The way we do startup is by taking advantage of the MBeanServer notification service. We have a StartupMBean that registers with the MBeanServerDelegate (see the javadocs) to get notification about when things are coming up. When it recieves notification that the required beans have been deployed, it calls loads up another EJB that takes care of the rest of the initialization. Let me know if this approach is initeresting and I can follow up on it on more detail...
Paul > -----Original Message----- > From: Eric Anderson [mailto:[EMAIL PROTECTED]] > Sent: Thursday, January 17, 2002 12:22 PM > To: [EMAIL PROTECTED] > Subject: [JBoss-user] Deployment dependencies / timing > > > I have a question about how to specify or control deployment order in > JBoss. I have two EJB jar files, one containing a single MDB, and > another containing a collection of session/entity beans that the MDB > calls upon. As it so happens, the MDB is deployed ahead of > the bean jar > file. > > When I start JBoss, if the MDB queue contains data, then the MDB is > called *during* JBoss startup. When this happens, the MDB > cannot access > the beans from the other jar file, because it has not yet > been deployed! > I'm wondering if there's a way to either defer MDB > processing until all > code is deployed, or to specify a relationship between the > MDB and the > other beans such that the MDB will not be started until those > beans are > deployed. > > I think I could make this work if I packaged the MDB+the beans in one > jar file (or as components in a .ear file), but I would really prefer > not to do that, as the non-MDB beans are a resource that are shared > across applications. > > I'm probably asking a more general J2EE question here, but if it > matters, I'm currently using JBoss 2.4.3. > > Thanks, > Eric Anderson > > > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
