LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 06-05-2013, 03:52 AM   #1
maheslinux
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, 06:35 AM   #2
jpollard
Senior Member
 
Registered: Dec 2012
Location: Washington DC area
Distribution: Fedora, CentOS, Slackware
Posts: 4,654

Rep: Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255Reputation: 1255
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, 08:46 AM   #3
pan64
LQ Guru
 
Registered: Mar 2012
Location: Hungary
Distribution: debian/ubuntu/suse ...
Posts: 8,516

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


Reply


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 12:15 PM
Loading libXm.so.3 shared library on a Linux server namatias Linux - Server 1 09-05-2007 02:30 PM
Implement cluster with Tomcat 5 shadow11 Linux - Networking 0 10-10-2005 06:41 PM
Which distro's implement robust JVM and Tomcat Vince0053 General 4 06-16-2005 06:31 AM
howto compile bin with my library using all-static and shared linked standart library stpg Programming 4 06-29-2004 05:20 AM


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

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