aspose file tools
The moose likes EJB and other Java EE Technologies and the fly likes JTA and Container managed transactions Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Reply Bookmark "JTA and Container managed transactions" Watch "JTA and Container managed transactions" New topic
Author

JTA and Container managed transactions

Srinivas Ramgopal
Ranch Hand

Joined: Aug 06, 2006
Posts: 63
Hi all,

In weblogic, there is one stateless session bean (SLSB) as facade to an application that has POJOs.
I do not want to set any transaction settings on the SLSB, instead I want to use Spring declarative transaction setting on one of the POJOs (There are 5 pojos used in a workflow and I want to declare transaction settings at 4th pojo only).

I have few basic questions about EJB and JTA in java 5:

1) I want to use container managed bean (CMT) only, for the above SLSB, is it possible because I do not want to set any transaction at this level?

2) What is the default transaction setting for a CMP in weblogic?

3) If I extend this above scenario to use JTA( hitting 2 databases in a single transaction), can I still use CMP in weblogic?

4) In case a single transaction that hits more than one database, can declarative transaction management along with
javax.transaction.Transaction be used?

If so, how is it different from javax.transaction.xa?

Can you give an example of code.

6) Is the transaction processing different for Message driven beans in distributed and local transactions?

5) Are there any good books to understand JTA usuage in EJB world?



Thanks in advance for your valuable time and interest.
Jaikiran Pai
Marshal

Joined: Jul 20, 2005
Posts: 8142
    
  52


1) I want to use container managed bean (CMT) only, for the above SLSB, is it possible because I do not want to set any transaction at this level?


Yes its possible. You can set the transaction attribute to NOTSUPPORTED. For more options, have a look at: CMT attributes

2) What is the default transaction setting for a CMP in weblogic?


Not sure. AFAIK, the spec does not mention what the default transaction attribute should be. You will have to check the Weblogic docs for this.


4) In case a single transaction that hits more than one database, can declarative transaction management along with
javax.transaction.Transaction be used?

If so, how is it different from javax.transaction.xa?


You can still use declarative transaction management but the resources that will be part of this transaction will have to be a XA resource. This thread on the serverside.com has a good explanation about XA and non-XA resource(see the post by Mike Spille)

6) Is the transaction processing different for Message driven beans in distributed and local transactions?


Not sure, i understood the question right.


[My Blog] [JavaRanch Journal]
 
I agree. Here's the link: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: JTA and Container managed transactions
 
Similar Threads
Mock Exam Questions
Local transactions in application servers.
weblogic 9.2 support for Spring's non-jta/local transactions
EJB rookie questions
My SCEA Part 1Study Notes