I am using JBoss [Trinity] 4.2.3.GA.
I've created a web service that uses a set of MBeans to hold configuration information for a JAX-WS web service. I'd like to have the ability to configure the MBeans via the JMX console prior to the first incoming web service call.
After looking at various posts (Initializing an Application on Deployment using JMX and ServiceLifecycle in JossWS 2.0.1), I've come to the conclusion that there is likely no good way of doing initialization at container start-up time within a JAX-WS web service.
Right now, the solution I've settled on is to have a very simple initialization servlet that is loaded at startup time using the <load-on-startup> node in the web.xml. The only thing that the servlet does is have an init() method where the MBeans for the web service are initialized. It seems to work.
Question: Is there any better way of doing this just using the web services framework without having to depend on servlets?
JBoss 4.2.3 comes with jbossws-3.0.1-native-2.0.4.GA so I cannot take advantage of the org.jboss.ws.eagerInitializeJAXBContextCache flag in jbossws 3.0.3 though I'm not sure it would help any since this is not a JAXB issue.