aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes EJB transaction Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "EJB transaction " Watch "EJB transaction " New topic
Author

EJB transaction

happy cheng
Greenhorn

Joined: Jul 01, 2008
Posts: 2
in the servlet there is following method:

ejbRequiredCall() is an ejb call that specify transaction as Required, which run some db transaction.
my question is, for the looping part, every ejbRequiredCall will be a separated transaction, right? or it will fall into one transaction. Thanks.
Amit M Tank
Ranch Hand

Joined: Mar 28, 2004
Posts: 257
You transaction starts when the EJB method is started. So each call to the EJB method will be in a diff transaction.

Thanks,


Amit Tank
Linked In
Scott Selikoff
Saloon Keeper

Joined: Oct 23, 2005
Posts: 3697
    
    5

"Happy cheng"

Please review The JavaRanch naming policies, as your name appears to be clearly fictitious.

To your question, what exactly is ejbRequiredCall? Also, I'm not sure why you're starting threads in J2EE or EJB, its considered a bad practice to be doing any kind of thread management in such an environment (thats what the server is for).

To Amit, why would each call to an ejb create a transaction? It all depends how the EJB transaction attributes are configured for the ejb. Maybe there's part of this question I'm missing.


My Blog: Down Home Country Coding with Scott Selikoff
happy cheng
Greenhorn

Joined: Jul 01, 2008
Posts: 2
Thanks, Amit. That's what I thought but need confirm.
To Scott,
1. my name was taken by others, it seems this forum forbid two people use same name , so what's better the sounded real fake name and my current one.
2. ejbRequiredCall is an ejb call which defined as transaction 'Required'
thanks.
 
jQuery in Action, 2nd edition
 
subject: EJB transaction
 
Similar Threads
Annonymous Inner class problem
K&B Chapter 8: Inner Classes - Self Test
is Runnable an interface or a class?
What are flat transactions?
How setDaemon works