[jboss-cvs] jboss-seam/src/main/org/jboss/seam ...

Gavin King gavin.king at jboss.com
Mon Jul 16 05:19:15 EDT 2007


  User: gavin   
  Date: 07/07/16 05:19:15

  Modified:    src/main/org/jboss/seam    Component.java components-2.0.dtd
                        components-2.0.xsd
  Log:
  override startup in components.xml
  
  Revision  Changes    Path
  1.269     +8 -7      jboss-seam/src/main/org/jboss/seam/Component.java
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: Component.java
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/Component.java,v
  retrieving revision 1.268
  retrieving revision 1.269
  diff -u -b -r1.268 -r1.269
  --- Component.java	7 Jul 2007 01:28:16 -0000	1.268
  +++ Component.java	16 Jul 2007 09:19:15 -0000	1.269
  @@ -193,26 +193,27 @@
      // only used for tests
      public Component(Class<?> clazz, String componentName)
      {
  -      this(clazz, componentName, Seam.getComponentScope(clazz), null);
  +      this(clazz, componentName, Seam.getComponentScope(clazz), false, null);
      }
   
      // only used for tests
      public Component(Class<?> clazz, Context applicationContext)
      {
  -      this( clazz, getComponentName(clazz), Seam.getComponentScope(clazz), null, applicationContext );
  +      this( clazz, getComponentName(clazz), Seam.getComponentScope(clazz), false, null, applicationContext );
      }
   
  -   public Component(Class<?> clazz, String componentName, ScopeType componentScope, String jndiName)
  +   public Component(Class<?> clazz, String componentName, ScopeType componentScope, boolean startup, String jndiName)
      {
  -      this(clazz, componentName, componentScope, jndiName, Contexts.getApplicationContext());
  +      this(clazz, componentName, componentScope, startup, jndiName, Contexts.getApplicationContext());
      }
   
  -   private Component(Class<?> beanClass, String componentName, ScopeType componentScope, String componentJndiName, Context applicationContext)
  +   private Component(Class<?> beanClass, String componentName, ScopeType componentScope, boolean startup, String componentJndiName, Context applicationContext)
      {
         super(beanClass);
         
         name = componentName;
         scope = componentScope;
  +      this.startup = startup;
         type = Seam.getComponentType( getBeanClass() );
         interceptionEnabled = Seam.isInterceptionEnabled( getBeanClass() );
         
  @@ -279,14 +280,14 @@
   
      private void initStartup()
      {
  -      startup = getBeanClass().isAnnotationPresent(Startup.class);
         if (startup)
         {
            if (scope!=SESSION && scope!=APPLICATION)
            {
               throw new IllegalArgumentException("@Startup only supported for SESSION or APPLICATION scoped components: " + name);
            }
  -         dependencies = getBeanClass().getAnnotation(Startup.class).depends();
  +         Startup annotation = getBeanClass().getAnnotation(Startup.class);
  +         dependencies = annotation==null ? new String[0] : annotation.depends();
         }
      }
   
  
  
  
  1.2       +2 -1      jboss-seam/src/main/org/jboss/seam/components-2.0.dtd
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: components-2.0.dtd
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/components-2.0.dtd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- components-2.0.dtd	26 Jun 2007 23:02:37 -0000	1.1
  +++ components-2.0.dtd	16 Jul 2007 09:19:15 -0000	1.2
  @@ -22,7 +22,8 @@
   <!ATTLIST factory method CDATA #IMPLIED>
   <!ATTLIST factory value CDATA #IMPLIED>
   <!ATTLIST factory scope (stateless|event|page|conversation|session|business_process|application|STATELESS|EVENT|PAGE|CONVERSATION|SESSION|BUSINESS_PROCESS|APPLICATION) #IMPLIED>
  -<!ATTLIST factory auto-create (true|false) "false">
  +<!ATTLIST factory auto-create (true|false) #IMPLIED>
  +<!ATTLIST factory startup (true|false) #IMPLIED>
   
   <!ELEMENT property (#PCDATA|key|value)*>
   <!ATTLIST property name CDATA #REQUIRED>
  
  
  
  1.2       +9 -1      jboss-seam/src/main/org/jboss/seam/components-2.0.xsd
  
  (In the diff below, changes in quantity of whitespace are not shown.)
  
  Index: components-2.0.xsd
  ===================================================================
  RCS file: /cvsroot/jboss/jboss-seam/src/main/org/jboss/seam/components-2.0.xsd,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -b -r1.1 -r1.2
  --- components-2.0.xsd	26 Jun 2007 23:02:37 -0000	1.1
  +++ components-2.0.xsd	16 Jul 2007 09:19:15 -0000	1.2
  @@ -90,7 +90,15 @@
                   </xs:restriction>
               </xs:simpleType>
           </xs:attribute>
  -        <xs:attribute name="auto-create" default="false">
  +        <xs:attribute name="auto-create">
  +            <xs:simpleType>
  +                <xs:restriction base="xs:token">
  +                    <xs:enumeration value="true"/>
  +                    <xs:enumeration value="false"/>
  +                </xs:restriction>
  +            </xs:simpleType>
  +        </xs:attribute>
  +        <xs:attribute name="startup">
               <xs:simpleType>
                   <xs:restriction base="xs:token">
                       <xs:enumeration value="true"/>
  
  
  



More information about the jboss-cvs-commits mailing list