Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix for [PAXSB-54] ServiceLookup.getService() returns invalid Service instances #1

Merged
merged 4 commits into from Apr 20, 2012
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
Expand Up @@ -96,7 +96,8 @@ public static <T> T getService( BundleContext bc, String className, long timeout
{
throw new ServiceLookupException( "gave up waiting for service " + className );
}
return (T) svc;
// increment the service use count to keep it valid after the ServiceTracker is closed
return (T) bc.getService(tracker.getServiceReference());
}
catch ( InterruptedException exc )
{
Expand All @@ -121,7 +122,8 @@ public static <T> T getService( BundleContext bc, String className, long timeout
{
throw new ServiceLookupException( "gave up waiting for service " + className );
}
return (T) svc;
// increment the service use count to keep it valid after the ServiceTracker is closed
return (T) bc.getService(tracker.getServiceReference());
}
catch ( InterruptedException exc )
{
Expand Down
2 changes: 1 addition & 1 deletion samples/manifest-extender/pom.xml
Expand Up @@ -6,7 +6,7 @@
<parent>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>samples</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
4 changes: 2 additions & 2 deletions samples/pom.xml
Expand Up @@ -6,13 +6,13 @@
<parent>
<groupId>org.ops4j.pax</groupId>
<artifactId>swissbox</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>samples</artifactId>
<version>1.5.0-SNAPSHOT</version>
<version>1.6.0-SNAPSHOT</version>
<packaging>pom</packaging>

<name>OPS4J Pax Swissbox :: Samples</name>
Expand Down