Bugs item #461435, was opened at 2001-09-13 22:56 You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=461435&group_id=22866 Category: JBossServer Group: v2.4 (stable) Status: Open Resolution: None Priority: 5 Submitted By: Nobody/Anonymous (nobody) Assigned to: Nobody/Anonymous (nobody) Summary: Dirty EJB Entities being re-used. Initial Comment: Hi all, A collegue of mine has noticed a bug with 2.4 (running JVM 1.3.1 on either Win32 or Linux 2.4.x). It is concerned with the removal of entity bean (BMP) instances. Specifically, after one entity is removed that instance is being re-used for the next entity of that type created _without_ first clearing the instance variables. This is easy to re-create...simply write an entity bean with a create method like: /** Instance variable 'state' */ private String state = "Clean"; public Integer ejbCreate() { System.out.println("State at instantiation: " + this.state); this.state = "Dirty"; System.out.println("State after create: " + this.state); return // some unique primary key; } If you run this test code: TestEntity testEntityOne = this.testEntityHome.create(); TestEntity testEntityTwo = this.testEntityHome.create(); The output on the JBoss server will read: State at instantiation: Clean State after create: Dirty State at instantiation: Clean State after create: Dirty Fine...but if you run with test code: TestEntity testEntityOne = this.testEntityHome.create(); testEntityOne.remove(); TestEntity testEntityTwo = this.testEntityHome.create(); You get: State at instantiation: Clean State after create: Dirty State at instantiation: Dirty State after create: Dirty ---------------------------------------------------------------------- You can respond by visiting: http://sourceforge.net/tracker/?func=detail&atid=376685&aid=461435&group_id=22866 _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-development
