-
1. Re: [JBoss7] Remote EJB3 calls from spawned thread
jaikiran Jul 19, 2012 12:21 PM (in response to ndario)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.
-
2. Re: [JBoss7] Remote EJB3 calls from spawned thread
ndario Jul 20, 2012 5:54 AM (in response to jaikiran)Thanks Jaikiran,
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?
Thanks.
-
3. Re: [JBoss7] Remote EJB3 calls from spawned thread
jaikiran Jul 20, 2012 6:21 AM (in response to ndario)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.
-
4. Re: [JBoss7] Remote EJB3 calls from spawned thread
ndario Jul 20, 2012 7:21 AM (in response to jaikiran)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?
-
5. Re: [JBoss7] Remote EJB3 calls from spawned thread
olli24 Aug 24, 2012 2:57 AM (in response to jaikiran)Hi there.
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?
Thanks.
Update:
My problem is solved. See