[jboss-cvs] JBossAS SVN: r64914 - in projects/microcontainer/trunk/aop-mc-int/src: main/org/jboss/aop/microcontainer/beans/xml and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Tue Aug 28 11:27:14 EDT 2007


Author: alesj
Date: 2007-08-28 11:27:14 -0400 (Tue, 28 Aug 2007)
New Revision: 64914

Added:
   projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PreInstallLifecycleBeanMetaDataFactory.java
Modified:
   projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java
   projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd
Log:
PreInstallLifecycle callback.

Added: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PreInstallLifecycleBeanMetaDataFactory.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PreInstallLifecycleBeanMetaDataFactory.java	                        (rev 0)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/PreInstallLifecycleBeanMetaDataFactory.java	2007-08-28 15:27:14 UTC (rev 64914)
@@ -0,0 +1,40 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2006, JBoss Inc., and individual contributors as indicated
+* by the @authors tag. See the copyright.txt in the distribution for a
+* full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+*/
+package org.jboss.aop.microcontainer.beans;
+
+import org.jboss.dependency.spi.ControllerState;
+
+/**
+ * PreInstall lifecycle callback.
+ * 
+ * @author <a href="ales.justin at jboss.com">Ales Justin</a>
+ */
+public class PreInstallLifecycleBeanMetaDataFactory extends LifecycleBeanMetaDataFactory
+{
+   private static final long serialVersionUID = 1L;
+
+   @Override
+   protected ControllerState getState()
+   {
+      return ControllerState.PRE_INSTALL;
+   }
+}

Modified: projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java	2007-08-28 14:49:52 UTC (rev 64913)
+++ projects/microcontainer/trunk/aop-mc-int/src/main/org/jboss/aop/microcontainer/beans/xml/AOPBeansSchemaInitializer.java	2007-08-28 15:27:14 UTC (rev 64914)
@@ -32,6 +32,7 @@
 import org.jboss.aop.microcontainer.beans.InstantiateLifecycleBeanMetaDataFactory;
 import org.jboss.aop.microcontainer.beans.LifecycleBeanMetaDataFactory;
 import org.jboss.aop.microcontainer.beans.StartLifecycleBeanMetaDataFactory;
+import org.jboss.aop.microcontainer.beans.PreInstallLifecycleBeanMetaDataFactory;
 import org.jboss.kernel.plugins.deployment.xml.BeanFactoryHandler;
 import org.jboss.kernel.plugins.deployment.xml.BeanSchemaBinding20;
 import org.jboss.kernel.plugins.deployment.xml.BeanSchemaBindingHelper;
@@ -146,11 +147,15 @@
          {      
             return new InstantiateLifecycleBeanMetaDataFactory();
          }
+         if (localname.equals("lifecycle-preinstall"))
+         {      
+            return new PreInstallLifecycleBeanMetaDataFactory();
+         }
          if (localname.equals("lifecycle-start"))
-         {      
+         {
             return new StartLifecycleBeanMetaDataFactory();
          }
-         
+
          throw new IllegalStateException(name + " is not a recognized element");
       }
 

Modified: projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd
===================================================================
--- projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd	2007-08-28 14:49:52 UTC (rev 64913)
+++ projects/microcontainer/trunk/aop-mc-int/src/resources/main/schema/aop-beans_1_0.xsd	2007-08-28 15:27:14 UTC (rev 64914)
@@ -131,6 +131,16 @@
       </xsd:annotation>
    </xsd:element>
    
+   <xsd:element name="lifecycle-preinstall" type="lifecycleType">
+      <xsd:annotation>
+         <xsd:documentation>
+           <![CDATA[
+           An aspect intercepting when a bean is preinstalled/unpreinstalled
+           ]]>
+         </xsd:documentation>
+      </xsd:annotation>
+   </xsd:element>
+
    <xsd:element name="lifecycle-start" type="lifecycleType">
       <xsd:annotation>
          <xsd:documentation>




More information about the jboss-cvs-commits mailing list