On 2002.03.22 16:51:47 -0500 Dain Sundstrom wrote:
> marc fleury wrote:
> 
> > OK what you want to do is have the initialization of the Bean in the
> CMP
> > engine (the deploy) CHECK for the presence of a transaction.  SO if the
> > deployment is transactional (as done with a Required in MEJB) then you
> need
> > to check for that transaction and only start if not present.
> 
> 
> The problem is DDL is not transactional and even worse it auto commits 
> all other data in the transaction before the DDL is executed.
> 
>  
> > It is a fix in the CMP initialization code, and that is Dain's domain.
> > 
> > Claudio, you were right on the line that barf, really wrong on the MEJB
> > solution, for penitence can you give Dain the 3 lines diff that
> achieves
> > this behavior (only start transaction if not present in the
> initialization
> > of the code from Dain)
> 
> 
> David, and I can fix this (David helped with this code), but why is 
> there a transaction.  Deployment is not a transactional process; this is 
> why we have stop/destroy lifecycle events.

Claudio found a way to do deployment through the MEJB, which, due to its
ejb status and apparent tx method settings, associates a tx with the
current thread.  I think this continues attached to the current thread all
the way to the JDBCStartCommand, where it argues with your desire for a new
tx.

I kind of like my idea of running these calls through a tx interceptor,
configured for requiresNew for JDBCStart...  however that may not be
appropriate for today.

BTW in some dbs DDL is transactional, e.g. firebird, although it is a
little odd in that it is all executed at the end of a tx.

david jencks

> 
> -dain
> 
> 
> 
> _______________________________________________
> Jboss-development mailing list
> [EMAIL PROTECTED]
> https://lists.sourceforge.net/lists/listinfo/jboss-development
> 
> 

_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to