Download the source code. The Mail MBean or Scheduler MBean is a good example.
Not sure if the QuickStart guide has any information on this, but the JBoss for-pay docs have info. > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]]On Behalf Of Saroj Kumar > Sent: Tuesday, July 16, 2002 11:56 AM > To: [EMAIL PROTECTED] > Subject: RE: [JBoss-user] How to register a class as a startup class in > JBOSS3 > > > How do we use a mbean? Any starting points? I am new to JBOSS. Any help > would be more than welcome. > > Thanks, > Saroj > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of Jung , Dr. > Christoph > Sent: Tuesday, July 16, 2002 7:49 PM > To: '[EMAIL PROTECTED]' > Subject: AW: [JBoss-user] How to register a class as a startup class in > JBOSS3 > > > You could use an mbean for that purpose which would have the additional > advantage of being reinitializable when you cycle your application and > configurable from any (RMI/HTML/whatever) JXM-Adapter. > > Statics are poo-poo, IMHO. > > CGJ > > > > -----Urspr�ngliche Nachricht----- > Von: David Ward [mailto:[EMAIL PROTECTED]] > Gesendet: Dienstag, 16. Juli 2002 14:40 > An: [EMAIL PROTECTED] > Betreff: Re: [JBoss-user] How to register a class as a startup class in > JBOSS3 > > > There is a generic way to do this with web applications in the 2.2 > servlet spec and even a better way in 2.3. > > In 2.2, you can just have a servlet that calls your initializer in it's > init() method. Then, in web.xml, define the load-on-startup element. > That way, when your web app comes up, you get called. You can also call > > a clean-up class in the servlet's destroy() method. > > Now, in servlet 2.3, you can define a ServletContextListener (a servlet > context is basically your web app) in the web.xml. You will get > notified via the contextInitialized and contextDestroyed methods. > > Granted, each of these methods mean assumes you've got a web tier. Even > > if you don't, it's not a horrible thing to just through your ejb jars in > > an ear along with a tiny war who's only job is to initialize some stuff. > > Now, if you just wanted to now about startup/shutdown classes outside of > > your app and specific to jboss, I don't know. > > Hope this helps, > David > > -- > > Saroj Kumar wrote: > > Hi All, > > > > I want to register a class as startup class in JBOSS3. This class > > should be loaded in memory when server is started. > > > > This class reads some properties and loads them in the memory. Other > > classes need to access these variables using ClassName.Method Names(). > > > > Please suggest me a way. > > Saroj > > > > > > > > ------------------------------------------------------- > > This sf.net email is sponsored by: Jabber - The world's fastest > > growing > > real-time communications platform! Don't just IM. Build it in! > > http://www.jabber.com/osdn/xim > > _______________________________________________ > > JBoss-user mailing list > > [EMAIL PROTECTED] > > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > -- > > --------------------- > David Ward > [EMAIL PROTECTED] > http://www.dotech.com > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Jabber - The world's fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > ########################################### > > This message has been scanned by F-Secure Anti-Virus for Microsoft > Exchange. > For more information, connect to http://www.F-Secure.com/ > > > ------------------------------------------------------- > This sf.net email is sponsored by: Jabber - The world's fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user > > > > ------------------------------------------------------- > This sf.net email is sponsored by: Jabber - The world's fastest growing > real-time communications platform! Don't just IM. Build it in! > http://www.jabber.com/osdn/xim > _______________________________________________ > JBoss-user mailing list > [EMAIL PROTECTED] > https://lists.sourceforge.net/lists/listinfo/jboss-user ------------------------------------------------------- This sf.net email is sponsored by: Jabber - The world's fastest growing real-time communications platform! Don't just IM. Build it in! http://www.jabber.com/osdn/xim _______________________________________________ JBoss-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/jboss-user
