Thanks for your reply. It really makes sense.

Gerald

On Wed, Dec 9, 2009 at 11:53 AM, Bertrand Delacretaz
<[email protected]> wrote:
> On Wed, Dec 9, 2009 at 5:44 PM, Guo Zhenhua <[email protected]> wrote:
>> ...If I want to call Sling APIs from another webapp within the same
>> container, will it be different from regular case because of OSGi used
>> by Sling web app?...
>
> That might be tricky - if you want to call Sling APIs from another
> webapp, the API classes must come from the container's classloader.
>
> You'd have to make the required APIs globally available, and not load
> the corresponding API jars in the OSGi container used by Sling.
>
> I'm not sure if that's worth the effort, it might be simpler to run
> your code in the same webapp/container, or access Sling via its HTTP
> interface.
>
> -Bertrand
>

Reply via email to