Hi,

In CQ/Sling we use HttpSession objects created by the servlet container
used. In your case this would be the weblogic server.

The problem with the objects in the session is that the same classes
(class objects) must be used in the OSGi framework as well as in the
other parts of the EAR.

So the classes must be loaded from a shared class loader. To do this in
the OSGi framework you will want to use a feature call system package
exports.

The easiest way to get this done is creating a framework extension
fragment which attaches to the system bundle and enhances the exports of
that system bundle.

Refer to [1] for how this could be done.

Regards
Felix

[1]http://blog.meschberger.ch/2008/10/osgi-framework-extension-as-maven.html

Am Mittwoch, den 02.03.2011, 22:10 +0000 schrieb Unmesh Joshi: 
> Hi,
> 
> In our current project, we have a mix of sling servlets (as part of
> CQ) and an old spring mvc application. The migration is planned to
> move completely to sling/CQ. But till the complete migration happens,
> these two need to coexist in the same web container (weblogic in this
> case).
> We have a successful POC working where JSPs, which are CQ components,
> can access session objects set by other web applications. (Made
> possible by session sharing facility in weblogic). For refering to the
> Java classes in JSP, they need to be packaged and exported as an OSGI
> bundle.
> I am trying to understand how http session handling happens in OSGI
> container (felix) and other web applications in same web container.
> Because, if I try to use the same class in sling servlet (which is
> packaged as OSGI bundle), I get ClassCastException (as expected).
> 
> Are there any pointers which explain how class loading works in HTTP
> service in Felix?
> 
> Thanks,
> Unmesh


Reply via email to