From: SourceForge.net <no...@so...> - 2003-05-01 17:04:44
|
Patches item #730882, was opened at 2003-05-01 12:04 Message generated for change (Tracker Item Submitted) made by Item Submitter You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376687&aid=730882&group_id=22866 Category: JBossServer Group: v3.2 Status: Open Resolution: None Priority: 5 Submitted By: Chris Bonham (bonhamcm) Assigned to: Nobody/Anonymous (nobody) Summary: MDB recover too early on startup Initial Comment: JBoss 3.2.0RC4 Tomcat 4.1.18: IF the container is shutdown with messages stored in the JDBC2 persistence store, when the container starts up, the MDBs are potentially started before the dependent Entity or Session beans, resulting in a NPE. After doing some digging in the source code, I found that the EJBs are deployed sequentially (as opposed to multi- threaded). Also, the order in which they're deployed is nondeterministic due to the fact a HashMap iterator is used. Since the EJBs are placed in the HashMap in the order in which they're defined in jboss.xml, and since MDBs are always last I decided to change the HashMap to iterate over the values in insertion order. You could do this with a LinkedHashMap but since it requires JDK 1.4, I used the Apache commons-collection SequencedHashMap instead. This way the MDBs are deployed after the session and entity beans. I've supplied a patch for EjbModule.java to fix this problem. ---------------------------------------------------------------------- You can respond by visiting: https://sourceforge.net/tracker/?func=detail&atid=376687&aid=730882&group_id=22866 |