I'm working in an application with aproximately one hundred different MDBs. Some of these have configuration data stored in a variable that is kept between invocations of onMessage().
However, sometimes I want to programmatically reload that locally stored configuration data for all available instances of one perticular class of MDBs.
I have already searched the forums and found the "hack" solution of somehow causing a bean to throw a RuntimeException to make sure it is invalidated by the container. However, I cannot use a JMS message and specific RuntimeException-throwing behaviour of onMessage(), since all my MDBs except only one type of XML message, and I do not want them to except a special XML message just to get them to throw an exception.
Any ideas how to "kick" all loaded MDBs of a class such that they are completely reloaded, or can reload their configuration stored in a variable? A JBoss specific solution is no problem.
Perhaps through JMX you can tell JBoss to clear the MDB pool. Take a look at the JMX console.