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。 有沒有辦法抓住這個異常?