[jboss-cvs] JBossAS SVN: r97450 - in projects/jboss-osgi/projects/runtime/framework/trunk: .settings and 5 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Dec 4 06:43:26 EST 2009
Author: thomas.diesler at jboss.com
Date: 2009-12-04 06:43:26 -0500 (Fri, 04 Dec 2009)
New Revision: 97450
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs
projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/AutoInstallPluginImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/BasicResolverTest.java
Log:
Merge changes from Alpha2 branch
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/.settings/org.eclipse.jdt.core.prefs 2009-12-04 11:43:26 UTC (rev 97450)
@@ -1,12 +1,6 @@
-#Thu Nov 19 14:05:44 CET 2009
+#Fri Dec 04 12:28:37 CET 2009
eclipse.preferences.version=1
-org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
-org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.5
-org.eclipse.jdt.core.compiler.debug.lineNumber=generate
-org.eclipse.jdt.core.compiler.debug.localVariable=generate
-org.eclipse.jdt.core.compiler.debug.sourceFile=generate
-org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
-org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/pom.xml 2009-12-04 11:43:26 UTC (rev 97450)
@@ -44,18 +44,18 @@
<version.jboss.classloading>2.0.8.GA</version.jboss.classloading>
<version.jboss.deployers>2.2.0-SNAPSHOT</version.jboss.deployers>
<version.jboss.kernel>2.2.0-SNAPSHOT</version.jboss.kernel>
- <version.jboss.osgi.apache.xerces>2.9.1.SP2</version.jboss.osgi.apache.xerces>
+ <version.jboss.osgi.apache.xerces>2.9.1.SP3</version.jboss.osgi.apache.xerces>
<version.jboss.osgi.common>1.0.3</version.jboss.osgi.common>
<version.jboss.osgi.common.core>2.2.13.GA</version.jboss.osgi.common.core>
<version.jboss.osgi.deployment>1.0.0</version.jboss.osgi.deployment>
<version.jboss.osgi.husky>1.0.2</version.jboss.osgi.husky>
- <version.jboss.osgi.jaxb>2.1.10.SP2</version.jboss.osgi.jaxb>
+ <version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
<version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
<version.jboss.osgi.runtime.deployers>1.0.3</version.jboss.osgi.runtime.deployers>
<version.jboss.osgi.spi>1.0.3</version.jboss.osgi.spi>
- <version.jboss.osgi.xml.binding>2.0.1.SP1</version.jboss.osgi.xml.binding>
+ <version.jboss.osgi.xml.binding>2.0.2.Beta3</version.jboss.osgi.xml.binding>
<version.jboss.test>1.1.4.GA</version.jboss.test>
- <version.ops4j.pax.web>0.7.2-SNAPSHOT</version.ops4j.pax.web>
+ <version.ops4j.pax.web>0.7.2</version.ops4j.pax.web>
<version.osgi>4.2.0</version.osgi>
</properties>
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2009-12-04 11:43:26 UTC (rev 97450)
@@ -44,8 +44,8 @@
import java.util.concurrent.Executor;
import java.util.concurrent.Executors;
import java.util.jar.Attributes;
+import java.util.jar.Manifest;
import java.util.jar.Attributes.Name;
-import java.util.jar.Manifest;
import org.jboss.dependency.spi.Controller;
import org.jboss.dependency.spi.ControllerContext;
@@ -72,6 +72,7 @@
import org.jboss.metadata.spi.scope.CommonLevels;
import org.jboss.metadata.spi.scope.ScopeKey;
import org.jboss.osgi.deployment.deployer.Deployment;
+import org.jboss.osgi.deployment.deployer.DeploymentFactory;
import org.jboss.osgi.framework.metadata.OSGiMetaData;
import org.jboss.osgi.framework.metadata.PackageAttribute;
import org.jboss.osgi.framework.metadata.internal.AbstractOSGiMetaData;
@@ -83,7 +84,7 @@
import org.jboss.osgi.framework.plugins.ResolverPlugin;
import org.jboss.osgi.framework.plugins.ServicePlugin;
import org.jboss.osgi.framework.util.NoFilter;
-import static org.jboss.osgi.spi.OSGiConstants.PROPERTY_AUTO_START;
+import org.jboss.osgi.spi.util.BundleInfo;
import org.jboss.virtual.VFS;
import org.jboss.virtual.VFSUtils;
import org.jboss.virtual.VirtualFile;
@@ -684,6 +685,21 @@
return install(root, root.toString(), false);
}
+ /*
+ * Installs a bundle from the given virtual file.
+ */
+ private AbstractBundleState install(VirtualFile root, String location, boolean autoStart) throws BundleException
+ {
+ if (location == null)
+ throw new IllegalArgumentException("Null location");
+
+ BundleInfo info = BundleInfo.createBundleInfo(root, location);
+ Deployment dep = DeploymentFactory.createDeployment(info);
+ dep.setAutoStart(autoStart);
+
+ return installBundle(dep);
+ }
+
/**
* Install a bundle from a deployment.
*
@@ -694,25 +710,12 @@
*/
public AbstractBundleState installBundle(Deployment dep) throws BundleException
{
- String location = dep.getLocation().toExternalForm();
- return install(dep.getRoot(), location, dep.isAutoStart());
- }
-
- /*
- * Installs a bundle from the given virtual file.
- */
- private AbstractBundleState install(VirtualFile root, String location, boolean autoStart) throws BundleException
- {
- if (location == null)
- throw new IllegalArgumentException("Null location");
-
// Create the deployment and deploy it
try
{
- VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(root);
+ VFSDeployment deployment = VFSDeploymentFactory.getInstance().createVFSDeployment(dep.getRoot());
MutableAttachments att = (MutableAttachments)deployment.getPredeterminedManagedObjects();
- att.addAttachment(PROPERTY_BUNDLE_LOCATION, location);
- att.addAttachment(PROPERTY_AUTO_START, autoStart);
+ att.addAttachment(Deployment.class, dep);
deployerClient.deploy(deployment);
try
@@ -739,7 +742,7 @@
if (cause instanceof BundleException)
throw (BundleException)cause;
}
- throw new BundleException("Error installing bundle from location=" + root, (cause != null ? cause : ex));
+ throw new BundleException("Error installing bundle from: " + dep, (cause != null ? cause : ex));
}
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/deployers/OSGiDeployersWrapper.java 2009-12-04 11:43:26 UTC (rev 97450)
@@ -21,14 +21,11 @@
*/
package org.jboss.osgi.framework.deployers;
-import static org.jboss.osgi.spi.OSGiConstants.PROPERTY_AUTO_START;
-
import java.util.Collection;
import java.util.List;
import java.util.Map;
import java.util.concurrent.CopyOnWriteArrayList;
-import org.jboss.deployers.client.spi.Deployment;
import org.jboss.deployers.client.spi.main.MainDeployer;
import org.jboss.deployers.plugins.main.MainDeployerImpl;
import org.jboss.deployers.spi.DeploymentException;
@@ -39,6 +36,7 @@
import org.jboss.deployers.structure.spi.DeploymentUnit;
import org.jboss.logging.Logger;
import org.jboss.managed.api.ManagedObject;
+import org.jboss.osgi.deployment.deployer.Deployment;
import org.jboss.osgi.framework.bundle.OSGiBundleManager;
import org.jboss.osgi.framework.bundle.OSGiBundleState;
import org.osgi.framework.Bundle;
@@ -131,9 +129,8 @@
if (bundle == null)
continue;
- Boolean autoStart = (Boolean)unit.getAttachment(PROPERTY_AUTO_START);
- if (autoStart == null)
- autoStart = Boolean.TRUE;
+ Deployment dep = unit.getAttachment(Deployment.class);
+ boolean autoStart = (dep != null ? dep.isAutoStart() : true);
if (autoStart == true && bundle.getState() == Bundle.INSTALLED)
{
@@ -185,7 +182,7 @@
deployers.checkComplete(contexts);
}
- public void checkComplete(Collection<DeploymentContext> errors, Collection<Deployment> missingDeployer) throws DeploymentException
+ public void checkComplete(Collection<DeploymentContext> errors, Collection<org.jboss.deployers.client.spi.Deployment> missingDeployer) throws DeploymentException
{
deployers.checkComplete(errors, missingDeployer);
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/AutoInstallPluginImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/AutoInstallPluginImpl.java 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/plugins/internal/AutoInstallPluginImpl.java 2009-12-04 11:43:26 UTC (rev 97450)
@@ -24,6 +24,7 @@
//$Id$
import java.net.URL;
+import java.util.Collections;
import java.util.List;
import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;
@@ -45,8 +46,8 @@
// Provide logging
final Logger log = Logger.getLogger(AutoInstallPluginImpl.class);
- private List<URL> autoInstall;
- private List<URL> autoStart;
+ private List<URL> autoInstall = Collections.emptyList();
+ private List<URL> autoStart = Collections.emptyList();
private Map<URL, Bundle> autoBundles = new ConcurrentHashMap<URL, Bundle>();
@@ -55,7 +56,6 @@
super(bundleManager);
}
-
public void setAutoInstall(List<URL> autoInstall)
{
this.autoInstall = autoInstall;
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/service/internal/MicrocontainerServiceImpl.java 2009-12-04 11:43:26 UTC (rev 97450)
@@ -76,7 +76,7 @@
public void startService()
{
- installKernelBean(BEAN_SYSTEM_BUNDLE_CONTEXT, getSystemContext());
+ installKernelBean(BEAN_BUNDLE_CONTEXT, getSystemContext());
registration = getSystemContext().registerService(MicrocontainerService.class.getName(), this, null);
// Track the MBeanServer and register this service as an MBean
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/BasicResolverTest.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/BasicResolverTest.java 2009-12-04 11:24:43 UTC (rev 97449)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/resolver/BasicResolverTest.java 2009-12-04 11:43:26 UTC (rev 97450)
@@ -51,36 +51,36 @@
@Override
public void testOptionalImportPackageWired() throws Exception
{
- System.out.println("WONTFIX: testOptionalImportPackageWired");
+ // WONTFIX: testOptionalImportPackageWired
}
@Override
public void testRequireBundleVersionFails() throws Exception
{
- System.out.println("WONTFIX: testRequireBundleVersionFails");
+ // WONTFIX: testRequireBundleVersionFails
}
@Override
public void testPreferredExporterHigherVersion() throws Exception
{
- System.out.println("WONTFIX: testPreferredExporterHigherVersion");
+ // WONTFIX: testPreferredExporterHigherVersion
}
@Override
public void testPreferredExporterLowerId() throws Exception
{
- System.out.println("WONTFIX: testPreferredExporterLowerId");
+ // WONTFIX: testPreferredExporterLowerId
}
@Override
public void testPreferredExporterLowerIdReverse() throws Exception
{
- System.out.println("WONTFIX: testPreferredExporterLowerIdReverse");
+ // WONTFIX: testPreferredExporterLowerIdReverse
}
@Override
public void testPackageAttributeMandatoryFails() throws Exception
{
- System.out.println("WONTFIX: testPackageAttributeMandatoryFails");
+ // WONTFIX: testPackageAttributeMandatoryFails
}
}
\ No newline at end of file
More information about the jboss-cvs-commits
mailing list