views:

32

answers:

1

Hi there,

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.

A: 

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

asrijaal