I'm a long time database user/programmer/manager (mainframe DB2 DBA for
several years) but fairly new to EJB and JBoss.  It seems to me that if you
are using container managed transactions, you shouldn't be fooling with
autocommit (or transactions) at all.  If you are using CMT, then by
definition you want the container to handle everything.

Regarding your immediate issue, if you turn autocommit off, you won't see
any updates until you issue an explicit commit.  Regarding the rollback, if
you manually turn autocommit on, then every statement you execute against
the database is automatically committed  * by the database*.  As I admitted,
I'm fairly new to EJB and JBoss, but I think by doing this you are bypassing
the container's (JBoss's) ability to manage things.  That would explain why
JBoss is unable to rollback - the database has already done its own commit
without the container knowing about it.

----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Friday, April 06, 2001 4:35 PM
Subject: Re: [JBoss-user] Oracle 8i


>
>
> I am having the same problem...
>
> A BMP entity bean with CMT.
> I turn off autocommit when I connect to the Oracle 8i (8.1.5) database.
> The Transaction never seems to complete.
> If I turn on autocommit, then the data is updated but cannot be rolled
back by
> the transaction manager in the case of an error.
> In either case, I dont think that the Transaction ever commits.
>
> Tim Haley
>
>
>
>
>
>
> "Guy Rouillier" <[EMAIL PROTECTED]> on 04/06/2001 03:23:24 PM
>
> Please respond to [EMAIL PROTECTED]
>
> To:   [EMAIL PROTECTED]
> cc:
>
> Subject:  Re: [JBoss-user] Oracle 8i
>
>
>
> Sounds like your change is being made but not committed.  What type of EJB
> is this?  Are you managing your own transaction?  Are you turning
autocommit
> off?
>
> ----- Original Message -----
> From: "Simphoukham, Southin" <[EMAIL PROTECTED]>
> To: <[EMAIL PROTECTED]>
> Sent: Friday, April 06, 2001 12:32 PM
> Subject: [JBoss-user] Oracle 8i
>
>
> > Hi,
> >
> > Has anyone run into problems on making an update to an Oracle table?
> >
> > I have run into such a problem.  I have created a preparedStatement and
> > called the preparedStatement.excuteUpdate.  The update returns a value
of
> 1
> > (which is good).  I turn around and check to make sure it works in
> SQLPlus.
> > Wrong.  I turn on the loggingenable option in the Mbean in the jcml.
> > Everything looks good though the logging doesn't tell me if it actually
> > excuted and committed the changes to Oracle.  I know I can definitely
> > retrieve using Jboss's connection pool saving ummm.
> > oh yes I also copy the sql and pasted in SQLPlus and excuted it. That
> > worked.
> >
> > Thanks,
> >
> > Southin Simphoukham
> >
> >
> >
> > _______________________________________________
> > JBoss-user mailing list
> > [EMAIL PROTECTED]
> > http://lists.sourceforge.net/lists/listinfo/jboss-user
> >
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>
>
>
>
>
>
>
> _______________________________________________
> JBoss-user mailing list
> [EMAIL PROTECTED]
> http://lists.sourceforge.net/lists/listinfo/jboss-user
>


_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to