Seam:相当于components.xml中的@Startup?

时间:2010-06-29 09:39:46

标签: java java-ee seam seam2

在Seam中是否有类似的@Startup注释我可以在components.xml中使用?

1 个答案:

答案 0 :(得分:3)

http://www.jboss.com/products/seam/components-2.2.xsd你可以使用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>