[jboss-jira] [JBoss JIRA] (AS7-4253) TCCL used by EJBNamingContext is wrong when callstack passes through multiple OSGi modules

Stuart Douglas (JIRA) jira-events at lists.jboss.org
Mon Mar 26 03:59:47 EDT 2012


    [ https://issues.jboss.org/browse/AS7-4253?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12679166#comment-12679166 ] 

Stuart Douglas commented on AS7-4253:
-------------------------------------

If you lookup the ejb from java:global JNDI (rather than ejb: ) then it should work no matter what the current value for the TCCL is, as it has a fall back to the defining modules class loader. 

ejb: has no such fallback, as it is a client side only, and has no way of figuring out the correct class loader to use other than the TCCL. The only way I can think to work around this would be some way of passing the class loader to use into the initial context environment. e.g. 

Properties props = new Properties();
props.put("org.jboss.ejb.client.classloader", getClass().getClassLoader());
InitialContext ic = new InitialContext(props);

If this would be helpful then please file a feature request against the EJBCLIENT project.
                
> TCCL used by EJBNamingContext is wrong when callstack passes through multiple OSGi modules
> ------------------------------------------------------------------------------------------
>
>                 Key: AS7-4253
>                 URL: https://issues.jboss.org/browse/AS7-4253
>             Project: Application Server 7
>          Issue Type: Bug
>          Components: EJB, OSGi
>            Reporter: Thomas Diesler
>            Assignee: Thomas Diesler
>         Attachments: call-remote-ejb-with-cascaded-osgi-modules.zip, isolated-test-case.zip
>
>


--
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

        


More information about the jboss-jira mailing list