views:

26

answers:

1

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

+2  A: 

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> 
shipmaster
Duh. My tireness spoke when I was writing the question. The question was meant to ask about the @Create annotation. How about that?
Markos Fragkakis
The closest I think to that is to define a factory and call your initialization from the factory method e.g. <factory name="contact" method="#{contactManager.loadContact}" scope="CONVERSATION"/>
shipmaster
Cheers, that will work for me. (+1)
Markos Fragkakis