[jboss-dev-forums] [JBoss AS7 Development] - Re: META-INF/services for module extensions - question/issue
Brian Stansberry
do-not-reply at jboss.com
Mon Aug 29 13:38:42 EDT 2011
Brian Stansberry [http://community.jboss.org/people/brian.stansberry] created the discussion
"Re: META-INF/services for module extensions - question/issue"
To view the discussion, visit: http://community.jboss.org/message/623583#623583
--------------------------------------------------------------
Another hook, besides mbeans, that the AS provides for installing services from a deployment is the MSC https://github.com/jbossas/jboss-msc/blob/master/src/main/java/org/jboss/msc/service/ServiceActivator.java https://github.com/jbossas/jboss-msc/blob/master/src/main/java/org/jboss/msc/service/ServiceActivator.java. Basically, the AS scans any deployment for a META-INF/services/org.jboss.msc.service.ServiceActivator file. If found, the ServiceLoader mechanism is used to load the specified ServiceActivator implementation, and then its activate() method is invoked. Via that mechanism you could install an MSC service, and that service could do your ServiceLoad start from its start() method, and also do any cleanup from its stop() method.
--------------------------------------------------------------
Reply to this message by going to Community
[http://community.jboss.org/message/623583#623583]
Start a new discussion in JBoss AS7 Development at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2225]
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-dev-forums/attachments/20110829/2a65bbe7/attachment.html
More information about the jboss-dev-forums
mailing list