[jboss-jira] [JBoss JIRA] (WFLY-4806) Do not deploy artifacts until subsystem MBeans are registered

Brian Riehman (JIRA) issues at jboss.org
Mon Jun 22 11:12:04 EDT 2015


    [ https://issues.jboss.org/browse/WFLY-4806?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13082234#comment-13082234 ] 

Brian Riehman commented on WFLY-4806:
-------------------------------------

Thanks for the clarification, Kabir. From your description it seems that the MBean proxy should be installed prior to the deployments. Is that accurate? I have created a [sample repository|https://github.com/briehman/wildfly-mbean] to exhibit how the proxy is not available during deployment.

The application looks up the MBean in a ContextListener at startup and saves whether the MBean proxy is available to a servlet field. The servlet displays this field along with whether or not the MBean is presently available. I was expecting the MBean proxy to be available prior to deployment since there may be attributes or fields we would like to use within our application. However, the example shows that the proxy is not available until after deployment:

From: http://localhost:8080/wildfly-mbean/mbean
{quote}
Registered at startup: false
Registered currently: true
{quote}

If the WAR is deployed after the server has started up, it will be registered.

> Do not deploy artifacts until subsystem MBeans are registered
> -------------------------------------------------------------
>
>                 Key: WFLY-4806
>                 URL: https://issues.jboss.org/browse/WFLY-4806
>             Project: WildFly
>          Issue Type: Feature Request
>          Components: JMX, Server
>            Reporter: Brian Riehman
>            Assignee: Kabir Khan
>            Priority: Minor
>
> When the server starts up and begins to deploy artifacts, the subsystem MBeans are not yet available. Our application has implemented a {{ServletContextListener}} and is attempting to lookup attributes from a DataSource MBean (e.g. {{jboss.as:subsystem=datasources,xa-data-source=DefaultDS}}). This MBean is not available at the time the listener is called when the server is first starting up. Some time after the deployment has run, the MBean is available and can be queried.
> If the deployment is added after the server has already successfully started, the MBean can be queried successfully. I would imagine the deploy operation is done in parallel with the MBean registration, but I cannot find where the datasource subsystem MBean registration occurs.
> It is odd that the datasource exists but the datasources subsystem MBean is not yet available for querying.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)


More information about the jboss-jira mailing list