0 Replies Latest reply on May 25, 2012 10:50 AM by jkreska

    How do I cleanup a remote JNDI client invocation after server has been restarted

    jkreska Newbie

      I have a remote EJB client that obtains the bean via JNDI.

       

      If I stop and restart the server, the next invocation throws an exception ( EJBCLIENT000025: No EJB receiver available for handling [appName:t...)

      If I catch that exception and try to re-obtain the reference from JNDI I the context.lookup call throws a NotOpenException

       

      2012-05-25 10:37:18,531 ERROR [RemotingConnectionEJBReceiver] Failed to open channel for context EJBReceiverContext{clientContext=org.jboss.ejb.client.EJBClientCont
      ext@47a55958, receiver=Remoting connection EJB receiver [connection=Remoting connection <266fd79f>,channel=jboss.ejb,nodename=jb7-3]}
      org.jboss.remoting3.NotOpenException: Cannot open new channel because close was initiated
              at org.jboss.remoting3.remote.RemoteConnectionHandler.handleOutboundChannelOpen(RemoteConnectionHandler.java:181)
              at org.jboss.remoting3.remote.RemoteConnectionHandler.open(RemoteConnectionHandler.java:307)
              at org.jboss.remoting3.ConnectionImpl.openChannel(ConnectionImpl.java:75)
              at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.associate(RemotingConnectionEJBReceiver.java:127)
              at org.jboss.ejb.client.EJBClientContext.registerEJBReceiver(EJBClientContext.java:297)
              at org.jboss.ejb.client.EJBClientContext.registerEJBReceiver(EJBClientContext.java:252)
              at org.jboss.ejb.client.EJBClientContext.registerConnection(EJBClientContext.java:342)
              at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getContext(RemoteNamingEjbClientContextSelector.java:60)
              at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getCurrent(RemoteNamingEjbClientContextSelector.java:46)
              at org.jboss.naming.remote.client.ejb.RemoteNamingEjbClientContextSelector.getCurrent(RemoteNamingEjbClientContextSelector.java:15)
              at org.jboss.ejb.client.EJBClientContext.getCurrent(EJBClientContext.java:223)
              at org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:233)
              at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:120)
              at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)