0 Replies Latest reply on Oct 1, 2007 8:13 PM by Christopher Suter

    Best Practice - service initializations

    Christopher Suter Newbie

      I have been working with JBoss for several months now, and I have a couple general questions.

      1) Is there a good way to deploy a POJO into the app server and have it loaded into JNDI automatically upon deployment?

      2) Looking at documentation on the Timer Service MBean, it appears that in order to schedule a job, all one has to do is make a call to the Timer MBean. However, there is no immediately obvious way to automate this call. Similarly to my first question above, is there a good way to automate Timer Service initialization at deployment?

      I saw something online about extending a GenericServlet object to perform custom initializations upon deployment, but this seems a bit sloppy to me. Is this an approved practice?

      What I'm really looking for is a good place to put code that I want to run at deployment time, every time. Is this wishful thinking, a bad idea, or something obvious that I haven't thought of yet? Any input would be greatly appreciated, if only a link to some good resources. Thanks in advance!

      -Christopher Suter
      www.grooveshark.com