db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ramaswamy, Muthu" <mramasw...@gers.com>
Subject JDO with CMT.
Date Fri, 04 Feb 2005 21:56:09 GMT
Hi All-

Currently I am trying to use Apache/OJB with JDO support in Session Beans, using Container
Manager Transaction(CMT) in Websphere 5.1. 

When I executed the Session Bean, I get the following error:

"Exception data: javax.jdo.JDOUserException: Transaction is not active."

I have attached below the sample code:

 //Setting up the Bean
 AuthUserJDO usr = new AuthUserJDO();
 usr.setUsr_login("cocoon");
 usr.setUsr_fullname("Demo");
 usr.setUsr_password("moth");
 usr.setUsr_email("xyz@abc.org");

 //Get a PersistentManager 
 PersistenceManagerFactory factory = new OjbStorePMF(); //factory.
 PersistenceManager manager = factory.getPersistenceManager(); //get the manager.
 manager.makePersistent(usr); //make persistent.
 manager.close(); //close the manager.

I am new to Apache/OJB. Is there an example working program that shows how to use JDO with
CMT inside Session Bean? Any code sample would help to resolve this issue.

Appreciate your time. Thanks.,

-Muthu

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org


Mime
View raw message