thanks, that was exactly the problem. Switching to
ConnectionFactoryPooledImpl  fixed it. 

I guess I originally chose ConnectionFactoryManagedImpl because I thought
you had to use that if you were using Datasources.

Thanks again.
-John


-----Original Message-----
From: Armin Waibel [mailto:[EMAIL PROTECTED]
Sent: Wednesday, July 09, 2003 10:58 AM
To: OJB Users List
Subject: Re: Rollback not happening


Hi,

----- Original Message -----
From: "McCaffrey, John G." <[EMAIL PROTECTED]>
To: "'OJB Users List'" <[EMAIL PROTECTED]>
Sent: Wednesday, July 09, 2003 5:19 PM
Subject: RE: Rollback not happening


> I do call persistanceBroker.abortTransaction(); when I catch an
exception,
> and I call
>   persistanceBroker.close(); in the finally of the method
>
> I am not sure if I understand your suggestion about which transaction
logic
> to use.

If you let OJB handle transactions, do not
use ConnectionFactoryManagedImpl. This implementation
should be used when transaction demarcation is done
outside of OJB (e.g. container-managed tx, JTA UserTransaction).
In your case ConnectionFactoryPooledImpl should done the job.

regards,
Armin

> I am not using EJBs, I am using websphere datasource, with DB2 pooled
> database driver.
> Is there a known issue?
>
> thanks for your help
> -John
>
>
> -----Original Message-----
> From: Armin Waibel [mailto:[EMAIL PROTECTED]
> Sent: Tuesday, July 08, 2003 6:13 PM
> To: OJB Users List
> Subject: Re: Rollback not happening
>
>
> Hi,
>
> > I am using WebSphere transaction manager factory, and
> > ConnectionFactoryManagedImpl.
> if you are running in an managed environment use
> declarative or programmatic transaction of your
> appServer (don't use the OJB tx demarcation
> e.g beginTransaction(), ...).
> How do you use OJB - within session beans?
>
> If you don't run in a managed environment
> and you want to use OJB tx-demarcation, don't
> set 'ConnectionFactoryManagedImpl'.
>
> regards,
> Armin
>
>
> ----- Original Message -----
> From: "McCaffrey, John G." <[EMAIL PROTECTED]>
> To: "'OJB Users List'" <[EMAIL PROTECTED]>
> Sent: Wednesday, July 09, 2003 12:12 AM
> Subject: Rollback not happening
>
>
> > hmmm. I must be missing something, but I thought if I called
> > persistanceBroker.beginTransaction();
> > persistanceBroker.store(brokerVO);
> > and if there was an exception and
> persistanceBroker.commitTransaction();
> > never gets called, then the data should not be in the database.
> >
> > I am storing a BrokerVO that has N BusinessContact objects, and if
one
> of
> > the businesContacts fails to insert, I want the whole transaction to
> > rollback. I am not sure what I am doing wrong here. If any part of
the
> > transaction fails (I am inserting into three tables), I want all of
> the data
> > to rollback.
> >
> >
> >  <snip>
> > <class-descriptor class="com.kraft.esi.msf.common.db.dsna.BrokerVO"
> > schema="&schema;" table="brkr">
> > <field-descriptor id="1" name="brkrNbr" column="BP_NBR"
> > jdbc-type="DECIMAL" primarykey="true"/>
> > <field-descriptor id="2" name="vendNbr" column="AP_VNDR_NBR"
> > jdbc-type="VARCHAR" />
> >
> > <field-descriptor id="3" name="brkrEffStrtDate"
> > column="EFCT_STRT_DT" jdbc-type="DATE"
> >
> >
>
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDa
> teFi
> > eldConversion"/>
> > <field-descriptor id="4" name="brkrEffEndDate"
> > column="EFCT_END_DT" jdbc-type="DATE"
> >
> >
>
conversion="org.apache.ojb.broker.accesslayer.conversions.JavaDate2SqlDa
> teFi
> > eldConversion"/>
> > <field-descriptor id="5" name="brkrComment" column="CMNT"
> > jdbc-type="VARCHAR"/>
> >
> >     <reference-descriptor name="busnPtnrVO"
> > class-ref="com.kraft.esi.msf.common.db.dsna.BusnPtnrVO"
> auto-retrieve="true"
> > auto-update="true" auto-delete="true">
> >     <foreignkey field-id-ref="1"/>
> >     </reference-descriptor>
> >
> >      <reference-descriptor name="apVndrVO"
> > class-ref="com.kraft.esi.msf.common.db.dsna.ApVndrVO"
> auto-retrieve="true"
> > auto-update="false" auto-delete="false">
> >     <foreignkey field-id-ref="2"/>
> >     </reference-descriptor>
> >   <!-- -->
> > <collection-descriptor  name="businessContacts"
> > element-class-ref="com.kraft.esi.msf.common.db.dsna.BpCntctVO"
> > auto-retrieve="true" auto-update="true"
> > auto-delete="true" orderby="cntctTypeCode" sort="ASC"
> > proxy="false" >
> >      <inverse-foreignkey  field-id-ref="1"/>
> >     </collection-descriptor>
> >
> > </class-descriptor>
> >
> >  <snip>
> >
> > I am using WebSphere transaction manager factory, and
> > ConnectionFactoryManagedImpl.
> >
> > any help would be greatly appreciated.
> >
> > -John
> >
> >
>
> ---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
> >
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>
>



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

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

Reply via email to