JBoss Community

java:comp/ vs java/

created by iconnj in JNDI and Naming - View the full discussion

I am trying to lookup TransactionSynchronizationRegistry using JNDI from a pojo. When I try

 

new InitialContext().lookup(java:TransactionSynchronizationRegistry) the lookup is successful

 

however

 

new InitialContext().lookup(java:comp/TransactionSynchronizationRegistry) doesn't work

 

The javaDoc for TransactionSynchronizationRegistry specifically says that the standard jndi name should be java:comp/TransactionSynchronizationRegistry.

 

I am trying to build a standard solution which works on all major app servers and the standard jndi name works on Websphere and Weblogic, but just not on JBOSS.

 

Has anyone come around similar issues before and how about would you go to resolve this?

 

Thanks

Reply to this message by going to Community

Start a new discussion in JNDI and Naming at Community