About Question enthuware.oce-ejbd.v6.2.611 :

Moderator: admin

Post Reply
aazizi.tarik
Posts: 31
Joined: Sun Dec 27, 2015 1:47 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.611 :

Post by aazizi.tarik »

Wow! clearly specified int he specs, thx Paul!

henrid
Posts: 31
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.611 :

Post by henrid »

Interesting question. So this looks like having nested or overlapping transactions, but of course not active at the same time. Let me take the question a bit further, from what I learned in JPA. If the client is a servlet or other non-EJB, the client's transaction is not suspended, but propagated, even with BMT in the called bean, right? So in this case, all you may have is one BMT transaction from the client? And the callee may even be a stateless bean (if state is not important)? Never mind if this is not okay, but I am just curious.

admin
Site Admin
Posts: 10057
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.611 :

Post by admin »

It can't be a stateless bean because as per section 13.3.3 - "Enterprise Beans Using Bean-Managed Transaction Demarcation", "A stateless session bean must either commit or rollback a transaction before it returns. "
Since the problem statement requires that both the methods will be called by the client in the same transaction scope, the bean method cannot commit the transaction.
If you like our products and services, please help us by posting your review here.

henrid
Posts: 31
Joined: Sun Oct 13, 2013 1:20 pm
Contact:

Re: About Question enthuware.oce-ejbd.v6.2.611 :

Post by henrid »

I was talking about a propagated transaction from a non-EJB into an BMT bean, in case when transaction was started before the bean. But never mind.

Post Reply

Who is online

Users browsing this forum: No registered users and 37 guests