i ll test it soon in a distributed application, and post my result here:) Remi
----- Original Message ----- From: "Armin Waibel" <[EMAIL PROTECTED]> To: "OJB Users List" <[EMAIL PROTECTED]> Sent: Tuesday, February 10, 2004 11:57 AM Subject: Re: Identity > ok, I will add your patch. > We may run into the same problems in an clustered environment with a > distributed lock management (same temp values on different cluster > nodes), but this will be another story... ;-) > > regards, > Armin > > R�mi Bars wrote: > > >>Think the problem is the lock of the objects before insert. > >>SequenceManagerNativeImpl returns a temp key and OJB builds an Identity > >>object to do the lock. In an multithreaded environment it is possible > >>that two threads lookup the same temp key. > > > > > > yes it s th problem i have put a System.out.println when the appli try to > > get the getUniqueLong -> i saw multiple reference on the same tempkey > > > > > >>If your solution works for you I will update SequenceManagerNativeImpl. > >>To verify my assumption (and your solution), can you post the whole > >>stack trace (+ error log before the exception if available) if you use > >>the "unmodified version" of SequenceManagerNativeImpl? > > > > > > 0 DEBUG [main] sequence.SequenceManagerNativeImpl - After store - > > newid=42 > > > > org.odmg.LockNotGrantedException: Can not lock > > [EMAIL PROTECTED] for WRITE > > > > at org.apache.ojb.odmg.TransactionImpl.lock(Unknown Source) > > > > at > > fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_PersistentManager.insert(OJ > > B_ODMG_PersistentManager.java:143) > > > > at > > fr.sip.cezan.framework.persistance.odmg.OJB_ODMG_CezanGestionnaireDAO.create > > (OJB_ODMG_CezanGestionnaireDAO.java:64) > > > > at > > fr.sip.cezan.serveur.ordre.work.GestionnaireOrdreImpl.creerFichierOrdre(Gest > > ionnaireOrdreImpl.java:532) > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > > > --------------------------------------------------------------------- > To unsubscribe, e-mail: [EMAIL PROTECTED] > For additional commands, e-mail: [EMAIL PROTECTED] > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
