ops4j / org.ops4j.pax.swissbox

Other
10 stars 12 forks source link

ServiceLookup.getService() returns invalid Service instances [PAXSB-54] #67

Closed ops4j-issues closed 12 years ago

ops4j-issues commented 12 years ago

Timo Naroska created PAXSB-54

The ServiceLookup.getService() methods internally use the OSGi ServiceTracker to lookup/wait for services. The service instances are then returned and the ServiceTracker closed.
The problem is that closing the ServiceTracker ungets the tracked service on the BundleContext. This invalidates the service instance. Any further use of an ungotten service is a bug according to OSGi terminology.

See also PAXEXAM-292


Affects: 1.5.0 Fixed in: 1.5.1 Votes: 0, Watches: 0