Author: thomas.diesler(a)jboss.com
Date: 2010-03-31 10:44:10 -0400 (Wed, 31 Mar 2010)
New Revision: 103338
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/vfs21/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/deployers/AbstractClassLoadingDeployer.java
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
Log:
Merge ~tdiesler/share/git/pub/scm/jboss-osgi
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/resources/bootstrap/jboss-osgi-bootstrap.xml 2010-03-31
14:44:10 UTC (rev 103338)
@@ -157,6 +157,7 @@
<bean name="OSGiBundleStateInstallDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateInstallDeployer"/>
<bean name="OSGiBundleStateResolveDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateResolveDeployer"/>
<bean name="OSGiContextTrackerDeployer"
class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
+ <bean name="OSGiDeploymentMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiDeploymentMetaDataDeployer" />
<bean name="OSGiManifestParsingDeployer"
class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/deployers/AbstractClassLoadingDeployer.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/deployers/AbstractClassLoadingDeployer.java 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/deployers/AbstractClassLoadingDeployer.java 2010-03-31
14:44:10 UTC (rev 103338)
@@ -30,7 +30,6 @@
import org.jboss.classloading.spi.metadata.CapabilitiesMetaData;
import org.jboss.classloading.spi.metadata.ClassLoadingMetaData;
import org.jboss.classloading.spi.metadata.RequirementsMetaData;
-import org.jboss.deployers.plugins.classloading.DeploymentMetaData;
import org.jboss.deployers.spi.DeploymentException;
import org.jboss.deployers.spi.deployer.DeploymentStages;
import org.jboss.deployers.spi.deployer.helpers.AbstractSimpleRealDeployer;
@@ -64,9 +63,7 @@
super(OSGiMetaData.class);
addInput(AbstractBundleState.class);
addInput(ClassLoadingMetaData.class);
- addInput(DeploymentMetaData.class);
addOutput(ClassLoadingMetaData.class);
- addOutput(DeploymentMetaData.class);
setStage(DeploymentStages.POST_PARSE);
setTopLevelOnly(true);
}
@@ -84,13 +81,6 @@
@Override
public void deploy(DeploymentUnit unit, OSGiMetaData osgiMetaData) throws
DeploymentException
{
- if (unit.isAttachmentPresent(DeploymentMetaData.class) == false)
- {
- DeploymentMetaData deploymentMetaData = new DeploymentMetaData();
- deploymentMetaData.setLazyResolve(true);
- unit.addAttachment(DeploymentMetaData.class, deploymentMetaData);
- }
-
if (unit.isAttachmentPresent(ClassLoadingMetaData.class))
return;
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/packageadmin/PackageAdminImpl.java 2010-03-31
14:44:10 UTC (rev 103338)
@@ -342,18 +342,6 @@
{
resetBundleDeploymentStates(resolvableBundles);
allResolved = false;
-
- // Reset the required state for bundles that didn't get resolved
- for (OSGiBundleState bundleState : resolvableBundles)
- {
- if (bundleState.getState() == Bundle.INSTALLED)
- {
- DeploymentUnit unit = bundleState.getDeploymentUnit();
- unit.setRequiredStage(DeploymentStages.DESCRIBE);
- ControllerContext ctx = unit.getAttachment(ControllerContext.class);
-
ctx.setRequiredState(ControllerState.newState(DeploymentStages.DESCRIBE.getName()));
- }
- }
}
return allResolved;
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/vfs21/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/vfs21/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
(rev 0)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/vfs21/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java 2010-03-31
14:44:10 UTC (rev 103338)
@@ -0,0 +1,55 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.osgi.framework.deployers;
+
+// $Id$
+
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.framework.metadata.OSGiMetaData;
+
+/**
+ * A deployer that attaches {@link DeploymentMetaData}, which is used to mark
+ * the deployment as "lazy-resolve".
+ *
+ * This automatically resolves the classloaders if needed to resolve other bundles.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 31-Mar-2010
+ */
+public class OSGiDeploymentMetaDataDeployer extends AbstractRealDeployer
+{
+ public OSGiDeploymentMetaDataDeployer()
+ {
+ setInput(OSGiMetaData.class);
+ setStage(DeploymentStages.POST_PARSE);
+ setTopLevelOnly(true);
+ }
+
+ @Override
+ protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ // DeploymentMetaData not supported
+ }
+}
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java
(rev 0)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeploymentMetaDataDeployer.java 2010-03-31
14:44:10 UTC (rev 103338)
@@ -0,0 +1,63 @@
+/*
+* JBoss, Home of Professional Open Source
+* Copyright 2009, Red Hat Middleware LLC, and individual contributors
+* as indicated by the @author tags. See the copyright.txt file in the
+* distribution for a full listing of individual contributors.
+*
+* This is free software; you can redistribute it and/or modify it
+* under the terms of the GNU Lesser General Public License as
+* published by the Free Software Foundation; either version 2.1 of
+* the License, or (at your option) any later version.
+*
+* This software is distributed in the hope that it will be useful,
+* but WITHOUT ANY WARRANTY; without even the implied warranty of
+* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+* Lesser General Public License for more details.
+*
+* You should have received a copy of the GNU Lesser General Public
+* License along with this software; if not, write to the Free
+* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+* 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+*/
+package org.jboss.osgi.framework.deployers;
+
+// $Id$
+
+import org.jboss.deployers.plugins.classloading.DeploymentMetaData;
+import org.jboss.deployers.spi.DeploymentException;
+import org.jboss.deployers.spi.deployer.DeploymentStages;
+import org.jboss.deployers.spi.deployer.helpers.AbstractRealDeployer;
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.osgi.framework.metadata.OSGiMetaData;
+
+/**
+ * A deployer that attaches {@link DeploymentMetaData}, which is used to mark
+ * the deployment as "lazy-resolve".
+ *
+ * This automatically resolves the classloaders if needed to resolve other bundles.
+ *
+ * @author thomas.diesler(a)jboss.com
+ * @since 31-Mar-2010
+ */
+public class OSGiDeploymentMetaDataDeployer extends AbstractRealDeployer
+{
+ public OSGiDeploymentMetaDataDeployer()
+ {
+ setInput(OSGiMetaData.class);
+ addInput(DeploymentMetaData.class);
+ addOutput(DeploymentMetaData.class);
+ setStage(DeploymentStages.POST_PARSE);
+ setTopLevelOnly(true);
+ }
+
+ @Override
+ protected void internalDeploy(DeploymentUnit unit) throws DeploymentException
+ {
+ if (unit.isAttachmentPresent(DeploymentMetaData.class))
+ return;
+
+ DeploymentMetaData deploymentMetaData = new DeploymentMetaData();
+ unit.addAttachment(DeploymentMetaData.class, deploymentMetaData);
+ deploymentMetaData.setLazyResolve(true);
+ }
+}
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml
===================================================================
---
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/jbossas/jboss-beans-jbossmc.xml 2010-03-31
14:44:10 UTC (rev 103338)
@@ -179,6 +179,7 @@
<bean name="OSGiBundleStateResolveDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateResolveDeployer"/>
<bean name="OSGiBundleStructure"
class="org.jboss.osgi.deployer.BundleStructureDeployer" />
<bean name="OSGiContextTrackerDeployer"
class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
+ <bean name="OSGiDeploymentMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiDeploymentMetaDataDeployer" />
<bean name="OSGiManifestParsingDeployer"
class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
Modified:
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/trunk/distribution/installer/src/main/resources/runtime/server/conf/jboss-osgi-bootstrap.xml 2010-03-31
14:44:10 UTC (rev 103338)
@@ -210,6 +210,7 @@
<bean name="OSGiBundleStateInstallDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateInstallDeployer"/>
<bean name="OSGiBundleStateResolveDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateResolveDeployer"/>
<bean name="OSGiContextTrackerDeployer"
class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
+ <bean name="OSGiDeploymentMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiDeploymentMetaDataDeployer" />
<bean name="OSGiManifestParsingDeployer"
class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
Modified:
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/trunk/testsuite/example/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-03-31
14:44:10 UTC (rev 103338)
@@ -193,6 +193,7 @@
<bean name="OSGiBundleStateInstallDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateInstallDeployer"/>
<bean name="OSGiBundleStateResolveDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateResolveDeployer"/>
<bean name="OSGiContextTrackerDeployer"
class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
+ <bean name="OSGiDeploymentMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiDeploymentMetaDataDeployer" />
<bean name="OSGiManifestParsingDeployer"
class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />
Modified:
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml
===================================================================
---
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-03-31
14:31:17 UTC (rev 103337)
+++
projects/jboss-osgi/trunk/testsuite/functional/src/test/resources/META-INF/jboss-osgi-bootstrap.xml 2010-03-31
14:44:10 UTC (rev 103338)
@@ -167,6 +167,7 @@
<bean name="OSGiBundleStateInstallDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateInstallDeployer"/>
<bean name="OSGiBundleStateResolveDeployer"
class="org.jboss.osgi.framework.deployers.OSGiBundleStateResolveDeployer"/>
<bean name="OSGiContextTrackerDeployer"
class="org.jboss.osgi.framework.deployers.OSGiContextTrackerDeployer" />
+ <bean name="OSGiDeploymentMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiDeploymentMetaDataDeployer" />
<bean name="OSGiManifestParsingDeployer"
class="org.jboss.osgi.framework.deployers.OSGiManifestParsingDeployer" />
<bean name="OSGiNativeCodeMetaDataDeployer"
class="org.jboss.osgi.framework.deployers.OSGiNativeCodeMetaDataDeployer" />