Issue Details (XML | Word | Printable)

Key: HK2-71
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Blocker Blocker
Assignee: jwells
Reporter: Jakub Podlesak
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
hk2

ServiceLocatorUtilities.enablePerThreadScope functionality is broken in OSGi environment

Created: 31/Jul/12 02:11 PM   Updated: 06/Dec/13 11:58 AM   Resolved: 06/Dec/13 11:58 AM
Component/s: None
Affects Version/s: 2.1.*
Fix Version/s: 2.1.*

Time Tracking:
Not Specified

File Attachments: 1. File patch (7 kB) 31/Jul/12 02:11 PM - Jakub Podlesak

Issue Links:
Dependency
 

Tags:
Participants: Jakub Podlesak and jwells


 Description  « Hide

ServiceLocatorUtilities.enablePerThreadScope method binds hk2-api bundle internal, PerThreadContext, class.
When ServiceHandleImpl class from hk2-locator is trying to retrieve the above context, it fails as hk2-locator bundle class loader is being used,
which does not see the PerThreadContext class. In a non-OSGi environment, this is not an issue, but it breaks in GF.

Attaching a patch, we put together with Marek and tested to resolve the issue.



jwells added a comment - 09/Aug/12 01:17 PM

This was fixed with the supplied fix.