This content has been marked as final.
Show 2 replies
-
1. Re: servlet depends on MBean!
mvrajesh Sep 13, 2005 12:12 PM (in response to vikas0506)Hi,
To register the mBean you need to add the following lines to the default\conf\jBoss-service.xml
This makes the jBoss while loading to recognize the mBean
Following is a sample how to use it<mbean code="your mbean" name="your mBean name which you have given in the mbean java file"> </mbean>
for example<mbean code="com.jnu.temp.server.ServerExample" name="temp.server:alias=temp/server/ServerExample"> </mbean>
the name in the above code sample is the ObjectName you specify in your mBean
Before that you make sure that your mbean follows the architecture or Jboss throws exception and will not start
Hope this helps
Thanks
Venkat -
2. Re: servlet depends on MBean!
vlokesh Sep 13, 2005 8:17 PM (in response to vikas0506)Package your servlet in a war file. Package your mbean in a SAR file. Create jboss-web.xml under WEB-INF folder and mention the SAR dependency in that file.
Example
******
jboss-web.xml under WEB-INF
< jboss-web >
< depends >someservice:mbeanName
</jboss-web>
Regards.
Lokesh.