2. Step by step, 安装完毕后,我们要配置自己的domain,点击"开始/程序/BEA WebLogic Platform8.1/ Configuration Wizard"(图一),选择"Create a new Weblogic configuration", "NextàBasic Weblogic Server DomainàNextàEXPressàNext" 输入"Name*,PassWord*,Description"(图二) 接着Nextà右下角修改"Configuration Name: à Create"(图三) 一直到进度条为100%时 Done完成。
CREATE USER "TEST" PROFILE "DEFAULT" IDENTIFIED BY "TEST" ; DEFAULT ; TABLESPACE "TEST" ACCOUNT UNLOCK;
5.授予其三个权限:UNLIMITED TABLESPACE,CONNECT,RESOURCE;
GRANT UNLIMITED TABLESPACE, CONNECT, RESOURCE TO "TEST";
6.使用"TEST"用户登录;
CONNECT TEST/TEST;
正常显示"已连接",Okay。
(三). 创建示例数据库
1.建表;
CREATE TABLE count (num1 NUMBER(4,2), num2 NUMBER(5,2), result NUMBER(6,2));
2.插入数据;
INSERT INTO count(num1,num2,result) VALUES(1,1,2); INSERT INTO count(num1,num2,result) VALUES(1,1,1); INSERT INTO count(num1,num2,result) VALUES(2,8,10); INSERT INTO count(num1,num2,result) VALUES(68,90,158);
图七 接下来到"Custom"子页,"BEA home directory:"设为d:/ bea ;" JDK installation directory:"设为d:/bea/jdk141_02 ,"Domain directory:"设为d:/bea/user_projects/mydomain,在"User name:","Possowrd:"中填入安装WebLogic时的用户名和密码,将"Listen address:"改为"localhost",不选"Add an Admin Console item to the tools menu"和"Add a Configuration Wizard item to the tools menu",完成后点击"OK"。
图八
接下来在菜单栏点击"Project/Default Project Properties…"à弹出"Default Project Properties"窗口,在"Server" 子页中选中"Single server for all services in project",然后在其下面的下拉框中选择"Weblogic Application Server 8.x",点击"OK"确定。
点击Continue继续,进入Test database connection页面,点击Test Driver Configuration,进入Create an deploy页面,假如你看到的是绿色Connection successful字样,说明配置成功,点击Create an deploy建立oraclePool连接池。
接下来我们配置数据源testTxDataSource,单击控制台左侧域树的JDBC/ Data Source节点,然后单击右侧的Configure a new JDBC Tx Data Source,进入Configure the data source选项卡。