>From the http://www.jboss.org/manual/adv_config.html#custom docs
Custom MBeans
If you want to add services to the jBoss server, the best way to do that is to write 
your own JMX MBeans. Then they can be loaded in
jboss.conf and configured in jboss.jcml like the existing MBeans. The best way for 
your EJBs to access your new services is to make
them accessible via JNDI.

The easiest way to proceed is to subclass org.jboss.util.ServiceMBean and 
org.jboss.util.ServiceMBeanSupport, so your service will
receive startService and stopService calls. You should declare a constructor with 
minimal parameters, and then include accessor
methods for your important properties. If you declare them in you MBean interface, 
they will show up in jboss.jcml and you can
configure the properties there. Then the sequence of calls is to the constructor, to 
all the accessor methods, and finally to
startService.

If your service depends on other services being loaded first (such as the logger, JNDI 
server, etc.) you should add entries to
jboss.dependencies to declare as much. The services are always constructed in the 
order they're listed in jboss.conf, but there's
not a guaranteed order for calling startService on the various MBeans. However, it is 
guaranteed to be consistant with the
dependencies declared in jboss.dependencies.

If your using a version of JBoss after the 2.0 release then the config is a little 
different. See

http://www.mail-archive.com/[email protected]/msg09202.html

----- Original Message -----
From: "Steve Harris" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Thursday, January 25, 2001 12:48 PM
Subject: [jBoss-User] Startup


> I want Jboss to call a startup() method on an an  object (not a bean) when I
> start it and a shutdown method when I stop it. Weblogic allows me to specify
> startup and shutdown classes in its properties file and calls startup and
> shutdown()on that class. Is there any standard way to do this with Jboss? I
> can add code to do it, but prefer not to reinvent the wheel. (I'm running
> with Jetty).
>
>
>
>
> --
> --------------------------------------------------------------
> To subscribe:        [EMAIL PROTECTED]
> To unsubscribe:      [EMAIL PROTECTED]
> List Help?:          [EMAIL PROTECTED]
>
>



--
--------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
List Help?:          [EMAIL PROTECTED]

Reply via email to