Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about transaction attribute

 
Timber Lee
Ranch Hand
Posts: 157
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You have a method that cannot be executed in a transaction. What is the correct attribute in the deployment descriptor?
1.not supportted
2.never
ans. is 2, but I think 1 is not bad.
please clear my question if wrong. thanks in advance
 
Bhanu
Ranch Hand
Posts: 48
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I think NOTSupported is the most suitable one in that case. Since the wording is not suggesting MUST NOT.

Please let me know.
 
Santiago Urrizola
Ranch Hand
Posts: 172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
i agree,
- no suported suspends the actual trasaction (if exists) but always execute the method.
- Never mens containers throw a RemoteException if the method excecutes inside a transactional context

So if you want the methods always execute outside a transaction, not superted is your choice
if you want the methos never execute inside a transaction and throw an exception if you try to excecute inside one ... never is your choice.

This is an interpretation problem, " cannot be executed in a transaction" .. i asume a method must exceute always outside the transactions boundaries.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic