Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361228 - Extend BundleWebappClassLoader in a way that it implements BundleReference
Summary: Extend BundleWebappClassLoader in a way that it implements BundleReference
Status: CLOSED FIXED
Alias: None
Product: Gemini.Web
Classification: RT
Component: unknown (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: 2.1.0.M01   Edit
Assignee: Violeta Georgieva CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-18 05:09 EDT by Violeta Georgieva CLA
Modified: 2011-10-31 14:00 EDT (History)
1 user (show)

See Also:


Attachments
Patch proposal (1.08 KB, patch)
2011-10-18 05:09 EDT, Violeta Georgieva CLA
glyn.normington: review+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Violeta Georgieva CLA 2011-10-18 05:09:10 EDT
Created attachment 205398 [details]
Patch proposal

Hi,

In OSGI JNDI specification it is explained how to obtain caller's bundle context. 

"126.7.3 Caller’s Bundle Context
...
2 Obtain the Thread Context Class Loader; if it, or an ancestor class loader, implements the BundleReference interface, call its getBundle method to get the client’s Bundle; then call getBundleContext on the Bundle object to get the client’s Bundle Context. If the Bundle Context has been found stop."

In the current implementation for org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader we already provided method getBundle(). So the only change is to add that org.eclipse.gemini.web.tomcat.internal.loading.BundleWebappClassLoader implements org.osgi.framework.BundleReference.

So the corresponding change that I want to make is the one that is attached.

Could you please review it?

Thanks
Violeta
Comment 1 Violeta Georgieva CLA 2011-10-18 08:27:12 EDT
Change is tested, committed and pushed
Commit ID: 68c6a0a1649f564dc23d738cb81f06abe7edce81