[jboss-cvs] JBossAS SVN: r100165 - in projects/jboss-jca/trunk/fungal/src/main: java/org/jboss/jca/fungal/impl and 1 other directories.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Sat Jan 30 10:35:39 EST 2010


Author: jesper.pedersen
Date: 2010-01-30 10:35:39 -0500 (Sat, 30 Jan 2010)
New Revision: 100165

Added:
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreCreateType.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreDestroyType.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStartType.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStopType.java
Modified:
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/BeanType.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/Unmarshaller.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/BeanDeployment.java
   projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java
   projects/jboss-jca/trunk/fungal/src/main/resources/deployment.xsd
Log:
[JBJCA-266] Add support for ignoring lifecycle methods

Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/BeanType.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/BeanType.java	2010-01-30 15:23:17 UTC (rev 100164)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/BeanType.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -37,6 +37,10 @@
    private List<UninstallType> uninstall;
    private List<IncallbackType> incallback;
    private List<UncallbackType> uncallback;
+   private IgnoreCreateType ignoreCreate;
+   private IgnoreStartType ignoreStart;
+   private IgnoreStopType ignoreStop;
+   private IgnoreDestroyType ignoreDestroy;
    private String name;
    private String interfaze;
    private String clazz;
@@ -53,6 +57,10 @@
       uninstall = null;
       incallback = null;
       uncallback = null;
+      ignoreCreate = null;
+      ignoreStart = null;
+      ignoreStop = null;
+      ignoreDestroy = null;
       name = null;
       interfaze = null;
       clazz = null;
