Win a copy of Head First Android this week in the Android forum!
  • 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

Transaction Context

 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
hi
I am too confused abt what methods run in
Callers Transaction context
Unspecified transaction context
and no transaction context

Can someone help me by listing them ?
Thanks for your help in advance
 
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Originally posted by Anand

I am too confused abt what methods run in
Callers Transaction context
Unspecified transaction context
and no transaction context

Hi Anand,
Let's break your question down, to get a clear picture of the situation.
First a transaction is unit of say work, either all successed or all fails. The same is true, if any of the work fails. There isn't 30%,80% or 99%, like
we do get from all this exams. It is either you get 100% 0r you go back and pay more bucks to those guys at Sun. So hope you got that.There is <tran-attribute> used to specify transaction type in the DD (only for CMT).

Unspecified transaction context: This is a bit complex, even the spec say so, it simply mean the container can handle the transaction, in an undefined
manner. To you, it's like i don't know, but the container can choose to
handle it whichever it chooses. Ok let's hit some examples.
Let's use three methods, say A,B,C.

For BMT.

methodA() { // this is the caller method.
tx = context.getUserTransaction();
tx.begin(); // transaction starts
methodB(); // Called method it's part of the transaction
tx.commit(); // transaction commit ie end
methodC(); // methodC is called without transaction context
// not part of the transaction
For CMT, it's on method bases depending on the attriute in the DD.
Wao, hope it's help
 
MI Mohammed
Ranch Hand
Posts: 146
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Originally posted by Anand

I am too confused abt what methods run in
Callers Transaction context
Unspecified transaction context
and no transaction context

Hi Anand,
Let's break your question down, to get a clear picture of the situation.
First a transaction is unit of say work, either all successed or all fails. The same is true, if any of the work fails. There isn't 30%,80% or 99%, like
we do get from all this exams. It is either you get 100% 0r you go back and pay more bucks to those guys at Sun. So hope you got that.There is <tran-attribute> used to specify transaction type in the DD (only for CMT).

Unspecified transaction context: This is a bit complex, even the spec say so, it simply mean the container can handle the transaction, in an undefined
manner. To you, it's like i don't know, but the container can choose to
handle it whichever it chooses. Ok let's hit some examples.
Let's use three methods, say A,B,C.

For BMT.

methodA() { // this is the caller method.
tx = context.getUserTransaction();
tx.begin(); // transaction starts
methodB(); // Called method it's part of the transaction
tx.commit(); // transaction commit ie end
methodC(); // methodC is called without transaction context
// not part of the transaction
For CMT, it's on method bases depending on the attriute in the DD.
Wao, hope it helped
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic