dcsimg
How do we control the transactions fromthe client side?
2 posts in topic
Flat View  Flat View
TOPIC ACTIONS:
 

Posted By:   Vikas_Nijhawan
Posted On:   Saturday, October 27, 2001 08:25 AM

How do we control the transactions fromthe client side?
As explained in Oreily I use following code.
Context con = new InitialContext()
javax.transaction.UserTransaction tran = (javax.transaction.UserTransaction)con.lookup("javax.transaction.UserTransaction");

But it gives an exception at runtime that JNDI NAME "javax.transaction.UserTransaction" not found.What settings are required for that?

Re: How do we control the transactions fromthe client side?

Posted By:   Michael_Lueders  
Posted On:   Sunday, October 28, 2001 01:22 AM

are you using the same app server as in the Oreily book? since (it sounds like) your client is external to the container, there's no standard way to access the transaction manager (per section 24.2.4 of the 2.0 spec, the UserTransaction is only gauranteed available, via the 'java:comp/UserTransaction' key, to bmp beans within an ejb container). however, app servers will generally publish a transaction manager in jndi for use by external clients. check your app server documentation for the client UserTransaction (or transaction manager) key, then point the initial context to the app server's jndi directory and look it up.

Re: How do we control the transactions fromthe client side?

Posted By:   Bozidar_Dangubic  
Posted On:   Saturday, October 27, 2001 10:03 AM

try con.lookup("java:comp/UserTransaction");
About | Sitemap | Contact