OK, I can't see how to expose an EJB as an MBean. So in JBoss everything is
an MBean, and my EJB is there already and there are some stats that the
interceptor must maintain. But how do I add my own MBean interface, or
extend the existing one?

I've specified the XDoclet tags  @jmx.mbean  on my EJB class and
@jmx.managed-operation  on the method I want to expose. I've set up the
XDoclet task thus:

  jmxdoclet
    fileset
    jbossxmbean
      PackageSubstitution (MBean interface in subpackage of EJB)
    jbosxmldoc
    mbeaninterface
      PackageSubstitution (MBean interface in subpackage of EJB)

This generates  src/jboss-service.xml  (with an empty  <service>  tag) and
my interface class with the exposed method. I then add the <mbean code=...>
tag to the  jboss-service.xml  file, and add a
<service>jboss-service.xml</service>  entry to  application.xml.  

Finally I package it into an  .ear  that has my  xxxEJB.jar,  xxxWS.wsr,
jboss-service.xml  and  META-INF/application.xml  which refers to all three
of these thus:

  <application>
    <display-name>xxx</display-name> 
    <service>jboss-service.xml</service> 
    <module>
      <ejb>xxxEJB.jar</ejb> 
    </module>
    <module>
      <java>xxxWS.wsr</java> 
    </module>
  </application>

This deploys fine, but I cannot find my MBean. I am expecting JBoss to
recognise the MBean and register it for me. Am I confused?

Any pointers or an example would be greatly appreciated!

cheers

Simon


***********************************************************************************
The Royal Bank of Scotland plc. Registered in Scotland No 90312.       Registered 
Office: 36 St Andrew Square, Edinburgh EH2 2YB.                                      
Authorised and regulated by the Financial Services Authority     
 
This e-mail message is confidential and for use by the                      
addressee only. If the message is received by anyone other             
than the addressee, please return the message to the sender          
by replying to it and then delete the message from your                    
computer. Internet e-mails are not necessarily secure. The               
Royal Bank of Scotland plc does not accept responsibility for          
changes made to this message after it was sent.                              
                                                                                       
                 
Whilst all reasonable care has been taken to avoid the                   
transmission of viruses, it is the responsibility of the recipient to        
ensure that the onward transmission, opening or use of this             
message and any attachments will not adversely affect its               
systems or data.  No responsibility is accepted by The Royal           
Bank of Scotland plc in this regard and the recipient should carry   
out such virus and other checks as it considers appropriate.           
                                                                                       
                        Visit our websites at:                                         
                                 
http://www.rbs.co.uk/CBFM                                                        
http://www.rbsmarkets.com                                                         
                                                                                       
                
********************************************************************************



-------------------------------------------------------
This SF.net email is sponsored by: Perforce Software.
Perforce is the Fast Software Configuration Management System offering
advanced branching capabilities and atomic changes on 50+ platforms.
Free Eval! http://www.perforce.com/perforce/loadprog.html
_______________________________________________
JBoss-user mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-user

Reply via email to