dev@glassfish.java.net

Re: lib/addons - PHP configuration

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Wed, 22 Aug 2007 09:12:25 +0530

Hi Arun

>>> not found. Instead, if I copy PHP jars in lib directory then it works.

Placing a jar under install-dir/lib makes it available to all apps in the domain
  and is loaded by the shared chain. However this is not a recommended practice.
Based on your particular need, please choose the approach explained in the
answer to the question "
How do I control visibility scope of my libraries? [ie how do I control my
libraries/ library classes to be available o only to an application o only to a
cluster/config o for the whole domain" at
http://blogs.sun.com/sivakumart/entry/classloaders_in_glassfish_an_attempt

>>> Has the class loading behavior for lib/addons changed since Mar 2007 ?

There has been some changes related to addons uninstallation but this shouldn't
affect the earlier addons loading semantics

>>> What is the recommended directory to copy any JAR files accessible to
>>> *all* the deployed applications ?

I hope the response in the FAQ above helps. In short, for a JAR to be available
to all the apps in the domain, place in domains/domain1/lib or use
classpath-suffix. The former is loaded by the common classloader and hence
available to all applications whereas the latter is loaded at a classloader
higher up in the hierarchy [the shared classloader] and hence available to
everyone including AS implementation classes.

> I see there is a lib\applibs directory.

applibs are for application specific classloading. More details are available
off https://glassfish.dev.java.net/nonav/javaee5/docs/DG/beade.html#gatej


Thanks
--Siva.



Arun Gupta wrote:
> Hi Alexis,
>
> Thanks for the pointer. I saw those instructions but would like to setup
> PHP in a default GlassFish instance instead of creating a new instance.
> If I just copy the jar files to domains\domain1\lib directory (without
> creating a new instance), that works too!
>
> But I was wondering if that is the recommended practice ?
>
> I see there is a lib\applibs directory. Keeping Quercus JARs there does
> not help though.
>
> -Arun
>
> Alexis Moussine-Pouchkine wrote:
>> It's working fine for me with RC1 (build 58) and these instructions:
>> http://blogs.sun.com/alexismp/entry/php_in_glassfish_first_steps
>> which add PHP capabilities to a given (new) domain using the domain/lib
>> directory. This is how I had it running back in March too.
>> -Alexis
>>
>> Arun Gupta wrote:
>>> Ludo posted instructions (Mar 2007) on how to configure Caucho PHP in
>>> GlassFish at:
>>>
>>> http://weblogs.java.net/blog/ludo/archive/2007/03/100_java_quercu.html
>>>
>>> These instructions require to copy the JAR files in lib/addons
>>> directory. But when I follow the same then the CauchoServlet class is
>>> not found. Instead, if I copy PHP jars in lib directory then it works.
>>>
>>> Has the class loading behavior for lib/addons changed since Mar 2007 ?
>>>
>>> What is the recommended directory to copy any JAR files accessible to
>>> *all* the deployed applications ?
>>>
>>> -Arun
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: dev-unsubscribe_at_glassfish.dev.java.net
>> For additional commands, e-mail: dev-help_at_glassfish.dev.java.net
>>
>