Vladimir Blagojevic wrote:

> Hey,
>
> Julian this is not CC-ed to jboss-dev since I can not post it there at the
> moment. So you can post it to jboss-dev if you want.

Already doing it...

>
>
> > > Is this the right direction?
> >
> > It is - and I have already done this. Every Jetty MBean that registers
> > against the JBoss MBeanServer gets init() called on it (JBoss_2_2_0_Final)
> > as if it was a JBoss style MBean, resulting in an Exception.
> >
> > init()
>
> This shouldn't happen and has nothing to do with MBeanServer.
>
> Only way I can perceive this happening if you list your Jetty MBeans in
> jboss.jcml or you load Jetty MBeans AFTER ServiceControl hooks itself
> (happens during postregistration of ServiceControl) as a
> NotificationListener for MBean registration/unregistration events.

Ah - now we're getting somewhere - thanks.

I'm not loading any MBeans. I am 'new'-ing one, and using Jetty Objects which
'new' others.
These are all DynamicMBeans.

They are not listed in jboss.jcml

Since Jetty creates new MBeans as and when necessary i.e. if you deploy a new
WebApp Jetty will create a new WebAppContextMBean to hold it, we can assume
that whenever ServiceControl hooks in, JettyMBeans will be hooking in
afterwards.

>
>
> Details:
>
> JBoss' ServiceControl registers itself as Notification listener for
> registration and unregistration events.  Now when *any* MBean is loaded
> up from jboss.jcml , it is added to ServiceControl's list (through
> notification callback) of MBeans.  ServiceControl in it's init and start
> methods calls init and start method on all those MBeans in that list.

loading MBeans from jboss.jcml is _NOT_ the only mechanism by which new MBeans
could be created in a running JBoss - Jetty creates them on the fly according
to need.

This means that any 3rd party MBean created after ServiceControl's registration
as a Notification listener will have init() called on it, regardless of whether
it actually extends ServiceMBeanSupport, or implements an init() method.

Either:

3rd party MBeans are expected to register with JBoss' MBeanServer and
ServiceControl should be a little more careful who it assumes complies with
it's expected lifecycle.

Or:

3rd party MBeans are not expected to register with JBoss' MBeanServer and I
need to register them somewhere else.

Or:

Not many people have tried this and it needs to be thought out properly.

Or:

I've lost the plot !


>
>
> Now, if you have your own MBean loading mechanism , that you use in
> JettyServiceControlMBean, from let's say third file where you list your
> Jetty MBeans -> you are fine, since you bypass this ServiceControl's hook.

I don't load the MBeans, they are created on the fly. When you talk about a
'loading mechanism' does this involve a seperate MBeanServer. I assume so,
otherwise the JettyMBeans will still register with the same MBeanServer to
which your ServiceControlMBean is listening and it will still call init() on
them.



>
>
> But note that you also MUST load and register these Jetty MBeans before
> ServiceControl attaches it self as a NotificationListener to
> MBean registration events, otherwise you are screwed.
>

I guess I'm screwed then -  :-)  !


>
> You can only achieve this if you do the MBean loading and registration in
> JettyService and in its postregister method.

?????

>
>
> Other way to do it is to use some NotificationFilter in
> ServiceControl that excludes JettyServiceMBean registration events.
>

This sounds like a sensible option to me.

