Hi!

I have a POJO, used by a BMT Session Bean, where some blocks of the code needs 
to be executed in a transaction... 

The POJO has no handle to the calling Session Bean and its UserTransaction, so 
my question is: how should I do to obtain a proper UserTransaction?

Is it safe to use:

UserTransaction userTransaction = (UserTransaction) 
m_jndiContext.lookup("UserTransaction");

...considering the statement in the JBoss 4.0 Guide:

anonymous wrote : Note: For BMT beans, do not obtain the UserTransaction 
interface using a JNDI lookup. Doing this violates the EJB specification, and 
the returned UserTransaction object does not have the hooks the EJB container 
needs to make important checks.

I tried that as well but it seems to just messes it all up, the transactions 
seems not to be comitted properly and hangs for 10 mins...
 
I would be very greatful for any advice how to do this correctly in the 
EJB/JBoss world!!!

Thx,
Osten

View the original post : 
http://www.jboss.org/index.html?module=bb&op=viewtopic&p=3872550#3872550

Reply to the post : 
http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=3872550


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
_______________________________________________
JBoss-user mailing list
JBoss-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to