> > Should setRollbackOnly on an MDB with NotSupported simply be ignored rather
> > than throwing an exception?
> >
> > If not, then an MDB would have to be written to handle exceptions for these
> > cases when it is configured to be Requires or NotSupported... which seems
> > like a bad idea.
>
> I am inclined to agree, and maybe I have intepreted the spec wrong. The
> behaviour now is from section 15.15.1 (at least in the spec I read now),
> where it is said that it has to throw IllegalState if these methods are
> invoked under BMT or when bean is "not associated with a transaction" or
> does not have a "meaningfull transaction context".
>
> Question is: is it possible to inteprete NotSupported as a "meaningfull
> transactional context"
Can you think of any reason why an MDB would want an exception to be thrown?
It would be better if these returned booleans for success. It would also be
better if java.io.File.delete() threw an exception instead of a boolean.
* * *
I can't figure out how to make xpdf copy text... don't have acrobat
installed here (too lazy to install it now too)
"""
setRollbackOnly() getRollbackOnly() are only to be used with CMT.
...
The container _must_ throw the java.lang.Illegal* if the methods are
invoked while the instance is not associated with a tx.
"""
So, the spec says it should. I still think it makes no sence. Lets add a
flag to jboss.xml which will enable the intelegent mode (not throwing) or
leave compatiblity enabled.
In fact we might want to add this to all jboss components, similar to a
table of options.
<jboss>
<options>
<option name="mdb.cmt.txmethods.relaxed">true</option>
</options>
...
</jboss>
We could even add a bit of framework around this to allow component to
inspect these options. Something like this would allow us to provide
advanced features to users and still retain execlent compatiblity.
...
time heals _all_ wounds.
--jason
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development