This content has been marked as final.
Show 4 replies
-
1. Re: Transaction RequiresNew Problem
wisper2002 Aug 9, 2004 9:55 AM (in response to wisper2002)I forgot to mention:
methodB is called over getSessionContext().getEJBObject() ofcourse. -
2. Re: Transaction RequiresNew Problem
aloubyansky Aug 12, 2004 8:10 AM (in response to wisper2002)Works for me with Oracle9i and 3.2.6rc2.
/** * @ejb.interface-method * @ejb.transaction type="RequiresNew" */ public void run(long l) throws Exception { final long startTime = System.currentTimeMillis(); log.debug("RUN>"); AUtil.getLocalHome().create(new Long(1), "avoka"); ((Facade)ctx.getEJBObject()).run2(); ctx.setRollbackOnly(); log.debug("RUN> done in " + (System.currentTimeMillis() - startTime) + " ms."); } /** * @ejb.interface-method * @ejb.transaction type="RequiresNew" */ public void run2() throws Exception { final long startTime = System.currentTimeMillis(); log.debug("RUN2>"); AUtil.getLocalHome().create(new Long(2), "ataka"); log.debug("RUN2> done in " + (System.currentTimeMillis() - startTime) + " ms."); }
The db contains only row with id 2. -
3. Re: Transaction RequiresNew Problem
aloubyansky Aug 12, 2004 8:14 AM (in response to wisper2002)It seems like an issue with Hibernate. Please post on the Hibernate forums.
-
4. Re: Transaction RequiresNew Problem
aloubyansky Aug 12, 2004 8:16 AM (in response to wisper2002)Is the session object shared between the transactions?