>
> I dont see a third option. :( Anyone else ?

I haven't written a filter - so I'm not sure if it is string-based (i.e.
matches patterns to Service names or what...) but here is my suggestion.

MBeans signal their willingness to have their lifecycle managed by JBoss by
e.g. implementing org.jboss.util.Service (static/standard MBeans) or publishing
a method e.g.  public boolean toBeManagedByJBoss() {returns true;}
(DynamicMBeans - maybe standard MBeans too). You could look for DynamicMBeans
which publish init()/start()/stop()/destroy() but these are very common
lifecycle methods (JettyMBeans implement 3/4) and may be implemented by 3rd
party MBeans which do not wish to be managed by ServiceControl. If the filter
is capable of letting through only MBeans doing this then it might be a useful
way to implement it.

Alternatively you could keep track of MBeans loaded statically by JBoss and
provide a manageMyLifeCycle(MBean) call so that dynamically created MBeans
could register their needs, and only manage the lifecycles of MBeans that end
up in this list.

Any more takers...?

>
> Cheers,
> Vladimir
>
>

Thanks for all the help,


Jules


P.S.

Here is what happens when I start JBoss_2_2_0_Final with Jetty registering
DynamicMBeans as and when they are created....

CLASSPATH=dummy:.:/usr/java/jdk1.3//lib/tools.jar:run.jar:../lib/crimson.jar
jboss.home =
/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/JBoss-2.2.0_Final
Using configuration "jetty"
[Info] Java version: 1.3.0,Sun Microsystems Inc.
[Info] Java VM: Java HotSpot(TM) Server VM 1.3.0,Sun Microsystems Inc.
[Info] System: Linux 2.4.2,i386
[Shutdown] Shutdown hook added
[Service Control] Registered with server
[Default] JBoss and Jetty Log models connected
[Default] successfully loaded properties
[Jetty] HttpServer version Jetty/3.1.RC1
[Jetty] setting jettyHome to
/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2
[Jetty] setting webDefault to
/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/etc/webdefault.xml

[Default] Jetty instantiated and initialised
[Jetty] Registered :service=Jetty,Jetty=0
[Jetty] setting unpackWars to false
[Jetty] setting webDefault to
/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/etc/webdefault.xml

[Default] setConfiguration() is deprecated - use addConfiguration()
[Jetty] Registered :service=Jetty,Jetty=0,SocketListener=0
[Jetty] Registered
:service=Jetty,Jetty=0,context=/jetty,WebApplicationContext=0
[Jetty] Web Application WebApp:Jetty3
Demo@file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/
added
[Jetty] Registered :service=Jetty,Jetty=0,context=/demo,HandlerContext=0
[Jetty] Registered :service=Jetty,Jetty=0,context=/javadoc,HandlerContext=0
[Jetty] Registered :service=Jetty,Jetty=0,context=/cgi-bin,HandlerContext=0
[Jetty] Registered :service=Jetty,Jetty=0,context=/,HandlerContext=0
[Jetty] successfully added configuration: file:../conf/jetty/jetty.xml
[Service Control] Initializing 32 MBeans
[Webserver] Initializing
[Webserver] Initialized
[Naming] Initializing
[Naming] Initialized
[JNDIView] Initializing
[JNDIView] Initialized
[Transaction manager] Initializing
[Transaction manager] Initialized
[JAAS Security Manager] Initializing
[JAAS Security Manager] Initialized
[JDBC provider] Initializing
[JDBC provider] Loaded JDBC-driver:org.hsql.jdbcDriver
[JDBC provider] Loaded JDBC-driver:org.enhydra.instantdb.jdbc.idbDriver
[JDBC provider] Initialized
[Hypersonic] Initializing
[Hypersonic] Initialized
[InstantDB] Initializing
[InstantDB] Initialized
[DefaultDS] Initializing
[DefaultDS] Initialized
[Container factory] Initializing
[Container factory] Initialized
[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty] Initializing
[Jetty] Initialized
[JBossMQ] Initializing
[JBossMQ] Initialized
[DefaultJMSProvider] Initializing
[DefaultJMSProvider] Initialized
[StdJMSPool] Initializing
[StdJMSPool] Initialized
[J2EE Deployer Default] Initializing
[J2EE Deployer Default] Initialized
[Auto deploy] Initializing
[Auto deploy] Initialized
[RARDeployer] Initializing
[RARDeployer] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaNoTransCMFactory] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaSharedLocalCMFactory] Initialized
[ConnectionManagerFactoryLoader] Initializing
[MinervaXACMFactory] Initialized
[ConnectionFactoryLoader] Initializing
[BlackBoxDS] Initialized
[JMX RMI Adaptor] Initializing
[JMX RMI Adaptor] Initialized
[JMX RMI Connector] Initializing
[JMX RMI Connector] Initialized
[Mail Service] Initializing
[Mail Service] Initialized
[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Jetty]
java.lang.NoSuchMethodException: init()
 at com.mortbay.Jetty.JMX.ModelMBeanImpl.invoke(ModelMBeanImpl.java)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1555)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.util.ServiceControl.init(ServiceControl.java:59)
 at java.lang.reflect.Method.invoke(Native Method)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1628)
 at com.sun.management.jmx.MBeanServerImpl.invoke(MBeanServerImpl.java:1523)
 at org.jboss.Main.<init>(Main.java:202)
 at org.jboss.Main$1.run(Main.java:107)
 at java.security.AccessController.doPrivileged(Native Method)
 at org.jboss.Main.main(Main.java:103)

