|
From: JP P. <jp....@ti...> - 2003-05-30 14:29:51
|
Hi Isabelle, Ah, the continuously problematic MaxValueIncrementer ;-) ! As with the key search we will always have potentially two Sql orders, how manage this? The best would be to have the possibility to treat separately. It would be convenient to assure the key search being out of any transaction and being committed regardless of a current transaction. In this case, simply the key(s) used by the rollbacked operations are lost. I don't know, so quickly, if it is possible and how. Jean-Pierre =20 > -----Message d'origine----- > De : spr...@li...=20 > [mailto:spr...@li...] > De la part de Isabelle Muszynski > Envoy=E9 : vendredi 30 mai 2003 15:28 > =C0 : spr...@li... > Objet : [Springframework-developer] Problem with=20 > MySqlMaxValueIncrementer >=20 >=20 > Hi everyone, >=20 > There is a problem with MySQLMaxValueIncrementer (and I think=20 > with the Oracle one as well). Currently the code doesn't do=20 > any transaction management which has 3 consequences : > (1) if the calling code does a rollback, the value(s) cached=20 > in / handed out by the object are invalid > (2) the code requires the caller to do a commit, which I'm=20 > sure most people will forget to do if using the framework. > (3) when requesting a bunch of keys, it is possible to get a=20 > series of non-sequential numbers from the database. This=20 > because of the loop in the code, which is requred by mySQL=20 > last_insert_id() semantics. This particular problem could be=20 > solved by maintaining an array of values, instead of just a=20 > maxId. I'll make this change over the weekend. This=20 > particular problem won't show up in the Oracle=20 > implementation. I'm not sure how to solve the items 1 & 2=20 > though. The code can be called in a variety of circumstances=20 > (BMP and CMP beans, no EJB, ...). Can we even assume the=20 > presence of a transaction manager? >=20 > Any ideas? >=20 >=20 > --=20 > Isabelle Muszynski > Software Engineer > Zandweellaan 4 > 2660 Antwerpen > Belgium > Tel. 32-(0)3-830 18 54 > Mobile: 32-(0)485 49 50 89 > Email: isa...@me... > Website: www.meta-logix.com >=20 >=20 > ------------------------------------------------------- > This SF.net email is sponsored by: eBay > Get office equipment for less on eBay!=20 > http://adfarm.mediaplex.com/ad/ck/711-11697-> 6916-5 >=20 > _______________________________________________ >=20 > Springframework-developer mailing list=20 > Spr...@li... > https://lists.sourceforge.net/lists/listinfo/springframework-developer >=20 |