In that other thread, are you doing the lookup again and then invoking or are you just invoking on that bean proxy that you previously obtained?
Looking up and invoking in that other thread should work.
quite right, if I lookup and invoke in the thread, it works.
BUT, I also have to create a 'new InitialContext', and make lookup on it. So for every remote call I have to go through all "createContext-lookup-remoteCall-close" procedure? Is it possible to make authentication cacheing on client?
What would be the best practice for secured remote calls?
In this specific case, there should be no reason why the proxy shouldn't be usable in a separate thread. The reason I asked you to try the lookup + invoke in a separate thread is because after looking at the remote-naming project code, I saw a potential bug which you have now confirmed. We'll need to fix that.
By the way, have you read this article which explains what approach to use for remote EJB lookups against AS7 https://docs.jboss.org/author/display/AS71/Remote+EJB+invocations+via+JNDI+-+EJB+client+API+or+remote-naming+project? remote-naming approach isn't the recommended one.
I did read "Remote EJB invocations via JNDI - EJB client API or remote-naming project", couple of times actually , and I was sure I am using "EJB client" API and not remote-naming. Is it not the case?
I believed that ejb:/ naming scheme is for EJB clients, I followed lookupRemoteStatelessCalculator() example. Am I missing something?
We are migrating from JBoss5 to JBoss7 and faced the same problem.
Calling an EJB method from a different Thread context, causing a java.lang.IllegalStateException: No EJB receiver available for node name
Under JBoss5 this has been working.
Can someone confirm that this issue is bug of JBoss7.1.1 which will be fixed?
So far I didn’t find anything in the Issue Tracker about this problem.
Or are there any InitialContext properties availble to allow this?
My problem is solved. See