Hello!

I'm new to Apache OJB and I've the following problem: I'd like to use the JDO-API of OJB in EJBs within a JBoss-Server. Unfortunately, only two of the three supported APIs are registered in the JNDI:

- ojb/PBAPI
- ojb/defaultODMG

JDO is not registered in JNDI. Thus, I can't look it up. What do I have to do?

Anyway I tried to get JDO running within an EJB (stateful SessionBean) with the following code:

   Product product = new Product();
   product.setProductName("Notebook Fujitsu-Siemens");
   product.setPrice(1333.99f);
   PersistenceManager pm = pmFactory.getPersistenceManager();
   Transaction tx = pm.currentTransaction();
   tx.begin();
   pm.makePersistent(product);
   tx.commit();
   pm.close();

The tx.begin() causes a java.lang.UnsupportedOperationException: Not supported in managed environment

If I don't do a tx.begin(), pm.makePersistent(...) causes a javax.jdo.JDOUserException: Transaction is not active.

Can you please help me with a simple example bean and a short howto to register JDO in JNDI with JBoss?

Thousand thanks in advance!!!

Best regards, Marco ;-)

--
No software patents in Europe!!! Logic
patents are weapons in the hand of big
companies to destroy smaller competitors,
that can't finance expensive lawsuits!
...and our company will surely die, too,
if software patents become reality here!
...and don't forget that all software
will get much more expensive to finance
patent researches.

*** http://petition.eurolinux.org/ ***
*** http://www.ffii.org/ ***



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



Reply via email to