[jboss-cvs] JBossAS SVN: r94940 - in projects/jboss-osgi/branches/tdiesler: distribution and 36 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Oct 15 07:44:26 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-10-15 07:44:24 -0400 (Thu, 15 Oct 2009)
New Revision: 94940
Added:
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersCapability.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersService.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployment.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/DeployersActivator.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleClassLoaderDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleContainedBeansDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleDeploymentUnitFilter.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleManagementDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaData.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaDataDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleRealDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartLevelDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartStopDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStructureDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/DeploymentProvidedDeploymentUnitFilter.java
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/resources/META-INF/jboss-osgi-default-bootstrap.xml
Removed:
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleContainedBeansDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/helpers/
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/java/org/jboss/osgi/framework/service/internal/ds/
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/resources/schema/
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
Modified:
projects/jboss-osgi/branches/tdiesler/distribution/docbook/pom.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/.project
projects/jboss-osgi/branches/tdiesler/distribution/installer/pom.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss501/metadata-deployer-jboss-beans.xml
projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
projects/jboss-osgi/branches/tdiesler/distribution/javadoc/pom.xml
projects/jboss-osgi/branches/tdiesler/distribution/pom.xml
projects/jboss-osgi/branches/tdiesler/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
projects/jboss-osgi/branches/tdiesler/reactor/deployers/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/framework/pom.xml
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/java/org/jboss/test/osgi/OSGiTestDelegate.java
projects/jboss-osgi/branches/tdiesler/reactor/pom.xml
projects/jboss-osgi/branches/tdiesler/testsuite/example/pom.xml
projects/jboss-osgi/branches/tdiesler/testsuite/example/scripts/assembly-bundles.xml
projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
projects/jboss-osgi/branches/tdiesler/testsuite/functional/pom.xml
projects/jboss-osgi/branches/tdiesler/testsuite/functional/scripts/assembly-bundles.xml
projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml
projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/pom.xml
Log:
wip
Modified: projects/jboss-osgi/branches/tdiesler/distribution/docbook/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/docbook/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/docbook/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/.project
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/.project 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/.project 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,15 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
- <name>jboss-osgi-distribution</name>
+ <name>jboss-osgi-installer</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
+ <name>org.eclipse.jdt.core.javabuilder</name>
+ <arguments>
+ </arguments>
+ </buildCommand>
+ <buildCommand>
<name>org.maven.ide.eclipse.maven2Builder</name>
+ <arguments>
+ </arguments>
</buildCommand>
</buildSpec>
<natures>
+ <nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
</natures>
</projectDescription>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Dependencies -->
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-equinox.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -109,29 +109,27 @@
-->
<!-- The OSGi MetaData Deployer -->
- <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.BundleMetaDataDeployer" />
+ <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleMetaDataDeployer" />
<!-- The OSGi Bundle Structure Deployer -->
- <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+ <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleStructureDeployer" />
<!-- The OSGi Bundle Deployer -->
- <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.BundleRealDeployer">
+ <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleRealDeployer">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
<property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
</bean>
<!-- The Bundle ClassLoader Deployer -->
- <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDeployer">
- <property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
- </bean>
+ <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleClassLoaderDeployer"/>
<!-- The Bundle Start/Stop Deployer -->
- <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer">
+ <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleStartStopDeployer">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
</bean>
<!-- The Bundle Management Deployer -->
- <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.BundleManagementDeployer">
+ <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleManagementDeployer">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-felix.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -130,29 +130,27 @@
-->
<!-- The OSGi MetaData Deployer -->
- <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.BundleMetaDataDeployer" />
+ <bean name="jboss.osgi:service=BundleMetaDataDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleMetaDataDeployer" />
<!-- The OSGi Bundle Structure Deployer -->
- <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+ <bean name="jboss.osgi:service=BundleStructureDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleStructureDeployer" />
<!-- The OSGi Bundle Deployer -->
- <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.BundleRealDeployer">
+ <bean name="jboss.osgi:service=BundleRealDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleRealDeployer">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
<property name="skipBundles"><inject bean="jboss.osgi:service=Framework" property="autoInstall" /></property>
</bean>
<!-- The Bundle ClassLoader Deployer -->
- <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.BundleClassLoaderDeployer">
- <property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
- </bean>
+ <bean name="jboss.osgi:service=BundleClassLoaderDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleClassLoaderDeployer"/>
<!-- The Bundle Start/Stop Deployer -->
- <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.BundleStartStopDeployer">
+ <bean name="jboss.osgi:service=BundleStartStopDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleStartStopDeployer">
<property name="systemContext"><inject bean="jboss.osgi:service=Framework" property="bundleContext" /></property>
</bean>
<!-- The Bundle Management Deployer -->
- <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.BundleManagementDeployer">
+ <bean name="jboss.osgi:service=BundleManagementDeployer" class="org.jboss.osgi.deployer.jboss.internal.BundleManagementDeployer">
<property name="mbeanServer"><inject bean="JMXKernel" property="mbeanServer"/></property>
</bean>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -139,7 +139,7 @@
</constructor>
</bean>
- <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+ <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.jboss.internal.BundleStructureDeployer" />
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss501/metadata-deployer-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss501/metadata-deployer-jboss-beans.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/jbossas/jboss501/metadata-deployer-jboss-beans.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -97,7 +97,7 @@
</constructor>
</bean>
- <bean name="DeploymentProvidedDUFilter" class="org.jboss.osgi.deployer.helpers.DeploymentProvidedDeploymentUnitFilter" />
+ <bean name="DeploymentProvidedDUFilter" class="org.jboss.osgi.deployer.jboss.internal.helpers.DeploymentProvidedDeploymentUnitFilter" />
<bean name="GenScanDeployer" class="org.jboss.deployers.vfs.plugins.annotations.FilteredAnnotationEnvironmentDeployer">
<property name="filter">
Modified: projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -164,7 +164,7 @@
</bean>
<!-- OSGI Deployment -->
- <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
+ <bean name="OSGiBundleStructure" class="org.jboss.osgi.deployer.jboss.internal.BundleStructureDeployer" />
<bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
<constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/javadoc/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/javadoc/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/javadoc/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.osgi.distribution</groupId>
<artifactId>jboss-osgi-distribution</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
Modified: projects/jboss-osgi/branches/tdiesler/distribution/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/distribution/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/distribution/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -37,7 +37,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Modules -->
Modified: projects/jboss-osgi/branches/tdiesler/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -20,7 +20,7 @@
<artifactId>jboss-osgi</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
<parent>
<groupId>org.jboss.osgi</groupId>
@@ -50,21 +50,21 @@
<version.apache.felix.metatype>1.0.2</version.apache.felix.metatype>
<version.izpack>4.3.1</version.izpack>
<version.jboss.osgi.apache.xerces>2.9.1.SP2</version.jboss.osgi.apache.xerces>
- <version.jboss.osgi.blueprint>1.0.0.Alpha2</version.jboss.osgi.blueprint>
+ <version.jboss.osgi.blueprint>1.0.0.Alpha3</version.jboss.osgi.blueprint>
<version.jboss.osgi.common>1.0.2</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
- <version.jboss.osgi.framework>1.0.0.Alpha2-SNAPSHOT</version.jboss.osgi.framework>
+ <version.jboss.osgi.deployers>1.0.3-SNAPSHOT</version.jboss.osgi.deployers>
+ <version.jboss.osgi.framework>1.0.0.Alpha2</version.jboss.osgi.framework>
<version.jboss.osgi.hotdeploy>1.0.2</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.1</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP2</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.1</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.1</version.jboss.osgi.jndi>
- <version.jboss.osgi.microcontainer>1.0.2</version.jboss.osgi.microcontainer>
- <version.jboss.osgi.runtime.deployers>1.0.2</version.jboss.osgi.runtime.deployers>
+ <version.jboss.osgi.microcontainer>1.0.3-SNAPSHOT</version.jboss.osgi.microcontainer>
<version.jboss.osgi.runtime.equinox>3.5</version.jboss.osgi.runtime.equinox>
<version.jboss.osgi.runtime.felix>2.0.0</version.jboss.osgi.runtime.felix>
<version.jboss.osgi.runtime.jbossas>1.0.1</version.jboss.osgi.runtime.jbossas>
- <version.jboss.osgi.spi>1.0.2</version.jboss.osgi.spi>
+ <version.jboss.osgi.spi>1.0.3-SNAPSHOT</version.jboss.osgi.spi>
<version.jboss.osgi.webconsole>1.0.2</version.jboss.osgi.webconsole>
<version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
<version.ops4j.pax.base>1.2.1</version.ops4j.pax.base>
@@ -113,6 +113,11 @@
</dependency>
<dependency>
<groupId>org.jboss.osgi.bundles</groupId>
+ <artifactId>jboss-osgi-deployers</artifactId>
+ <version>${version.jboss.osgi.deployers}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-hotdeploy</artifactId>
<version>${version.jboss.osgi.hotdeploy}</version>
</dependency>
@@ -155,11 +160,6 @@
<!-- jboss.osgi.runtime -->
<dependency>
<groupId>org.jboss.osgi.runtime</groupId>
- <artifactId>jboss-osgi-deployers</artifactId>
- <version>${version.jboss.osgi.runtime.deployers}</version>
- </dependency>
- <dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
<artifactId>jboss-osgi-runtime-jbossas</artifactId>
<version>${version.jboss.osgi.runtime.jbossas}</version>
</dependency>
Modified: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -24,7 +24,7 @@
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-blueprint-parent</artifactId>
- <version>1.0.0.Alpha3-SNAPSHOT</version>
+ <version>1.0.0.Alpha3</version>
</parent>
<!-- Dependencies -->
@@ -72,7 +72,9 @@
org.jboss.dependency.spi*,
org.jboss.kernel.spi*,
org.jboss.osgi.common.log;version=1.0,
+ org.jboss.osgi.deployer;version=1.0,
org.jboss.osgi.jbossxb;version=2.0,
+ org.jboss.osgi.microcontainer;version=1.0,
org.jboss.osgi.spi;version=1.0,
org.jboss.osgi.spi.capability;version=1.0,
org.jboss.osgi.spi.service;version=1.0,
Modified: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/impl/src/main/java/org/jboss/osgi/blueprint/BlueprintCapability.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -23,9 +23,10 @@
//$Id$
+import org.jboss.osgi.deployer.DeployersCapability;
import org.jboss.osgi.jbossxb.XMLBindingCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.capability.Capability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
import org.jboss.osgi.spi.testing.OSGiRuntime;
/**
@@ -46,6 +47,7 @@
super (BlueprintService.class.getName());
addDependency(new XMLBindingCapability());
+ addDependency(new DeployersCapability());
addDependency(new MicrocontainerCapability());
addBundle("bundles/jboss-osgi-blueprint.jar");
Modified: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -20,13 +20,13 @@
<artifactId>jboss-osgi-blueprint-parent</artifactId>
<packaging>pom</packaging>
- <version>1.0.0.Alpha3-SNAPSHOT</version>
+ <version>1.0.0.Alpha3</version>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Modules -->
Modified: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -32,7 +32,7 @@
<parent>
<groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-blueprint-parent</artifactId>
- <version>1.0.0.Alpha3-SNAPSHOT</version>
+ <version>1.0.0.Alpha3</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/scripts/assembly-bundles.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -18,6 +18,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployers:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/blueprint/testsuite/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,200 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- ********************************
- * *
- * OSGi Framework *
- * *
- ********************************
- -->
-
- <bean name="OSGiBundleManager" class="org.jboss.osgi.framework.bundle.OSGiBundleManager">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
- <parameter><inject bean="MainDeployer" /></parameter>
- </constructor>
- <property name="properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
- <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
- <entry><key>org.osgi.framework.system.packages.extra</key><value>
-
- <!-- [JBOSGI-145] JAXB classes are loaded from the system classpath -->
- com.sun.xml.internal.bind.v2,
-
- <!-- log4j -->
- org.apache.log4j;version=1.2,
-
- <!-- jboss -->
- org.jboss.beans.metadata.plugins;version=2.0,
- org.jboss.beans.metadata.plugins.builder;version=2.0,
- org.jboss.beans.metadata.spi;version=2.0,
- org.jboss.beans.metadata.spi.builder;version=2.0,
- org.jboss.dependency.spi;version=2.0,
- org.jboss.kernel.spi.dependency;version=2.0,
- org.jboss.logging;version=2.0,
-
- <!-- jboss-osgi -->
- org.jboss.osgi.spi;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.framework;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.spi.testing;version=1.0,
- org.jboss.osgi.spi.util;version=1.0
- </value></entry>
- </map>
- </property>
- <incallback method="addPlugin" />
- <uncallback method="removePlugin" />
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Framework Plugins *
- * *
- ********************************
- -->
-
- <bean name="OSGiAutoInstallPlugin" class="org.jboss.osgi.framework.plugins.internal.AutoInstallPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="autoInstall">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value>
- </list>
- </property>
- <property name="autoStart">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
- <value>${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
- </list>
- </property>
- </bean>
- <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="synchronous">true</property>
- </bean>
- <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Service Plugins *
- * *
- ********************************
- -->
-
- <bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Deployment *
- * *
- ********************************
- -->
-
- <!-- The MainDeployer -->
- <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
- <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
- <property name="deployers"><inject bean="Deployers" /></property>
- </bean>
-
- <!-- The holder for deployers that determine structure -->
- <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
- <property name="structureBuilder">
- <!-- The consolidator of the structure information -->
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
- </property>
- <!-- Accept any implementor of structure deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- The holder for deployers that do real deployment -->
- <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
- <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
- <!-- Accept any implementor of deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- Bundle Structure -->
- <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
-
- <!-- JAR & File Structure (needed for negative testing) -->
- <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
- <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
-
- <!-- POJO Deployment -->
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
- <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
- <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
- <constructor>
- <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
- </constructor>
- </bean>
-
- <!-- OSGI Deployment -->
- <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
- <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
-
- <!--
- ********************************
- * *
- * OSGi Classloading *
- * *
- ********************************
- -->
-
- <bean name="OSGiClassLoaderSystem" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderSystem" />
- <bean name="OSGiClassLoaderDomain" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderDomain" >
- <constructor><parameter>OSGiClassLoaderDomain</parameter></constructor>
- <property name="classLoaderSystem"><inject bean="OSGiClassLoaderSystem"/></property>
- <property name="bundleManager"><inject bean="OSGiBundleManager" /></property>
- </bean>
- <bean name="OSGiClassLoaderFactory" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderFactory" >
- <property name="system"><inject bean="OSGiClassLoaderSystem"/></property>
- </bean>
- <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.framework.classloading.OSGiBundleClassLoadingDeployer">
- <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
- <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
- </bean>
-
- <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
- <incallback method="addModule" state="Configured" />
- <uncallback method="removeModule" state="Configured" />
- </bean>
- <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
- <property name="defaultMetaData">
- <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
- </property>
- </bean>
- <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
- <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean>
- <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
- </bean>
-
-</deployment>
Modified: projects/jboss-osgi/branches/tdiesler/reactor/deployers/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -14,25 +14,23 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <name>JBossOSGi Runtime - Deployers</name>
+ <name>JBossOSGi Deployers</name>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-deployers</artifactId>
- <packaging>jar</packaging>
+ <packaging>bundle</packaging>
<version>1.0.3-SNAPSHOT</version>
<!-- Parent -->
<parent>
<groupId>org.jboss.osgi</groupId>
- <artifactId>jboss-osgi-parent</artifactId>
- <version>1.0.3</version>
+ <artifactId>jboss-osgi</artifactId>
+ <version>1.0.0.Beta5</version>
</parent>
<properties>
<version.jboss.deployers>2.0.8.GA</version.jboss.deployers>
- <version.jboss.osgi.spi>1.0.2</version.jboss.osgi.spi>
- <version.osgi>r4v42</version.osgi>
</properties>
<!-- Dependencies -->
@@ -40,7 +38,6 @@
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
- <version>${version.jboss.osgi.spi}</version>
</dependency>
<dependency>
<groupId>org.jboss.deployers</groupId>
@@ -52,22 +49,36 @@
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
- <version>${version.osgi}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.compendium</artifactId>
- <version>${version.osgi}</version>
<scope>provided</scope>
</dependency>
</dependencies>
- <!-- Subversion -->
- <scm>
- <connection>scm:svn:http://anonsvn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/runtime/deployers/trunk</connection>
- <developerConnection>scm:svn:https://svn.jboss.org/repos/jbossas/projects/jboss-osgi/projects/runtime/deployers/trunk</developerConnection>
- <url>http://fisheye.jboss.com/qsearch/JBossOSGi/projects/runtime/deployers/trunk</url>
- </scm>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.felix</groupId>
+ <artifactId>maven-bundle-plugin</artifactId>
+ <extensions>true</extensions>
+ <configuration>
+ <instructions>
+ <Bundle-SymbolicName>${artifactId}</Bundle-SymbolicName>
+ <Bundle-Activator>org.jboss.osgi.deployer.internal.DeployersActivator</Bundle-Activator>
+ <Export-Package>
+ org.jboss.osgi.deployer;version=1.0,
+ org.jboss.osgi.deployer.jboss.internal;version=1.0
+ </Export-Package>
+ <Private-Package>
+ org.jboss.osgi.deployer.internal
+ </Private-Package>
+ </instructions>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
</project>
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleClassLoaderDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,110 +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;
-
-// $Id$
-
-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.deployers.structure.spi.DeploymentUnitFilter;
-import org.jboss.osgi.deployer.helpers.BundleDeploymentUnitFilter;
-import org.jboss.osgi.deployer.helpers.PackageAdminDependencyItem;
-import org.jboss.osgi.spi.OSGiConstants;
-import org.jboss.osgi.spi.util.BundleClassLoader;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-
-/**
- * A deployer that attaches a {@link ClassLoaderFactory} that creates a
- * {@link BundleClassLoader} for the deployed Bundle.
- *
- * @author Ales.Justin at jboss.org
- * @author Thomas.Diesler at jboss.org
- * @since 03-Feb-2009
- */
-public class BundleClassLoaderDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private DeploymentUnitFilter filter = new BundleDeploymentUnitFilter();
- private BundleContext systemContext;
-
- public BundleClassLoaderDeployer()
- {
- super(Bundle.class);
- addOutput(ClassLoaderFactory.class);
- setStage(DeploymentStages.POST_PARSE);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- 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
- String propStart = systemContext.getProperty(OSGiConstants.PROPERTY_DEFERRED_START);
- if (Boolean.parseBoolean(propStart != null ? propStart : "true") == false)
- unit.addIDependOn(new PackageAdminDependencyItem(systemContext, bundle));
-
- // skip annotations scanning, if filter is set
- if (filter != null)
- unit.addAttachment(DeploymentUnitFilter.class, filter);
- }
-
- /**
- * 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.createClassLoader(bundle);
- }
-
- public void removeClassLoader(DeploymentUnit unit) throws Exception
- {
- }
- };
- }
-
- /**
- * Set deployment filter.
- *
- * @param filter the deployment filter
- */
- public void setFilter(DeploymentUnitFilter filter)
- {
- this.filter = filter;
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleContainedBeansDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleContainedBeansDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleContainedBeansDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,97 +0,0 @@
-/*
- * 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.osgi.deployer;
-
-// $Id$
-
-import java.util.Collections;
-import java.util.List;
-
-import org.jboss.beans.metadata.spi.BeanMetaData;
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
-import org.jboss.deployers.structure.spi.ClassLoaderFactory;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor;
-import org.jboss.kernel.spi.deployment.KernelDeployment;
-import org.osgi.framework.Bundle;
-
-/**
- * Deploy the bundle contained MC beans onto the Kernel.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 06-May-2009
- */
-public class BundleContainedBeansDeployer extends AbstractComponentDeployer<KernelDeployment, BeanMetaData>
-{
- /*
- * Create a new KernelDeploymentDeployer.
- */
- public BundleContainedBeansDeployer()
- {
- addInput(Bundle.class);
- addInput(ClassLoaderFactory.class);
- setDeploymentVisitor(new KernelDeploymentVisitor());
- setComponentVisitor(new BeanMetaDataVisitor());
- }
-
- /*
- * KernelDeploymentVisitor.
- */
- public static class KernelDeploymentVisitor extends BeanMetaDataFactoryVisitor<KernelDeployment>
- {
- @Override
- public void deploy(DeploymentUnit unit, KernelDeployment deployment) throws DeploymentException
- {
- ClassLoaderFactory factory = unit.getAttachment(ClassLoaderFactory.class);
- unit.createClassLoader(factory);
-
- super.deploy(unit, deployment);
- }
-
- public Class<KernelDeployment> getVisitorType()
- {
- return KernelDeployment.class;
- }
-
- protected List<BeanMetaData> getBeans(KernelDeployment deployment)
- {
- return deployment.getBeans();
- }
- }
-
- /*
- * BeanMetaDataVisitor.
- */
- public static class BeanMetaDataVisitor extends BeanMetaDataFactoryVisitor<BeanMetaData>
- {
- public Class<BeanMetaData> getVisitorType()
- {
- return BeanMetaData.class;
- }
-
- protected List<BeanMetaData> getBeans(BeanMetaData deployment)
- {
- return Collections.singletonList(deployment);
- }
- }
-}
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleManagementDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,93 +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;
-
-// $Id: $
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.management.ManagedBundle;
-import org.osgi.framework.Bundle;
-
-/**
- * Register the Bundle as MBean with JMX.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 04-Mar-2009
- */
-public class BundleManagementDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private MBeanServer mbeanServer;
-
- public BundleManagementDeployer()
- {
- super(Bundle.class);
- }
-
- public void setMbeanServer(MBeanServer mbeanServer)
- {
- this.mbeanServer = mbeanServer;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- if (mbeanServer != null)
- {
- ManagedBundle mb = new ManagedBundle(bundle);
- ObjectName oname = mb.getObjectName();
- try
- {
- if (mbeanServer.isRegistered(mb.getObjectName()) == false)
- {
- mbeanServer.registerMBean(mb, oname);
- unit.addAttachment(ManagedBundle.class, mb);
- }
- }
- catch (Exception ex)
- {
- DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
- }
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, Bundle bundle)
- {
- if (mbeanServer != null)
- {
- try
- {
- ManagedBundle mb = unit.getAttachment(ManagedBundle.class);
- if (mb != null && mbeanServer.isRegistered(mb.getObjectName()))
- mbeanServer.unregisterMBean(mb.getObjectName());
- }
- catch (Exception ex)
- {
- log.warn("Cannot unregister: " + bundle, ex);
- }
- }
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaData.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,71 +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;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
-
-
-/**
- * The Bundle metadata.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 03-Feb-2009
- */
-public class BundleMetaData extends AbstractManifestMetaData
-{
- private String symbolicName;
- private URL bundleLocation;
-
- // exteralizable usage
- public BundleMetaData()
- {
- }
-
- public BundleMetaData(String symbolicName)
- {
- this.symbolicName = symbolicName;
- }
-
- public String getSymbolicName()
- {
- return symbolicName;
- }
-
- public URL getBundleLocation()
- {
- return bundleLocation;
- }
-
- public void setBundleLocation(URL bundleLocation)
- {
- this.bundleLocation = bundleLocation;
- }
-
- public String toString()
- {
- return "Bundle[name=" + symbolicName + "]";
- }
-}
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleMetaDataDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,77 +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;
-
-//$Id$
-
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
-import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
-import org.jboss.osgi.spi.OSGiConstants;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Constants;
-
-/**
- * Create {@link BundleMetaData} from Manifest Headers.
- *
- * If the manifest does not contain a header (named "Bundle-SymbolicName") this deployer does nothing.
- *
- * @author Thomas.Diesler at jboss.org
- * @since 03-Feb-2009
- */
-public class BundleMetaDataDeployer extends ManifestDeployer<BundleMetaData>
-{
- public BundleMetaDataDeployer()
- {
- super(BundleMetaData.class);
- }
-
- @Override
- protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
- {
- BundleMetaData metaData = super.parse(unit, file, root);
- if (metaData != null)
- {
- String symbolicName = metaData.getSymbolicName();
- log.debug("Bundle-SymbolicName: " + symbolicName + " in " + file);
-
- metaData.setBundleLocation(unit.getRoot().toURL());
-
- // Add a marker that this is an OSGi deployment
- unit.addAttachment(OSGiConstants.KEY_BUNDLE_SYMBOLIC_NAME, symbolicName);
- }
- return metaData;
- }
-
- @Override
- protected BundleMetaData createMetaData(Manifest manifest) throws Exception
- {
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName != null)
- return new BundleMetaData(symbolicName);
-
- return null;
- }
-}
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleRealDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,123 +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;
-
-//$Id$
-
-import java.net.URL;
-import java.util.ArrayList;
-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.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-
-/**
- * Installs the Bundle into the Framework's SystemContext.
- *
- * This deployer does not start the bundle. It leaves it in state INSTALLED.
- * On undeploy the Bundle gets uninstalled from the Framework's SystemContext.
- *
- * @author Thomas.Diesler at jboss.org
- * @author Ales.Justin at jboss.org
- * @since 03-Feb-2009
- */
-public class BundleRealDeployer extends AbstractSimpleRealDeployer<BundleMetaData>
-{
- private BundleContext systemContext;
- private List<URL> skipBundles = new ArrayList<URL>();
-
- public BundleRealDeployer()
- {
- super(BundleMetaData.class);
- addOutput(Bundle.class);
- setStage(DeploymentStages.POST_PARSE);
- }
-
- public void setSystemContext(BundleContext bundleContext)
- {
- this.systemContext = bundleContext;
- }
-
- public void setSkipBundles(List<URL> skipBundles)
- {
- this.skipBundles = skipBundles;
- }
-
- public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
- {
- URL bundleURL = metadata.getBundleLocation();
- if (bundleURL == null)
- throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
-
- String bundlePath = bundleURL.getPath();
- if (bundlePath.endsWith("/"))
- bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
-
- try
- {
- boolean skipBundle = false;
- for (URL skip : skipBundles)
- {
- String skipPath = skip.getPath();
- if (skipPath.equals(bundlePath))
- {
- skipBundle = true;
- break;
- }
- }
- if (skipBundle == false)
- {
- Bundle bundle = systemContext.installBundle(bundleURL.toString());
- unit.addAttachment(Bundle.class, bundle);
-
- log.info("Installed: " + bundle);
- }
- }
- catch (BundleException ex)
- {
- throw DeploymentException.rethrowAsDeploymentException("Cannot install bundle: " + metadata, ex);
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, BundleMetaData osGiMetaData)
- {
- Bundle bundle = unit.getAttachment(Bundle.class);
- if (bundle != null)
- {
- try
- {
- bundle.uninstall();
- log.info("Uninstalled: " + bundle);
- }
- catch (BundleException ex)
- {
- log.warn(ex);
- }
- }
- }
-}
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartLevelDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,80 +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;
-
-// $Id:$
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.OSGiConstants;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.service.startlevel.StartLevel;
-import org.osgi.util.tracker.ServiceTracker;
-
-/**
- * Sets the bundle's start level on the StartLevel service.
- *
- * A start level can be given when the bundle is deployed through the
- * WebConsole. Currently, neither hot deployment nor SPI test framework
- * deployments support start levels.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 08-Jul-2009
- */
-public class BundleStartLevelDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private BundleContext systemContext;
- private ServiceTracker startLevelTracker;
-
- public BundleStartLevelDeployer()
- {
- super(Bundle.class);
- addOutput(OSGiConstants.PROPERTY_START_LEVEL);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- Integer propStart = unit.getAttachment(OSGiConstants.PROPERTY_START_LEVEL, Integer.class);
- StartLevel startLevel = getStartLevel();
- if (propStart != null && startLevel != null)
- {
- startLevel.setBundleStartLevel(bundle, propStart);
- }
- }
-
- private StartLevel getStartLevel()
- {
- if (startLevelTracker == null)
- {
- startLevelTracker = new ServiceTracker(systemContext, StartLevel.class.getName(), null);
- startLevelTracker.open();
- }
- return (StartLevel)startLevelTracker.getService();
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStartStopDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,173 +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;
-
-// $Id: $
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.osgi.spi.OSGiConstants;
-import org.jboss.osgi.spi.logging.ExportedPackageHelper;
-import org.osgi.framework.Bundle;
-import org.osgi.framework.BundleContext;
-import org.osgi.framework.BundleException;
-import org.osgi.framework.ServiceReference;
-import org.osgi.service.packageadmin.PackageAdmin;
-
-/**
- * This is the Bundle start/stop Deployer
- *
- * @author Ales.Justin at jboss.org
- * @author Thomas.Diesler at jboss.com
- * @since 27-Feb-2009
- */
-public class BundleStartStopDeployer extends AbstractSimpleRealDeployer<Bundle>
-{
- private BundleContext systemContext;
- private PackageAdmin packageAdmin;
-
- // The list of unresolved bundles
- private List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
-
- public BundleStartStopDeployer()
- {
- super(Bundle.class);
- addInput(OSGiConstants.PROPERTY_START_LEVEL);
- }
-
- public void setSystemContext(BundleContext systemContext)
- {
- this.systemContext = systemContext;
- }
-
- public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- Boolean propAutoStart = unit.getAttachment(OSGiConstants.PROPERTY_AUTO_START, Boolean.class);
- if (propAutoStart == null || Boolean.TRUE.equals(propAutoStart))
- {
- String propDeferredStart = systemContext.getProperty(OSGiConstants.PROPERTY_DEFERRED_START);
- if (Boolean.parseBoolean(propDeferredStart != null ? propDeferredStart : "true") == true)
- {
- deferredStart(unit, bundle);
- }
- else
- {
- simpleStart(unit, bundle);
- }
- }
- }
-
- @Override
- public void undeploy(DeploymentUnit unit, Bundle bundle)
- {
- try
- {
- bundle.stop();
-
- unresolvedBundles.remove(bundle);
-
- log.info("Stoped: " + bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot stop bundle: " + e);
- }
- }
-
- private void simpleStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- ExportedPackageHelper packageHelper = new ExportedPackageHelper(systemContext);
- try
- {
- // Added support for Bundle.START_ACTIVATION_POLICY on start
- // http://issues.apache.org/jira/browse/FELIX-1317
- // bundle.start(Bundle.START_ACTIVATION_POLICY);
-
- bundle.start();
-
- log.info("Started: " + bundle);
- packageHelper.logExportedPackages(bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot start bundle", e);
- }
- }
-
- private void deferredStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
- {
- ExportedPackageHelper packageHelper = new ExportedPackageHelper(systemContext);
-
- // Get the required dependency on the PackageAdmin service
- if (packageAdmin == null)
- {
- ServiceReference sref = systemContext.getServiceReference(PackageAdmin.class.getName());
- packageAdmin = (PackageAdmin)systemContext.getService(sref);
- if (packageAdmin == null)
- throw new IllegalStateException("Cannot obtain PackageAdmin service");
- }
-
- // Always add the bundle as unresolved
- unresolvedBundles.add(bundle);
-
- Bundle[] bundleArr = new Bundle[unresolvedBundles.size()];
- unresolvedBundles.toArray(bundleArr);
-
- // Try to resolve the bundles
- packageAdmin.resolveBundles(bundleArr);
-
- // Find resolved bundles and start them
- Iterator<Bundle> it = unresolvedBundles.iterator();
- while (it.hasNext())
- {
- Bundle auxBundle = it.next();
- if ((Bundle.RESOLVED & auxBundle.getState()) == Bundle.RESOLVED)
- {
- it.remove();
- try
- {
- // Added support for Bundle.START_ACTIVATION_POLICY on start
- // http://issues.apache.org/jira/browse/FELIX-1317
- // auxBundle.start(Bundle.START_ACTIVATION_POLICY);
-
- auxBundle.start();
-
- packageHelper.logExportedPackages(bundle);
- log.info("Started: " + bundle);
- }
- catch (BundleException e)
- {
- log.warn("Cannot start bundle", e);
- }
- }
- }
-
- // Report unresolved bundles
- if (unresolvedBundles.size() > 0)
- log.info("Unresolved: " + unresolvedBundles);
- }
-}
\ No newline at end of file
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/BundleStructureDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,132 +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;
-
-// $Id$
-
-import java.io.IOException;
-import java.util.jar.Attributes;
-import java.util.jar.Manifest;
-
-import org.jboss.deployers.spi.DeploymentException;
-import org.jboss.deployers.spi.structure.ContextInfo;
-import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
-import org.jboss.deployers.vfs.spi.structure.StructureContext;
-import org.jboss.virtual.VFSUtils;
-import org.jboss.virtual.VirtualFile;
-import org.osgi.framework.Constants;
-
-/**
- * Determine the structure of a Bundle deployment.
- *
- * @author Thomas.Diesler at jboss.com
- * @since 16-Apr-2009
- */
-public class BundleStructureDeployer extends AbstractVFSStructureDeployer
-{
- /**
- * Sets the default relative order.
- */
- public BundleStructureDeployer()
- {
- // WARStructure: 1000
- // JARStructure: 10000
- setRelativeOrder(500);
- }
-
- /**
- * Determine the structure of a bundle deployment
- *
- * @param context the structure context
- * @return true when it recognised the context
- * @throws DeploymentException for an error
- */
- public boolean determineStructure(StructureContext structureContext) throws DeploymentException
- {
- ContextInfo context = null;
- VirtualFile root = structureContext.getRoot();
-
- try
- {
- // This file is not for me, because I'm only interested
- // in root deployments that contain a MANIFEST.MF
- Manifest manifest = VFSUtils.getManifest(root);
- if (root != structureContext.getFile() || manifest == null)
- return false;
-
- // This file is also not for me, because I need to see Bundle-SymbolicName
- Attributes attribs = manifest.getMainAttributes();
- String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
- if (symbolicName == null)
- return false;
-
- // Create a context for this jar file with META-INF as the location for metadata
- context = createContext(structureContext, "META-INF");
-
- // Add a classpath entry for every Bundle-ClassPath element
- String classPath = attribs.getValue(Constants.BUNDLE_CLASSPATH);
- if (classPath == null)
- {
- // No Bundle-ClassPath, just add the root
- addClassPath(structureContext, root, true, false, context);
- }
- else
- {
- String[] classPathArr = classPath.split("[,\\s]");
- for (String path : classPathArr)
- {
- if (path.equals("."))
- {
- // Add the root
- addClassPath(structureContext, root, true, false, context);
- }
- else
- {
- // [TODO] publish a Framework Event of type INFO
- // [TODO] locate the class path entry in attached fragments
- try
- {
- VirtualFile child = root.getChild(path);
- addClassPath(structureContext, child, true, false, context);
- }
- catch (IOException ex)
- {
- log.info("Cannot find class path '" + path + "' in: " + root);
- }
- }
- }
- }
-
- // We don't process children as potential subdeployments
-
- return true;
- }
- catch (Exception e)
- {
- // Remove the invalid context
- if (context != null)
- structureContext.removeChild(context);
-
- throw DeploymentException.rethrowAsDeploymentException("Error determining structure: " + root.getName(), e);
- }
- }
-}
\ No newline at end of file
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.osgi.deployer;
+
+//$Id$
+
+
+/**
+ * An OSGi deployer
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface Deployer
+{
+ enum Phase {
+ BEFORE_INSTALLED,
+ AFTER_INSTALLED,
+ BEFORE_RESOLVED,
+ AFTER_RESOLVED,
+ BEFORE_ACTIVE,
+ AFTER_ACTIVE
+ }
+
+ void deploy(Deployment dep);
+
+ void undeploy(Deployment dep);
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersCapability.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersCapability.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersCapability.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,48 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.osgi.deployer;
+
+//$Id$
+
+import org.jboss.osgi.spi.capability.Capability;
+import org.jboss.osgi.spi.testing.OSGiRuntime;
+
+/**
+ * Adds the Deployers capability to the {@link OSGiRuntime}
+ * under test.
+ *
+ * It is ignored if the {@link DeployersService} is already registered.
+ *
+ * Installed bundles: jboss-osgi-microcontainer.jar
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 05-May-2009
+ */
+public class DeployersCapability extends Capability
+{
+ public DeployersCapability()
+ {
+ super(DeployersService.class.getName());
+
+ addBundle("bundles/jboss-osgi-deployers.jar");
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersCapability.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersService.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersService.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersService.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,40 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.osgi.deployer;
+
+//$Id$
+
+
+/**
+ * The deployers service
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface DeployersService
+{
+ Deployment createDeployment(String location);
+
+ void addDeployer(Deployer deployer);
+
+ void removeDeployer(Deployer deployer);
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/DeployersService.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployment.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployment.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployment.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,39 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.osgi.deployer;
+
+//$Id$
+
+import org.jboss.virtual.VirtualFile;
+
+/**
+ * An OSGi deployment
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public interface Deployment
+{
+ String getLocation();
+
+ VirtualFile getRoot();
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/Deployment.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/DeployersActivator.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/DeployersActivator.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/DeployersActivator.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,69 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, 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.osgi.deployer.internal;
+
+//$Id$
+
+import org.jboss.osgi.deployer.Deployer;
+import org.jboss.osgi.deployer.DeployersService;
+import org.jboss.osgi.deployer.Deployment;
+import org.jboss.osgi.spi.NotImplementedException;
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+
+/**
+ * The deployers activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 15-Oct-2009
+ */
+public class DeployersActivator implements BundleActivator
+{
+ public void start(BundleContext context) throws Exception
+ {
+ DeployersService service = new DeployersService()
+ {
+ public void removeDeployer(Deployer deployer)
+ {
+ throw new NotImplementedException();
+ }
+
+ public Deployment createDeployment(String location)
+ {
+ throw new NotImplementedException();
+ }
+
+ public void addDeployer(Deployer deployer)
+ {
+ throw new NotImplementedException();
+ }
+ };
+ context.registerService(DeployersService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context) throws Exception
+ {
+ // TODO Auto-generated method stub
+
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/internal/DeployersActivator.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleClassLoaderDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleClassLoaderDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleClassLoaderDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,95 @@
+/*
+ * 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.jboss.internal;
+
+// $Id$
+
+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.deployers.structure.spi.DeploymentUnitFilter;
+import org.jboss.osgi.spi.util.BundleClassLoader;
+import org.osgi.framework.Bundle;
+
+/**
+ * A deployer that attaches a {@link ClassLoaderFactory} that creates a
+ * {@link BundleClassLoader} for the deployed Bundle.
+ *
+ * @author Ales.Justin at jboss.org
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleClassLoaderDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private DeploymentUnitFilter filter = new BundleDeploymentUnitFilter();
+
+ public BundleClassLoaderDeployer()
+ {
+ 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);
+
+ // skip annotations scanning, if filter is set
+ if (filter != null)
+ unit.addAttachment(DeploymentUnitFilter.class, filter);
+ }
+
+ /**
+ * 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.createClassLoader(bundle);
+ }
+
+ public void removeClassLoader(DeploymentUnit unit) throws Exception
+ {
+ }
+ };
+ }
+
+ /**
+ * Set deployment filter.
+ *
+ * @param filter the deployment filter
+ */
+ public void setFilter(DeploymentUnitFilter filter)
+ {
+ this.filter = filter;
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleClassLoaderDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleContainedBeansDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleContainedBeansDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleContainedBeansDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,97 @@
+/*
+ * 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.osgi.deployer.jboss.internal;
+
+// $Id$
+
+import java.util.Collections;
+import java.util.List;
+
+import org.jboss.beans.metadata.spi.BeanMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractComponentDeployer;
+import org.jboss.deployers.structure.spi.ClassLoaderFactory;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryVisitor;
+import org.jboss.kernel.spi.deployment.KernelDeployment;
+import org.osgi.framework.Bundle;
+
+/**
+ * Deploy the bundle contained MC beans onto the Kernel.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 06-May-2009
+ */
+public class BundleContainedBeansDeployer extends AbstractComponentDeployer<KernelDeployment, BeanMetaData>
+{
+ /*
+ * Create a new KernelDeploymentDeployer.
+ */
+ public BundleContainedBeansDeployer()
+ {
+ addInput(Bundle.class);
+ addInput(ClassLoaderFactory.class);
+ setDeploymentVisitor(new KernelDeploymentVisitor());
+ setComponentVisitor(new BeanMetaDataVisitor());
+ }
+
+ /*
+ * KernelDeploymentVisitor.
+ */
+ public static class KernelDeploymentVisitor extends BeanMetaDataFactoryVisitor<KernelDeployment>
+ {
+ @Override
+ public void deploy(DeploymentUnit unit, KernelDeployment deployment) throws DeploymentException
+ {
+ ClassLoaderFactory factory = unit.getAttachment(ClassLoaderFactory.class);
+ unit.createClassLoader(factory);
+
+ super.deploy(unit, deployment);
+ }
+
+ public Class<KernelDeployment> getVisitorType()
+ {
+ return KernelDeployment.class;
+ }
+
+ protected List<BeanMetaData> getBeans(KernelDeployment deployment)
+ {
+ return deployment.getBeans();
+ }
+ }
+
+ /*
+ * BeanMetaDataVisitor.
+ */
+ public static class BeanMetaDataVisitor extends BeanMetaDataFactoryVisitor<BeanMetaData>
+ {
+ public Class<BeanMetaData> getVisitorType()
+ {
+ return BeanMetaData.class;
+ }
+
+ protected List<BeanMetaData> getBeans(BeanMetaData deployment)
+ {
+ return Collections.singletonList(deployment);
+ }
+ }
+}
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleContainedBeansDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleDeploymentUnitFilter.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleDeploymentUnitFilter.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -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.jboss.internal;
+
+// $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/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleManagementDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleManagementDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleManagementDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,93 @@
+/*
+ * 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.jboss.internal;
+
+// $Id: $
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.management.ManagedBundle;
+import org.osgi.framework.Bundle;
+
+/**
+ * Register the Bundle as MBean with JMX.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 04-Mar-2009
+ */
+public class BundleManagementDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private MBeanServer mbeanServer;
+
+ public BundleManagementDeployer()
+ {
+ super(Bundle.class);
+ }
+
+ public void setMbeanServer(MBeanServer mbeanServer)
+ {
+ this.mbeanServer = mbeanServer;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ if (mbeanServer != null)
+ {
+ ManagedBundle mb = new ManagedBundle(bundle);
+ ObjectName oname = mb.getObjectName();
+ try
+ {
+ if (mbeanServer.isRegistered(mb.getObjectName()) == false)
+ {
+ mbeanServer.registerMBean(mb, oname);
+ unit.addAttachment(ManagedBundle.class, mb);
+ }
+ }
+ catch (Exception ex)
+ {
+ DeploymentException.rethrowAsDeploymentException(ex.getMessage(), ex);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, Bundle bundle)
+ {
+ if (mbeanServer != null)
+ {
+ try
+ {
+ ManagedBundle mb = unit.getAttachment(ManagedBundle.class);
+ if (mb != null && mbeanServer.isRegistered(mb.getObjectName()))
+ mbeanServer.unregisterMBean(mb.getObjectName());
+ }
+ catch (Exception ex)
+ {
+ log.warn("Cannot unregister: " + bundle, ex);
+ }
+ }
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaData.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaData.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaData.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,71 @@
+/*
+ * 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.jboss.internal;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.vfs.spi.deployer.helpers.AbstractManifestMetaData;
+
+
+/**
+ * The Bundle metadata.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleMetaData extends AbstractManifestMetaData
+{
+ private String symbolicName;
+ private URL bundleLocation;
+
+ // exteralizable usage
+ public BundleMetaData()
+ {
+ }
+
+ public BundleMetaData(String symbolicName)
+ {
+ this.symbolicName = symbolicName;
+ }
+
+ public String getSymbolicName()
+ {
+ return symbolicName;
+ }
+
+ public URL getBundleLocation()
+ {
+ return bundleLocation;
+ }
+
+ public void setBundleLocation(URL bundleLocation)
+ {
+ this.bundleLocation = bundleLocation;
+ }
+
+ public String toString()
+ {
+ return "Bundle[name=" + symbolicName + "]";
+ }
+}
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaData.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaDataDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaDataDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaDataDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,77 @@
+/*
+ * 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.jboss.internal;
+
+//$Id$
+
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.vfs.spi.deployer.ManifestDeployer;
+import org.jboss.deployers.vfs.spi.structure.VFSDeploymentUnit;
+import org.jboss.osgi.spi.OSGiConstants;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Constants;
+
+/**
+ * Create {@link BundleMetaData} from Manifest Headers.
+ *
+ * If the manifest does not contain a header (named "Bundle-SymbolicName") this deployer does nothing.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleMetaDataDeployer extends ManifestDeployer<BundleMetaData>
+{
+ public BundleMetaDataDeployer()
+ {
+ super(BundleMetaData.class);
+ }
+
+ @Override
+ protected BundleMetaData parse(VFSDeploymentUnit unit, VirtualFile file, BundleMetaData root) throws Exception
+ {
+ BundleMetaData metaData = super.parse(unit, file, root);
+ if (metaData != null)
+ {
+ String symbolicName = metaData.getSymbolicName();
+ log.debug("Bundle-SymbolicName: " + symbolicName + " in " + file);
+
+ metaData.setBundleLocation(unit.getRoot().toURL());
+
+ // Add a marker that this is an OSGi deployment
+ unit.addAttachment(OSGiConstants.KEY_BUNDLE_SYMBOLIC_NAME, symbolicName);
+ }
+ return metaData;
+ }
+
+ @Override
+ protected BundleMetaData createMetaData(Manifest manifest) throws Exception
+ {
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName != null)
+ return new BundleMetaData(symbolicName);
+
+ return null;
+ }
+}
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleMetaDataDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleRealDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleRealDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleRealDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,123 @@
+/*
+ * 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.jboss.internal;
+
+//$Id$
+
+import java.net.URL;
+import java.util.ArrayList;
+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.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+
+/**
+ * Installs the Bundle into the Framework's SystemContext.
+ *
+ * This deployer does not start the bundle. It leaves it in state INSTALLED.
+ * On undeploy the Bundle gets uninstalled from the Framework's SystemContext.
+ *
+ * @author Thomas.Diesler at jboss.org
+ * @author Ales.Justin at jboss.org
+ * @since 03-Feb-2009
+ */
+public class BundleRealDeployer extends AbstractSimpleRealDeployer<BundleMetaData>
+{
+ private BundleContext systemContext;
+ private List<URL> skipBundles = new ArrayList<URL>();
+
+ public BundleRealDeployer()
+ {
+ super(BundleMetaData.class);
+ addOutput(Bundle.class);
+ setStage(DeploymentStages.POST_PARSE);
+ }
+
+ public void setSystemContext(BundleContext bundleContext)
+ {
+ this.systemContext = bundleContext;
+ }
+
+ public void setSkipBundles(List<URL> skipBundles)
+ {
+ this.skipBundles = skipBundles;
+ }
+
+ public void deploy(DeploymentUnit unit, BundleMetaData metadata) throws DeploymentException
+ {
+ URL bundleURL = metadata.getBundleLocation();
+ if (bundleURL == null)
+ throw new IllegalStateException("Cannot obtain bundle location for: " + metadata);
+
+ String bundlePath = bundleURL.getPath();
+ if (bundlePath.endsWith("/"))
+ bundlePath = bundlePath.substring(0, bundlePath.length() - 1);
+
+ try
+ {
+ boolean skipBundle = false;
+ for (URL skip : skipBundles)
+ {
+ String skipPath = skip.getPath();
+ if (skipPath.equals(bundlePath))
+ {
+ skipBundle = true;
+ break;
+ }
+ }
+ if (skipBundle == false)
+ {
+ Bundle bundle = systemContext.installBundle(bundleURL.toString());
+ unit.addAttachment(Bundle.class, bundle);
+
+ log.info("Installed: " + bundle);
+ }
+ }
+ catch (BundleException ex)
+ {
+ throw DeploymentException.rethrowAsDeploymentException("Cannot install bundle: " + metadata, ex);
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, BundleMetaData osGiMetaData)
+ {
+ Bundle bundle = unit.getAttachment(Bundle.class);
+ if (bundle != null)
+ {
+ try
+ {
+ bundle.uninstall();
+ log.info("Uninstalled: " + bundle);
+ }
+ catch (BundleException ex)
+ {
+ log.warn(ex);
+ }
+ }
+ }
+}
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleRealDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartLevelDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartLevelDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartLevelDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,80 @@
+/*
+ * 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.jboss.internal;
+
+// $Id:$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.OSGiConstants;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.service.startlevel.StartLevel;
+import org.osgi.util.tracker.ServiceTracker;
+
+/**
+ * Sets the bundle's start level on the StartLevel service.
+ *
+ * A start level can be given when the bundle is deployed through the
+ * WebConsole. Currently, neither hot deployment nor SPI test framework
+ * deployments support start levels.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 08-Jul-2009
+ */
+public class BundleStartLevelDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private BundleContext systemContext;
+ private ServiceTracker startLevelTracker;
+
+ public BundleStartLevelDeployer()
+ {
+ super(Bundle.class);
+ addOutput(OSGiConstants.PROPERTY_START_LEVEL);
+ }
+
+ public void setSystemContext(BundleContext systemContext)
+ {
+ this.systemContext = systemContext;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ Integer propStart = unit.getAttachment(OSGiConstants.PROPERTY_START_LEVEL, Integer.class);
+ StartLevel startLevel = getStartLevel();
+ if (propStart != null && startLevel != null)
+ {
+ startLevel.setBundleStartLevel(bundle, propStart);
+ }
+ }
+
+ private StartLevel getStartLevel()
+ {
+ if (startLevelTracker == null)
+ {
+ startLevelTracker = new ServiceTracker(systemContext, StartLevel.class.getName(), null);
+ startLevelTracker.open();
+ }
+ return (StartLevel)startLevelTracker.getService();
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartStopDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartStopDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStartStopDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,173 @@
+/*
+ * 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.jboss.internal;
+
+// $Id: $
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.spi.OSGiConstants;
+import org.jboss.osgi.spi.logging.ExportedPackageHelper;
+import org.osgi.framework.Bundle;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.BundleException;
+import org.osgi.framework.ServiceReference;
+import org.osgi.service.packageadmin.PackageAdmin;
+
+/**
+ * This is the Bundle start/stop Deployer
+ *
+ * @author Ales.Justin at jboss.org
+ * @author Thomas.Diesler at jboss.com
+ * @since 27-Feb-2009
+ */
+public class BundleStartStopDeployer extends AbstractSimpleRealDeployer<Bundle>
+{
+ private BundleContext systemContext;
+ private PackageAdmin packageAdmin;
+
+ // The list of unresolved bundles
+ private List<Bundle> unresolvedBundles = new ArrayList<Bundle>();
+
+ public BundleStartStopDeployer()
+ {
+ super(Bundle.class);
+ addInput(OSGiConstants.PROPERTY_START_LEVEL);
+ }
+
+ public void setSystemContext(BundleContext systemContext)
+ {
+ this.systemContext = systemContext;
+ }
+
+ public void deploy(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ Boolean propAutoStart = unit.getAttachment(OSGiConstants.PROPERTY_AUTO_START, Boolean.class);
+ if (propAutoStart == null || Boolean.TRUE.equals(propAutoStart))
+ {
+ String propDeferredStart = systemContext.getProperty(OSGiConstants.PROPERTY_DEFERRED_START);
+ if (Boolean.parseBoolean(propDeferredStart != null ? propDeferredStart : "true") == true)
+ {
+ deferredStart(unit, bundle);
+ }
+ else
+ {
+ simpleStart(unit, bundle);
+ }
+ }
+ }
+
+ @Override
+ public void undeploy(DeploymentUnit unit, Bundle bundle)
+ {
+ try
+ {
+ bundle.stop();
+
+ unresolvedBundles.remove(bundle);
+
+ log.info("Stoped: " + bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot stop bundle: " + e);
+ }
+ }
+
+ private void simpleStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ ExportedPackageHelper packageHelper = new ExportedPackageHelper(systemContext);
+ try
+ {
+ // Added support for Bundle.START_ACTIVATION_POLICY on start
+ // http://issues.apache.org/jira/browse/FELIX-1317
+ // bundle.start(Bundle.START_ACTIVATION_POLICY);
+
+ bundle.start();
+
+ log.info("Started: " + bundle);
+ packageHelper.logExportedPackages(bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot start bundle", e);
+ }
+ }
+
+ private void deferredStart(DeploymentUnit unit, Bundle bundle) throws DeploymentException
+ {
+ ExportedPackageHelper packageHelper = new ExportedPackageHelper(systemContext);
+
+ // Get the required dependency on the PackageAdmin service
+ if (packageAdmin == null)
+ {
+ ServiceReference sref = systemContext.getServiceReference(PackageAdmin.class.getName());
+ packageAdmin = (PackageAdmin)systemContext.getService(sref);
+ if (packageAdmin == null)
+ throw new IllegalStateException("Cannot obtain PackageAdmin service");
+ }
+
+ // Always add the bundle as unresolved
+ unresolvedBundles.add(bundle);
+
+ Bundle[] bundleArr = new Bundle[unresolvedBundles.size()];
+ unresolvedBundles.toArray(bundleArr);
+
+ // Try to resolve the bundles
+ packageAdmin.resolveBundles(bundleArr);
+
+ // Find resolved bundles and start them
+ Iterator<Bundle> it = unresolvedBundles.iterator();
+ while (it.hasNext())
+ {
+ Bundle auxBundle = it.next();
+ if ((Bundle.RESOLVED & auxBundle.getState()) == Bundle.RESOLVED)
+ {
+ it.remove();
+ try
+ {
+ // Added support for Bundle.START_ACTIVATION_POLICY on start
+ // http://issues.apache.org/jira/browse/FELIX-1317
+ // auxBundle.start(Bundle.START_ACTIVATION_POLICY);
+
+ auxBundle.start();
+
+ packageHelper.logExportedPackages(bundle);
+ log.info("Started: " + bundle);
+ }
+ catch (BundleException e)
+ {
+ log.warn("Cannot start bundle", e);
+ }
+ }
+ }
+
+ // Report unresolved bundles
+ if (unresolvedBundles.size() > 0)
+ log.info("Unresolved: " + unresolvedBundles);
+ }
+}
\ No newline at end of file
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStructureDeployer.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStructureDeployer.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStructureDeployer.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,132 @@
+/*
+ * 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.jboss.internal;
+
+// $Id$
+
+import java.io.IOException;
+import java.util.jar.Attributes;
+import java.util.jar.Manifest;
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.structure.ContextInfo;
+import org.jboss.deployers.vfs.plugins.structure.AbstractVFSStructureDeployer;
+import org.jboss.deployers.vfs.spi.structure.StructureContext;
+import org.jboss.virtual.VFSUtils;
+import org.jboss.virtual.VirtualFile;
+import org.osgi.framework.Constants;
+
+/**
+ * Determine the structure of a Bundle deployment.
+ *
+ * @author Thomas.Diesler at jboss.com
+ * @since 16-Apr-2009
+ */
+public class BundleStructureDeployer extends AbstractVFSStructureDeployer
+{
+ /**
+ * Sets the default relative order.
+ */
+ public BundleStructureDeployer()
+ {
+ // WARStructure: 1000
+ // JARStructure: 10000
+ setRelativeOrder(500);
+ }
+
+ /**
+ * Determine the structure of a bundle deployment
+ *
+ * @param context the structure context
+ * @return true when it recognised the context
+ * @throws DeploymentException for an error
+ */
+ public boolean determineStructure(StructureContext structureContext) throws DeploymentException
+ {
+ ContextInfo context = null;
+ VirtualFile root = structureContext.getRoot();
+
+ try
+ {
+ // This file is not for me, because I'm only interested
+ // in root deployments that contain a MANIFEST.MF
+ Manifest manifest = VFSUtils.getManifest(root);
+ if (root != structureContext.getFile() || manifest == null)
+ return false;
+
+ // This file is also not for me, because I need to see Bundle-SymbolicName
+ Attributes attribs = manifest.getMainAttributes();
+ String symbolicName = attribs.getValue(Constants.BUNDLE_SYMBOLICNAME);
+ if (symbolicName == null)
+ return false;
+
+ // Create a context for this jar file with META-INF as the location for metadata
+ context = createContext(structureContext, "META-INF");
+
+ // Add a classpath entry for every Bundle-ClassPath element
+ String classPath = attribs.getValue(Constants.BUNDLE_CLASSPATH);
+ if (classPath == null)
+ {
+ // No Bundle-ClassPath, just add the root
+ addClassPath(structureContext, root, true, false, context);
+ }
+ else
+ {
+ String[] classPathArr = classPath.split("[,\\s]");
+ for (String path : classPathArr)
+ {
+ if (path.equals("."))
+ {
+ // Add the root
+ addClassPath(structureContext, root, true, false, context);
+ }
+ else
+ {
+ // [TODO] publish a Framework Event of type INFO
+ // [TODO] locate the class path entry in attached fragments
+ try
+ {
+ VirtualFile child = root.getChild(path);
+ addClassPath(structureContext, child, true, false, context);
+ }
+ catch (IOException ex)
+ {
+ log.info("Cannot find class path '" + path + "' in: " + root);
+ }
+ }
+ }
+ }
+
+ // We don't process children as potential subdeployments
+
+ return true;
+ }
+ catch (Exception e)
+ {
+ // Remove the invalid context
+ if (context != null)
+ structureContext.removeChild(context);
+
+ throw DeploymentException.rethrowAsDeploymentException("Error determining structure: " + root.getName(), e);
+ }
+ }
+}
\ No newline at end of file
Property changes on: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/BundleStructureDeployer.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/DeploymentProvidedDeploymentUnitFilter.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/DeploymentProvidedDeploymentUnitFilter.java (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/DeploymentProvidedDeploymentUnitFilter.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -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.jboss.internal;
+
+// $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] JBOSGI-94
+ *
+ * @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/branches/tdiesler/reactor/deployers/src/main/java/org/jboss/osgi/deployer/jboss/internal/DeploymentProvidedDeploymentUnitFilter.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:mergeinfo
+
Name: svn:eol-style
+ LF
Modified: projects/jboss-osgi/branches/tdiesler/reactor/framework/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/framework/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/framework/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -28,12 +28,12 @@
<artifactId>jboss-osgi-framework</artifactId>
<packaging>bundle</packaging>
- <version>1.0.0.Alpha2-SNAPSHOT</version>
+ <version>1.0.0.Alpha2</version>
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Properties -->
@@ -136,12 +136,10 @@
<dependency>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi-spi</artifactId>
- <version>${version.jboss.osgi.spi}</version>
</dependency>
<dependency>
- <groupId>org.jboss.osgi.runtime</groupId>
+ <groupId>org.jboss.osgi.bundles</groupId>
<artifactId>jboss-osgi-deployers</artifactId>
- <version>${version.jboss.osgi.runtime.deployers}</version>
</dependency>
<!-- OSGi Dependencies -->
Modified: projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/java/org/jboss/osgi/framework/launch/OSGiFrameworkFactory.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -70,7 +70,7 @@
BasicXMLDeployer deployer = new BasicXMLDeployer(kernel, ControllerMode.AUTOMATIC);
URL url = null;
- String[] bootstraps = new String[] { "bootstrap/bootstrap.xml", "jboss-osgi-bootstrap.xml", "META-INF/jboss-osgi-bootstrap.xml" };
+ String[] bootstraps = new String[] { "jboss-osgi-bootstrap.xml", "META-INF/jboss-osgi-bootstrap.xml", "META-INF/jboss-osgi-default-bootstrap.xml" };
ClassLoader contextLoader = Thread.currentThread().getContextClassLoader();
for (String xml : bootstraps)
{
Copied: projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/resources/META-INF/jboss-osgi-default-bootstrap.xml (from rev 94932, projects/jboss-osgi/trunk/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml)
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/resources/META-INF/jboss-osgi-default-bootstrap.xml (rev 0)
+++ projects/jboss-osgi/branches/tdiesler/reactor/framework/src/main/resources/META-INF/jboss-osgi-default-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -0,0 +1,174 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <!--
+ ********************************
+ * *
+ * OSGi Framework *
+ * *
+ ********************************
+ -->
+
+ <bean name="OSGiBundleManager" class="org.jboss.osgi.framework.bundle.OSGiBundleManager">
+ <constructor>
+ <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
+ <parameter><inject bean="MainDeployer" /></parameter>
+ </constructor>
+ <property name="properties">
+ <map keyClass="java.lang.String" valueClass="java.lang.String">
+ <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
+ <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
+ <entry><key>org.osgi.framework.system.packages.extra</key><value>
+
+ org.jboss.logging;version=2.0,
+
+ org.jboss.osgi.spi.capability;version=1.0,
+ org.jboss.osgi.spi.logging;version=1.0,
+ org.jboss.osgi.spi.management;version=1.0,
+ org.jboss.osgi.spi.service;version=1.0,
+ org.jboss.osgi.spi.testing;version=1.0,
+ org.jboss.osgi.spi.util;version=1.0,
+
+ org.osgi.framework,
+ org.osgi.framework.launch,
+ org.osgi.service.startlevel,
+ org.osgi.service.packageadmin
+ </value></entry>
+ </map>
+ </property>
+ <incallback method="addPlugin" />
+ <uncallback method="removePlugin" />
+ </bean>
+
+ <!--
+ ********************************
+ * *
+ * OSGi Framework Plugins *
+ * *
+ ********************************
+ -->
+
+ <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+
+ <!--
+ ********************************
+ * *
+ * OSGi Service Plugins *
+ * *
+ ********************************
+ -->
+
+ <bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+
+ <!--
+ ********************************
+ * *
+ * OSGi Deployment *
+ * *
+ ********************************
+ -->
+
+ <!-- The MainDeployer -->
+ <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
+ <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
+ <property name="deployers"><inject bean="Deployers" /></property>
+ </bean>
+
+ <!-- The holder for deployers that determine structure -->
+ <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
+ <property name="structureBuilder">
+ <!-- The consolidator of the structure information -->
+ <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
+ </property>
+ <!-- Accept any implementor of structure deployer -->
+ <incallback method="addDeployer" />
+ <uncallback method="removeDeployer" />
+ </bean>
+
+ <!-- The holder for deployers that do real deployment -->
+ <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
+ <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
+ <!-- Accept any implementor of deployer -->
+ <incallback method="addDeployer" />
+ <uncallback method="removeDeployer" />
+ </bean>
+
+ <!-- Bundle Structure -->
+ <bean name="BundleStructure" class="org.jboss.osgi.deployer.jboss.internal.BundleStructureDeployer" />
+
+ <!-- JAR & File Structure (needed for negative testing) -->
+ <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
+ <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
+
+ <!-- POJO Deployment -->
+ <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
+ <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
+ <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
+ <constructor>
+ <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
+ </constructor>
+ </bean>
+
+ <!-- OSGI Deployment -->
+ <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
+ <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
+ <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
+ </bean>
+ <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
+
+ <!--
+ ********************************
+ * *
+ * OSGi Classloading *
+ * *
+ ********************************
+ -->
+
+ <bean name="OSGiClassLoaderSystem" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderSystem" />
+ <bean name="OSGiClassLoaderDomain" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderDomain" >
+ <constructor><parameter>OSGiClassLoaderDomain</parameter></constructor>
+ <property name="classLoaderSystem"><inject bean="OSGiClassLoaderSystem"/></property>
+ <property name="bundleManager"><inject bean="OSGiBundleManager" /></property>
+ </bean>
+ <bean name="OSGiClassLoaderFactory" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderFactory" >
+ <property name="system"><inject bean="OSGiClassLoaderSystem"/></property>
+ </bean>
+ <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.framework.classloading.OSGiBundleClassLoadingDeployer">
+ <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
+ <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
+ </bean>
+
+ <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
+ <incallback method="addModule" state="Configured" />
+ <uncallback method="removeModule" state="Configured" />
+ </bean>
+ <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
+ <property name="defaultMetaData">
+ <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
+ </property>
+ </bean>
+ <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
+ <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
+ <property name="classLoading"><inject bean="ClassLoading" /></property>
+ </bean>
+ <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
+ <property name="classLoading"><inject bean="ClassLoading" /></property>
+ <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
+ </bean>
+
+</deployment>
Modified: projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/java/org/jboss/test/osgi/OSGiTestDelegate.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/java/org/jboss/test/osgi/OSGiTestDelegate.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/java/org/jboss/test/osgi/OSGiTestDelegate.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -81,10 +81,12 @@
*/
protected void deploy() throws Exception
{
- String common = "/META-INF/jboss-osgi-bootstrap.xml";
- URL url = getClass().getResource(common);
+ URL url = getClass().getResource("/META-INF/jboss-osgi-bootstrap.xml");
if (url == null)
- throw new IllegalStateException(common + " not found");
+ url = getClass().getResource("/META-INF/jboss-osgi-default-bootstrap.xml");
+ if (url == null)
+ throw new IllegalStateException("Cannot find: jboss-osgi-bootstrap.xml");
+
deploy(url);
try
{
Deleted: projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/framework/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,172 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- ********************************
- * *
- * OSGi Framework *
- * *
- ********************************
- -->
-
- <bean name="OSGiBundleManager" class="org.jboss.osgi.framework.bundle.OSGiBundleManager">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
- <parameter><inject bean="MainDeployer" /></parameter>
- </constructor>
- <property name="properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
- <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
- <entry><key>org.osgi.framework.system.packages.extra</key><value>
- org.jboss.logging;version=2.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.spi.testing;version=1.0,
- org.jboss.osgi.spi.util;version=1.0,
-
- org.osgi.framework,
- org.osgi.framework.launch,
- org.osgi.service.startlevel,
- org.osgi.service.packageadmin
- </value></entry>
- </map>
- </property>
- <incallback method="addPlugin" />
- <uncallback method="removePlugin" />
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Framework Plugins *
- * *
- ********************************
- -->
-
- <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Service Plugins *
- * *
- ********************************
- -->
-
- <bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Deployment *
- * *
- ********************************
- -->
-
- <!-- The MainDeployer -->
- <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
- <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
- <property name="deployers"><inject bean="Deployers" /></property>
- </bean>
-
- <!-- The holder for deployers that determine structure -->
- <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
- <property name="structureBuilder">
- <!-- The consolidator of the structure information -->
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
- </property>
- <!-- Accept any implementor of structure deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- The holder for deployers that do real deployment -->
- <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
- <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
- <!-- Accept any implementor of deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- Bundle Structure -->
- <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
-
- <!-- JAR & File Structure (needed for negative testing) -->
- <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
- <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
-
- <!-- POJO Deployment -->
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
- <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
- <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
- <constructor>
- <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
- </constructor>
- </bean>
-
- <!-- OSGI Deployment -->
- <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
- <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
-
- <!--
- ********************************
- * *
- * OSGi Classloading *
- * *
- ********************************
- -->
-
- <bean name="OSGiClassLoaderSystem" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderSystem" />
- <bean name="OSGiClassLoaderDomain" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderDomain" >
- <constructor><parameter>OSGiClassLoaderDomain</parameter></constructor>
- <property name="classLoaderSystem"><inject bean="OSGiClassLoaderSystem"/></property>
- <property name="bundleManager"><inject bean="OSGiBundleManager" /></property>
- </bean>
- <bean name="OSGiClassLoaderFactory" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderFactory" >
- <property name="system"><inject bean="OSGiClassLoaderSystem"/></property>
- </bean>
- <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.framework.classloading.OSGiBundleClassLoadingDeployer">
- <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
- <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
- </bean>
-
- <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
- <incallback method="addModule" state="Configured" />
- <uncallback method="removeModule" state="Configured" />
- </bean>
- <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
- <property name="defaultMetaData">
- <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
- </property>
- </bean>
- <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
- <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean>
- <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
- </bean>
-
-</deployment>
Modified: projects/jboss-osgi/branches/tdiesler/reactor/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/reactor/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/reactor/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -38,10 +38,11 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<modules>
+ <module>deployers</module>
<module>framework</module>
<module>blueprint</module>
</modules>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/scripts/assembly-bundles.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/scripts/assembly-bundles.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -19,6 +19,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployers:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/java/org/jboss/test/osgi/example/microcontainer/MicrocontainerTestCase.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -29,7 +29,7 @@
import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.testing.OSGiBundle;
import org.jboss.osgi.spi.testing.OSGiRuntime;
Deleted: projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,200 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- ********************************
- * *
- * OSGi Framework *
- * *
- ********************************
- -->
-
- <bean name="OSGiBundleManager" class="org.jboss.osgi.framework.bundle.OSGiBundleManager">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
- <parameter><inject bean="MainDeployer" /></parameter>
- </constructor>
- <property name="properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
- <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
- <entry><key>org.osgi.framework.system.packages.extra</key><value>
-
- <!-- [JBOSGI-145] JAXB classes are loaded from the system classpath -->
- com.sun.xml.internal.bind.v2,
-
- <!-- log4j -->
- org.apache.log4j;version=1.2,
-
- <!-- jboss -->
- org.jboss.beans.metadata.plugins;version=2.0,
- org.jboss.beans.metadata.plugins.builder;version=2.0,
- org.jboss.beans.metadata.spi;version=2.0,
- org.jboss.beans.metadata.spi.builder;version=2.0,
- org.jboss.dependency.spi;version=2.0,
- org.jboss.kernel.spi.dependency;version=2.0,
- org.jboss.logging;version=2.0,
-
- <!-- jboss-osgi -->
- org.jboss.osgi.spi;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.framework;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.spi.testing;version=1.0,
- org.jboss.osgi.spi.util;version=1.0
- </value></entry>
- </map>
- </property>
- <incallback method="addPlugin" />
- <uncallback method="removePlugin" />
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Framework Plugins *
- * *
- ********************************
- -->
-
- <bean name="OSGiAutoInstallPlugin" class="org.jboss.osgi.framework.plugins.internal.AutoInstallPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="autoInstall">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value>
- </list>
- </property>
- <property name="autoStart">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
- <value>${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
- </list>
- </property>
- </bean>
- <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="synchronous">true</property>
- </bean>
- <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Service Plugins *
- * *
- ********************************
- -->
-
- <bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Deployment *
- * *
- ********************************
- -->
-
- <!-- The MainDeployer -->
- <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
- <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
- <property name="deployers"><inject bean="Deployers" /></property>
- </bean>
-
- <!-- The holder for deployers that determine structure -->
- <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
- <property name="structureBuilder">
- <!-- The consolidator of the structure information -->
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
- </property>
- <!-- Accept any implementor of structure deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- The holder for deployers that do real deployment -->
- <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
- <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
- <!-- Accept any implementor of deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- Bundle Structure -->
- <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
-
- <!-- JAR & File Structure (needed for negative testing) -->
- <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
- <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
-
- <!-- POJO Deployment -->
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
- <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
- <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
- <constructor>
- <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
- </constructor>
- </bean>
-
- <!-- OSGI Deployment -->
- <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
- <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
-
- <!--
- ********************************
- * *
- * OSGi Classloading *
- * *
- ********************************
- -->
-
- <bean name="OSGiClassLoaderSystem" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderSystem" />
- <bean name="OSGiClassLoaderDomain" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderDomain" >
- <constructor><parameter>OSGiClassLoaderDomain</parameter></constructor>
- <property name="classLoaderSystem"><inject bean="OSGiClassLoaderSystem"/></property>
- <property name="bundleManager"><inject bean="OSGiBundleManager" /></property>
- </bean>
- <bean name="OSGiClassLoaderFactory" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderFactory" >
- <property name="system"><inject bean="OSGiClassLoaderSystem"/></property>
- </bean>
- <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.framework.classloading.OSGiBundleClassLoadingDeployer">
- <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
- <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
- </bean>
-
- <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
- <incallback method="addModule" state="Configured" />
- <uncallback method="removeModule" state="Configured" />
- </bean>
- <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
- <property name="defaultMetaData">
- <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
- </property>
- </bean>
- <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
- <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean>
- <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
- </bean>
-
-</deployment>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/functional/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -31,7 +31,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Properties -->
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/functional/scripts/assembly-bundles.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/scripts/assembly-bundles.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/scripts/assembly-bundles.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -19,6 +19,7 @@
<include>*:jboss-osgi-blueprint:jar</include>
<include>*:jboss-osgi-common:jar</include>
<include>*:jboss-osgi-common-core:jar</include>
+ <include>*:jboss-osgi-deployers:jar</include>
<include>*:jboss-osgi-husky:jar</include>
<include>*:jboss-osgi-jaxb:jar</include>
<include>*:jboss-osgi-jmx:jar</include>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/jbossas/jbosgi36/OSGI36TestCase.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -28,7 +28,7 @@
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.MBeanProxyException;
import org.jboss.osgi.spi.testing.OSGiBundle;
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/java/org/jboss/test/osgi/service/microcontainer/MicrocontainerServiceTestCase.java 2009-10-15 11:44:24 UTC (rev 94940)
@@ -39,7 +39,7 @@
import org.jboss.osgi.jbossxb.XMLBindingCapability;
import org.jboss.osgi.jmx.JMXCapability;
import org.jboss.osgi.jndi.JNDICapability;
-import org.jboss.osgi.spi.capability.MicrocontainerCapability;
+import org.jboss.osgi.microcontainer.MicrocontainerCapability;
import org.jboss.osgi.spi.management.MBeanProxy;
import org.jboss.osgi.spi.management.ManagedFrameworkMBean;
import org.jboss.osgi.spi.management.MicrocontainerServiceMBean;
Deleted: projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -1,199 +0,0 @@
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
-
- <!--
- ********************************
- * *
- * OSGi Framework *
- * *
- ********************************
- -->
-
- <bean name="OSGiBundleManager" class="org.jboss.osgi.framework.bundle.OSGiBundleManager">
- <constructor>
- <parameter><inject bean="jboss.kernel:service=Kernel" /></parameter>
- <parameter><inject bean="MainDeployer" /></parameter>
- </constructor>
- <property name="properties">
- <map keyClass="java.lang.String" valueClass="java.lang.String">
- <entry><key>org.osgi.framework.storage</key><value>${log4j.output.dir}/osgi-store</value></entry>
- <entry><key>org.osgi.framework.storage.clean</key><value>onFirstInit</value></entry>
- <entry><key>org.osgi.framework.system.packages.extra</key><value>
-
- <!-- [JBOSGI-145] JAXB classes are loaded from the system classpath -->
- com.sun.xml.internal.bind.v2,
-
- <!-- log4j -->
- org.apache.log4j;version=1.2,
-
- <!-- jboss -->
- org.jboss.beans.metadata.plugins;version=2.0,
- org.jboss.beans.metadata.plugins.builder;version=2.0,
- org.jboss.beans.metadata.spi;version=2.0,
- org.jboss.beans.metadata.spi.builder;version=2.0,
- org.jboss.dependency.spi;version=2.0,
- org.jboss.kernel.spi.dependency;version=2.0,
- org.jboss.logging;version=2.0,
-
- <!-- jboss-osgi -->
- org.jboss.osgi.spi;version=1.0,
- org.jboss.osgi.spi.capability;version=1.0,
- org.jboss.osgi.spi.framework;version=1.0,
- org.jboss.osgi.spi.logging;version=1.0,
- org.jboss.osgi.spi.management;version=1.0,
- org.jboss.osgi.spi.service;version=1.0,
- org.jboss.osgi.spi.testing;version=1.0,
- org.jboss.osgi.spi.util;version=1.0
- </value></entry>
- </map>
- </property>
- <incallback method="addPlugin" />
- <uncallback method="removePlugin" />
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Framework Plugins *
- * *
- ********************************
- -->
-
- <bean name="OSGiAutoInstallPlugin" class="org.jboss.osgi.framework.plugins.internal.AutoInstallPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- <property name="autoInstall">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.osgi.compendium.jar</value>
- </list>
- </property>
- <property name="autoStart">
- <list elementClass="java.net.URL">
- <value>${test.archive.directory}/bundles/org.apache.felix.log.jar</value>
- <value>${test.archive.directory}/bundles/jboss-osgi-common.jar</value>
- </list>
- </property>
- </bean>
- <bean name="OSGiFrameworkEventsPlugin" class="org.jboss.osgi.framework.plugins.internal.FrameworkEventsPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiStoragePlugin" class="org.jboss.osgi.framework.plugins.internal.BundleStoragePluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiSystemPackages" class="org.jboss.osgi.framework.plugins.internal.SystemPackagesPluginImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Service Plugins *
- * *
- ********************************
- -->
-
- <bean name="MicrocontainerService" class="org.jboss.osgi.framework.service.internal.MicrocontainerServiceImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="StartLevelService" class="org.jboss.osgi.framework.service.internal.StartLevelImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="PackageAdminService" class="org.jboss.osgi.framework.service.internal.PackageAdminImpl">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
-
- <!--
- ********************************
- * *
- * OSGi Deployment *
- * *
- ********************************
- -->
-
- <!-- The MainDeployer -->
- <bean name="MainDeployer" class="org.jboss.deployers.plugins.main.MainDeployerImpl">
- <property name="structuralDeployers"><inject bean="StructuralDeployers" /></property>
- <property name="deployers"><inject bean="Deployers" /></property>
- </bean>
-
- <!-- The holder for deployers that determine structure -->
- <bean name="StructuralDeployers" class="org.jboss.deployers.vfs.plugins.structure.VFSStructuralDeployersImpl">
- <property name="structureBuilder">
- <!-- The consolidator of the structure information -->
- <bean name="StructureBuilder" class="org.jboss.deployers.vfs.plugins.structure.VFSStructureBuilder" />
- </property>
- <!-- Accept any implementor of structure deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- The holder for deployers that do real deployment -->
- <bean name="Deployers" class="org.jboss.deployers.plugins.deployers.DeployersImpl">
- <constructor><parameter><inject bean="jboss.kernel:service=KernelController" /></parameter></constructor>
- <!-- Accept any implementor of deployer -->
- <incallback method="addDeployer" />
- <uncallback method="removeDeployer" />
- </bean>
-
- <!-- Bundle Structure -->
- <bean name="BundleStructure" class="org.jboss.osgi.deployer.BundleStructureDeployer" />
-
- <!-- JAR & File Structure (needed for negative testing) -->
- <bean name="JARStructure" class="org.jboss.deployers.vfs.plugins.structure.jar.JARStructure" />
- <bean name="FileStructure" class="org.jboss.deployers.vfs.plugins.structure.file.FileStructure" />
-
- <!-- POJO Deployment -->
- <bean name="BeanDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanDeployer" />
- <bean name="KernelDeploymentDeployer" class="org.jboss.deployers.vfs.deployer.kernel.KernelDeploymentDeployer" />
- <bean name="BeanMetaDataDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataDeployer">
- <constructor>
- <parameter class="org.jboss.dependency.spi.Controller"><inject bean="jboss.kernel:service=KernelController" /></parameter>
- </constructor>
- </bean>
-
- <!-- OSGI Deployment -->
- <bean name="OSGiManifestParsingDeployer" class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
- <bean name="OSGiBundleStateDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleStateDeployer">
- <constructor><parameter><inject bean="OSGiBundleManager" /></parameter></constructor>
- </bean>
- <bean name="OSGiBundleActivatorDeployer" class="org.jboss.osgi.framework.deployers.OSGiBundleActivatorDeployer" />
-
- <!--
- ********************************
- * *
- * OSGi Classloading *
- * *
- ********************************
- -->
-
- <bean name="OSGiClassLoaderSystem" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderSystem" />
- <bean name="OSGiClassLoaderDomain" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderDomain" >
- <constructor><parameter>OSGiClassLoaderDomain</parameter></constructor>
- <property name="classLoaderSystem"><inject bean="OSGiClassLoaderSystem"/></property>
- <property name="bundleManager"><inject bean="OSGiBundleManager" /></property>
- </bean>
- <bean name="OSGiClassLoaderFactory" class="org.jboss.osgi.framework.classloading.OSGiClassLoaderFactory" >
- <property name="system"><inject bean="OSGiClassLoaderSystem"/></property>
- </bean>
- <bean name="OSGiBundleClassLoadingDeployer" class="org.jboss.osgi.framework.classloading.OSGiBundleClassLoadingDeployer">
- <property name="domain"><inject bean="OSGiClassLoaderDomain"/></property>
- <property name="factory"><inject bean="OSGiClassLoaderFactory"/></property>
- </bean>
-
- <bean name="ClassLoading" class="org.jboss.classloading.spi.dependency.ClassLoading">
- <incallback method="addModule" state="Configured" />
- <uncallback method="removeModule" state="Configured" />
- </bean>
- <bean name="ClassLoadingDefaultDeployer" class="org.jboss.deployers.plugins.classloading.ClassLoadingDefaultDeployer">
- <property name="defaultMetaData">
- <classloading xmlns="urn:jboss:classloading:1.0" export-all="NON_EMPTY" import-all="true" />
- </property>
- </bean>
- <bean name="ClassLoaderClassPathDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderClassPathDeployer" />
- <bean name="ClassLoaderDescribeDeployer" class="org.jboss.deployers.vfs.plugins.classloader.VFSClassLoaderDescribeDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- </bean>
- <bean name="ClassLoaderDeployer" class="org.jboss.deployers.plugins.classloading.AbstractLevelClassLoaderSystemDeployer">
- <property name="classLoading"><inject bean="ClassLoading" /></property>
- <property name="system"><inject bean="OSGiClassLoaderSystem" /></property>
- </bean>
-
-</deployment>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -26,7 +26,7 @@
<parent>
<groupId>org.jboss.osgi</groupId>
<artifactId>jboss-osgi</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<modules>
Modified: projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/pom.xml
===================================================================
--- projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/pom.xml 2009-10-15 11:40:00 UTC (rev 94939)
+++ projects/jboss-osgi/branches/tdiesler/testsuite/trailblazer/pom.xml 2009-10-15 11:44:24 UTC (rev 94940)
@@ -23,7 +23,7 @@
<parent>
<groupId>org.jboss.osgi.testsuite</groupId>
<artifactId>jboss-osgi-testsuite</artifactId>
- <version>1.0.0.Beta5-SNAPSHOT</version>
+ <version>1.0.0.Beta5</version>
</parent>
<!-- Properties -->
More information about the jboss-cvs-commits
mailing list