File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Architect Certification (SCEA/OCMJEA) and the fly likes question about transaction attribute Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Architect Certification (SCEA/OCMJEA)
Bookmark "question about transaction attribute " Watch "question about transaction attribute " New topic

question about transaction attribute

Timber Lee
Ranch Hand

Joined: Oct 14, 2002
Posts: 157
You have a method that cannot be executed in a transaction. What is the correct attribute in the deployment descriptor?
1.not supportted
ans. is 2, but I think 1 is not bad.
please clear my question if wrong. thanks in advance

Ranch Hand

Joined: Dec 05, 2004
Posts: 48
I think NOTSupported is the most suitable one in that case. Since the wording is not suggesting MUST NOT.

Please let me know.

Thanks,<br />Bhanu<br />SCEA Step-I<br />SCBCD for J2EE 1.3<br />SCJP1.4
Santiago Urrizola
Ranch Hand

Joined: Apr 27, 2006
Posts: 172
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.

Santiago Urrizola : La Plata - Argentina<br />SCEA (89%-92%)<br /><a href="" target="_blank" rel="nofollow"></a>
I agree. Here's the link:
subject: question about transaction attribute
It's not a secret anymore!