[jboss-cvs] JBossAS SVN: r100147 - in projects/jboss-osgi: trunk/distribution/installer/src/main/resources/jbossas and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Jan 29 18:01:07 EST 2010
Author: thomas.diesler at jboss.com
Date: 2010-01-29 18:01:06 -0500 (Fri, 29 Jan 2010)
New Revision: 100147
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiModuleDeployerTempWorkaround.java
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
Log:
Fix more AS6 integration issues
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiModuleDeployerTempWorkaround.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiModuleDeployerTempWorkaround.java (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiModuleDeployerTempWorkaround.java 2010-01-29 23:01:06 UTC (rev 100147)
@@ -0,0 +1,69 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, 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.framework.deployers;
+
+import org.jboss.classloading.spi.dependency.ClassLoading;
+import org.jboss.classloading.spi.dependency.Module;
+import org.jboss.classloading.spi.dependency.policy.ClassLoaderPolicyModule;
+import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer;
+import org.jboss.osgi.framework.classloading.OSGiClassLoadingMetaData;
+import org.jboss.osgi.framework.classloading.OSGiModule;
+
+/**
+ * [TODO] Remove this deployer when the VFSClassLoaderDescribeDeployer
+ * suports an already attached Module.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @version $Revision: 100143 $
+ */
+public class OSGiModuleDeployerTempWorkaround extends VFSClassLoaderDescribeDeployer
+{
+ public OSGiModuleDeployerTempWorkaround()
+ {
+ // Make sure we come after the ClassLoaderDescribeDeployer
+ setInput(Module.class);
+ }
+
+ @Override
+ public void deploy(DeploymentUnit unit, ClassLoadingMetaData metaData) throws DeploymentException
+ {
+ // If there is already a module attached and this is an OSGi deployment
+ // remove the old module and create a new OSGiModule
+ if (metaData instanceof OSGiClassLoadingMetaData)
+ {
+ Module module = unit.removeAttachment(Module.class);
+ ClassLoading classLoading = getClassLoading();
+ classLoading.removeModule(module);
+ unit.removeAttachment(Module.class);
+ super.deploy(unit, metaData);
+ }
+ }
+
+ @Override
+ protected ClassLoaderPolicyModule createModule(DeploymentUnit unit, ClassLoadingMetaData metaData)
+ {
+ return new OSGiModule(unit, metaData);
+ }
+}
Modified: projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-01-29 22:59:14 UTC (rev 100146)
+++ projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-01-29 23:01:06 UTC (rev 100147)
@@ -177,6 +177,7 @@
<bean name="OSGiBundleStateRemoveDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateRemoveDeployer">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
</bean>
+ <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
<bean name="OSGiContextTrackerDeployer" class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer" class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
@@ -207,10 +208,9 @@
<property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
</bean>
<bean name="OSGiFragmentAttachmentDeployer" class="org.jboss.osgi.framework.deployers.OSGiFragmentAttachmentDeployer"/>
-
- <!-- bean name="OSGiModuleDeployer" class="org.jboss.osgi.framework.deployers.OSGiModuleDeployer">
+ <bean name="OSGiModuleDeployer" class="org.jboss.osgi.framework.deployers.OSGiModuleDeployerTempWorkaround">
<property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean -->
+ </bean>
<!--
********************************
More information about the jboss-cvs-commits
mailing list