Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

TransactionSynchronizationRegistry lookup

 
Melquiades Fagundez
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

When I lookup TransactionSynchronizationRegistry using the following code:

try {
Context ctx = new InitialContext(props);
transactionRegistry = (TransactionSynchronizationRegistry) ctx.lookup("java:TransactionSynchronizationRegistry");
} catch (Exception e) { .. }

I am getting the following exception

Caused by: javax.naming.NamingException: Could not dereference object [Root exception is java.lang.ClassCastException: com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple cannot be cast to javax.naming.spi.ObjectFactory]
at org.jnp.interfaces.NamingContext.getObjectInstanceWrapFailure(NamingContext.java:1508) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:824) [:5.0.5.Final]
at org.jnp.interfaces.NamingContext.lookup(NamingContext.java:688) [:5.0.5.Final]
at javax.naming.InitialContext.lookup(InitialContext.java:392) [:1.6.0_21]
.....

As long as I understand the lookup "succeeds" and it finds object of type com.arjuna.ats.internal.jta.transaction.arjunacore.TransactionSynchronizationRegistryImple but this object cannot be cast to expected type.

Can anybody help me??

Thanks in advance,
Melquiades

 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic