----- Original Message -----
From: "Max Rydahl Andersen" <[EMAIL PROTECTED]>
To: "OJB Users List" <[EMAIL PROTECTED]>
Sent: Tuesday, September 10, 2002 11:09 PM
Subject: Re: The new and improved J2EE code :)


> Ok - so what "level of integration" is there in the current "hack" ?
>
> Is it "just" on the JDBC-connection ? (as it is retreived via
datasource the
> commits will only be done by the j2Ee server)

The container has full control of the transactions.

> Or does the "hack" tries to connect every PersistenceBroker to the
current
> transaction ?
>
> Maybe a question is - how/where is the transaction barriers
> controlled/manged ?

Currently we have a integration for the ODMG api.
On every method call we using the TransactionManager to obtain the
current Transaction tx, intern we start a odmg-transaction and do
tx.registerSynchronization(odmg-tx). The container do a beforeCompletion
call on odmg-tx before commit the tx. And a afterCompletion call on
odmg-tx after the tx was commited (or rolled back).
beforeCompletion: we prepare the OJB for commit
afterCompletion: we do commit if container status was ok.
More details you will find in the source (...ojb.odmg.OJBJ2EE).

regards,
Armin
>
> /max
>
> ----- Original Message -----
> From: "Armin Waibel" <[EMAIL PROTECTED]>
> To: "OJB Users List" <[EMAIL PROTECTED]>
> Sent: Tuesday, September 10, 2002 10:52 PM
> Subject: Re: The new and improved J2EE code :)
>
>
> > Hi again,
> >
> > this stuff is only a first "hack" for using OJB within appServers
> > (jboss). Hope we can present in near future a real JCA integration.
> >
> > Armin
> >
> > ----- Original Message -----
> > From: "Armin Waibel" <[EMAIL PROTECTED]>
> > To: "OJB Users List" <[EMAIL PROTECTED]>
> > Sent: Tuesday, September 10, 2002 10:43 PM
> > Subject: Re: The new and improved J2EE code :)
> >
> >
> > > Hi Max,
> > >
> > > >
> > > > Any hints on how to use the new and improved J2EE code ?
> > > >
> > >
> > > You find a sample session bean using ODMG under
> > > jakarta-ojb\src\ejb\org\apache\ojb\ejb
> > >
> > > > Any tips/guide on which classes one should reimplement if the
> > > J2EE-container
> > > > is not JBOSS ?
> > >
> > > we use xdoclet to generate the bean interfaces and deployment
> > > descriptor.
> > > Run the "jar_beans" target of the build-xdoclet.xml. This
generates a
> > > deployable jar-File (with the sample beans) for jboss.
> > > xdoclet supports many other appServer (see xdoclet docs) you only
need
> > > to change the xdoclet target in build-xdoclet.xml.
> > >
> > > In ODMGTransactionMonitor_2 we do lookup the TransactionMonitor of
> > > jboss. Here you need the jndi-name of your TM
> > > (jboss: TM_LOOKUP = "java:/TransactionManager")
> > > This could be difficult when using commercial products, because
this
> > was
> > > not specified by the EJB spec., hence most vendors hide this jndi
> > name.
> > >
> > > We bind a jboss mbean org.jboss.ojb.odmg.ODMGFactory under
> > > "java:ojb/defaultODMG" to get a Implementation instance via jndi.
> > > For a first step its also possible using OJBJ2EE_2 directly in
your
> > > bean.
> > >
> > > It's recommend first using the OJB default DB (hsql).
> > > When using datasources from your appServer change your
OJB.properties
> > > file:
> > > useAutoCommit=0
> > >
> >
ConnectionFactoryClass=org.apache.ojb.broker.accesslayer.ConnectionFacto
> > > ryPassThroughImpl
> > >
> > > that's it! ;-)
> > >
> > > regards,
> > > Armin
> > >
> > > >
> > > > Thanx! :)
> > > >
> > > > /max
> > > >
> > > >
> > > > --
> > > > 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]>
> > >
> > >
> > >
> >
> >
> > --
> > 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]>
>
>
>


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

Reply via email to