JBoss-OSGI SVN: r97606 - in projects/jboss-osgi/projects: runtime/framework/tags and 1 other directory.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 08:22:12 -0500 (Wed, 09 Dec 2009)
New Revision: 97606
Added:
projects/jboss-osgi/projects/runtime/framework/tags/jboss-osgi-framework-1.0.0.Alpha2/
Removed:
projects/jboss-osgi/projects/parent/tags/jboss-osgi-framework-1.0.0.Alpha2/
Log:
Move jboss-osgi-framework-1.0.0.Alpha2 to runtime/framework/tags
Copied: projects/jboss-osgi/projects/runtime/framework/tags/jboss-osgi-framework-1.0.0.Alpha2 (from rev 97605, projects/jboss-osgi/projects/parent/tags/jboss-osgi-framework-1.0.0.Alpha2)
16 years
JBoss-OSGI SVN: r97604 - projects/jboss-osgi/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 07:49:09 -0500 (Wed, 09 Dec 2009)
New Revision: 97604
Modified:
projects/jboss-osgi/trunk/pom.xml
Log:
Remove OPS4J snapshot repo
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-12-09 12:36:25 UTC (rev 97603)
+++ projects/jboss-osgi/trunk/pom.xml 2009-12-09 12:49:09 UTC (rev 97604)
@@ -296,14 +296,6 @@
<enabled>true</enabled>
</snapshots>
</repository>
- <repository>
- <id>ops4j.snapshots</id>
- <name>The OPS4J Snapshot Repository</name>
- <url>http://repository.ops4j.org/mvn-snapshots/</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- </repository>
</repositories>
<!-- Profiles -->
16 years
JBoss-OSGI SVN: r97599 - projects/jboss-osgi/tags.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 03:27:31 -0500 (Wed, 09 Dec 2009)
New Revision: 97599
Added:
projects/jboss-osgi/tags/jboss-osgi-1.0.0.Beta5/
Log:
Release jboss-osgi-1.0.0.Beta5
Copied: projects/jboss-osgi/tags/jboss-osgi-1.0.0.Beta5 (from rev 97598, projects/jboss-osgi/trunk)
16 years
JBoss-OSGI SVN: r97598 - projects/jboss-osgi/trunk/testsuite/example.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-09 02:20:24 -0500 (Wed, 09 Dec 2009)
New Revision: 97598
Modified:
projects/jboss-osgi/trunk/testsuite/example/pom.xml
Log:
[JBOSGI-236] XML Binding example fails in JBossAS
Exclude test in equinox
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-09 07:14:05 UTC (rev 97597)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-09 07:20:24 UTC (rev 97598)
@@ -190,7 +190,7 @@
<exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
<exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
<!-- [JBOSGI-236] XML Binding example fails in JBossAS -->
- <exclude>org/jboss/test/osgi/example/jbossxb/**</exclude>
+ <exclude>org/jboss/test/osgi/example/xml/jbossxb/**</exclude>
</excludes>
</configuration>
</plugin>
16 years
JBoss-OSGI SVN: r97569 - projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-08 17:52:53 -0500 (Tue, 08 Dec 2009)
New Revision: 97569
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceUnitTestCase.java
Log:
Test ungetService result.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceUnitTestCase.java 2009-12-08 22:11:55 UTC (rev 97568)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/GetUnGetServiceUnitTestCase.java 2009-12-08 22:52:53 UTC (rev 97569)
@@ -35,6 +35,7 @@
* GetUnGetServiceUnitTestCase.
*
* @author <a href="adrian(a)jboss.com">Adrian Brock</a>
+ * @author <a href="ales.justin(a)jboss.org">Ales Justin</a>
* @version $Revision: 1.1 $
*/
public class GetUnGetServiceUnitTestCase extends FrameworkTest
@@ -201,4 +202,49 @@
uninstall(bundle);
}
}
+
+ public void testUnGetServiceResult() throws Exception
+ {
+ Bundle bundle = addBundle("/bundles/simple/", "simple-bundle1");
+ try
+ {
+ bundle.start();
+ BundleContext bundleContext = bundle.getBundleContext();
+ assertNotNull(bundleContext);
+
+ ServiceRegistration registration = bundleContext.registerService(BundleContext.class.getName(), bundleContext, null);
+ ServiceReference reference = registration.getReference();
+ Object actual = bundleContext.getService(reference);
+ assertEquals(bundleContext, actual);
+ assertFalse(bundleContext.ungetService(reference));
+
+ bundleContext.getService(reference);
+ bundleContext.getService(reference);
+ assertTrue(bundleContext.ungetService(reference));
+ assertFalse(bundleContext.ungetService(reference));
+
+ Bundle bundle2 = addBundle("/bundles/simple/", "simple-bundle2");
+ try
+ {
+ bundle2.start();
+ BundleContext bundleContext2 = bundle2.getBundleContext();
+ assertNotNull(bundleContext2);
+
+ bundleContext2.getService(reference);
+
+ bundleContext.getService(reference);
+ assertFalse(bundleContext.ungetService(reference));
+
+ assertFalse(bundleContext2.ungetService(reference));
+ }
+ finally
+ {
+ uninstall(bundle2);
+ }
+ }
+ finally
+ {
+ uninstall(bundle);
+ }
+ }
}
16 years
JBoss-OSGI SVN: r97568 - projects/jboss-osgi/trunk/testsuite/example.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-08 17:11:55 -0500 (Tue, 08 Dec 2009)
New Revision: 97568
Modified:
projects/jboss-osgi/trunk/testsuite/example/pom.xml
Log:
[JBOSGI-236] XML Binding example fails in JBossAS
Modified: projects/jboss-osgi/trunk/testsuite/example/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-08 21:52:02 UTC (rev 97567)
+++ projects/jboss-osgi/trunk/testsuite/example/pom.xml 2009-12-08 22:11:55 UTC (rev 97568)
@@ -189,6 +189,8 @@
<!-- [JBOSGI-214] Cannot repeatedly register service bound to an interface from the system classpath -->
<exclude>org/jboss/test/osgi/example/blueprint/**</exclude>
<exclude>org/jboss/test/osgi/example/microcontainer/**</exclude>
+ <!-- [JBOSGI-236] XML Binding example fails in JBossAS -->
+ <exclude>org/jboss/test/osgi/example/jbossxb/**</exclude>
</excludes>
</configuration>
</plugin>
16 years
JBoss-OSGI SVN: r97567 - projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-08 16:52:02 -0500 (Tue, 08 Dec 2009)
New Revision: 97567
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
Log:
service == bean
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-08 21:49:30 UTC (rev 97566)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-08 21:52:02 UTC (rev 97567)
@@ -449,6 +449,7 @@
assertNotNull(bc);
Object service = bc.getService(ref);
assertInstanceOf(service, aClass, false);
+ assertSame(service, getBean("A"));
assertFalse(bc.ungetService(ref));
}
finally
16 years
JBoss-OSGI SVN: r97565 - in projects/jboss-osgi/projects/runtime/framework/trunk/src: test/java/org/jboss/test/osgi/service and 3 other directories.
by jboss-osgi-commits@lists.jboss.org
Author: alesj
Date: 2009-12-08 16:27:22 -0500 (Tue, 08 Dec 2009)
New Revision: 97565
Added:
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml
Modified:
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
Log:
Add beans mix, fix few typos/bugz.
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-08 20:34:57 UTC (rev 97564)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/AbstractBundleState.java 2009-12-08 21:27:22 UTC (rev 97565)
@@ -355,7 +355,7 @@
ContextTracking ct = (ContextTracking)context;
ct.ungetTarget(this);
}
- return isContextInUse(context);
+ return getUsedByCount(context, this) > 0;
}
public ServiceReference[] getServicesInUse()
@@ -463,17 +463,17 @@
// Check if the service is still in use by this bundle
ControllerContextHandle handle = (ControllerContextHandle)reference;
ControllerContext context = handle.getContext();
- if (isContextInUse(context) == false)
+ if (OSGiBundleManager.isUnregistered(context))
return false;
checkValidBundleContext();
- return getBundleManager().ungetContext(this, context);
+ return ungetContext(context);
}
- boolean ungetContex(ControllerContext state)
+ boolean ungetContext(ControllerContext context)
{
- return getBundleManager().ungetContext(this, state);
+ return getBundleManager().ungetContext(this, context);
}
public void addBundleListener(BundleListener listener)
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-08 20:34:57 UTC (rev 97564)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/GenericServiceReferenceWrapper.java 2009-12-08 21:27:22 UTC (rev 97565)
@@ -75,6 +75,9 @@
public Bundle getBundle()
{
+ if (OSGiBundleManager.isUnregistered(context))
+ return null;
+
return bundleState.getBundleInternal();
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-08 20:34:57 UTC (rev 97564)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/main/java/org/jboss/osgi/framework/bundle/OSGiServiceState.java 2009-12-08 21:27:22 UTC (rev 97565)
@@ -676,7 +676,7 @@
int count = ct.getUsedByCount(this, using);
while(count > 0)
{
- using.ungetContex(this); // ungetService will cleanup service cache
+ using.ungetContext(this); // ungetService will cleanup service cache
count--;
}
}
Modified: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-08 20:34:57 UTC (rev 97564)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/java/org/jboss/test/osgi/service/ServiceMixUnitTestCase.java 2009-12-08 21:27:22 UTC (rev 97565)
@@ -38,6 +38,7 @@
import org.jboss.test.osgi.service.support.a.A;
import org.jboss.test.osgi.service.support.c.C;
import org.jboss.test.osgi.service.support.d.D;
+import org.jboss.virtual.AssembledDirectory;
import org.osgi.framework.Bundle;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceReference;
@@ -425,6 +426,37 @@
}
}
+ public void testBeansMix() throws Throwable
+ {
+ AssembledDirectory mix = createAssembledDirectory("beans1", "");
+ addPath(mix, "/bundles/service/service-beans1", "");
+ addPackage(mix, A.class);
+ Deployment deployment = addDeployment(mix);
+ try
+ {
+ checkComplete();
+
+ Bundle bundle = getBundle(getDeploymentUnit(deployment));
+ bundle.start();
+
+ ServiceReference[] refs = bundle.getRegisteredServices();
+ assertNotNull(refs);
+ assertEquals(1, refs.length);
+ ServiceReference ref = refs[0];
+ assertEquals(bundle, ref.getBundle());
+ Class<?> aClass = bundle.loadClass(A.class.getName());
+ BundleContext bc = bundle.getBundleContext();
+ assertNotNull(bc);
+ Object service = bc.getService(ref);
+ assertInstanceOf(service, aClass, false);
+ assertFalse(bc.ungetService(ref));
+ }
+ finally
+ {
+ undeploy(deployment);
+ }
+ }
+
public void testFiltering() throws Throwable
{
Deployment bean = addBean("beanA", A.class);
Copied: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF (from rev 97508, projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-bundle1/META-INF/MANIFEST.MF)
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/MANIFEST.MF 2009-12-08 21:27:22 UTC (rev 97565)
@@ -0,0 +1,7 @@
+Manifest-Version: 1.0
+Implementation-Title: JBoss OSGi tests
+Implementation-Version: test
+Implementation-Vendor: jboss.org
+Bundle-Name: Service1
+Bundle-SymbolicName: org.jboss.test.osgi.service1
+Export-Package: org.jboss.test.osgi.service.support.a
Added: projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml
===================================================================
--- projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml (rev 0)
+++ projects/jboss-osgi/projects/runtime/framework/trunk/src/test/resources/bundles/service/service-beans1/META-INF/jboss-beans.xml 2009-12-08 21:27:22 UTC (rev 97565)
@@ -0,0 +1,5 @@
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+
+ <bean name="A" class="org.jboss.test.osgi.service.support.a.A" />
+
+</deployment>
\ No newline at end of file
16 years
JBoss-OSGI SVN: r97560 - projects/jboss-osgi/trunk.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-08 14:26:21 -0500 (Tue, 08 Dec 2009)
New Revision: 97560
Modified:
projects/jboss-osgi/trunk/pom.xml
Log:
Use jboss-osgi-jmx-1.0.2.SP1
Modified: projects/jboss-osgi/trunk/pom.xml
===================================================================
--- projects/jboss-osgi/trunk/pom.xml 2009-12-08 19:25:30 UTC (rev 97559)
+++ projects/jboss-osgi/trunk/pom.xml 2009-12-08 19:26:21 UTC (rev 97560)
@@ -58,7 +58,7 @@
<version.jboss.osgi.hotdeploy>1.0.3</version.jboss.osgi.hotdeploy>
<version.jboss.osgi.husky>1.0.2</version.jboss.osgi.husky>
<version.jboss.osgi.jaxb>2.1.10.SP3</version.jboss.osgi.jaxb>
- <version.jboss.osgi.jmx>1.0.2</version.jboss.osgi.jmx>
+ <version.jboss.osgi.jmx>1.0.2.SP1</version.jboss.osgi.jmx>
<version.jboss.osgi.jndi>1.0.2</version.jboss.osgi.jndi>
<version.jboss.osgi.jta>1.0.0</version.jboss.osgi.jta>
<version.jboss.osgi.microcontainer>2.0.9</version.jboss.osgi.microcontainer>
16 years
JBoss-OSGI SVN: r97559 - projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/jboss/osgi/jmx/internal.
by jboss-osgi-commits@lists.jboss.org
Author: thomas.diesler(a)jboss.com
Date: 2009-12-08 14:25:30 -0500 (Tue, 08 Dec 2009)
New Revision: 97559
Modified:
projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/jboss/osgi/jmx/internal/ManagedFrameworkImpl.java
Log:
Use 'name' instead of 'sname' in managed bundle ObjectName
Modified: projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/jboss/osgi/jmx/internal/ManagedFrameworkImpl.java
===================================================================
--- projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/jboss/osgi/jmx/internal/ManagedFrameworkImpl.java 2009-12-08 19:20:53 UTC (rev 97558)
+++ projects/jboss-osgi/projects/bundles/jmx/trunk/src/main/java/org/jboss/osgi/jmx/internal/ManagedFrameworkImpl.java 2009-12-08 19:25:30 UTC (rev 97559)
@@ -136,7 +136,7 @@
public Set<ObjectName> getBundles()
{
// [JBAS-6571] JMX filtering does not work with wildcards
- // ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":sname=*,*");
+ // ObjectName pattern = ObjectNameFactory.create(Constants.DOMAIN_NAME + ":name=*,*");
// Set<ObjectName> names = mbeanServer.queryNames(pattern, null);
ObjectName pattern = ObjectNameFactory.create(DOMAIN_NAME + ":*");
16 years