Welcome to the most active Linux Forum on the web.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 06-05-2013, 02:52 AM   #1
LQ Newbie
Registered: Jun 2013
Posts: 1

Rep: Reputation: Disabled
Smile 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?
Old 06-05-2013, 05:35 AM   #2
Senior Member
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,704

Rep: Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270Reputation: 1270
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.
Old 06-05-2013, 07:46 AM   #3
LQ Guru
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 9,567

Rep: Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811Reputation: 2811
Are you really sure the jar loaded several times?


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
gcc link shared library against another shared library qcp Linux - Newbie 1 07-25-2008 11:15 AM
Loading shared library on a Linux server namatias Linux - Server 1 09-05-2007 01:30 PM
Implement cluster with Tomcat 5 shadow11 Linux - Networking 0 10-10-2005 05:41 PM
Which distro's implement robust JVM and Tomcat Vince0053 General 4 06-16-2005 05:31 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 04:20 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:51 AM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration