一 安装JB7,Weblogic7,Mysql(安装过程略)。
假设安装路径如下:
c:\bea
c:\jbuilder7
c:\mysql
假设数据库名:testdb二 Weblogic7配置 · 进入c:\bea\weblogic700\server\bin目录,修改startWLS.cmd
找到set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\server\lib\weblogic_sp.jar;
%WL_HOME%\server\lib\weblogic.jar;%CLASSPATH%
在CLASSPATH最前面加上mm.mysql-2.0.14-bin.jar的全路经。· 打开[启动菜单]中的[BEA Weblogic platform 7.0]->[domain configuration wizard]
1.Select a template:选择WLS Domain,Name默认的mydomain (可修改)
2.Choose Server Type: 默认的是“Single Server”
3.Specify directory for "mydomain": 输入C:\bea\user_projects\
4.Configure Standalone/Administrative Server:
Server Name: 默认为myserver (可修改)
Server Listen Address: 本机ip地址 (单机使用时不填也可)
Server Listen Port: 默认7001
Server SSL Listen Port:默认7002
5.Create Administrator User: 输入管理使用的用户名和密码。
6.选择是否作为系统服务运行。
7.选择是否添加快捷方式到开始菜单中。
上述配置完成后单击[create]创建新的domain。创建成功后会在开始菜单中会出现(前面配置过程中如果没有选择该项则看不到)
[BEA Weblogic Platform 7.0]->[User projects]->[mydomain]->[Start Server]
选择[Start Server]· 启动浏览器输入:http://localhost:7001/console
输入管理使用的用户名和密码,即可进入管理控制台。
· 配置连接池(使用管理控制台)
选择Services->JDBC->Connection Pools,
单击右侧的Configure a new JDBC Connection Pool.
输入以下信息:
Configuration->General页:
Name = Mysql Connection Pool
URL = jdbc:mysql://localhost:3306/testdb
Driver classname = org.gjt.mm.mysql.Driver
Properties :
user= 数据库用户名
password= 密码
单击Create建立连接池。
选择Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,单击Apply。
· 配置数据源(使用管理控制台)
选择Services->JDBC->TX Data Sources,
单击右侧的Configure a new TX Data Sources,
输入以下信息:
Configuration->General页:
Name = Mysql TX Data Source (可修改)
JNDI Name = ejbPool 这个名字就是你以后要引用的DataSource名称
Pool Name = Mysql Connection Pool
选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled
单击Create建立数据源。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕 三 配置JBuilder7
· 确保系统环境变量种的TEMP和TMP 为不带空格的目录。(weblogic不支持空格)
· 启动Jbuilder7,选择Tools->Configure libraries->class->Add,
加入mm.mysql-2.0.14-bin.jar。
· 选择Tools->Configure Servers
选择Weblogic Application Server 6.x+,选中右边的Enable Server
Home Directory设为WebLogic7的Home Directory:如c:/bea/weblogic700/server。
server parameters不填。
· 将Custom->JDK Installation Directory设为 JDK的安装目录.
· 将Custom->BEA Home Directory设为WebLogic7的Home Director,如:c:/bea
· 将Custom->Domain Directory设为你的域目录,如:c:/bea/user_projects/mydomain
· 输入Weblogic中的User name, Password ,Domain name, Server name.
· 选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:
Name for this configuration = WelLogic
Path for ORB Tools = c:/bea/weblogic700/server
Library for Projects = WebLogic 6.x+ Deploy
IDL compiler command = idlj.exe
Commnad option for output directory = 随意目录
· 单击OK退出,重新启动JBuilder7配置生效。
假设安装路径如下:
c:\bea
c:\jbuilder7
c:\mysql
假设数据库名:testdb二 Weblogic7配置 · 进入c:\bea\weblogic700\server\bin目录,修改startWLS.cmd
找到set CLASSPATH=%JAVA_HOME%\lib\tools.jar;%WL_HOME%\server\lib\weblogic_sp.jar;
%WL_HOME%\server\lib\weblogic.jar;%CLASSPATH%
在CLASSPATH最前面加上mm.mysql-2.0.14-bin.jar的全路经。· 打开[启动菜单]中的[BEA Weblogic platform 7.0]->[domain configuration wizard]
1.Select a template:选择WLS Domain,Name默认的mydomain (可修改)
2.Choose Server Type: 默认的是“Single Server”
3.Specify directory for "mydomain": 输入C:\bea\user_projects\
4.Configure Standalone/Administrative Server:
Server Name: 默认为myserver (可修改)
Server Listen Address: 本机ip地址 (单机使用时不填也可)
Server Listen Port: 默认7001
Server SSL Listen Port:默认7002
5.Create Administrator User: 输入管理使用的用户名和密码。
6.选择是否作为系统服务运行。
7.选择是否添加快捷方式到开始菜单中。
上述配置完成后单击[create]创建新的domain。创建成功后会在开始菜单中会出现(前面配置过程中如果没有选择该项则看不到)
[BEA Weblogic Platform 7.0]->[User projects]->[mydomain]->[Start Server]
选择[Start Server]· 启动浏览器输入:http://localhost:7001/console
输入管理使用的用户名和密码,即可进入管理控制台。
· 配置连接池(使用管理控制台)
选择Services->JDBC->Connection Pools,
单击右侧的Configure a new JDBC Connection Pool.
输入以下信息:
Configuration->General页:
Name = Mysql Connection Pool
URL = jdbc:mysql://localhost:3306/testdb
Driver classname = org.gjt.mm.mysql.Driver
Properties :
user= 数据库用户名
password= 密码
单击Create建立连接池。
选择Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,单击Apply。
· 配置数据源(使用管理控制台)
选择Services->JDBC->TX Data Sources,
单击右侧的Configure a new TX Data Sources,
输入以下信息:
Configuration->General页:
Name = Mysql TX Data Source (可修改)
JNDI Name = ejbPool 这个名字就是你以后要引用的DataSource名称
Pool Name = Mysql Connection Pool
选中Emulate Two-Phase Commit for non-XA Driver和Row Prefetch Enabled
单击Create建立数据源。
Targets->Server页:
将myserver(服务器名称)移至右侧的列表中,但击单击Apply,配置完毕 三 配置JBuilder7
· 确保系统环境变量种的TEMP和TMP 为不带空格的目录。(weblogic不支持空格)
· 启动Jbuilder7,选择Tools->Configure libraries->class->Add,
加入mm.mysql-2.0.14-bin.jar。
· 选择Tools->Configure Servers
选择Weblogic Application Server 6.x+,选中右边的Enable Server
Home Directory设为WebLogic7的Home Directory:如c:/bea/weblogic700/server。
server parameters不填。
· 将Custom->JDK Installation Directory设为 JDK的安装目录.
· 将Custom->BEA Home Directory设为WebLogic7的Home Director,如:c:/bea
· 将Custom->Domain Directory设为你的域目录,如:c:/bea/user_projects/mydomain
· 输入Weblogic中的User name, Password ,Domain name, Server name.
· 选择:Tools->Enterprise Setup,单击CORBA页上的New, 按下表填写相应信息:
Name for this configuration = WelLogic
Path for ORB Tools = c:/bea/weblogic700/server
Library for Projects = WebLogic 6.x+ Deploy
IDL compiler command = idlj.exe
Commnad option for output directory = 随意目录
· 单击OK退出,重新启动JBuilder7配置生效。
解决方案 »
免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货