简体   繁体   中英

Spring JMX MBeans, JBoss ListenerService

I'm trying to use the Spring JMX Exporter to define a MBean in my JBoss Portal Server (2.7.0) which is built on a JBoss AS 4.2.3.

The MBean is exported correctly but I want to trigger some of the PortalEvents now here comes my problem:

If I declare a service in my jboss-service.xml I have to define a dependency for this MBean.

<mbean
    code="org.jboss.portal.core.event.PortalEventListenerServiceImpl"
    name="portal:service=ListenerService,type=login_event"
    xmbean-dd=""
    xmbean-code="org.jboss.portal.jems.as.system.JBossServiceModelMBean">
        <xmbean/>
        <depends
        optional-attribute-name="Registry"
            proxy-type="attribute">portal:service=ListenerRegistry</depends>
        <attribute name="RegistryId">login_event</attribute>
        <attribute name="ListenerClassName">
        de.ac.m.login.PortalSessionEventLogin
        </attribute>
</mbean>

Is there a possibility to define such a dependency in my Spring JMX Exporter too? Reason for exporting via spring is, that I want to access my dao layer too from this MBean. And I dont want a double packaging. One export as war and one as jar, so that my MBean class is available for the portal.

sadly it is not possible via springs jmx exporter. Writing the mbean and deploying the mbean programmaticly seems the only way here.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM