[
https://issues.jboss.org/browse/AS7-3830?page=com.atlassian.jira.plugin.s...
]
jaikiran pai commented on AS7-3830:
-----------------------------------
The issue here is that the stateful bean lookup is triggered in a TCCL which _doesn't_
point to the deployment's classloader. For obvious reasons, the generic lookup code in
remote-naming project will have no knowledge of the correct deployment's classloader.
Because of the incorrect TCCL, the EJB client context selector which is a TCCL based
selector can't find the EJB client context for creating a SFSB session. This issue
doesn't show up in stateless and singleton beans because a lookup doesn't require
a EJB client context for those beans whereas the stateful bean needs a context for session
creation.
I believe the fix should be done in the getReference method of the
RemoteViewManagedReferenceFactory to set the TCCL to point to the view class'
classloader before trying to create a session for stateful beans. I'll have to take a
look at this tomorrow.
Remote JNDI call does not bind stateful beans
---------------------------------------------
Key: AS7-3830
URL:
https://issues.jboss.org/browse/AS7-3830
Project: Application Server 7
Issue Type: Bug
Components: EJB
Affects Versions: 7.1.0.Final
Reporter: Ondřej Chaloupka
Assignee: jaikiran pai
Fix For: 7.1.1.Final
It seems that current ejb remote client is not able to find stateful bean. Exception is
thrown instead:
{code}
javax.naming.NamingException: java.lang.IllegalStateException: No EJB client context is
available [Root exception is java.lang.RuntimeException: java.lang.IllegalStateException:
No EJB client context is available]
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:135)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:74)
at org.jboss.as.naming.NamingContext.lookup(NamingContext.java:177)
at
org.jboss.naming.remote.protocol.v1.Protocol$1.handleServerMessage(Protocol.java:124)
at
org.jboss.naming.remote.protocol.v1.RemoteNamingServerV1$MessageReciever$1.run(RemoteNamingServerV1.java:70)
at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
at java.lang.Thread.run(Thread.java:662)
Caused by: java.lang.RuntimeException: java.lang.IllegalStateException: No EJB client
context is available
at
org.jboss.as.ejb3.remote.RemoteViewManagedReferenceFactory.getReference(RemoteViewManagedReferenceFactory.java:91)
at org.jboss.as.naming.ServiceBasedNamingStore.lookup(ServiceBasedNamingStore.java:133)
... 7 more
Caused by: java.lang.IllegalStateException: No EJB client context is available
at org.jboss.ejb.client.EJBClientContext.requireCurrent(EJBClientContext.java:233)
at org.jboss.ejb.client.EJBClient.createSession(EJBClient.java:160)
at
org.jboss.as.ejb3.remote.RemoteViewManagedReferenceFactory.getReference(RemoteViewManagedReferenceFactory.java:89)
... 8 more
{code}
Please, check my test whether definition of remote context does not contain a mistake.
But finding singleton and stateless beans works fine.
https://github.com/ochaloup/jboss-as/blob/ejb-remote-call/testsuite/integ...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://issues.jboss.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see:
http://www.atlassian.com/software/jira