[jboss-user] [Installation, Configuration & DEPLOYMENT] - Re: Starting Thread on Deploy

GRatcliffe do-not-reply at jboss.com
Wed Aug 8 06:11:58 EDT 2007


Hi,

A solution to this kind of problem, but not involving applets, that we've used is to implement the server as an MBean service. This allows it to be deployed as a .sar archive within the JBoss server. This is getting JBoss specific but I guess from your package names this is not really an issue. If you look in the JBoss user guide  at 
http://docs.jboss.org/jbossas/jboss4guide/r5/html/ch2.chapter.html#ch2.writembean.sect
It explains how to write an MBean service. You would implement the startService method to start your server. You can also provide configuration attributes to your server this way. For example the port number.

To ensure the service is started before the war is deployed I think you can add a jboss-web.xml file into the war WEB-INF folder that contains the name of the mbean in a  element. It may not be needed because in JBoss 4 I don't think the Tomcat connectors pass on any requests to a servlet until everything as started.

Gary

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4071938#4071938

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4071938



More information about the jboss-user mailing list