图3 配置Server界面2
2.选择Tools->Enterprise Setup,单击CORBA面板上的New,弹出如图4所示的窗口。配置如下:在Name for this configuration里填写WelLogic 7.0、在Path for ORB Tools里填写h:/bea/weblogic700/server、在Library for projects里选择WebLogic 6.x Deploy、在IDL compiler command里填写idlj.exe,在Commnad option for output directory里填写任意一个目录,比如:h:\temp,单击OK退出。
图4 设置CORBA界面
3.选择Project->Default Project properties,然后选择Server标签,在Single services for all service in project下拉列表中选择WebLogic Application Server 6.x ,单击OK退出,配置完毕。这里有两个选项Single services for all service in project和Modular Services provided by different servers,第一个表示在项目里用一个服务,后面的表示在项目里用不同的服务,比如JSP和Servlet可以用Tomcat的,而ELB是用Weblogic的。这里选择在项目里用一个服务。
在配置好的环境下开发一个Session Beans
1. 创建一个项目。选择File—>New,然后选择Project面板下的 Project项,在Name中填入TestSes,在Directory里填写项目要放的位置,其它的默认,单击Finish。
2. 创建一个Session Bean模块。选择File—>New,然后选择Enterprise面板下的EJB Module,选择OK。在出现的窗口后,在Name里填写TestSesMod,在Version里选择EJB 2.0 compliant。
图10 运行客户端测试程序界面
常见错误解答
1.WebLogic Server cannot start: config.xml not found。
(1)错误代码描述:
C:\bea\user_projects\.\config.xml not found
Since no config.xml was found, the fileRealm.properties file will not be used.
Would you like the server to create a default configuration and boot? (y/n):
(2)问题发生时机:
在JBuilder上运行Weblogic Server时,在Weblogic 6.x http:7001页上。
(3)产生原因:
Weblogic域目录没有正确设置。
(4)解决方法:
选择Tools——>Configure Servers,左边选择Weblogic Server 6.x ,右边选择Custom标签,同时检查域目录是否正确。如:h:\bea\user_projects\mydomain。
2.Authentication for user denied。
(1)错误代码描述: