Thx Armin, its the thread problem. Silly me. :)


kit.

----- Original Message -----
From: "Armin Waibel" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Friday, November 15, 2002 7:10 PM
Subject: Re: need help


> Hi,
>
> seems to me a multi-threading problem.
> Do you share the 'broker' variable, so that
> another thread can do a commit?
> Or do you set the eager-release attribute
> in jdbc-connection-descriptor 'true'?
> Should be 'false' (default was 'false').
>
> regards,
> Armin
>
> ----- Original Message -----
> From: "Cheong Wai Kit" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Friday, November 15, 2002 10:44 AM
> Subject: need help
>
>
> Can anyone help me with the following problem? Once i hit the error, i
> have to restart Tomcat.
>
> currently i am using :-
>
>     MsSqlServer2000,
>     net.sourceforge.jtds.jdbc.Driver,
>     Tomcat4.0.4, and
>     jakarta-ojb-0.9.6
>
>
> org.apache.ojb.broker.TransactionNotInProgressException: Not in
> transaction, call begin() before commi()
>         at
> org.apache.ojb.broker.accesslayer.ConnectionManager.localCommit(Unknown
> Source)
>         at
> org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.commitTransaction(U
> nknown Source)
>         at SaveCompany.doPost(SaveCompany.java:35)
>
>
> try{
>         ...
>         ...
>          ...
>         broker = PersistenceBrokerFactory.defaultPersistenceBroker();
>         broker.beginTransaction();
>         broker.store(company);
>         broker.commitTransaction();     <<<< line 35.
>         broker.clearCache();
> }catch(Exception ex){
>     ...
> }
> finally{
>     if (broker != null) broker.close();
> }
>
>
> Thanks in advance.
> kit.
>
>
>
> --
> To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>
>
>


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to