[jboss-dev-forums] [Design of the JBoss EJB Container] - Re: jndi lookup during restart

bstansberry@jboss.com do-not-reply at jboss.com
Wed Aug 22 12:25:18 EDT 2007


"Jimmy Wilson" wrote : 
  | Just so there's no confusion, I built the branch Ben and you created, and used that AS (I didn't try to copy fixed JARs etc).  I also copied the client/jbossall-client.jar to the client (it is the only JAR the client uses besides log4j.jar).
  | 
  | So, I performed this test through the two scenarios listed below:
  | 
  | * Start 2 servers
  | * Start client that uses same proxy over and over
  | * Make a few requests
  | * Kill both servers
  | * Restart the second server
  | * Make more requests
  | 
  | Case #1: java.naming.provider.url specified as list
  | 
  | This now works as expected.
  | 
  | Case #2: java.naming.provider.url not specified (use discovery) 
  | 
  | I could not always get this to work seamlessly.  
  | 

Log info Jimmy provided:

2007-08-21 23:36:24,956 TRACE [org.jboss.proxy.ejb.RetryInterceptor] Begin reestablishInvokerProxy
  | 2007-08-21 23:36:24,956 TRACE [org.jboss.proxy.ejb.RetryInterceptor] Using retry properties from NamingContextFactory
  | 2007-08-21 23:36:25,057 TRACE [org.jboss.proxy.ejb.RetryInterceptor] Looking for invoker: Hello-RemoteInvoker
  | 2007-08-21 23:36:25,060 TRACE [org.jboss.ha.framework.interfaces.HARMIClient] Invoking on target=HARMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[lo2:1101](remote),objID:[253c198f:1148bd97a0d:-8000, 2]]]]
  | 2007-08-21 23:36:25,064 TRACE [org.jboss.ha.framework.interfaces.HARMIClient] Invoke failed, target=HARMIServerImpl_Stub[UnicastRef2 [liveRef: [endpoint:[lo2:1101](remote),objID:[253c198f:1148bd97a0d:-8000, 2]]]]
  | java.rmi.NoSuchObjectException: no such object in table
  | 	at sun.rmi.transport.StreamRemoteCall.exceptionReceivedFromServer(StreamRemoteCall.java:247)
  | 	at sun.rmi.transport.StreamRemoteCall.executeCall(StreamRemoteCall.java:223)
  | 	at sun.rmi.server.UnicastRef.invoke(UnicastRef.java:126)
  | 	at org.jboss.ha.framework.server.HARMIServerImpl_Stub.invoke(Unknown Source)
  | 	at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:172)
  | 	at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:267)
  | 	at $Proxy0.lookup(Unknown Source)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:664)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:624)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 	at org.jboss.proxy.ejb.RetryInterceptor.reestablishInvokerProxy(RetryInterceptor.java:247)
  | 	at org.jboss.proxy.ejb.RetryInterceptor.invoke(RetryInterceptor.java:185)
  | 	at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
  | 	at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
  | 	at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
  | 	at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
  | 	at $Proxy2.sayHello(Unknown Source)
  | 	at example.StdInClient.main(Unknown Source)
  | 2007-08-21 23:36:25,066 TRACE [org.jboss.proxy.ejb.RetryInterceptor] Retry attempt 1: Failed to lookup proxy
  | javax.naming.CommunicationException [Root exception is java.rmi.RemoteException: Service unavailable.]
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:777)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:624)
  | 	at javax.naming.InitialContext.lookup(InitialContext.java:351)
  | 	at org.jboss.proxy.ejb.RetryInterceptor.reestablishInvokerProxy(RetryInterceptor.java:247)
  | 	at org.jboss.proxy.ejb.RetryInterceptor.invoke(RetryInterceptor.java:185)
  | 	at org.jboss.proxy.TransactionInterceptor.invoke(TransactionInterceptor.java:61)
  | 	at org.jboss.proxy.SecurityInterceptor.invoke(SecurityInterceptor.java:70)
  | 	at org.jboss.proxy.ejb.StatelessSessionInterceptor.invoke(StatelessSessionInterceptor.java:112)
  | 	at org.jboss.proxy.ClientContainer.invoke(ClientContainer.java:100)
  | 	at $Proxy2.sayHello(Unknown Source)
  | 	at example.StdInClient.main(Unknown Source)
  | Caused by: java.rmi.RemoteException: Service unavailable.
  | 	at org.jboss.ha.framework.interfaces.HARMIClient.invokeRemote(HARMIClient.java:213)
  | 	at org.jboss.ha.framework.interfaces.HARMIClient.invoke(HARMIClient.java:267)
  | 	at $Proxy0.lookup(Unknown Source)
  | 	at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:672)
  | 	... 10 more

The final line of the stack trace shows the failure occured in the retry after flushing the cache.  I'm looking into this, but I'm pretty sure this issue revolves around the fact that NamingContext.removeServer(Hashtable serverEnv) only removes an entry if java.naming.provider.url is specified.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4076964#4076964

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4076964



More information about the jboss-dev-forums mailing list