[Service Control] Initialized 32 services
[Service Control] Starting 32 MBeans
[Webserver] Starting
[Webserver] Codebase set to http://megalodon:8083/
[Webserver] Started webserver on port 8083
[Webserver] Started
[Naming] Starting
[Naming] Naming started on port 1099
[Naming] Started
[JNDIView] Starting
[JNDIView] Started
[Transaction manager] Starting
[Transaction manager] Started
[JAAS Security Manager] Starting
[JAAS Security Manager] JAAS.startService, cachePolicy=null
[JAAS Security Manager] JAAS.startService,
SecurityProxyFactory=org.jboss.security.SubjectSecurityProxyFactory@45f0e3
[JAAS Security Manager] Started
[JDBC provider] Starting
[JDBC provider] Started
[Hypersonic] Starting
[Hypersonic] Server 1.4 is running
[Hypersonic] Database started
[Hypersonic] Started
[InstantDB] Starting
[Hypersonic] Press [Ctrl]+[C] to abort
[InstantDB] XA Connection pool InstantDB bound to java:/InstantDB
Enhydra InstantDB - Version 3.21
[InstantDB] The Initial Developer of the Original Code is Lutris Technologies
Inc.
Portions created by Lutris are Copyright (C) 1997-2000 Lutris Technologies,
Inc.
All Rights Reserved.
[InstantDB] Started
[DefaultDS] Starting
[DefaultDS] XA Connection pool DefaultDS bound to java:/DefaultDS
[DefaultDS] Started
[Container factory] Starting
[Container factory] Started
[Jetty] Started SecurityHandler in WebApp:Jetty3
Demo@file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/

[Jetty] Jetty Demo Page: init
[Jetty] Started ServletHandler in WebApp:Jetty3
Demo@file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/

[Jetty] Started WebInfProtect
[Jetty] ResourceHandler started in
file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/

[Jetty] Started ResourceHandler in WebApp:Jetty3
Demo@file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/

[Jetty] Started NotFoundHandler in WebApp:Jetty3
Demo@file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/webapps/jetty/

[Jetty] Started ServletHandler in HandlerContext[/cgi-bin]
[Jetty] Started ForwardHandler in HandlerContext[/demo]
[Jetty] Started ServletHandler in HandlerContext[/demo]
[Jetty] ResourceHandler started in
file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/docroot/

[Jetty] Started ResourceHandler in HandlerContext[/demo]
[Jetty] Started DumpHandler in HandlerContext[/demo]
[Jetty] ResourceHandler started in
file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/javadoc/

[Jetty] Started ResourceHandler in HandlerContext[/javadoc]
[Jetty] Started ForwardHandler in HandlerContext[/]
[Jetty] Started ServletHandler in HandlerContext[/]
[Jetty] ResourceHandler started in
file:/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/Jetty-3.1.RC2/etc/dtd/