@@ -149,6 +157,78 @@
    }
 
    /**
+    * Get the ignore create value
+    * @return The value
+    */
+   public IgnoreCreateType getIgnoreCreate()
+   {
+      return ignoreCreate;
+   }
+
+   /**
+    * Set the ignore create value
+    * @param value The value
+    */
+   public void setIgnoreCreate(IgnoreCreateType value)
+   {
+      ignoreCreate = value;
+   }
+
+   /**
+    * Get the ignore start value
+    * @return The value
+    */
+   public IgnoreStartType getIgnoreStart()
+   {
+      return ignoreStart;
+   }
+
+   /**
+    * Set the ignore start value
+    * @param value The value
+    */
+   public void setIgnoreStart(IgnoreStartType value)
+   {
+      ignoreStart = value;
+   }
+
+   /**
+    * Get the ignore stop value
+    * @return The value
+    */
+   public IgnoreStopType getIgnoreStop()
+   {
+      return ignoreStop;
+   }
+
+   /**
+    * Set the ignore stop value
+    * @param value The value
+    */
+   public void setIgnoreStop(IgnoreStopType value)
+   {
+      ignoreStop = value;
+   }
+
+   /**
+    * Get the ignore destroy value
+    * @return The value
+    */
+   public IgnoreDestroyType getIgnoreDestroy()
+   {
+      return ignoreDestroy;
+   }
+
+   /**
+    * Set the ignore destroy value
+    * @param value The value
+    */
+   public void setIgnoreDestroy(IgnoreDestroyType value)
+   {
+      ignoreDestroy = value;
+   }
+
+   /**
     * Get the name
     * @return The value
     */

Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreCreateType.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreCreateType.java	                        (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreCreateType.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.fungal.deployment;
+
+/**
+ * Represents an ignore create element
+ */
+public class IgnoreCreateType
+{
+
+   /**
+    * Constructor
+    */
+   public IgnoreCreateType()
+   {
+   }
+}

Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreDestroyType.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreDestroyType.java	                        (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreDestroyType.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.fungal.deployment;
+
+/**
+ * Represents an ignore destroy element
+ */
+public class IgnoreDestroyType
+{
+
+   /**
+    * Constructor
+    */
+   public IgnoreDestroyType()
+   {
+   }
+}

Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStartType.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStartType.java	                        (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStartType.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.fungal.deployment;
+
+/**
+ * Represents an ignore start element
+ */
+public class IgnoreStartType
+{
+
+   /**
+    * Constructor
+    */
+   public IgnoreStartType()
+   {
+   }
+}

Added: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStopType.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStopType.java	                        (rev 0)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/IgnoreStopType.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2010, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.jca.fungal.deployment;
+
+/**
+ * Represents an ignore stop element
+ */
+public class IgnoreStopType
+{
+
+   /**
+    * Constructor
+    */
+   public IgnoreStopType()
+   {
+   }
+}

Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/Unmarshaller.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/Unmarshaller.java	2010-01-30 15:23:17 UTC (rev 100164)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/deployment/Unmarshaller.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -193,6 +193,22 @@
                {
                   result.getUncallback().add(readUncallback(xmlStreamReader));
                }
+               else if ("ignoreCreate".equals(name))
+               {
+                  result.setIgnoreCreate(readIgnoreCreate(xmlStreamReader));
+               }
+               else if ("ignoreStart".equals(name))
+               {
+                  result.setIgnoreStart(readIgnoreStart(xmlStreamReader));
+               }
+               else if ("ignoreStop".equals(name))
+               {
+                  result.setIgnoreStop(readIgnoreStop(xmlStreamReader));
+               }
+               else if ("ignoreDestroy".equals(name))
+               {
+                  result.setIgnoreDestroy(readIgnoreDestroy(xmlStreamReader));
+               }
 
                break;
             default :
@@ -930,4 +946,96 @@
 
       return result;
    }
+
+   /**
+    * Read: <ignoreCreate>
+    * @param xmlStreamReader The XML stream
+    * @return The ignoreCreate
+    * @exception XMLStreamException Thrown if an exception occurs
+    */
+   private IgnoreCreateType readIgnoreCreate(XMLStreamReader xmlStreamReader) throws XMLStreamException
+   {
+      IgnoreCreateType result = new IgnoreCreateType();
+
+      int eventCode = xmlStreamReader.next();
+
+      while (eventCode != XMLStreamReader.END_ELEMENT)
+      {
+         eventCode = xmlStreamReader.next();
+      }
+
+      if (!"ignoreCreate".equals(xmlStreamReader.getLocalName()))
+         throw new XMLStreamException("ignoreCreate tag not completed", xmlStreamReader.getLocation());
+
+      return result;
+   }
+
+   /**
+    * Read: <ignoreStart>
+    * @param xmlStreamReader The XML stream
+    * @return The ignoreStart
+    * @exception XMLStreamException Thrown if an exception occurs
+    */
+   private IgnoreStartType readIgnoreStart(XMLStreamReader xmlStreamReader) throws XMLStreamException
+   {
+      IgnoreStartType result = new IgnoreStartType();
+
+      int eventCode = xmlStreamReader.next();
+
+      while (eventCode != XMLStreamReader.END_ELEMENT)
+      {
+         eventCode = xmlStreamReader.next();
+      }
+
+      if (!"ignoreStart".equals(xmlStreamReader.getLocalName()))
+         throw new XMLStreamException("ignoreStart tag not completed", xmlStreamReader.getLocation());
+
+      return result;
+   }
+
+   /**
+    * Read: <ignoreStop>
+    * @param xmlStreamReader The XML stream
+    * @return The ignoreStop
+    * @exception XMLStreamException Thrown if an exception occurs
+    */
+   private IgnoreStopType readIgnoreStop(XMLStreamReader xmlStreamReader) throws XMLStreamException
+   {
+      IgnoreStopType result = new IgnoreStopType();
+
+      int eventCode = xmlStreamReader.next();
+
+      while (eventCode != XMLStreamReader.END_ELEMENT)
+      {
+         eventCode = xmlStreamReader.next();
+      }
+
+      if (!"ignoreStop".equals(xmlStreamReader.getLocalName()))
+         throw new XMLStreamException("ignoreStop tag not completed", xmlStreamReader.getLocation());
+
+      return result;
+   }
+
+   /**
+    * Read: <ignoreDestroy>
+    * @param xmlStreamReader The XML stream
+    * @return The ignoreDestroy
+    * @exception XMLStreamException Thrown if an exception occurs
+    */
+   private IgnoreDestroyType readIgnoreDestroy(XMLStreamReader xmlStreamReader) throws XMLStreamException
+   {
+      IgnoreDestroyType result = new IgnoreDestroyType();
+
+      int eventCode = xmlStreamReader.next();
+
+      while (eventCode != XMLStreamReader.END_ELEMENT)
+      {
+         eventCode = xmlStreamReader.next();
+      }
+
+      if (!"ignoreDestroy".equals(xmlStreamReader.getLocalName()))
+         throw new XMLStreamException("ignoreDestroy tag not completed", xmlStreamReader.getLocation());
+
+      return result;
+   }
 }

Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/BeanDeployment.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/BeanDeployment.java	2010-01-30 15:23:17 UTC (rev 100164)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/BeanDeployment.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -49,6 +49,12 @@
    /** Uninstall methods */
    private Map<String, List<Method>> uninstall;
 
+   /** Ignore stop */
+   private Set<String> ignoreStops;
+
+   /** Ignore destroy */
+   private Set<String> ignoreDestroys;
+
    /** The kernel */
    private KernelImpl kernel;
 
@@ -57,11 +63,15 @@
     * @param deployment The deployment
     * @param beans The list of bean names for the deployment
     * @param uninstall Uninstall methods for beans
+    * @param ignoreStops Ignore stop methods for beans
+    * @param ignoreDestroys Ignore destroy methods for beans
     * @param kernel The kernel
     */
    public BeanDeployment(URL deployment, 
                          List<String> beans, 
                          Map<String, List<Method>> uninstall,
+                         Set<String> ignoreStops,
+                         Set<String> ignoreDestroys,
                          KernelImpl kernel)
    {
       if (deployment == null)
@@ -79,6 +89,8 @@
       this.deployment = deployment;
       this.beans = beans;
       this.uninstall = uninstall;
+      this.ignoreStops = ignoreStops;
+      this.ignoreDestroys = ignoreDestroys;
       this.kernel = kernel;
    }
 
@@ -159,33 +171,39 @@
             }
          }
 
