怎样在公共类中调用ejb?

bh_cool 03-05-08

项目中有个公用类pubs.jar,它实现了项目所需的所有公用方法,但现在为了让某些方法涉及到数据库,所以将以前的jdbc操作改为调用ejb,我的公用类放在C:\bea\weblogic700\server\lib下,在startWebLogic.cmd中设置classpath

如下:set CLASSPATH=%WL_HOME%\server\lib\pubs.jar;%WL_HOME%\server\lib\weblogic.jar;%CLASSPATH%

如果在公用类pubs.jar中调用ejb(我的ejb包为info.jar),则必须将info.jar拷贝到C:\bea\weblogic700\server\lib下
同时指定classpath,如下所示:
set CLASSPATH=%WL_HOME%\server\lib\pubs.jar;%WL_HOME%\server\lib\info.jar;%WL_HOME%\server\lib\weblogic.jar;%CLASSPATH%
这样外部jsp程序调用公用类的方法能正常使用相应的功能,控制台也不会抛任何错,但今天我偶然发现在log文件中有这样的错误
.........
2003-5-5 下午04时36分18秒 Info Deployer preparing application _appsdir_khsb_jar on myserver


2003-5-5 下午04时36分18秒 Info EJB EJB Deploying file: khsb.jar


2003-5-5 下午04时36分20秒 Info Deployer prepared application _appsdir_khsb_jar on myserver


2003-5-5 下午04时36分20秒 Info Deployer preparing application _appsdir_Cast_jar on myserver
2003-5-5 下午04时36分20秒 Info EJB EJB Deploying file: Cast.jar


2003-5-5 下午04时36分20秒 Info Deployer prepared application _appsdir_Cast_jar on myserver


2003-5-5 下午04时36分20秒 Info Deployer preparing application _appsdir_info_jar on myserver


2003-5-5 下午04时36分20秒 Info EJB EJB Deploying file: info.jar


2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: XmlbmxControl cannot be redeployed

while the
server is running. com.yxxx.bzxm.XmlbmxControlBean is locat
ed in the server's classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: XmlbmxControl cannot be redeployed

while the
server is running. com.yxxx.bzxm.XmlbmxControlHome is locat
ed in the server's classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: XmlbmxControl cannot be redeployed

while the
server is running. com.yxxx.bzxm.XmlbmxControl is located i
n the server's classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: Xmlbmx cannot be redeployed while the

server
is running. com.basic.bzxm.XmlbmxBean is located in the ser
ver's classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: Xmlbmx cannot be redeployed while the

server
is running. com.basic.bzxm.XmlbmxHome is located in the ser
ver's classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: Xmlbmx cannot be redeployed while the

server
is running. com.basic.bzxm.Xmlbmx is located in the server'
s classpath.

2003-5-5 下午04时36分20秒 Warning EJB EJB Deployment: Xmlbmx cannot be redeployed while the

server
is running. com.basic.bzxm.XmlbmxPK is located in the serve
r's classpath.

当然我的ejb包还在其它两个目录下存在:C:\bea\user_domains\mydomain\applications下和

C:\bea\user_domains\mydomain\applications\DefaultWebApp\WEB-INF\lib下

请问我怎么解决以上问题,虽然程序不报错,但日志中的错总是要解决的,所以望高手指点:怎样在公共类中调用ejb
谢谢