Search code examples
javajakarta-eeseamseam2

Seam: equivalent of @Startup in components.xml?


Is there an equivalent of @Startup annotation in Seam which I could use in components.xml?


Solution

  • Per http://www.jboss.com/products/seam/components-2.2.xsd you can use startup=true|false

    <xs:attribute name="startup" default="false" type="components:boolean"> 
            <xs:annotation> 
                <xs:documentation> 
                    Indicates that an instance of the component should be created when the 
                    the component's controlling scope starts.  This is only used for application and
                    session scope.
                </xs:documentation> 
            </xs:annotation> 
        </xs:attribute>