-         try
+         if (ignoreStops == null || !ignoreStops.contains(name))
          {
-            Method stopMethod = bean.getClass().getMethod("stop", (Class[])null);
-            stopMethod.invoke(bean, (Object[])null);
+            try
+            {
+               Method stopMethod = bean.getClass().getMethod("stop", (Class[])null);
+               stopMethod.invoke(bean, (Object[])null);
+            }
+            catch (NoSuchMethodException nsme)
+            {
+               // No stop method
+            }
+            catch (InvocationTargetException ite)
+            {
+               throw ite.getTargetException();
+            }
          }
-         catch (NoSuchMethodException nsme)
-         {
-            // No create method
-         }
-         catch (InvocationTargetException ite)
-         {
-            throw ite.getTargetException();
-         }
 
-         try
+         if (ignoreDestroys == null || !ignoreDestroys.contains(name))
          {
-            Method destroyMethod = bean.getClass().getMethod("destroy", (Class[])null);
-            destroyMethod.invoke(bean, (Object[])null);
+            try
+            {
+               Method destroyMethod = bean.getClass().getMethod("destroy", (Class[])null);
+               destroyMethod.invoke(bean, (Object[])null);
+            }
+            catch (NoSuchMethodException nsme)
+            {
+               // No destroy method
+            }
+            catch (InvocationTargetException ite)
+            {
+               throw ite.getTargetException();
+            }
          }
