[JBoss JIRA] Created: (JBOSGI-305) Clarify ServiceReference.getUsingBundles() in ServiceFactory.ungetService()
by Thomas Diesler (JIRA)
Clarify ServiceReference.getUsingBundles() in ServiceFactory.ungetService()
---------------------------------------------------------------------------
Key: JBOSGI-305
URL: https://jira.jboss.org/jira/browse/JBOSGI-305
Project: JBoss OSGi
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Core Framework
Reporter: Thomas Diesler
Assignee: Thomas Diesler
Consider
final boolean[] allGood = new boolean[2];
ServiceFactory factory = new ServiceFactory()
{
@Override
public Object getService(Bundle bundle, ServiceRegistration sreg)
{
ServiceReference sref = sreg.getReference();
Bundle[] users = sref.getUsingBundles();
assertNotNull("Users not null", users);
assertEquals(1, users.length);
assertEquals(bundle, users[0]);
allGood[0] = true;
return new Runnable()
{
public void run()
{
}
};
}
@Override
public void ungetService(Bundle bundle, ServiceRegistration sreg, Object service)
{
ServiceReference sref = sreg.getReference();
Bundle[] users = sref.getUsingBundles();
assertNotNull("Users not null", users);
assertEquals(1, users.length);
assertEquals(bundle, users[0]);
allGood[1] = true;
}
};
Here we expect the service user to be the same in getService() and ungetService().
This works in Felix-2.0.4 but in Equinox-3.5.2. In Equinox getUsingBundles() returns null in ungetService()
The Core TCK 4.2 expects the Felix behaviour in ServiceHookTests.testListenerHook03, AFAICS.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBOSGI-382) Migrate shrinkwrap test bundles
by Thomas Diesler (JIRA)
Migrate shrinkwrap test bundles
--------------------------------
Key: JBOSGI-382
URL: https://jira.jboss.org/browse/JBOSGI-382
Project: JBoss OSGi
Issue Type: Task
Security Level: Public (Everyone can see)
Components: Other
Reporter: Thomas Diesler
Fix For: JBossOSGi 1.0.x
Currently we use a rather verbose syntax like
// Bundle-SymbolicName: simple-fragA
// Export-Package: org.jboss.test.osgi.fragments.fragA
// Fragment-Host: simple-hostA
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "simple-hostA");
archive.addClasses(FragBeanA.class);
archive.addResource(getResourceFile("fragments/resource.txt"));
archive.setManifest(new Asset()
{
public InputStream openStream()
{
OSGiManifestBuilder builder = OSGiManifestBuilder.newInstance();
builder.addBundleManifestVersion(2);
builder.addBundleSymbolicName(archive.getName());
builder.addExportPackages(FragBeanA.class);
builder.addFragmentHost("simple-hostA");
return builder.openStream();
}
});
Bundle fragA = installBundle(archive);
assertBundleState(Bundle.INSTALLED, fragA.getState());
This should be supported natively by Shrinkwrap
// Bundle-SymbolicName: simple-fragA
// Export-Package: org.jboss.test.osgi.fragments.fragA
// Fragment-Host: simple-hostA
final BundleArchive archive = ShrinkWrap.create(BundleArchive.class, "simple-hostA");
archive.addClasses(FragBeanA.class);
archive.addResource(getResourceFile("fragments/resource.txt"));
archive.addBundleManifestVersion(2);
archive.addBundleSymbolicName(archive.getName());
archive.addExportPackages(FragBeanA.class);
archive.addFragmentHost("simple-hostA");
Bundle fragA = installBundle(archive);
assertBundleState(Bundle.INSTALLED, fragA.getState());
or simmilar
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months
[JBoss JIRA] Created: (JBOSGI-419) Cannot start example webapp through console
by Thomas Diesler (JIRA)
Cannot start example webapp through console
-------------------------------------------
Key: JBOSGI-419
URL: https://jira.jboss.org/browse/JBOSGI-419
Project: JBoss OSGi
Issue Type: Bug
Security Level: Public (Everyone can see)
Components: jboss-osgi-webapp
Reporter: Thomas Diesler
Fix For: JBossOSGi 1.0.0 Beta10
Caused by: org.apache.felix.log.LogException: javax.xml.parsers.FactoryConfigurationError: Provider org.apache.xerces.jaxp.DocumentBuilderFactoryImpl not found
at javax.xml.parsers.DocumentBuilderFactory.newInstance(DocumentBuilderFactory.java:129)
at org.ops4j.util.xml.ElementHelper.getRootElement(ElementHelper.java:68)
at org.ops4j.pax.web.extender.war.internal.parser.dom.DOMWebXmlParser.parse(DOMWebXmlParser.java:63)
at org.jboss.osgi.webapp.internal.WebXMLParserInterceptor.createWebAppMetadata(WebXMLParserInterceptor.java:82)
at org.jboss.osgi.webapp.internal.WebXMLParserInterceptor.invoke(WebXMLParserInterceptor.java:67)
at org.jboss.osgi.deployment.interceptor.AbstractLifecycleInterceptorService.handleStateChange(AbstractLifecycleInterceptorService.java:279)
at org.jboss.osgi.framework.plugin.internal.LifecycleInterceptorPluginImpl.handleStateChange(LifecycleInterceptorPluginImpl.java:106)
at org.jboss.osgi.framework.bundle.AbstractBundle.changeState(AbstractBundle.java:443)
at org.jboss.osgi.framework.bundle.HostBundle.startInternal(HostBundle.java:192)
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
12 years, 9 months