Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

Is it possible for a stateless session bean to employ a JTA UserTransaction object?

0
Posted

Is it possible for a stateless session bean to employ a JTA UserTransaction object?

0

Location: http://www.jguru.com/faq/view.jsp?EID=2580 Created: Dec 14, 1999 Modified: 2000-08-03 22:06:23.29 Author: Jerry Smith (http://www.jguru.com/guru/viewbio.jsp?EID=9) Yes, but with restrictions. By definition, a stateless session bean has no state; hence, each method invocation must be independent. (The bean can be “swapped out” between method invocations.) Thus, a stateless session bean can obtain a UserTransaction object via the EJBContext using the getUserTransaction() method, but it must start and finish each transaction within the scope of a method invocation.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123