-         catch (NoSuchMethodException nsme)
-         {
-            // No create method
-         }
-         catch (InvocationTargetException ite)
-         {
-            throw ite.getTargetException();
-         }
 
          kernel.removeBean(name);
       }

Modified: projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java	2010-01-30 15:23:17 UTC (rev 100164)
+++ projects/jboss-jca/trunk/fungal/src/main/java/org/jboss/jca/fungal/impl/DeploymentDeployer.java	2010-01-30 15:35:39 UTC (rev 100165)
@@ -30,6 +30,10 @@
 import org.jboss.jca.fungal.deployment.ConstructorType;
 import org.jboss.jca.fungal.deployment.DependsType;
 import org.jboss.jca.fungal.deployment.EntryType;
+import org.jboss.jca.fungal.deployment.IgnoreCreateType;
+import org.jboss.jca.fungal.deployment.IgnoreDestroyType;
+import org.jboss.jca.fungal.deployment.IgnoreStartType;
+import org.jboss.jca.fungal.deployment.IgnoreStopType;
 import org.jboss.jca.fungal.deployment.IncallbackType;
 import org.jboss.jca.fungal.deployment.InjectType;
 import org.jboss.jca.fungal.deployment.InstallType;
@@ -122,12 +126,15 @@
             List<String> beans = Collections.synchronizedList(new ArrayList<String>(deployment.getBean().size()));
             Map<String, List<Method>> uninstall = 
                new ConcurrentHashMap<String, List<Method>>(deployment.getBean().size());
+            Set<String> ignoreStops = Collections.synchronizedSet(new HashSet<String>(deployment.getBean().size()));
+            Set<String> ignoreDestroys = Collections.synchronizedSet(new HashSet<String>(deployment.getBean().size()));
 
             final CountDownLatch beansLatch = new CountDownLatch(deployment.getBean().size());
 
             for (BeanType bt : deployment.getBean())
             {
-               BeanDeployer deployer = new BeanDeployer(bt, beans, uninstall, kernel, beansLatch, parent);
+               BeanDeployer deployer = new BeanDeployer(bt, beans, uninstall, ignoreStops, ignoreDestroys, kernel,
+                                                        beansLatch, parent);
                deployers.add(deployer);
 
                Future<?> result = kernel.getExecutorService().submit(deployer);
@@ -144,7 +151,7 @@
             }
 
             if (deployException == null)
-               return new BeanDeployment(url, beans, uninstall, kernel);
+               return new BeanDeployment(url, beans, uninstall, ignoreStops, ignoreDestroys, kernel);
          }
       }
       catch (Throwable t)
@@ -176,6 +183,12 @@
       /** Uninstall methods */
       private Map<String, List<Method>> uninstall;
 
+      /** Ignore stop */
+      private Set<String> ignoreStops;
+
+      /** Ignore destroy */
+      private Set<String> ignoreDestroys;
+
       /** The kernel */
       private KernelImpl kernel;
 
@@ -216,6 +229,8 @@
        * @param bt The bean
        * @param beans The list of bean names
        * @param uninstall Uninstall methods for beans
+       * @param ignoreStops Ignore stop methods for beans
+       * @param ignoreDestroys Ignore destroy methods for beans
        * @param kernel The kernel
        * @param beansLatch The beans latch
        * @param classLoader The class loader
@@ -223,6 +238,8 @@
       public BeanDeployer(BeanType bt, 
                           List<String> beans,
                           Map<String, List<Method>> uninstall,
+                          Set<String> ignoreStops,
+                          Set<String> ignoreDestroys,
                           KernelImpl kernel,
                           CountDownLatch beansLatch,
                           ClassLoader classLoader)
@@ -230,6 +247,8 @@
          this.bt = bt;
          this.beans = beans;
          this.uninstall = uninstall;
+         this.ignoreStops = ignoreStops;
+         this.ignoreDestroys = ignoreDestroys;
          this.kernel = kernel;
          this.beansLatch = beansLatch;
          this.classLoader = classLoader;
