[jboss-jira] [JBoss JIRA] Created: (AS7-1921) <init-on-startup> in ejb-jar.xml doesn't suppress the EJB's @Startup annotation

Pedro Kowalski (JIRA) jira-events at lists.jboss.org
Fri Sep 23 10:33:26 EDT 2011


<init-on-startup> in ejb-jar.xml doesn't suppress the EJB's @Startup annotation
-------------------------------------------------------------------------------

                 Key: AS7-1921
                 URL: https://issues.jboss.org/browse/AS7-1921
             Project: Application Server 7
          Issue Type: Bug
          Components: EE
    Affects Versions: 7.0.2.Final
         Environment: GNU/Linux Ubuntu 11.04 x86
            Reporter: Pedro Kowalski
            Assignee: David Lloyd


For a Singleton EJB defined as follows:

@Singleton(name="MyInit")
@Startup
public class MyInit {

    @PostConstruct
    void init() {
        System.out.println("=========== INITIALIZING! ===========");
    }
}

and for ejb-jar.xml fragment defined as follows:
 
<session>
   <ejb-name>MyInit</ejb-name>
   <init-on-startup>false</init-on-startup>
</session>


The MyInit EJB is still initializing and you can still see the '======= INITIALIZING! =====' part in the logs.

It seems that the <init-on-startup> element's value is not suppressing the @Startup annotation.

Exemplary application: http://community.jboss.org/servlet/JiveServlet/download/628245-41501/StartupAS7.jar

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

        


More information about the jboss-jira mailing list