Hi Francesco,

Francesco Russo wrote:

Hi Thomas,
let's suppose I want to use OJB with distributed BMT. In such a scenario, I guess I should do something like:


//* a generic SessionBean's method
...
UserTransaction utx = sessionCtx.getUserTransaction();
utx.begin();
//* acquire transactional resources which will be enlisted in the current transaction
//* these resources will be XAResources according to the XOpen/XA standard specification


... do work
utx.commit();
...


So, I am wondering how does OJB integrates itself in such a scenario.
>

OJB needs some specific configuration properties settings for use in managed environments.
Here you can find an example for JBoss integration (docs are valid for rc6 or CVS)


http://db.apache.org/ojb/deployment.html#Deployment%20in%20EJB%20based%20applications

The integration in other J2EE compatible appServer are similar.
Currently PB- and the ODMG-api are supported in managed environments.

Which OJB classes can support me in coding something like that? I have downloaded your sources, but all the examples were involved with Container Managed Persistence, so I thought it was simply not possible to achieve distriuted BMT with OJB.


This should be no problem.


PB-api:
UserTransaction utx = sessionCtx.getUserTransaction();
utx.begin();
PersistenceBroker broker = PersistenceBrokerFactory.create...
// do work
utx.commit();

ODMG-api:
UserTransaction utx = sessionCtx.getUserTransaction();
utx.begin();
Transaction tx = odmg.currentTransaction();
// do work
utx.commit();


As in my previous mail, I repeat: I am a newbie to OJB, so maybe I am just missing something, but I need you to prove that I am wrong, for example pointing me out the classes I should better study and investigate to fully understand that I am really wrong.

No, you are right. All examples using cm-tx.


regards,
Armin




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



Reply via email to