@@ -479,34 +498,46 @@
             }
          }
 
-         try
+         if (bt.getIgnoreCreate() == null)
          {
-            Method createMethod = clz.getMethod("create", (Class[])null);
-            createMethod.invoke(instance, (Object[])null);
+            try
+            {
+               Method createMethod = clz.getMethod("create", (Class[])null);
+               createMethod.invoke(instance, (Object[])null);
+            }
+            catch (NoSuchMethodException nsme)
+            {
+               // No create method
+            }
+            catch (InvocationTargetException ite)
+            {
+               throw ite.getTargetException();
+            }
          }
-         catch (NoSuchMethodException nsme)
-         {
-            // No create method
-         }
-         catch (InvocationTargetException ite)
-         {
-            throw ite.getTargetException();
-         }
 
-         try
+         if (bt.getIgnoreStart() == null)
          {
-            Method startMethod = clz.getMethod("start", (Class[])null);
-            startMethod.invoke(instance, (Object[])null);
+            try
+            {
+               Method startMethod = clz.getMethod("start", (Class[])null);
+               startMethod.invoke(instance, (Object[])null);
+            }
+            catch (NoSuchMethodException nsme)
+            {
+               // No start method
+            }
+            catch (InvocationTargetException ite)
+            {
+               throw ite.getTargetException();
+            }
          }
-         catch (NoSuchMethodException nsme)
-         {
-            // No start method
-         }
-         catch (InvocationTargetException ite)
-         {
-            throw ite.getTargetException();
-         }
 
+         if (bt.getIgnoreStop() != null)
+            ignoreStops.add(bt.getName());
+
+         if (bt.getIgnoreDestroy() != null)
+            ignoreDestroys.add(bt.getName());
+
          // Invoke install methods
          if (bt.getInstall() != null && bt.getInstall().size() > 0)
          {

Modified: projects/jboss-jca/trunk/fungal/src/main/resources/deployment.xsd
===================================================================
--- projects/jboss-jca/trunk/fungal/src/main/resources/deployment.xsd	2010-01-30 15:23:17 UTC (rev 100164)
+++ projects/jboss-jca/trunk/fungal/src/main/resources/deployment.xsd	2010-01-30 15:35:39 UTC (rev 100165)
@@ -11,6 +11,10 @@
        <xsd:element name="depends" type="dependsType" maxOccurs="unbounded" minOccurs="0"/>
        <xsd:element name="install" type="installType" maxOccurs="unbounded" minOccurs="0"/>
        <xsd:element name="uninstall" type="uninstallType" maxOccurs="unbounded" minOccurs="0"/>
+       <xsd:element name="ignoreCreate" type="ignoreCreateType" maxOccurs="1" minOccurs="0"/>
+       <xsd:element name="ignoreStart" type="ignoreStartType" maxOccurs="1" minOccurs="0"/>
+       <xsd:element name="ignoreStop" type="ignoreStopType" maxOccurs="1" minOccurs="0"/>
+       <xsd:element name="ignoreDestroy" type="ignoreDestroyType" maxOccurs="1" minOccurs="0"/>
      </xsd:sequence>
      <xsd:attribute name="name" type="xsd:token" use="required"/>
      <xsd:attribute name="interface" type="xsd:token"/>
@@ -134,6 +138,14 @@
      <xsd:attribute name="method" type="xsd:token"/>
    </xsd:complexType>
 
+   <xsd:complexType name="ignoreCreateType"/>
+
+   <xsd:complexType name="ignoreStartType"/>
+
+   <xsd:complexType name="ignoreStopType"/>
+
+   <xsd:complexType name="ignoreDestroyType"/>
+
    <xsd:element name="deployment">
      <xsd:complexType>
        <xsd:sequence>




More information about the jboss-cvs-commits mailing list