Hi,

Nested transactions (as ISO, X/Open and OTS
define them) would not help in your scenario
since the inner transaction would also be
rolled back when the main transaction is rolled
back. This despite the fact that the inner
transaction was committed.

For your scenario, I would try to use a
resource that does not participate in
transactions.
Plain old non-XA JDBC connections are an
example of this.
Try setting up a non-XA resource by using
the org.jboss.jdbc.DataSourceLoader instead
of the org.jboss.jdbc.XADataSourceLoader.
Then use that data source for your
outside-of-transaction work.

Best Regards,

Ole Husgaard.


Tilmann Ludwig wrote:
> 
> I'm trying to implement a nested transaction with jboss2.0 (FINAL).
> I need it, although the ejb specs says that this is not possible.
> The scenario is:
> 
> One long runnig method is trying to update the database in several steps.
> One of this steps is failing. In this case, there should be an message in
> the database in
> a protocol table. This message must be created, although the rest of the
> tranaction is rolled back.
> I can't wait with this message till the end of the businnes logic, because
> there might be a lot of messages.
> 
> Is it possible to implement such a scenario?
> I tried to simpy start a new transaction with bean manged tranaction,
> but this caused an exception (like the specs says). I tried to use the first
> bean with bean managed transaction and
>  a second bean with container managed transaction. In the second bean, there
> is a method with tranaction attribute "requires new" which should start a
> new transaction and commit this transaction, after the method is finished.
> But i only got the result of the first bean, although no exception occured.
> 
> Any help is appreciated
> 
> Tilmann
> 
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]


--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to