Hi Kishanthan,

I will remove that parent first configuration in the wso2as-web.xml.

According to the Java docs of ClassLoader[1] the child classes are only
need to register as parallel capable. Since the tomcat
WebappClassLoaderBase is registering it as parallel capable, we only need
to call the registerAsParallelCapable() in a static block of our custom
classloader (because of the condition 1 given in the Java docs.[1])

Also in the wso2as-web.xml we can add a Boolean to configure whether a web
app requires parallel capable classloader.

[1]
https://docs.oracle.com/javase/8/docs/api/java/lang/ClassLoader.html#registerAsParallelCapable--

Thanks.

On Sun, Mar 13, 2016 at 11:51 AM, Kishanthan Thangarajah <
[email protected]> wrote:

> Did we also look into how we can use ParallelWebappClassLoader with our
> class loaded enhancements?
>
>
> https://tomcat.apache.org/tomcat-8.0-doc/config/loader.html#Standard_Implementation
>
> On Sun, Mar 13, 2016 at 11:42 AM, Kishanthan Thangarajah <
> [email protected]> wrote:
>
>> If tomcat is already providing a way to configure the parent first
>> behaviour we should use that instead of our own. But most of the times, we
>> do not need to change this class loading behaviour to parent first as we
>> mostly use the default (child first) behaviour. This config was added
>> during OSGi based tomcat class loading time (AS 5.3.0) to make use of the
>> parent class loading behaviour, but this is no longer a valid use case with
>> plain tomcat. So let's go ahead with tomcat based config.
>>
>> On Fri, Mar 11, 2016 at 11:02 AM, Miraj Abeysekara <[email protected]>
>> wrote:
>>
>>> Hi all,
>>>
>>> Currently in the wso2as-web.xml contains a parent first configuration
>>> parameter per web app class loading. Also tomcat it self provide
>>> configurable parent first class loading behavior in side the context.xml.
>>>
>>> One benefit of using the tomcat configuration for controlling parent
>>> first behavior is, we can reuse their methods. But if we separate the
>>> parent first parameter from wso2as-web.xml we need to add context.xml file
>>> per web app just for changing the class loading behavior. Also for each
>>> context.xml, the Loader element must be added with specifying app-sever web
>>> app loader class if the web app requires wso2 web app loader module.
>>> Therefore it is bit complex to configure a web app if it requires to change
>>> parent first behavior.
>>>
>>> Which approach should we use for the configuration?
>>>
>>> Thanks
>>> --
>>> Miraj Abeysekara
>>> Intern (Software Engineering)
>>> Mobile: +94775690822
>>> Twitter: https://twitter.com/MiRAGECreator
>>> GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
>>>
>>
>>
>>
>> --
>> *Kishanthan Thangarajah*
>> Associate Technical Lead,
>> Platform Technologies Team,
>> WSO2, Inc.
>> lean.enterprise.middleware
>>
>> Mobile - +94773426635
>> Blog - *http://kishanthan.wordpress.com
>> <http://kishanthan.wordpress.com>*
>> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>>
>
>
>
> --
> *Kishanthan Thangarajah*
> Associate Technical Lead,
> Platform Technologies Team,
> WSO2, Inc.
> lean.enterprise.middleware
>
> Mobile - +94773426635
> Blog - *http://kishanthan.wordpress.com <http://kishanthan.wordpress.com>*
> Twitter - *http://twitter.com/kishanthan <http://twitter.com/kishanthan>*
>



-- 
Miraj Abeysekara
Intern (Software Engineering)
Mobile: +94775690822
Twitter: https://twitter.com/MiRAGECreator
GooglePlus: https://plus.google.com/u/0/+MirageAbeysekara
_______________________________________________
Dev mailing list
[email protected]
http://wso2.org/cgi-bin/mailman/listinfo/dev

Reply via email to