• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Liutauras Vilda
  • Ron McLeod
Sheriffs:
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
Saloon Keepers:
  • Scott Selikoff
  • Tim Holloway
  • Piet Souris
  • Mikalai Zaikin
  • Frits Walraven
Bartenders:
  • Stephan van Hulst
  • Carey Brown

JTA and Container managed transactions

 
Ranch Hand
Posts: 63
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
Sheriff
Posts: 10445
227
IntelliJ IDE Ubuntu
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator


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.
 
Politics n. Poly "many" + ticks "blood sucking insects". Tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic