And I finally got it - happy happy joy joy :-)
The freestyle hack for determining if the table already exists or not
caused Sebastiens idea to fail (because the tx gets a rollback mark).
I will fix it. It will be in cvs until tomorrow at lunch time...
good night
\Daniel
On Tue, 10 Oct 2000, Sebastien Alborini wrote:
> Aaron Mulder wrote:
> >
> > Gosh, I disagree. If there is no transaction, no work should be
> > saved. That's what transactions are for! We should be able to trivially
> > alter the persistence manager initialization to run within the context of
> > a transaction, which I think makes the most sense. For BMT session beans,
> > if you don't use a transaction, you don't save the work. It's up to you,
> > now, isn't it?
> >
>
> Hi,
>
> I guess you are right.
>
> How would you do the persistence manager fix? I tried
>
> // Initialize the store
> con.getTransactionManager().begin();
> store.init();
> con.getTransactionManager().commit();
>
> in CMPPersistenceManager, but my transaction gets MARKED_ROLLBACK.
>
>
> regards,
>
> Sebastien
>
>
>
> > Aaron
> >
> > On Tue, 10 Oct 2000, Sebastien Alborini wrote:
> > > Hi,
> > >
> > > By default, a java.sql.Connection uses AutoCommit=true. Minerva
> > > overrides this (which is ok), and nothing is done until
> > > Transaction.commit() is called.
> > >
> > > However, when no transaction is used, one should expect the work to be
> > > done. This situation happens:
> > > - for BMT session beans, if you don't use the UserTransaction.begin(),
> > > .commit()
> > > - for table creation by jaws (gotcha).
> > >
> > > Now, I am not sure how/where to fix this. Test for transactions in
> > > StatementInPool.execute()? Use a boolean userAutoCommit flag?
> > >
> > > Aaron?
> > >
> > > Sebastien
> > >