-
1. Re: JMX annotations and parsing question
alesj Dec 19, 2009 12:46 PM (in response to deruelle_jean)There is no auto-magic discovery.
You will need to somehow tweak this to end-up in MC/MBeanServer.
If you post more info I can give you more exact suggestion.
-
2. Re: JMX annotations and parsing question
deruelle_jean Dec 21, 2009 8:40 AM (in response to alesj)Thanks for the answer.
so the sip stack is started as a Tomcat connector.
In server.xml of jboss web, you basically have this under the Service tag
<!-- Define a SIP Connector -->
<Connector port="5080" ipAddress = "${jboss.bind.address}" protocol="org.mobicents.servlet.sip.startup.SipProtocolHandler" signalingTransport="udp" sipStackPropertiesFile="conf/mss-sip-stack.properties"/>
Thus when the connectors are started by org.jboss.web.tomcat.service.deployers.TomcatService, the SIP Connector is started.
During the SIP Connector Startup, we use a stack which we need to pass some properties programmatically so this stack is created programmatically See http://code.google.com/p/mobicents/source/browse/trunk/servers/sip-servlets/sip-servlets-impl/src/main/java/org/mobicents/servlet/sip/startup/SipProtocolHandler.java#362 for SIP stack creation.
I was wondering if it was possible to get the MBeanServer through something similar to JBoss AS 4, MBeanProxyExt class ?
Thanks in advance
BR
Jean
-
3. Re: JMX annotations and parsing question
alesj Dec 21, 2009 8:55 AM (in response to deruelle_jean)I was wondering if it was possible to get the MBeanServer through something similar to JBoss AS 4, MBeanProxyExt class ?
You mean MBeanServerLocator?
There are two things wrong with that static hack:
* JMX might not exist in next version of AS (it will be optional)
* MC equivalent can be scoped, hence you might end up with the wrong instance of Kernel
I hacked together a simple MC-int-servlet lib (which I think I already pointed you once), which deals with this two issues.
The entry point is somewhere in Tomcat/JBossWeb code, where I attach current Kernel instance and DeploymentUnit to ServletContext's attributes.
Dunno if that helps you, but my suggestion would be you do something similar.
In the worst case use ThreadLocalUtil in MC-int-common to help you pass around the right instance.
* http://anonsvn.jboss.org/repos/jbossas/projects/mc-int/trunk/
The current version is 2.2.0.Alpha2, also distributed in our mvn repo.
-
4. Re: JMX annotations and parsing question
deruelle_jean Dec 21, 2009 4:08 PM (in response to alesj)I actually need something supported out of the box on EAP 5, so if ThreadLocalUtil is available in EAP 5 I could use that easily otherwise it will have to wait that we intergate with AS6, I guess otherwise I would use MBeanServerLocator. Also in my case, I need the ServiceController not the Kernel right ?
Is the entry point you mention located in deployWebModule method of http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_1_0_GA/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java ?
Thanks
Jean
-
5. Re: JMX annotations and parsing question
alesj Dec 21, 2009 4:38 PM (in response to deruelle_jean)1 of 1 people found this helpfulI actually need something supported out of the box on EAP 5, so if ThreadLocalUtil is available in EAP 5 I could use that easily otherwise it will have to wait that we intergate with AS6, I guess otherwise I would use MBeanServerLocator. Also in my case, I need the ServiceController not the Kernel right ?
Either one.
This piece creates the mbean which then creates ServletContext, where the Kernel and DeploymentUnit are stashed.Is the entry point you mention located in deployWebModule method of http://anonsvn.jboss.org/repos/jbossas/tags/JBoss_5_1_0_GA/server/src/main/org/jboss/web/deployers/AbstractWarDeployer.java ?