0
I'm通信与EJB的独立应用程序,如果持有EJB服务器未开启我收到这样一个COMM_FAILURE:无法赶上COMM_FAILURE异常(JAVA)
May 11, 2011 9:42:50 AM com.sun.enterprise.transaction.JavaEETransactionManagerSimplified initDelegates
INFO: Using com.sun.enterprise.transaction.jts.JavaEETransactionManagerJTSDelegate as the delegate
org.omg.CORBA.COMM_FAILURE: vmcid: SUN minor code: 201 completed: No
at com.sun.corba.ee.impl.logging.ORBUtilSystemException.connectFailure(ORBUtilSystemException.java:3431)
...
at com.sun.enterprise.naming.impl.SerialContext.lookup(SerialContext.java:430)
at javax.naming.InitialContext.lookup(InitialContext.java:392)
at app.comercio.system.RemoteBeans.lookupProducts(RemoteBeans.java:33)
at app.comercio.system.Controller.sendSpec(Controller.java:86)
at app.comercio.view.Main.sendSpec(Main.java:175)
at app.comercio.view.Main.main(Main.java:54)
我尝试在main上捕获这个异常,然后将它放在sendSpec,sendSpec和lookupProducts上,但是我不知道这是否有效,因为InitialContext.lookup只抛出NamingException。 有没有办法抓住这个异常?