LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   How to implement shared library in tomcat server? (https://www.linuxquestions.org/questions/linux-newbie-8/how-to-implement-shared-library-in-tomcat-server-4175464784/)

maheslinux 06-05-2013 02:52 AM

How to implement shared library in tomcat server?
 
I am working in multiple application ie., tomcat/webapps/App1 and tomcat/webapps/App2 . Both application use the same library for example zyx.jar. Now when start the tomcat server multiple times zyx.jar is loaded. But i dont want to load the jar twice, so i want to go for shared lib concept. Here i have done the following in my application ie., i have put my jar in tomcat/lib . But it does't load? Now my app is failure to access.How can i solve this issue?

jpollard 06-05-2013 05:35 AM

Not sure you can - as the "sharing" you want has to be supported by the JVM.

The problem is that Java applications are actually interpreted, and the library you want to share has to be interpreted by the JVM. IF the JVM supports shared read only memory segments, then it is possible for a JVM to allocate memory, load the library, then share it with other instances. The problem is this can't be done by the host, but must be done by the JVM.

pan64 06-05-2013 07:46 AM

Are you really sure the jar loaded several times?


All times are GMT -5. The time now is 08:37 PM.