用jboss3.0+tomcat4.03釋出EJB,InitialContext環境如何設定

cathy發表於2002-11-05
我在建立好EntityBean以後,釋出都透過,但是用以下的client呼叫此EJB時會拋錯:
ActionInfoHome home = null;
Context ctx = new InitialContext();
try{
home = (ActionInfoHome)ctx.lookup("ActionInfo") ;
} catch (javax.naming.NamingException nx) {
throw new RuntimeException("Failed to get ActionInfoHome: caught " + nx);
}

javax.naming.NoInitialContextException;(因為找不到預設的java.naming.factory.initial

請問在Jboss3.0+tomcat4環境下InitialContext()的環境該怎麼設?

相關文章