[jboss-osgi-commits] JBoss-OSGI SVN: r86968 - in projects/jboss-osgi/trunk: testsuite and 11 other directories.
jboss-osgi-commits at lists.jboss.org
jboss-osgi-commits at lists.jboss.org
Wed Apr 8 11:51:13 EDT 2009
Author: thomas.diesler at jboss.com
Date: 2009-04-08 11:51:12 -0400 (Wed, 08 Apr 2009)
New Revision: 86968
Added:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties
projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy
Removed:
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/
projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/
Modified:
projects/jboss-osgi/trunk/runtime/felix/pom.xml
projects/jboss-osgi/trunk/testsuite/pom.xml
projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java
projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml
projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd
Log:
[JBOSGI-36] Move to deployer section
Modified: projects/jboss-osgi/trunk/runtime/felix/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/runtime/felix/pom.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -194,6 +194,7 @@
<configuration>
<excludes>
<!-- Exclude tests that require remote access -->
+ <exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
Modified: projects/jboss-osgi/trunk/testsuite/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/testsuite/pom.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -189,6 +189,7 @@
<configuration>
<excludes>
<!-- Exclude tests that require remote access -->
+ <exclude>org/jboss/test/osgi/deployer/**</exclude>
<exclude>org/jboss/test/osgi/**/*DeployerTestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/http/junit/*TestCase.java</exclude>
<exclude>org/jboss/test/osgi/service/microcontainer/junit/*TestCase.java</exclude>
Modified: projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-08 15:30:43 UTC (rev 86967)
+++ projects/jboss-osgi/trunk/testsuite/scripts/antrun-test-jars.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -43,13 +43,13 @@
<!-- Please add alphabetically -->
<!-- jbosgi36 -->
- <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/jbosgi36/jbosgi36.bnd" />
+ <bnd classpath="${tests.classes.dir}" output="${tests.output.dir}/test-libs/jbosgi36-bundle.jar" files="${tests.resources.dir}/deployer/jbosgi36/jbosgi36.bnd" />
<jar jarfile="${tests.output.dir}/test-libs/jbosgi36-mbean.jar">
<fileset dir="${tests.classes.dir}">
- <include name="org/jboss/test/osgi/jbosgi36/mbean/Foo.class" />
- <include name="org/jboss/test/osgi/jbosgi36/mbean/FooMBean.class" />
+ <include name="org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.class" />
+ <include name="org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.class" />
</fileset>
- <fileset dir="${tests.resources.dir}/jbosgi36">
+ <fileset dir="${tests.resources.dir}/deployer/jbosgi36">
<include name="META-INF/jbosgi36-jboss-beans.xml" />
</fileset>
</jar>
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/OSGI36TestCase.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/OSGI36TestCase.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,88 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.deployer.jbosgi36;
+
+//$Id$
+
+import junit.framework.Test;
+
+import org.jboss.osgi.spi.junit.IntegrationTest;
+import org.jboss.osgi.spi.junit.IntegrationTestSetup;
+import org.jboss.osgi.spi.management.MBeanProxy;
+import org.jboss.osgi.spi.management.MBeanProxyException;
+import org.jboss.test.osgi.deployer.jbosgi36.mbean.FooMBean;
+
+/**
+ * [JBOSGI-36] Bundle classes leak into system classloader
+ *
+ * https://jira.jboss.org/jira/browse/JBOSGI-36
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 25-Feb-2009
+ */
+public class OSGI36TestCase extends IntegrationTest
+{
+ static IntegrationTestSetup setup;
+
+ public static Test suite()
+ {
+ setup = new IntegrationTestSetup(OSGI36TestCase.class, "jbosgi36-bundle.jar, jbosgi36-mbean.jar");
+ return setup;
+ }
+
+ public void testAccessMBean() throws Exception
+ {
+ assertEquals("hello", getFooMBean().echo("hello"));
+ }
+
+ public void testAccessSomeService() throws Exception
+ {
+ try
+ {
+ String loaderName = getFooMBean().accessSomeService();
+ fail("Unexpected classloader: " + loaderName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ // expected
+ }
+ }
+
+ public void testAccessSomeInternal() throws Exception
+ {
+ try
+ {
+ String loaderName = getFooMBean().accessSomeInternal();
+ fail("Unexpected classloader: " + loaderName);
+ }
+ catch (ClassNotFoundException ex)
+ {
+ // expected
+ }
+ }
+
+ private FooMBean getFooMBean() throws MBeanProxyException
+ {
+ FooMBean foo = (FooMBean)MBeanProxy.get(FooMBean.class, FooMBean.OBJECT_NAME, getServer());
+ return foo;
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/SomeService.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeService.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,34 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.deployer.jbosgi36.bundle;
+
+import org.jboss.test.osgi.deployer.jbosgi36.bundle.internal.SomeInternal;
+
+//$Id$
+
+public class SomeService
+{
+ public String doStuff()
+ {
+ return SomeInternal.class.getName();
+ }
+}
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/SomeServiceActivator.java)
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/SomeServiceActivator.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.test.osgi.deployer.jbosgi36.bundle;
+
+//$Id$
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+import org.osgi.framework.ServiceRegistration;
+
+/**
+ * A Service Activator
+ *
+ * @author thomas.diesler at jboss.com
+ * @since 04-Feb-2009
+ */
+public class SomeServiceActivator implements BundleActivator
+{
+ private ServiceRegistration registration;
+
+ public void start(BundleContext context)
+ {
+ SomeService service = new SomeService();
+ registration = context.registerService(SomeService.class.getName(), service, null);
+ }
+
+ public void stop(BundleContext context)
+ {
+ if (registration != null)
+ {
+ registration.unregister();
+ registration = null;
+ }
+ }
+}
\ No newline at end of file
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/internal)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/bundle/internal/SomeInternal.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/bundle/internal/SomeInternal.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.test.osgi.jbosgi36.bundle.internal;
+package org.jboss.test.osgi.deployer.jbosgi36.bundle.internal;
//$Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean/Foo.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/Foo.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.test.osgi.jbosgi36.mbean;
+package org.jboss.test.osgi.deployer.jbosgi36.mbean;
//$Id$
@@ -36,14 +36,14 @@
public String accessSomeService() throws ClassNotFoundException
{
ClassLoader loader = getClass().getClassLoader();
- loader.loadClass("org.jboss.test.osgi.jbosgi36.bundle.SomeService");
+ loader.loadClass("org.jboss.test.osgi.deployer.jbosgi36.bundle.SomeService");
return loader.toString();
}
public String accessSomeInternal() throws ClassNotFoundException
{
ClassLoader loader = getClass().getClassLoader();
- loader.loadClass("org.jboss.test.osgi.jbosgi36.bundle.internal.SomeInternal");
+ loader.loadClass("org.jboss.test.osgi.deployer.jbosgi36.bundle.internal.SomeInternal");
return loader.toString();
}
}
Modified: projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/jbosgi36/mbean/FooMBean.java 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/java/org/jboss/test/osgi/deployer/jbosgi36/mbean/FooMBean.java 2009-04-08 15:51:12 UTC (rev 86968)
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.jboss.test.osgi.jbosgi36.mbean;
+package org.jboss.test.osgi.deployer.jbosgi36.mbean;
// $Id$
Copied: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36 (from rev 86945, projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36)
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/META-INF/jbosgi36-jboss-beans.xml 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/META-INF/jbosgi36-jboss-beans.xml 2009-04-08 15:51:12 UTC (rev 86968)
@@ -1,6 +1,6 @@
<deployment xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="urn:jboss:bean-deployer:2.0 bean-deployer_2_0.xsd" xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="Foo" class="org.jboss.test.osgi.jbosgi36.mbean.Foo"/>
+ <bean name="Foo" class="org.jboss.test.osgi.deployer.jbosgi36.mbean.Foo"/>
</deployment>
Modified: projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jbosgi36/jbosgi36.bnd 2009-04-08 07:11:09 UTC (rev 86945)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/deployer/jbosgi36/jbosgi36.bnd 2009-04-08 15:51:12 UTC (rev 86968)
@@ -1,7 +1,7 @@
# bnd build -classpath target/test-classes -output target/test-libs/jbosgi36-bundle.jar src/test/resources/jbosgi36/jbosgi36.bnd
Bundle-SymbolicName: jbosgi36
-Bundle-Activator: org.jboss.test.osgi.jbosgi36.bundle.SomeServiceActivator
-Export-Package: org.jboss.test.osgi.jbosgi36.bundle
-Private-Package: org.jboss.test.osgi.jbosgi36.bundle.internal
+Bundle-Activator: org.jboss.test.osgi.deployer.jbosgi36.bundle.SomeServiceActivator
+Export-Package: org.jboss.test.osgi.deployer.jbosgi36.bundle
+Private-Package: org.jboss.test.osgi.deployer.jbosgi36.bundle.internal
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/jndi.properties 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,3 @@
+java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory
+java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces
+java.naming.provider.url=jnp://@jboss.bind.address@:1099
Added: projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy
===================================================================
--- projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy (rev 0)
+++ projects/jboss-osgi/trunk/testsuite/src/test/resources/tst.policy 2009-04-08 15:51:12 UTC (rev 86968)
@@ -0,0 +1,4 @@
+grant {
+ permission java.security.AllPermission;
+};
+
More information about the jboss-osgi-commits
mailing list