[Jetty] Started ResourceHandler in HandlerContext[/]
[Jetty] Started SocketListener on 0.0.0.0:8080
[Jetty] Starting
[Jetty] Starting (jetty.mortbay.com)
[Jetty] Started successfully
[Jetty] Started
[JBossMQ] Starting
[JBossMQ] Server Version 0.8 Started
[JBossMQ] Started
[DefaultJMSProvider] Starting
[DefaultJMSProvider] JMS provider Adapter DefaultJMSProvider bound to
java:/DefaultJMSProvider
[DefaultJMSProvider] Started
[StdJMSPool] Starting
[StdJMSPool] JMS provider Adapter StdJMSPool bound to java:/StdJMSPool
[StdJMSPool] Started
[J2EE Deployer Default] Starting
[J2EE Deployer Default] Cleaning up deployment directory
[J2EE Deployer Default] Started
[Auto deploy] Starting
[Auto deploy] Watching
/home/jules/binaries/JBoss-2.2.0_Final-Jetty-3.1.RC2/JBoss-2.2.0_Final/deploy
[Auto deploy] Started
[RARDeployer] Starting
[RARDeployer] Started
[MinervaNoTransCMFactory] Starting
[MinervaNoTransCMFactory] Connection manager factory 'MinervaNoTransCMFactory
bound to 'java:/MinervaNoTransCMFactory'
[MinervaNoTransCMFactory] Started
[MinervaSharedLocalCMFactory] Starting
[MinervaSharedLocalCMFactory] Connection manager factory
'MinervaSharedLocalCMFactory bound to 'java:/MinervaSharedLocalCMFactory'
[MinervaSharedLocalCMFactory] Started
[MinervaXACMFactory] Starting
[MinervaXACMFactory] Connection manager factory 'MinervaXACMFactory bound to
'java:/MinervaXACMFactory'
[MinervaXACMFactory] Started
[BlackBoxDS] Starting
[BlackBoxDS] Started
[JMX RMI Adaptor] Starting
[JMX RMI Adaptor] Started
[JMX RMI Connector] Starting
[JMX RMI Connector] Started
[Mail Service] Starting
[Mail Service] DEBUG: not loading system providers in <java.home>/lib
[Mail Service] DEBUG: not loading optional custom providers file:
/META-INF/javamail.providers
[Mail Service] DEBUG: successfully loaded default providers
[Mail Service]
DEBUG: Tables of loaded providers
[Mail Service] DEBUG: Providers Listed By Class Name:
{com.sun.mail.smtp.SMTPTransport=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc],
com.sun.mail.imap.IMAPStore=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
com.sun.mail.pop3.POP3Store=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc]}
[Mail Service] DEBUG: Providers Listed By Protocol:
{imap=javax.mail.Provider[STORE,imap,com.sun.mail.imap.IMAPStore,Sun
Microsystems, Inc],
pop3=javax.mail.Provider[STORE,pop3,com.sun.mail.pop3.POP3Store,Sun
Microsystems, Inc],
smtp=javax.mail.Provider[TRANSPORT,smtp,com.sun.mail.smtp.SMTPTransport,Sun
Microsystems, Inc]}
[Mail Service] DEBUG: not loading optional address map file:
/META-INF/javamail.address.map
[Mail Service] Mail Service 'Mail' bound to java:/Mail
[Mail Service] Started
[Jetty] Already started on 0.0.0.0:8080
[Jetty] Started SocketListener on 0.0.0.0:8080
[Service Control] Started 32 services
[Default] JBoss 2.2.0 FINAL Started in 0m:20s>>
>
> >
> >
> > Vladimir
> >
> >
> > > --- danch &lt;[EMAIL PROTECTED]> wrote:
> > > > Have you tried putting the jetty &lt;mbean> stuff in
> > > > jboss.conf rather than
> > > > jboss.jcml? I believe (but I'm not a JMX expert)
> > > > that the Service
> > > > (init,start,stop,destroy) only applies to mbeans
> > > > listed in jboss.jcml,
> > > > not those in jboss.conf.
> > > >
> > > > Julian Gosnell wrote:
> > > > >
> > > > > Greg has released JettyJMX, a packaged which
> > > > > integrates with Jetty in order that all major
> > > > > components of Jetty become MBeans.
> > > > >
> > > > > I have been integrating this into jboss_jetty, so
> > > > that
> > > > > Jetty is now listed by the JMX agent as a
> > > > collection
> > > > > of services, all with published interfaces,
> > > > instead of
> > > > > one megalithic service.
> > > > >
> > > > > I have a problem !
> > > > >
> > > > > JBoss seems to expect MBeans registered with it's
> > > > JMX
> > > > > Server to support a JBoss-inspired life-cycle
> > > > > init()/start()/stop()/destroy().
> > > > >
> > > > > Jetty MBeans support a different lifecycle which
> > > > has
> > > > > no init() method.
> > > > >
> > > > > Every time a Jetty MBean is registered, JBoss
> > > > tries to


>
>
> must be a JBoss thing, because valid Jetty MBeans function fine
> > without it.
> >
> > So, If JBoss does not expect 3rd party MBeans to register with it's
> > MBeanServer - where should I register them to get them connected to the
> > JBoss JMX Agent ?
> >
> > If JBoss does expect 3rd party MBeans to register with it's MBeanServer,
> > then it should not mandate the JBoss style lifecycle, simply use it if the
> > MBean implements it and leave it alone if it doesn't.
> >
> > So does it - or not ?
> >
> > Anyone ?
> >
> > Or have I completely misunderstood ?
> >
> >
> >
> > Jules
> >
> >
> > >
> > >
> > > Vladimir
> > >
> > >
> > > > --- danch <[EMAIL PROTECTED]> wrote:
> > > > > Have you tried putting the jetty <mbean> stuff in
> > > > > jboss.conf rather than
> > > > > jboss.jcml? I believe (but I'm not a JMX expert)
> > > > > that the Service
> > > > > (init,start,stop,destroy) only applies to mbeans
> > > > > listed in jboss.jcml,
> > > > > not those in jboss.conf.
> > > > >
> > > > > Julian Gosnell wrote:
> > > > > >
> > > > > > Greg has released JettyJMX, a packaged which
> > > > > > integrates with Jetty in order that all major
> > > > > > components of Jetty become MBeans.
> > > > > >
> > > > > > I have been integrating this into jboss_jetty, so
> > > > > that
> > > > > > Jetty is now listed by the JMX agent as a
> > > > > collection
> > > > > > of services, all with published interfaces,
> > > > > instead of
> > > > > > one megalithic service.
> > > > > >
> > > > > > I have a problem !
> > > > > >
> > > > > > JBoss seems to expect MBeans registered with it's
> > > > > JMX
> > > > > > Server to support a JBoss-inspired life-cycle
> > > > > > init()/start()/stop()/destroy().
> > > > > >
> > > > > > Jetty MBeans support a different lifecycle which
> > > > > has
> > > > > > no init() method.
> > > > > >
> > > > > > Every time a Jetty MBean is registered, JBoss
> > > > > tries to
> > > > > > call it's init() method, resulting in an exception
> > > > > > being thrown from within JMX.
> > > > > >
> > > > > > Maybe I am taking the wrong approach.
> > > > > >
> > > > > > I would like internal Jetty services to be
> > > > > available
> > > > > > to JBoss users via JMX. However these internal
> > > > > > services should be managed by Jetty, not JBoss (I
> > > > > > don't expect someone else to come in and call
> > > > > > lifecycle methods on objects I own...)
> > > > > >
> > > > > > Can this be done ?
> > > > > >
> > > > > > Do I register Jetty MBeans against another JMX
> > > > > Server
> > > > > > ? If so can I hook this into the main JBoss one ?
> > > > > >
> > > > > > Should JBoss-Jetty actually be this JMX Server ?
> > > > > >
> > > > > > How should we scope groups of nested services
> > > > > within
> > > > > > JBoss ?
> > > > > >
> > > > > > That should do it !
> > > > > >
> > > > > > Jules
> > > > > >
> > > > > > __________________________________________________


_________________________________________________________
Do You Yahoo!?
Get your free @yahoo.com address at http://mail.yahoo.com


_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/lists/listinfo/jboss-development

Reply via email to