Win a copy of Practical SVG this week in the HTML/CSS/JavaScript 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

 
it's a teeny, tiny, wafer thin ad:
the new thread boost feature: great for the advertiser and smooth for the coderanch user
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!