• Post Reply Bookmark Topic Watch Topic
  • New Topic

EJB 2 : Query in understanding Transaction Attribute NotSupported  RSS feed

 
Ravi Kiran Va
Ranch Hand
Posts: 2234
Eclipse IDE Firefox Browser Redhat
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
NotSupported

The Container invokes an enterprise Bean method whose transaction attribute is set to NotSupported with an unspecified transaction context.

I am having a query in understanding the above thing .Please let me know what does above mean and also what transaction context mean in the below :

If a client calls with a transaction context, the container SUSPENDS the association of the transaction context with the current thread before invoking the enterprise bean's business method.

Thanks in advance .





 
Ram Narayan.M
Ranch Hand
Posts: 247
Chrome Eclipse IDE Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Transaction context is nothing but the meaningful transaction... A group of methods can be executed in one transaction... If any method fails, the whole transaction can be rolled back i.e., undo the activities done by previous methods...

For e.g.,

M1 M2 M3 ... There are three methods...

Suppose M1 and M2 method execution is successful and M3 method call comes under the same transaction chain... If M3 fails, the activities done by M1 and M2 can be rolled back since these three method issue-less execution is considered as successful...

If it was called under no transaction context, previous methods action cannot be undone...

Thats the great advantage of transaction context...

And NotSupported attribute refuses to run under transaction context... that is,

M1 is called under "Transaction Context" and M2 is marked as "NotSupported"... At that time, same transaction context is not carried over to M2 and M2 run under no transaction context... Actions performed by M2 cannot be undone.. Since its out of transaction context
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!