[opencms-dev] Module Action class updateModule method

Mariano Barcia opencms at colaborativa.net
Thu Nov 24 06:05:35 CET 2005


Achim,

Thank you for your quick response.

I believe Tomcat is not enough because the context needs the "reloadable"
attribute set to "true". In a production environment, that's not the case
because it affects performance significantly.

Moreover, Tomcat would restart the whole context, destroying all the
sessions and interrupting service.

In a website with static export enabled, reloadable=true and restarting
automatically can be an option. But I'm afraid that option falls short when
considering sites where the offline and online versions are served from
tomcat directly.

I will re-evaluate this issue with my team and come up with more, kind
regards

--mariano


PS: BTW, we had problems in Linux mainly with modules in opencms 5. Despite
the export point was set OK, the module would not copy the JARs to the lib
directory in the tomcat file system. But I don't have a detailed report of
the problem now.


-----Mensaje original-----
De: opencms-dev-bounces at opencms.org [mailto:opencms-dev-bounces at opencms.org]
En nombre de Achim Westermann
Enviado el: Thursday, November 24, 2005 4:14 AM
Para: The OpenCms mailing list
Asunto: Re: [opencms-dev] Module Action class updateModule method

Hi Mariano,

> Our company is having a hard time due to the need to restart the context
> every time a module is installed or re installed. Moreover, sometimes
tomcat
> does not seem to copy the JARs needed to the WEB-INF/lib folder.

Copying the jar of the module is a matter of the export point 
WEB-INF/lib of the module's manifest.xml. I (seem to) do remember that 
the standard opencms modules have been refactored recently to import the 
jar files into the module (VFS) and then export it to WEB-INF/lib in the 
real file system.
Custom modules have to be configured to do this too.
Try configuring your module this way and install the module anew. Then 
try to trigger code-paths that use classes of your module lib without 
restart. According to Joachim tomcat already ships with a Classloader 
that supports hot deployment. I did not test this before and would be 
interested to hear, if that already does the trick.

kind regards,

Achim

> Does a "module class loader" for opencms makes sense?
> 
> Proposal:
> 
> - Build a module class loader that adds functionality to the current
opencms
> modules core.
> 
> - The module class loader, upon INSTALL, should look into the WEB-INF/lib
of
> the newly installed module for JARs, and load and register the classes
> inside those JARs
> 
> - The module class loader, upon UNINSTALL, should unload the classes
> registered with the module
> 
> - This module class loader should be transparent to the module developers.
> 
> If it worked on Tomcat only, I think it would be a big hit. 
> I look forward to your comments, TIA
> --mariano
> 
> 
> -----Mensaje original-----
> De: opencms-dev-bounces at opencms.org
[mailto:opencms-dev-bounces at opencms.org]
> En nombre de Joachim Arrasz
> Enviado el: Tuesday, November 08, 2005 5:35 AM
> Para: The OpenCms mailing list
> Asunto: Re: [opencms-dev] Module Action class updateModule method
> 
> Hi
> 
> 
>>the module handler class ships within your module, most often in a jar. 
>>Before an import it is not known to the JVM running.
> 
> 
> right
> 
> 
>>It will be highly depnendant on the caching of the application server's 
>>current Classloader wether dynamic class loading 
>>(class.forName("name"))") will be successful or not. Only by 
>>implementing a non - caching CL for module initialization after import 
>>this could be possible - expensive though.
> 
> 
> Well, most of todays popular servers like JBoss, Tomcat, We4bSphere ... 
> are able to check their lib folders at app's runtime. They updates the 
> cl's cache after you changed lib folders content. So it is not so 
> expensive. But you're right, not ALL servers can do this.
> 
> And it is one more point of failure for users of opencms when they have 
> to configure this manually.
> 
> Regards Achim
> 
> 
> _______________________________________________
> This mail is send to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> http://mail.opencms.org/mailman/listinfo/opencms-dev
> 



_______________________________________________
This mail is send to you from the opencms-dev mailing list
To change your list options, or to unsubscribe from the list, please visit
http://mail.opencms.org/mailman/listinfo/opencms-dev

-- 
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 11/23/2005
 

-- 
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.1.362 / Virus Database: 267.13.7/180 - Release Date: 11/23/2005
 




More information about the opencms-dev mailing list