You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by NickyPhan <ts...@gmail.com> on 2009/08/23 12:52:58 UTC

Dynamic Common/Share ClassLoader Reload

Hi all,

I am creating an Jar file to be used accross multiple portlet application
which is working fine.

I only have one issue is everytime I made change to the class and export to
JAR file, I need to restart Tomcat server for all portlets to take effect
since they are part of Common/Shared Loader.

I am not sure whether any config in Context.XML so that I can force Tomcat
to reload common/shared loader.

Thank for any help.
-- 
View this message in context: http://www.nabble.com/Dynamic-Common-Share-ClassLoader-Reload-tp25102161p25102161.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Dynamic Common/Share ClassLoader Reload

Posted by Pid <pi...@pidster.com>.
On 23/08/2009 12:49, NickyPhan wrote:
>
> Thank PID-6 for your response,
>
> Honestly this is my second post in this forum so forgive my mistake not
> mentioning Tomcat and Java version. Both Tomcat and Java are 6.

The subversions actually make a difference too. 6.0.20 is the most 
recent version of Tomcat, for example.

> I thought it is impossible and I was right. I am new to Tomcat too. The
> reason I asked for it as I mentioned they are all Lib to share between
> multiple custom portlets, Liferay for specific. But these classes are very
> immature and would be continously changed at this stage. So, this is the
> question of fast development only.
>
> Any other way you can think of so that I can achieve the same thing ?

Yes. Like I said, include the jar in the WEB-INF/lib dir of your app(s).

You are obviously not saving any time or effort by placing it in the 
shared classloader, because you have to restart the server.

Unless you're somehow attempting to share actual data inside the classes 
by placing it the shared classloader (unwise, probably) then there's no 
particular gain by doing so.


p


> Thanks
>
>
> NickyPhan wrote:
>>
>> Hi all,
>>
>> I am creating an Jar file to be used accross multiple portlet application
>> which is working fine.
>>
>> I only have one issue is everytime I made change to the class and export
>> to JAR file, I need to restart Tomcat server for all portlets to take
>> effect since they are part of Common/Shared Loader.
>>
>> I am not sure whether any config in Context.XML so that I can force Tomcat
>> to reload common/shared loader.
>>
>> Thank for any help.
>>
>


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Dynamic Common/Share ClassLoader Reload

Posted by NickyPhan <ts...@gmail.com>.
Thank PID-6 for your response,

Honestly this is my second post in this forum so forgive my mistake not
mentioning Tomcat and Java version. Both Tomcat and Java are 6.

I thought it is impossible and I was right. I am new to Tomcat too. The
reason I asked for it as I mentioned they are all Lib to share between
multiple custom portlets, Liferay for specific. But these classes are very
immature and would be continously changed at this stage. So, this is the
question of fast development only.

Any other way you can think of so that I can achieve the same thing ?

Thanks


NickyPhan wrote:
> 
> Hi all,
> 
> I am creating an Jar file to be used accross multiple portlet application
> which is working fine.
> 
> I only have one issue is everytime I made change to the class and export
> to JAR file, I need to restart Tomcat server for all portlets to take
> effect since they are part of Common/Shared Loader.
> 
> I am not sure whether any config in Context.XML so that I can force Tomcat
> to reload common/shared loader.
> 
> Thank for any help.
> 

-- 
View this message in context: http://www.nabble.com/Dynamic-Common-Share-ClassLoader-Reload-tp25102161p25102536.html
Sent from the Tomcat - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org


Re: Dynamic Common/Share ClassLoader Reload

Posted by Pid <pi...@pidster.com>.
On 23/08/2009 11:52, NickyPhan wrote:
>
> Hi all,
>
> I am creating an Jar file to be used accross multiple portlet application
> which is working fine.
>
> I only have one issue is everytime I made change to the class and export to
> JAR file, I need to restart Tomcat server for all portlets to take effect
> since they are part of Common/Shared Loader.

Yes.  This is intentional.

> I am not sure whether any config in Context.XML so that I can force Tomcat
> to reload common/shared loader.

No, you can't.
Any reason why you can just include the jar in each web application? 
Disk space is cheap.

> Thank for any help.

For future reference, it's traditional to specify the following when 
posting to the list.

Which version of Tomcat?
Which version of the JVM?
OS?

p

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org