[jboss-cvs] JBossAS SVN: r84806 - in projects/jboss-osgi/trunk/runtime/deployer/src/main: resources and 1 other directory.

jboss-cvs-commits at lists.jboss.org jboss-cvs-commits at lists.jboss.org
Thu Feb 26 09:47:51 EST 2009


Author: alesj
Date: 2009-02-26 09:47:51 -0500 (Thu, 26 Feb 2009)
New Revision: 84806

Added:
   projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDependecyDeployer.java
Removed:
   projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java
Modified:
   projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
Log:
Rename deployer.

Copied: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDependecyDeployer.java (from rev 84799, projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java)
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDependecyDeployer.java	                        (rev 0)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDependecyDeployer.java	2009-02-26 14:47:51 UTC (rev 84806)
@@ -0,0 +1,90 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2006, 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.osgi.deployer;
+
+import org.jboss.dependency.spi.DependencyItem;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.deployer.helpers.BundleClassLoader;
+import org.jboss.osgi.deployer.helpers.ResolvedBundleDependencyItem;
+import org.osgi.framework.Bundle;
+
+/**
+ * This is the Bundle Deployer
+ *
+ * @author Ales.Justin at jboss.org
+ */
+public class BundleClassLoaderDependecyDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+   public BundleClassLoaderDependecyDeployer()
+   {
+      super(Bundle.class);
+      addOutput(ClassLoaderFactory.class);
+      setStage(DeploymentStages.POST_PARSE);
+   }
+
+   public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+   {
+      // create bundle delegate classloader
+      ClassLoaderFactory factory = createClassLoaderFactory(bundle);
+      unit.addAttachment(ClassLoaderFactory.class, factory);
+
+      // create dependency items
+      DependencyItem resolvedBundleDI = createResolvedBudleDependencyItem(bundle);
+      unit.addIDependOn(resolvedBundleDI);
+   }
+
+   /**
+    * Create classloader factory.
+    *
+    * @param bundle the bundle
+    * @return new classloader factory
+    */
+   protected ClassLoaderFactory createClassLoaderFactory(final Bundle bundle)
+   {
+      return new ClassLoaderFactory()
+      {
+         public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
+         {
+            return BundleClassLoader.createBundleClassLoaderFor(bundle);
+         }
+
+         public void removeClassLoader(DeploymentUnit unit) throws Exception
+         {
+         }
+      };
+   }
+
+   /**
+    * Create resolved bundle dependency item.
+    *
+    * @param bundle the bundle
+    * @return new dependency item
+    */
+   protected DependencyItem createResolvedBudleDependencyItem(Bundle bundle)
+   {
+      return new ResolvedBundleDependencyItem(bundle);
+   }
+}
\ No newline at end of file


Property changes on: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDependecyDeployer.java
___________________________________________________________________
Name: svn:keywords
   + Id Revision
Name: svn:eol-style
   + LF

Deleted: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java	2009-02-26 14:43:11 UTC (rev 84805)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeployer.java	2009-02-26 14:47:51 UTC (rev 84806)
@@ -1,90 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.osgi.deployer;
-
-import org.jboss.dependency.spi.DependencyItem;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.DeploymentStages;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.deployer.helpers.BundleClassLoader;
-import org.jboss.osgi.deployer.helpers.ResolvedBundleDependencyItem;
-import org.osgi.framework.Bundle;
-
-/**
- * This is the Bundle Deployer
- *
- * @author Ales.Justin at jboss.org
- */
-public class BundleDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
-   public BundleDeployer()
-   {
-      super(Bundle.class);
-      addOutput(ClassLoaderFactory.class);
-      setStage(DeploymentStages.POST_PARSE);
-   }
-
-   public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
-   {
-      // create bundle delegate classloader
-      ClassLoaderFactory factory = createClassLoaderFactory(bundle);
-      unit.addAttachment(ClassLoaderFactory.class, factory);
-
-      // create dependency items
-      DependencyItem resolvedBundleDI = createResolvedBudleDependencyItem(bundle);
-      unit.addIDependOn(resolvedBundleDI);
-   }
-
-   /**
-    * Create classloader factory.
-    *
-    * @param bundle the bundle
-    * @return new classloader factory
-    */
-   protected ClassLoaderFactory createClassLoaderFactory(final Bundle bundle)
-   {
-      return new ClassLoaderFactory()
-      {
-         public ClassLoader createClassLoader(DeploymentUnit unit) throws Exception
-         {
-            return BundleClassLoader.createBundleClassLoaderFor(bundle);
-         }
-
-         public void removeClassLoader(DeploymentUnit unit) throws Exception
-         {
-         }
-      };
-   }
-
-   /**
-    * Create resolved bundle dependency item.
-    *
-    * @param bundle the bundle
-    * @return new dependency item
-    */
-   protected DependencyItem createResolvedBudleDependencyItem(Bundle bundle)
-   {
-      return new ResolvedBundleDependencyItem(bundle);
-   }
-}
\ No newline at end of file

Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml	2009-02-26 14:43:11 UTC (rev 84805)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml	2009-02-26 14:47:51 UTC (rev 84806)
@@ -92,7 +92,7 @@
 -->
 
   <!-- The Bundle Deployer -->
-  <bean name="jboss.osgi:service=BundleDeployer" class="org.jboss.osgi.deployer.BundleDeployer"/>
+  <bean name="jboss.osgi:service=BundleDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDependecyDeployer"/>
 
   <!-- The Bundle start/stop Deployer -->
   <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer"/>




More information about the jboss-cvs-commits mailing list