Author: thomas.diesler(a)jboss.com
Date: 2010-03-26 01:39:01 -0400 (Fri, 26 Mar 2010)
New Revision: 103006
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/AbstractDeploymentTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/SystemBundleTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/classloader/RequireBundleTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/AbstractImportExportTest.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/ResolverMetadataTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/RegisterServiceTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceFactoryTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceListenerTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceMixTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceReferenceTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceRegistrationTestCase.java
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/support/JMXKernel.java
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/classloading/OSGiBundleClassLoader.java
Log:
[JBOSGI-306] Invalid classloader policy created
Log warn instead of ISE
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/AbstractDeploymentTest.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/AbstractDeploymentTest.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/AbstractDeploymentTest.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -41,7 +41,7 @@
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.kernel.spi.deployment.KernelDeployment;
import org.jboss.osgi.framework.deployers.AbstractDeployment;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
/**
* Parent for deployment tests.
@@ -146,7 +146,7 @@
protected Deployment addBeans(String name, BeanMetaData bmd, Class<?>...
packages) throws Exception
{
- VirtualFile assembly = assembleArchive(name, new String[0], packages);
+ Archive<?> assembly = assembleArchive(name, new String[0], packages);
if (bmd == null)
{
@@ -155,7 +155,7 @@
bmd = builder.getBeanMetaData();
}
- Deployment deployment = AbstractDeployment.createDeployment(assembly);
+ Deployment deployment =
AbstractDeployment.createDeployment(toVirtualFile(assembly));
MutableAttachments att =
(MutableAttachments)deployment.getPredeterminedManagedObjects();
att.addAttachment(BeanMetaData.class, bmd);
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleLifecycleTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -26,7 +26,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.fail;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.bundle.support.a.FailOnStartActivator;
import org.jboss.test.osgi.bundle.support.b.LifecycleService;
@@ -51,7 +51,7 @@
@Test
public void testSimpleStart() throws Exception
{
- VirtualFile assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
+ Archive<?> assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -76,7 +76,7 @@
@Test
public void testDependencyNotAvailable() throws Exception
{
- VirtualFile assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
+ Archive<?> assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -86,7 +86,7 @@
ServiceReference sref =
systemContext.getServiceReference(LifecycleService.class.getName());
assertNull("Service not available", sref);
- VirtualFile assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Archive<?> assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -118,14 +118,14 @@
@Test
public void testDependencyAvailable() throws Exception
{
- VirtualFile assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
+ Archive<?> assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertBundleState(Bundle.ACTIVE, bundleA.getState());
- VirtualFile assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Archive<?> assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -151,13 +151,13 @@
@Test
public void testStartRetry() throws Exception
{
- VirtualFile assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
+ Archive<?> assemblyA = assembleArchive("lifecycle-service",
"/bundles/lifecycle/simple-service", LifecycleService.class);
Bundle bundleA = installBundle(assemblyA);
try
{
assertBundleState(Bundle.INSTALLED, bundleA.getState());
- VirtualFile assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Archive<?> assemblyB = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -200,7 +200,7 @@
@Test
public void testFailToResolve() throws Exception
{
- VirtualFile assemblyA = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
+ Archive<?> assemblyA = assembleArchive("lifecycle-failstart",
"/bundles/lifecycle/fail-on-start", FailOnStartActivator.class);
Bundle bundleB = installBundle(assemblyA);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/BundleTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -36,7 +36,7 @@
import java.util.jar.Manifest;
import org.jboss.osgi.vfs.VFSUtils;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -58,7 +58,7 @@
public void testBundleId() throws Exception
{
long id1 = -1;
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -87,7 +87,7 @@
@Test
public void testSymbolicName() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -103,7 +103,7 @@
@Test
public void testState() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -125,7 +125,7 @@
@Test
public void testGetBundleContext() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -161,15 +161,15 @@
@Test
public void testUpdate() throws Exception
{
- VirtualFile assemble1 = assembleArchive("bundle1",
"/bundles/update/update-bundle1");
- VirtualFile assemble2 = assembleArchive("bundle2",
"/bundles/update/update-bundle2");
+ Archive<?> assembly1 = assembleArchive("bundle1",
"/bundles/update/update-bundle1");
+ Archive<?> assembly2 = assembleArchive("bundle2",
"/bundles/update/update-bundle2");
- Manifest manifest = VFSUtils.getManifest(assemble2);
+ Manifest manifest = VFSUtils.getManifest(toVirtualFile(assembly2));
ByteArrayOutputStream baos = new ByteArrayOutputStream();
new JarOutputStream(baos, manifest).close();
ByteArrayInputStream updateStream = new ByteArrayInputStream(baos.toByteArray());
- Bundle bundle = installBundle(assemble1);
+ Bundle bundle = installBundle(assembly1);
try
{
int beforeCount = systemContext.getBundles().length;
@@ -200,11 +200,11 @@
@Test
public void testSingleton() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundle10",
"/bundles/singleton/singleton1");
+ Archive<?> assemblyA = assembleArchive("bundle10",
"/bundles/singleton/singleton1");
Bundle bundleA = installBundle(assemblyA);
try
{
- VirtualFile assemblyB = assembleArchive("bundle20",
"/bundles/singleton/singleton2");
+ Archive<?> assemblyB = assembleArchive("bundle20",
"/bundles/singleton/singleton2");
Bundle bundleB = installBundle(assemblyB);
bundleB.uninstall();
fail("Should not be here!");
@@ -222,11 +222,11 @@
@Test
public void testNotSingleton() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundle1",
"/bundles/singleton/singleton1");
+ Archive<?> assemblyA = assembleArchive("bundle1",
"/bundles/singleton/singleton1");
Bundle bundleA = installBundle(assemblyA);
try
{
- VirtualFile assemblyB = assembleArchive("not-singleton",
"/bundles/singleton/not-singleton");
+ Archive<?> assemblyB = assembleArchive("not-singleton",
"/bundles/singleton/not-singleton");
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -247,7 +247,7 @@
@SuppressWarnings({ "rawtypes", "unchecked" })
public void testGetHeaders() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/SystemBundleTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/SystemBundleTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/bundle/SystemBundleTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -23,7 +23,8 @@
// $Id: $
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
import java.util.Dictionary;
import java.util.Hashtable;
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/classloader/RequireBundleTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/classloader/RequireBundleTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/classloader/RequireBundleTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -25,7 +25,7 @@
import static org.junit.Assert.fail;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.classloader.support.a.A;
import org.jboss.test.osgi.classloader.support.b.B;
@@ -46,13 +46,13 @@
@Test
public void testSimpleRequireBundle() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("simplerequirebundleA",
"/bundles/classloader/simplerequirebundleA", B.class);
+ Archive<?> assemblyB = assembleArchive("simplerequirebundleA",
"/bundles/classloader/simplerequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -74,13 +74,13 @@
@Test
public void testSimpleRequireBundleFails() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("simplerequirebundlefails",
"/bundles/classloader/simplerequirebundlefails", B.class);
+ Archive<?> assemblyB =
assembleArchive("simplerequirebundlefails",
"/bundles/classloader/simplerequirebundlefails", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -105,13 +105,13 @@
@Test
public void testVersionRequireBundle() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("versionrequirebundleA",
"/bundles/classloader/versionrequirebundleA", B.class);
+ Archive<?> assemblyB = assembleArchive("versionrequirebundleA",
"/bundles/classloader/versionrequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -133,13 +133,13 @@
@Test
public void testVersionRequireBundleFails() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("versionrequirebundlefails",
"/bundles/classloader/versionrequirebundlefails", B.class);
+ Archive<?> assemblyB =
assembleArchive("versionrequirebundlefails",
"/bundles/classloader/versionrequirebundlefails", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -164,13 +164,13 @@
@Test
public void testOptionalRequireBundle() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("optionalrequirebundleA",
"/bundles/classloader/optionalrequirebundleA", B.class);
+ Archive<?> assemblyB = assembleArchive("optionalrequirebundleA",
"/bundles/classloader/optionalrequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -192,13 +192,13 @@
@Test
public void testOptionalRequireBundleFails() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("optionalrequirebundlefails",
"/bundles/classloader/optionalrequirebundlefails", B.class);
+ Archive<?> assemblyB =
assembleArchive("optionalrequirebundlefails",
"/bundles/classloader/optionalrequirebundlefails", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -224,7 +224,7 @@
//Bundle-Version: 1.0.0
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleA;test=x
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0;test=x
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
@@ -236,7 +236,7 @@
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleB
//Require-Bundle: org.jboss.test.osgi.classloader.bundleA;visibility:=reexport
//Export-Package: org.jboss.test.osgi.classloader.support.b
- VirtualFile assemblyB = assembleArchive("reexportrequirebundleA",
"/bundles/classloader/reexportrequirebundleA", B.class);
+ Archive<?> assemblyB = assembleArchive("reexportrequirebundleA",
"/bundles/classloader/reexportrequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
@@ -248,7 +248,7 @@
//Bundle-Name: BundleC
//Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleC
//Require-Bundle: org.jboss.test.osgi.classloader.bundleB
- VirtualFile assemblyC = assembleArchive("reexportrequirebundleB",
"/bundles/classloader/reexportrequirebundleB");
+ Archive<?> assemblyC =
assembleArchive("reexportrequirebundleB",
"/bundles/classloader/reexportrequirebundleB");
Bundle bundleC = installBundle(assemblyC);
try
@@ -275,20 +275,20 @@
@Test
public void testNoReExportRequireBundle() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("noreexportrequirebundleA",
"/bundles/classloader/noreexportrequirebundleA", B.class);
+ Archive<?> assemblyB =
assembleArchive("noreexportrequirebundleA",
"/bundles/classloader/noreexportrequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
bundleB.start();
assertLoadClass(bundleB, A.class.getName(), bundleA);
assertLoadClass(bundleB, B.class.getName(), bundleB);
- VirtualFile assemblyC = assembleArchive("reexportrequirebundleB",
"/bundles/classloader/reexportrequirebundleB");
+ Archive<?> assemblyC =
assembleArchive("reexportrequirebundleB",
"/bundles/classloader/reexportrequirebundleB");
Bundle bundleC = installBundle(assemblyC);
try
{
@@ -314,13 +314,13 @@
@Test
public void testAttributeRequireBundle() throws Exception
{
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
bundleA.start();
assertLoadClass(bundleA, A.class.getName());
- VirtualFile assemblyB = assembleArchive("attributerequirebundleA",
"/bundles/classloader/attributerequirebundleA", B.class);
+ Archive<?> assemblyB =
assembleArchive("attributerequirebundleA",
"/bundles/classloader/attributerequirebundleA", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -345,7 +345,7 @@
// Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleA;test=x
// Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0;test=x
// Bundle-Version: 1.0.0
- VirtualFile assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/classloader/bundleA", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -354,7 +354,7 @@
// Bundle-SymbolicName: org.jboss.test.osgi.classloader.bundleB
// Require-Bundle:
org.jboss.test.osgi.classloader.bundleA;doesnotexist=true;test=y
- VirtualFile assemblyB = assembleArchive("attributerequirebundlefails",
"/bundles/classloader/attributerequirebundlefails", B.class);
+ Archive<?> assemblyB =
assembleArchive("attributerequirebundlefails",
"/bundles/classloader/attributerequirebundlefails", B.class);
Bundle bundleB = installBundle(assemblyB);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/compendium/PackageAdminTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -26,7 +26,7 @@
import static org.junit.Assert.assertNull;
import static org.junit.Assert.assertSame;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.compendium.support.a.PA;
import org.jboss.test.osgi.compendium.support.b.Other;
@@ -45,7 +45,7 @@
@Test
public void testGetBudleFromClass() throws Exception
{
- VirtualFile assemblyA = assembleArchive("smoke-assembled",
"/bundles/smoke/smoke-assembled", PA.class);
+ Archive<?> assemblyA = assembleArchive("smoke-assembled",
"/bundles/smoke/smoke-assembled", PA.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -60,7 +60,7 @@
Bundle notFound = pa.getBundle(getClass());
assertNull(notFound);
- VirtualFile assemblyB = assembleArchive("simple",
"/bundles/simple/simple-bundle1", Other.class);
+ Archive<?> assemblyB = assembleArchive("simple",
"/bundles/simple/simple-bundle1", Other.class);
Bundle bundleB = installBundle(assemblyB);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/AbstractImportExportTest.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/AbstractImportExportTest.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/AbstractImportExportTest.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -27,7 +27,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertTrue;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.classloader.support.a.A;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -46,14 +46,14 @@
{
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -85,8 +85,8 @@
{
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -111,14 +111,14 @@
{
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Only resolve BundleB
@@ -154,8 +154,8 @@
// Bundle-SymbolicName: selfimport
// Export-Package: org.jboss.test.osgi.classloader.support.a
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/selfimport", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/selfimport", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -180,14 +180,14 @@
{
//Bundle-SymbolicName: packageimportversion
//Import-Package:
org.jboss.test.osgi.classloader.support.a;version="[0.0.0,1.0.0]"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageimportversion");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageimportversion");
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: packageexportversion100
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -219,14 +219,14 @@
{
//Bundle-SymbolicName: packageimportversionfails
//Import-Package:
org.jboss.test.osgi.classloader.support.a;version="[3.0,4.0)"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageimportversionfails");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageimportversionfails");
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: packageexportversion100
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -258,8 +258,8 @@
{
//Bundle-SymbolicName: packageimportoptional
//Import-Package: org.jboss.test.osgi.classloader.support.a;resolution:=optional
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -284,14 +284,14 @@
{
//Bundle-SymbolicName: packageimportoptional
//Import-Package: org.jboss.test.osgi.classloader.support.a;resolution:=optional
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -323,8 +323,8 @@
{
//Bundle-SymbolicName: packageimportoptional
//Import-Package: org.jboss.test.osgi.classloader.support.a;resolution:=optional
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageimportoptional");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -334,8 +334,8 @@
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -367,14 +367,14 @@
{
//Bundle-SymbolicName: bundlenameimport
//Import-Package:
org.jboss.test.osgi.classloader.support.a;bundle-symbolic-name=simpleexport
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/bundlenameimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/bundlenameimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: simpleexport
//Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -406,14 +406,14 @@
{
//Bundle-SymbolicName: bundlenameimport
//Import-Package:
org.jboss.test.osgi.classloader.support.a;bundle-symbolic-name=simpleexport
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/bundlenameimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/bundlenameimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: sigleton;singleton:=true
//Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/singleton", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/singleton", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -445,14 +445,14 @@
{
//Bundle-SymbolicName: bundleversionimport
//Import-Package:
org.jboss.test.osgi.classloader.support.a;bundle-version="[0.0.0,1.0.0)"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/bundleversionimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/bundleversionimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -484,14 +484,14 @@
{
//Bundle-SymbolicName: bundleversionimportfails
//Import-Package:
org.jboss.test.osgi.classloader.support.a;bundle-version="[1.0.0,2.0.0)"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/bundleversionimportfails");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/bundleversionimportfails");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -525,14 +525,14 @@
//Bundle-SymbolicName: requirebundle
//Require-Bundle: simpleexport
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -564,8 +564,8 @@
{
//Bundle-SymbolicName: requirebundle
//Require-Bundle: simpleexport
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -590,8 +590,8 @@
{
//Bundle-SymbolicName: requirebundleoptional
//Require-Bundle: simpleexport;resolution:=optional
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleoptional");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleoptional");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -613,14 +613,14 @@
{
//Bundle-SymbolicName: requirebundleversion
//Require-Bundle: simpleexport;bundle-version="[0.0.0,1.0.0]"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversion");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversion");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -652,14 +652,14 @@
{
//Bundle-SymbolicName: versionrequirebundlefails
//Require-Bundle: simpleexport;bundle-version="[1.0.0,2.0.0)"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversionfails");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversionfails");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -691,17 +691,17 @@
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
// Bundle-SymbolicName: simpleexportother
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
@@ -712,10 +712,10 @@
// Verify bundle states
assertEquals("BundleA RESOLVED", Bundle.RESOLVED,
bundleA.getState());
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
allResolved = packageAdmin.resolveBundles(null);
@@ -751,17 +751,17 @@
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
// Bundle-SymbolicName: simpleexportother
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -772,10 +772,10 @@
// Verify bundle states
assertEquals("BundleB RESOLVED", Bundle.RESOLVED,
bundleB.getState());
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
allResolved = packageAdmin.resolveBundles(null);
@@ -811,23 +811,23 @@
{
//Bundle-SymbolicName: packageexportversion100
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportversion100", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportversion100", A.class);
//Bundle-SymbolicName: packageexportversion200
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=2.0.0
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion200", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion200", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
// Resolve the installed bundles
@@ -866,23 +866,23 @@
{
//Bundle-SymbolicName: packageexportversion200
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=2.0.0
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportversion200", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportversion200", A.class);
//Bundle-SymbolicName: packageexportversion100
//Export-Package: org.jboss.test.osgi.classloader.support.a;version=1.0.0
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageexportversion100", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
// Resolve the installed bundles
@@ -921,20 +921,20 @@
{
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
// Bundle-SymbolicName: simpleexportother
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexportother", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -946,7 +946,7 @@
assertEquals("BundleA RESOLVED", Bundle.RESOLVED,
bundleA.getState());
assertEquals("BundleB RESOLVED", Bundle.RESOLVED,
bundleB.getState());
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
allResolved = packageAdmin.resolveBundles(null);
@@ -981,20 +981,20 @@
{
// Bundle-SymbolicName: simpleexportother
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleexportother", A.class);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleexportother", A.class);
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleexport", A.class);
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
+ Archive<?> assemblyC = assembleArchive("bundleC",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Bundle bundleA = installBundle(assemblyA);
try
{
- Bundle bundleB = installBundle(fileB);
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1006,7 +1006,7 @@
assertEquals("BundleA RESOLVED", Bundle.RESOLVED,
bundleA.getState());
assertEquals("BundleB RESOLVED", Bundle.RESOLVED,
bundleB.getState());
- Bundle bundleC = installBundle(fileC);
+ Bundle bundleC = installBundle(assemblyC);
try
{
allResolved = packageAdmin.resolveBundles(null);
@@ -1041,14 +1041,14 @@
{
//Bundle-SymbolicName: packageexportattribute
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: simpleimport
//Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1071,8 +1071,8 @@
//Bundle-SymbolicName: packageimportattribute
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=x
- fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
- bundleB = installBundle(fileB);
+ assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
+ bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1104,14 +1104,14 @@
{
//Bundle-SymbolicName: packageexportattribute
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: packageimportattributefails
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=y
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1143,14 +1143,14 @@
{
//Bundle-SymbolicName: packageexportattributemandatory
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x;mandatory:=test
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: packageimportattribute
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1182,14 +1182,14 @@
{
//Bundle-SymbolicName: packageexportattributemandatory
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x;mandatory:=test
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
//Bundle-SymbolicName: simpleimport
//Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
+ Bundle bundleB = installBundle(assemblyB);
try
{
// Resolve the installed bundles
@@ -1221,8 +1221,8 @@
{
//Bundle-SymbolicName: systempackageimport
//Import-Package: org.osgi.framework;version=1.4
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/systempackageimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/systempackageimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
// Resolve the installed bundles
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/ResolverMetadataTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/ResolverMetadataTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/resolver/ResolverMetadataTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -37,7 +37,7 @@
import org.jboss.osgi.framework.resolver.RequiredBundle;
import org.jboss.osgi.framework.resolver.Resolver;
import org.jboss.osgi.framework.resolver.ResolverBundle;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.classloader.support.a.A;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -60,8 +60,8 @@
// Bundle-SymbolicName: simpleexport
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleexport", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
assertEquals(1, resolver.getBundles().size());
@@ -115,8 +115,8 @@
// Bundle-SymbolicName: simpleimport
// Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/simpleimport");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -148,8 +148,8 @@
// Bundle-SymbolicName: singleton;singleton:=true
// Export-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/singleton", A.class);
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/singleton", A.class);
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -170,8 +170,8 @@
//Bundle-SymbolicName: requirebundle
//Require-Bundle: simpleexport
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundle");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -197,8 +197,8 @@
//Bundle-SymbolicName: requirebundle
//Require-Bundle: simpleexport;resolution:=optional
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleoptional");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleoptional");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -224,8 +224,8 @@
//Bundle-SymbolicName: requirebundle
//Require-Bundle: simpleexport;bundle-version="[0.0.0,1.0.0]"
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversion");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/requirebundleversion");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -251,8 +251,8 @@
//Bundle-SymbolicName: packageexportattribute
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -263,8 +263,8 @@
//Bundle-SymbolicName: simpleimport
//Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
+ Bundle bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
@@ -278,8 +278,8 @@
//Bundle-SymbolicName: packageimportattribute
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=x
- fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
- bundleB = installBundle(fileB);
+ assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
+ bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
@@ -309,8 +309,8 @@
//Bundle-SymbolicName: packageexportattribute
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattribute");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -321,8 +321,8 @@
//Bundle-SymbolicName: packageimportattributefails
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=y
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
+ Bundle bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
@@ -352,8 +352,8 @@
//Bundle-SymbolicName: packageexportattributemandatory
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x;mandatory:=test
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -366,8 +366,8 @@
//Bundle-SymbolicName: packageimportattribute
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=x
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattribute");
+ Bundle bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
@@ -397,8 +397,8 @@
//Bundle-SymbolicName: packageexportattributemandatory
//Export-Package: org.jboss.test.osgi.classloader.support.a;test=x;mandatory:=test
- VirtualFile fileA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory");
- Bundle bundleA = installBundle(fileA);
+ Archive<?> assemblyA = assembleArchive("bundleA",
"/bundles/resolver/packageexportattributemandatory");
+ Bundle bundleA = installBundle(assemblyA);
try
{
ResolverBundle resBundleA = resolver.getBundle(bundleA);
@@ -411,8 +411,8 @@
//Bundle-SymbolicName: simpleimport
//Import-Package: org.jboss.test.osgi.classloader.support.a
- VirtualFile fileB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
- Bundle bundleB = installBundle(fileB);
+ Archive<?> assemblyB = assembleArchive("bundleB",
"/bundles/resolver/simpleimport");
+ Bundle bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
@@ -426,8 +426,8 @@
//Bundle-SymbolicName: packageimportattributefails
//Import-Package: org.jboss.test.osgi.classloader.support.a;test=y
- fileB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
- bundleB = installBundle(fileB);
+ assemblyB = assembleArchive("bundleB",
"/bundles/resolver/packageimportattributefails");
+ bundleB = installBundle(assemblyB);
try
{
ResolverBundle resBundleB = resolver.getBundle(bundleB);
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetServiceReferencesTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -33,7 +33,7 @@
import org.jboss.osgi.testing.OSGiFrameworkTest;
import org.jboss.osgi.testing.OSGiManifestBuilder;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.shrinkwrap.api.Archives;
import org.jboss.shrinkwrap.api.Asset;
import org.jboss.shrinkwrap.api.spec.JavaArchive;
@@ -61,7 +61,7 @@
public void testGetServiceReferences() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundle = installBundle(assembly);
try
{
@@ -279,7 +279,7 @@
private void assertGetServiceReferencesNotAssignable(String className) throws
Exception
{
- VirtualFile assemblyA = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assemblyA = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -297,7 +297,7 @@
ServiceReference sref1 = sreg1.getReference();
assertNotNull(sref1);
- VirtualFile assemblyB = assembleArchive("simple2",
"/bundles/simple/simple-bundle2", A.class);
+ Archive<?> assemblyB = assembleArchive("simple2",
"/bundles/simple/simple-bundle2", A.class);
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -384,7 +384,7 @@
// Bundle-ManifestVersion: 2
// Bundle-SymbolicName: org.jboss.test.osgi.service2
// Export-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assemblyA = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
+ Archive<?> assemblyA = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -405,7 +405,7 @@
// Bundle-ManifestVersion: 2
// Bundle-SymbolicName: org.jboss.test.osgi.service1
// Import-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assemblyB = assembleArchive("service1",
"/bundles/service/service-bundle1");
+ Archive<?> assemblyB = assembleArchive("service1",
"/bundles/service/service-bundle1");
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -483,7 +483,7 @@
// Bundle-ManifestVersion: 2
// Bundle-SymbolicName: org.jboss.test.osgi.service2
// Export-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assemblyA = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
+ Archive<?> assemblyA = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -507,7 +507,7 @@
// Bundle-ManifestVersion: 2
// Bundle-SymbolicName: org.jboss.test.osgi.service1
// Import-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assemblyB = assembleArchive("service1",
"/bundles/service/service-bundle1");
+ Archive<?> assemblyB = assembleArchive("service1",
"/bundles/service/service-bundle1");
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -597,7 +597,7 @@
String className = A.class.getName();
String wrongClassName = B.class.getName();
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundle = installBundle(assembly);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -28,7 +28,7 @@
import static org.junit.Assert.assertTrue;
import static org.junit.Assert.fail;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.service.support.BrokenServiceFactory;
import org.junit.Test;
@@ -55,7 +55,7 @@
@Test
public void testGetUnServiceErrors() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -94,7 +94,7 @@
@Test
public void testGetService() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -121,7 +121,7 @@
@Test
public void testGetServiceAfterStop() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -155,7 +155,7 @@
@Test
public void testErrorInGetService() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -181,7 +181,7 @@
@Test
public void testErrorInUnGetService() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -210,7 +210,7 @@
@Test
public void testUnGetServiceResult() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -231,7 +231,7 @@
assertTrue(context1.ungetService(sref));
assertFalse(context1.ungetService(sref));
- VirtualFile assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/RegisterServiceTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/RegisterServiceTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/RegisterServiceTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -21,12 +21,16 @@
*/
package org.jboss.test.osgi.service;
-import static org.junit.Assert.*;
+import static org.junit.Assert.assertArrayEquals;
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.assertNotNull;
+import static org.junit.Assert.assertNull;
+import static org.junit.Assert.fail;
import java.util.Dictionary;
import java.util.Hashtable;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -55,7 +59,7 @@
String OBJCLASS = BundleContext.class.getName();
String[] OBJCLASSES = new String[] { OBJCLASS };
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -190,7 +194,7 @@
Dictionary<String, Object> properties = new Hashtable<String,
Object>();
properties.put(Constants.OBJECTCLASS, new String[] { "rubbish" });
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -221,7 +225,7 @@
@Test
public void testRegisterService() throws Exception
{
- VirtualFile assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -248,7 +252,7 @@
@Test
public void testBundleUninstall() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -261,7 +265,7 @@
Object actual = bundleContext.getService(reference);
assertEquals(bundleContext, actual);
- VirtualFile assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
@@ -289,7 +293,7 @@
@Test
public void testRegisteredServices() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple-bundle1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -302,7 +306,7 @@
Object actual = bundleContext.getService(reference);
assertEquals(bundleContext, actual);
- VirtualFile assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple-bundle2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceFactoryTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceFactoryTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceFactoryTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -29,7 +29,7 @@
import static org.junit.Assert.fail;
import org.jboss.osgi.framework.bundle.OSGiBundleWrapper;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.service.support.SimpleServiceFactory;
import org.jboss.test.osgi.service.support.a.A;
@@ -57,7 +57,7 @@
@Test
public void testRegisterServiceFactory() throws Exception
{
- VirtualFile assemblyA = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assemblyA = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundleA = installBundle(assemblyA);
try
{
@@ -82,7 +82,7 @@
assertEquals(bundleA.getSymbolicName(),
serviceFactory.getBundle.getSymbolicName());
assertEquals(1, serviceFactory.getCount);
- VirtualFile assemblyB = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assemblyB = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
Bundle bundleB = installBundle(assemblyB);
try
{
@@ -112,7 +112,7 @@
@Test
public void testGetServiceFactory() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -148,7 +148,7 @@
{
String OBJCLASS = BundleContext.class.getName();
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -185,7 +185,7 @@
String[] OBJCLASS = { String.class.getName() };
String[] OBJCLASSES = { String.class.getName(), BundleContext.class.getName() };
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceListenerTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceListenerTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceListenerTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -27,7 +27,7 @@
import java.util.Hashtable;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.junit.Test;
import org.osgi.framework.Bundle;
@@ -49,7 +49,7 @@
@Test
public void testServiceListener() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -77,7 +77,7 @@
@Test
public void testObjectClassFilter() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -115,7 +115,7 @@
@Test
public void testModifyServiceProperties() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceMixTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceMixTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceMixTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -41,7 +41,7 @@
import org.jboss.deployers.client.spi.Deployment;
import org.jboss.kernel.spi.dependency.KernelControllerContext;
import org.jboss.osgi.framework.deployers.AbstractDeployment;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.service.support.LazyBundle;
import org.jboss.test.osgi.service.support.a.A;
import org.jboss.test.osgi.service.support.c.C;
@@ -69,7 +69,7 @@
Deployment bean = deployBeans("beanA", A.class);
try
{
- VirtualFile assembly1 = assembleArchive("simple1",
"/bundles/service/service-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple1",
"/bundles/service/service-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -122,7 +122,7 @@
{
KernelControllerContext kcc = getControllerContext("C", null);
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -181,7 +181,7 @@
{
KernelControllerContext kcc = getControllerContext("C", null);
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -241,7 +241,7 @@
Deployment bean = addBeans("beanA", bmd, C.class, A.class);
try
{
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle3");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -296,7 +296,7 @@
Deployment bean2 = addBeans("beanA2", bmd, E.class);
try
{
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle4");
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle4");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -364,7 +364,7 @@
Deployment bean1 = addBeans("beanA1", bmd, C.class, A.class,
ServiceMixFactory.class);
try
{
- VirtualFile assembly = assembleArchive("service-bundle4",
"/bundles/service/service-bundle4");
+ Archive<?> assembly = assembleArchive("service-bundle4",
"/bundles/service/service-bundle4");
Bundle bundle = installBundle(assembly);
try
{
@@ -438,7 +438,7 @@
Deployment bean = deployBeans("beanA", A.class);
try
{
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -499,8 +499,8 @@
@Test
public void testBeansMix() throws Throwable
{
- VirtualFile assembly = assembleArchive("beans1",
"/bundles/service/service-beans1", A.class);
- Deployment deployment =
addDeployment(AbstractDeployment.createDeployment(assembly));
+ Archive<?> assembly = assembleArchive("beans1",
"/bundles/service/service-beans1", A.class);
+ Deployment deployment =
addDeployment(AbstractDeployment.createDeployment(toVirtualFile(assembly)));
try
{
checkComplete();
@@ -531,7 +531,7 @@
@Test
public void testServiceInjection() throws Throwable
{
- VirtualFile assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle2", A.class);
+ Archive<?> assembly1 = assembleArchive("simple2",
"/bundles/service/service-bundle2", A.class);
Bundle bundle = installBundle(assembly1);
try
{
@@ -546,8 +546,8 @@
ServiceRegistration reg1 = bundleContext1.registerService(A.class.getName(), a,
table);
assertNotNull(reg1);
- VirtualFile assembly = assembleArchive("beans1",
"/bundles/service/service-beans2", C.class);
- Deployment deployment =
addDeployment(AbstractDeployment.createDeployment(assembly));
+ Archive<?> assembly = assembleArchive("beans1",
"/bundles/service/service-beans2", C.class);
+ Deployment deployment =
addDeployment(AbstractDeployment.createDeployment(toVirtualFile(assembly)));
try
{
checkComplete();
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceReferenceTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceReferenceTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceReferenceTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -36,7 +36,7 @@
import java.util.Set;
import java.util.TreeSet;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.service.support.a.A;
import org.junit.Test;
@@ -63,7 +63,7 @@
String[] clazzes = new String[] { BundleContext.class.getName() };
Object serviceID = null;
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -162,7 +162,7 @@
{
ServiceReference sref = null;
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -222,7 +222,7 @@
@Test
public void testGetBundle() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -253,7 +253,7 @@
@Test
public void testGetBundleAfterStop() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -284,7 +284,7 @@
@Test
public void testUsingBundles() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -300,7 +300,7 @@
assertUsingBundles(sref);
- VirtualFile assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
@@ -343,7 +343,7 @@
@Test
public void testUsingBundlesAfterStop() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -359,7 +359,7 @@
assertUsingBundles(sref);
- VirtualFile assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
@@ -388,7 +388,7 @@
@Test
public void testIsAssignableToErrors() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundle = installBundle(assembly);
try
{
@@ -431,7 +431,7 @@
@Test
public void testNotAssignableTo() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
+ Archive<?> assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1", A.class);
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -445,7 +445,7 @@
ServiceReference sref = sreg.getReference();
assertNotNull(sref);
- VirtualFile assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2", A.class);
+ Archive<?> assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2", A.class);
Bundle bundle2 = installBundle(assembly2);
try
{
@@ -473,7 +473,7 @@
//Bundle-Name: Service2
//Bundle-SymbolicName: org.jboss.test.osgi.service2
//Export-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assembly2 = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
+ Archive<?> assembly2 = assembleArchive("service2",
"/bundles/service/service-bundle2", A.class);
Bundle bundle2 = installBundle(assembly2);
try
@@ -485,7 +485,7 @@
//Bundle-Name: Service1
//Bundle-SymbolicName: org.jboss.test.osgi.service1
//Import-Package: org.jboss.test.osgi.service.support.a
- VirtualFile assembly1 = assembleArchive("service1",
"/bundles/service/service-bundle1");
+ Archive<?> assembly1 = assembleArchive("service1",
"/bundles/service/service-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceRegistrationTestCase.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceRegistrationTestCase.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/ServiceRegistrationTestCase.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -30,7 +30,7 @@
import java.util.Hashtable;
-import org.jboss.osgi.vfs.VirtualFile;
+import org.jboss.shrinkwrap.api.Archive;
import org.jboss.test.osgi.AbstractFrameworkTest;
import org.jboss.test.osgi.service.support.SimpleServiceFactory;
import org.junit.Test;
@@ -53,7 +53,7 @@
@Test
public void testGetReference() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -115,7 +115,7 @@
@Test
public void testSetProperties() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -224,7 +224,7 @@
@Test
public void testSetPropertiesAfterStop() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
@@ -257,7 +257,7 @@
@Test
public void testUnregister() throws Exception
{
- VirtualFile assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly1 = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle1 = installBundle(assembly1);
try
{
@@ -282,7 +282,7 @@
inUse = bundle1.getServicesInUse();
assertArrayEquals(new ServiceReference[] { reference }, inUse);
- VirtualFile assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
+ Archive<?> assembly2 = assembleArchive("simple2",
"/bundles/simple/simple-bundle2");
Bundle bundle2 = installBundle(assembly2);
try
{
@@ -340,7 +340,7 @@
@Test
public void testUnregisterAfterStop() throws Exception
{
- VirtualFile assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
+ Archive<?> assembly = assembleArchive("simple1",
"/bundles/simple/simple-bundle1");
Bundle bundle = installBundle(assembly);
try
{
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/support/JMXKernel.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/support/JMXKernel.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/bundle/src/test/java/org/jboss/test/osgi/service/support/JMXKernel.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -1,6 +1,7 @@
package org.jboss.test.osgi.service.support;
import java.util.Properties;
+
import javax.management.MBeanServer;
import javax.management.MBeanServerFactory;
import javax.management.MalformedObjectNameException;
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/core/src/main/java/org/jboss/osgi/framework/bundle/OSGiBundleManager.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -95,7 +95,7 @@
*/
public class OSGiBundleManager
{
- /** The log */
+ // Provide logging
private static final Logger log = Logger.getLogger(OSGiBundleManager.class);
/** The bundle manager's bean name: OSGiBundleManager */
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/classloading/OSGiBundleClassLoader.java
===================================================================
---
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/classloading/OSGiBundleClassLoader.java 2010-03-26
05:29:54 UTC (rev 103005)
+++
projects/jboss-osgi/projects/runtime/framework/trunk/vfs30/src/main/java/org/jboss/osgi/framework/classloading/OSGiBundleClassLoader.java 2010-03-26
05:39:01 UTC (rev 103006)
@@ -25,6 +25,7 @@
import org.jboss.classloader.spi.ClassLoaderPolicy;
import org.jboss.classloader.spi.base.BaseClassLoader;
+import org.jboss.logging.Logger;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleReference;
@@ -36,16 +37,23 @@
*/
public class OSGiBundleClassLoader extends BaseClassLoader implements BundleReference
{
+ // Provide logging
+ private static final Logger log = Logger.getLogger(OSGiBundleClassLoader.class);
+
private OSGiClassLoaderPolicy osgiPolicy;
public OSGiBundleClassLoader(ClassLoaderPolicy policy)
{
super(policy);
- if (policy instanceof OSGiClassLoaderPolicy == false)
- throw new IllegalArgumentException("Invalid policy: " + policy);
+ if (policy instanceof OSGiClassLoaderPolicy)
+ osgiPolicy = (OSGiClassLoaderPolicy)policy;
- osgiPolicy = (OSGiClassLoaderPolicy)policy;
+ if (osgiPolicy == null)
+ {
+ log.warn("Invalid policy: " + policy, new IllegalStateException());
+ System.out.println("FIXME [JBOSGI-306] Invalid policy: " + policy);
+ }
}
@Override