[jboss-osgi-issues] [JBoss JIRA] Created: (JBOSGI-305) Clarify ServiceReference.getUsingBundles() in ServiceFactory.ungetService()
Thomas Diesler (JIRA)
jira-events at lists.jboss.org
Sun Mar 21 10:17:37 EDT 2010
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
More information about the jboss-osgi-issues
mailing list