[jboss-jira] [JBoss JIRA] (WFLY-11190) SAR jboss-service MBean start with @Postconstruct annotation called twice.

Brian Stansberry (Jira) issues at jboss.org
Mon Oct 22 12:59:00 EDT 2018


     [ https://issues.jboss.org/browse/WFLY-11190?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry resolved WFLY-11190.
-------------------------------------
    Resolution: Won't Fix


This is a fair enough point but I don't foresee anything being done about this. An application written this way is mixing two different component models.  Adjusting the two subsystems so they are somehow aware of each other and coordinate is likely to be complex and a source of bugs.

> SAR jboss-service MBean start with @Postconstruct annotation called twice.
> --------------------------------------------------------------------------
>
>                 Key: WFLY-11190
>                 URL: https://issues.jboss.org/browse/WFLY-11190
>             Project: WildFly
>          Issue Type: Bug
>          Components: Server
>    Affects Versions: 10.1.0.Final
>            Reporter: Wozza Xing
>            Assignee: Jason Greene
>            Priority: Minor
>
> Start and stop are "magic" method names for jboss services.
> As a result the method is invoked twice.
> I would expect the object has already started, so why call it again.
> This is the same for Predestroy and stop() method.
> In WFLYSRV0049: WildFly Full 10.1.0.Final (WildFly Core 2.2.0.Final) starting
> @PostConstruct
> public void start() {
> logger.info(this.hashCode() + "configuration for " + this.getBaseDir() + " " + System.getProperties().getProperty("jboss.server.config.dir"));
> }
> Output is
> (ServerService Thread Pool -- 69) 2034435521 configuration for /opt/wildfly/standalone/configuration /opt/wildfly/standalone/configuration
> (ServerService Thread Pool -- 69) 2034435521 configuration for /opt/wildfly/standalone/configuration /opt/wildfly/standalone/configuration



--
This message was sent by Atlassian Jira
(v7.12.1#712002)


More information about the jboss-jira mailing list