[jboss-cvs] JBossAS SVN: r84867 - in projects/jboss-osgi/trunk: build/distribution/src/main/etc/jboss501/server and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Feb 27 05:52:41 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-02-27 05:52:41 -0500 (Fri, 27 Feb 2009)
New Revision: 84867
Added:
projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/
projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/metadata-deployer-jboss-beans.xml
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeploymentUnitFilter.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/DeploymentProvidedDeploymentUnitFilter.java
Modified:
projects/jboss-osgi/trunk/build/distribution/scripts/assembly-deploy-artifacts.xml
projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
Log:
[JBOSGI-36] Bundle classes leak into system classloader
Modified: projects/jboss-osgi/trunk/build/distribution/scripts/assembly-deploy-artifacts.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/scripts/assembly-deploy-artifacts.xml 2009-02-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/build/distribution/scripts/assembly-deploy-artifacts.xml 2009-02-27 10:52:41 UTC (rev 84867)
@@ -47,6 +47,7 @@
<includes>
<include>JBossORG-EULA.txt</include>
<include>release.notes.html</include>
+ <include>jboss501/**</include>
</includes>
</fileSet>
</fileSets>
Added: projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/metadata-deployer-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/metadata-deployer-jboss-beans.xml (rev 0)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/metadata-deployer-jboss-beans.xml 2009-02-27 10:52:41 UTC (rev 84867)
@@ -0,0 +1,346 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+ <!--
+ MetaData configuration
+ $Id$
+-->
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!-- A reference metadata resolving deployer that creates and endpoint map
+ for the deployments
+ -->
+ <bean name="ReferenceMetaDataResolverDeployer" class="org.jboss.deployment.MappedReferenceMetaDataResolverDeployer" />
+
+ <!-- Generic scanning deployer - using javassist to do lookup -->
+
+ <bean name="EarLibExcludeDeployer" class="org.jboss.deployment.EarLibExcludeDeployer" />
+
+ <bean name="JBossMetaDataDUFilter" class="org.jboss.deployment.JBossMetaDataDeploymentUnitFilter" />
+
+ <bean name="ScanningMetaDataDeployer" class="org.jboss.deployers.vfs.plugins.annotations.ScanningMetaDataDeployer" />
+ <bean name="ScanningMetaDataDUFilter" class="org.jboss.deployers.vfs.plugins.annotations.ScanningDeploymentUnitFilter" />
+
+ <bean name="JBossCustomDeployDUFilter" class="org.jboss.deployers.vfs.spi.structure.helpers.VirtualFileDeploymentUnitFilter">
+ <constructor>
+ <parameter>
+ <bean class="org.jboss.deployment.FileNameVirtualFileFilter">
+ <constructor>
+ <parameter>
+ <map keyClass="java.lang.String" valueClass="java.util.Set">
+ <entry>
+ <key>jbossweb.sar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>console-mgr.sar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jbossws.sar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jmx-remoting.sar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jboss-local-jdbc.rar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jboss-xa-jdbc.rar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jms-ra.rar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>mail-ra.rar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>quartz-ra.rar</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ <entry>
+ <key>jmx-console.war</key>
+ <value>
+ <null />
+ </value>
+ </entry>
+ </map>
+ </parameter>
+ </constructor>
+ </bean>
+ </parameter>
+ </constructor>
+ </bean>
+
+ <bean name="DeploymentProvidedDUFilter" class="org.jboss.deployment.DeploymentProvidedDeploymentUnitFilter" />
+
+ <bean name="GenScanDeployer" class="org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationEnvironmentDeployer">
+ <property name="filter">
+ <bean class="org.jboss.deployment.ListDeploymentUnitFilter">
+ <property name="filters">
+ <list>
+ <inject bean="DeploymentProvidedDUFilter" />
+ <inject bean="JBossMetaDataDUFilter" />
+ <inject bean="ScanningMetaDataDUFilter" />
+ <inject bean="JBossCustomDeployDUFilter" />
+ </list>
+ </property>
+ </bean>
+ </property>
+ </bean>
+
+ <bean name="AnnotationMetaDataDeployer" class="org.jboss.deployment.OptAnnotationMetaDataDeployer">
+ <property name="metaDataCompleteIsDefault">false</property>
+ </bean>
+
+ <!--
+ Extract annotations into a standard metadata view <bean name="AnnotationMetaDataDeployer" class="org.jboss.deployment.AnnotationMetaDataDeployer"> <property
+ name="metaDataCompleteIsDefault">false</property> </bean>
+ -->
+
+ <!--
+ The schema location to JBossXB binding class mappings. We specify the dtd/xsd name of the schema as the location to work with legacy dtd as well as namespace based
+ documents.
+ -->
+ <bean name="SchemaResolverConfig" class="org.jboss.xb.binding.sunday.unmarshalling.SchemaResolverConfig">
+
+ <!-- schemaLocation to JBossXBuilder binding classes -->
+ <property name="bindingClassesByLocations">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <!-- EarMetaData -->
+ <entry>
+ <key>application</key>
+ <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application_1_2.dtd</key>
+ <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application_1_3.dtd</key>
+ <value>org.jboss.metadata.ear.spec.Ear13DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application_1_4.xsd</key>
+ <value>org.jboss.metadata.ear.spec.Ear14MetaData</value>
+ </entry>
+ <entry>
+ <key>application_5.xsd</key>
+ <value>org.jboss.metadata.ear.spec.Ear50MetaData</value>
+ </entry>
+ <!-- JBossAppMetaData -->
+ <entry>
+ <key>jboss-app</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_3_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_3_2.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_4_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_4_2.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_5_0.dtd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50DTDAppMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-app_5_0.xsd</key>
+ <value>org.jboss.metadata.ear.jboss.JBoss50AppMetaData</value>
+ </entry>
+
+ <!-- ApplicationClientMetaData -->
+ <entry>
+ <key>application-client</key>
+ <value>org.jboss.metadata.client.spec.ApplicationClient14DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application-client_1_2.dtd</key>
+ <value>org.jboss.metadata.client.spec.ApplicationClient14DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application-client_1_3.dtd</key>
+ <value>org.jboss.metadata.client.spec.ApplicationClient14DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>application-client_1_4.xsd</key>
+ <value>org.jboss.metadata.client.spec.ApplicationClient14MetaData</value>
+ </entry>
+ <entry>
+ <key>application-client_5.xsd</key>
+ <value>org.jboss.metadata.client.spec.ApplicationClient5MetaData</value>
+ </entry>
+ <!-- ApplicationClientMetaData -->
+ <entry>
+ <key>jboss-client</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_3_0.dtd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_3_2.dtd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_4_0.dtd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_4_2.dtd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_5_0.dtd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-client_5_0.xsd</key>
+ <value>org.jboss.metadata.client.jboss.JBossClient5MetaData</value>
+ </entry>
+
+ <!-- EjbJarMetaData -->
+ <entry>
+ <key>ejb-jar</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar20MetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_1_1.dtd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar1xMetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_2_0.dtd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar20MetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_2_1.xsd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar21MetaData</value>
+ </entry>
+ <entry>
+ <key>ejb-jar_3_0.xsd</key>
+ <value>org.jboss.metadata.ejb.spec.EjbJar30MetaData</value>
+ </entry>
+
+ <!-- JBossMetaData -->
+ <entry>
+ <key>jboss</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_3_0.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_3_2.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_4_0.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_4_2.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_5_0.dtd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50DTDMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss_5_0.xsd</key>
+ <value>org.jboss.metadata.ejb.jboss.JBoss50MetaData</value>
+ </entry>
+
+ <!-- WebMetaData -->
+ <entry>
+ <key>web-app</key>
+ <value>org.jboss.metadata.web.spec.Web23MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_2.dtd</key>
+ <value>org.jboss.metadata.web.spec.Web23MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_3.dtd</key>
+ <value>org.jboss.metadata.web.spec.Web23MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_4.xsd</key>
+ <value>org.jboss.metadata.web.spec.Web24MetaData</value>
+ </entry>
+ <entry>
+ <key>web-app_2_5.xsd</key>
+ <value>org.jboss.metadata.web.spec.Web25MetaData</value>
+ </entry>
+ <!-- JBossWebMetaData -->
+ <entry>
+ <key>jboss-web</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_3_0.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_3_2.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_4_0.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_4_2.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_5_0.dtd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50DTDWebMetaData</value>
+ </entry>
+ <entry>
+ <key>jboss-web_5_0.xsd</key>
+ <value>org.jboss.metadata.web.jboss.JBoss50WebMetaData</value>
+ </entry>
+ <!-- PersistenceMetaData -->
+ <entry>
+ <key>persistence_1_0.xsd</key>
+ <value>org.jboss.metadata.jpa.spec.PersistenceMetaData</value>
+ </entry>
+ </map>
+ </property>
+ </bean>
+
+</deployment>
Property changes on: projects/jboss-osgi/trunk/build/distribution/src/main/etc/jboss501/server/deployers/metadata-deployer-jboss-beans.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml
===================================================================
--- projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-02-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/build/distribution/src/main/resources/installer/install-definition.xml 2009-02-27 10:52:41 UTC (rev 84867)
@@ -66,7 +66,12 @@
<description>The JBoss OSGi Integration</description>
- <!-- OSGi Deployer -->
+ <!-- deployers -->
+ <fileset dir="@{deploy.artifacts.dir}/etc/jboss501/server/deployers" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers" override="true">
+ <include name="metadata-deployer-jboss-beans.xml" />
+ </fileset>
+
+ <!-- deployers/osgi.deployer -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deployers/osgi.deployer" override="true">
<include name="jboss-osgi-runtime-deployer.jar" />
<include name="jboss-osgi-runtime-felix.jar" />
@@ -79,7 +84,7 @@
<include name="osgi-deployers-jboss-beans.xml" />
</fileset>
- <!-- OSGi Bundles -->
+ <!-- deploy/osgi -->
<fileset dir="@{deploy.artifacts.dir}/lib" targetdir="${jbossInstallPath}/server/${jbossTargetServer}/deploy/osgi" override="true">
<include name="jboss-osgi-service-http.jar" />
<include name="jboss-osgi-service-webconsole.jar" />
Added: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeploymentUnitFilter.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeploymentUnitFilter.java 2009-02-27 10:52:41 UTC (rev 84867)
@@ -0,0 +1,43 @@
+/*
+ * 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;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+import org.osgi.framework.Bundle;
+
+/**
+ * A DeploymentUnitFilter that rejects OSGi bundle deployments.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 27-Feb-2009
+ */
+public class BundleDeploymentUnitFilter implements DeploymentUnitFilter
+{
+ public boolean accepts(DeploymentUnit unit)
+ {
+ Bundle bundle = unit.getTopLevel().getAttachment(Bundle.class);
+ return bundle == null;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-02-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-02-27 10:52:41 UTC (rev 84867)
@@ -38,7 +38,6 @@
public BundleStartStopDeployer()
{
super(Bundle.class);
- setStage(DeploymentStages.PRE_REAL);
}
public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
@@ -46,6 +45,7 @@
try
{
bundle.start();
+ log.info("Started: " + bundle.getSymbolicName() + ",state=" + bundle.getState());
}
catch (BundleException e)
{
@@ -59,6 +59,7 @@
try
{
bundle.stop();
+ log.info("Stoped: " + bundle.getSymbolicName() + ",state=" + bundle.getState());
}
catch (BundleException e)
{
Added: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/DeploymentProvidedDeploymentUnitFilter.java (rev 0)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/DeploymentProvidedDeploymentUnitFilter.java 2009-02-27 10:52:41 UTC (rev 84867)
@@ -0,0 +1,50 @@
+/*
+ * 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;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
+import org.jboss.deployers.vfs.spi.structure.helpers.VFS2BaseBridgeDeploymentUnitFilter;
+
+/**
+ * A DeploymentUnitFilter that delegates its work the DeploymentUnitFilter that
+ * is attached to the DeploymentUnit.
+ *
+ * A Deployer can attach a DeploymentUnitFilter to a DeploymentUnit which controlls whether
+ * the DeploymentUnit is to be processed by following Deployers
+ *
+ * [TODO] Remove this class when this functionallity is natively supported by all target containers
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 27-Feb-2009
+ */
+public class DeploymentProvidedDeploymentUnitFilter extends VFS2BaseBridgeDeploymentUnitFilter
+{
+ @Override
+ protected boolean doAccepts(DeploymentUnit unit)
+ {
+ DeploymentUnitFilter filter = unit.getTopLevel().getAttachment(DeploymentUnitFilter.class);
+ return filter == null || filter.accepts(unit);
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/DeploymentProvidedDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java
===================================================================
--- projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java 2009-02-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/java/org/jboss/osgi/deployer/OSGiDeployer.java 2009-02-27 10:52:41 UTC (rev 84867)
@@ -27,8 +27,10 @@
import java.util.List;
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.DeploymentUnit;
+import org.jboss.deployers.structure.spi.DeploymentUnitFilter;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.BundleEvent;
@@ -51,7 +53,7 @@
{
super(OSGiMetaData.class);
addOutput(Bundle.class);
- //setStage(DeploymentStages.POST_PARSE);
+ setStage(DeploymentStages.POST_PARSE);
}
public void setBundleContext(BundleContext bundleContext)
@@ -89,11 +91,13 @@
if (skipBundles != null && skipBundles.contains(bundleUri) == false)
{
Bundle bundle = bundleContext.installBundle(bundleUri.toString());
+
+ // Attach the DeploymentUnitFilter that allows Deployers to ignore this Deployment
+ unit.addAttachment(DeploymentUnitFilter.class, new BundleDeploymentUnitFilter());
+
unit.addAttachment(Bundle.class, bundle);
+
log.info("Installed: " + bundle.getSymbolicName() + ",state=" + bundle.getState());
-
- bundle.start();
- log.info("Started: " + bundle.getSymbolicName() + ",state=" + bundle.getState());
}
}
catch (BundleException ex)
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-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/runtime/deployer/src/main/resources/osgi-deployers-jboss-beans.xml 2009-02-27 10:52:41 UTC (rev 84867)
@@ -75,12 +75,10 @@
<property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
</bean>
- <!-- The Bundle Deployer - ->
+ <!-- The Bundle Deployer -->
<bean name="jboss.osgi:service=BundleDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDependencyDeployer"/>
- -->
- <!-- The Bundle start/stop Deployer - ->
+ <!-- The Bundle start/stop Deployer -->
<bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer"/>
- -->
</deployment>
\ No newline at end of file
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-02-27 09:32:01 UTC (rev 84866)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-02-27 10:52:41 UTC (rev 84867)
@@ -147,10 +147,6 @@
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<argLine>${surefire.security.args}</argLine>
- <excludes>
- <!-- [JBOSGI-36] Bundle classes leak into system classloader -->
- <exclude>org/jboss/test/osgi/jbosgi36/junit/*Test.java</exclude>
- </excludes>
</configuration>
</plugin>
</plugins>
More information about the jboss-cvs-commits
mailing list