ASG
IBM
Zystems
Cressida
Icon
Netflexity
 
  MQSeries.net
Search  Search       Tech Exchange      Education      Certifications      Library      Info Center      SupportPacs      LinkedIn  Search  Search                                                                   FAQ  FAQ   Usergroups  Usergroups
 
Register  ::  Log in Log in to check your private messages
 
RSS Feed - WebSphere MQ Support RSS Feed - Message Broker Support

MQSeries.net Forum IndexWebSphere Message Broker Supportwhy shared Lib can not reference to Static Library

Post new topicReply to topic
why shared Lib can not reference to Static Library View previous topic :: View next topic
Author Message
agrawalamit166
PostPosted: Mon Oct 26, 2015 9:59 am Post subject: why shared Lib can not reference to Static Library Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

Hi,

I am getting an error while trying to refer Static Library from Shared Library.
Quote:

Shared library 'Shared_library_Name' can not reference static library 'static_library_Name '. A shared library can only reference other shared libraries.


Do we have any specific reason not to reference Static Library from Shared Lib?
If I want to invoke message sub flows (from Shared Lib), which is not going to change, do I need to put that code inside shared lib. I can not make them a part of Static Lib and refer them from shared lib.
Please Help. I am using IIB10.0.0.1
Thanks.
Back to top
View user's profile Send private message Yahoo Messenger
Vitor
PostPosted: Mon Oct 26, 2015 10:17 am Post subject: Re: why shared Lib can not reference to Static Library Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 25165
Location: Ohio, USA

agrawalamit166 wrote:
Do we have any specific reason not to reference Static Library from Shared Lib?


I am not now nor have I ever been part of the IBM development team, but if it was me I'd ask myself how I'd reference a static library that's part of an application from a shared lib if there's was multiple copies of the library in different applications (how do I know which one to access, and how do I know they're all the same?) or what to do if I was a shared library being deployed to an EG that didn't have an application with the static library deployed.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
stoney
PostPosted: Mon Oct 26, 2015 12:57 pm Post subject: Re: why shared Lib can not reference to Static Library Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

agrawalamit166 wrote:
If I want to invoke message sub flows (from Shared Lib), which is not going to change, do I need to put that code inside shared lib.


Shared libraries can only use resources from other shared libraries.
So yes - if you want to call the code from a shared library, then you need to put that code inside a shared library.

agrawalamit166 wrote:
Do we have any specific reason not to reference Static Library from Shared Lib?


One reason (of several) is that there are several types of resource that you can have in a static library that you cannot have in a shared library.
Allowing a shared library to reference a static library would break those restrictions.
For example, a shared library cannot contain .msgflow (message flows or pre-V8 style subflows) files - but a static library can.
Back to top
View user's profile Send private message
agrawalamit166
PostPosted: Fri Oct 30, 2015 8:44 am Post subject: Reply with quote

Voyager

Joined: 17 Aug 2009
Posts: 78
Location: NY, US

Thanks Stoney and Vitor... It does make sense for me. I was thinking from jar file prospects only. but Shared Vs Static lib have lot of other things, due to that it makes them to put separately.


One more thing, I observed is that: If I have one jar file, which is used by both Shared Library and Application. So even shared lib is used by Application, but still I need to add this jar file at both places ( Shared Lib and Application).
Back to top
View user's profile Send private message Yahoo Messenger
mqjeff
PostPosted: Mon Nov 02, 2015 7:44 am Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

You may also be able to add the JAR file to a classloader - particularly a JavaClassLoader configurable service.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Display posts from previous:
Post new topicReply to topic Page 1 of 1

MQSeries.net Forum IndexWebSphere Message Broker Supportwhy shared Lib can not reference to Static Library
Jump to:



You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
Protected by Anti-Spam ACP


Theme by Dustin Baccetti
Powered by phpBB 2001, 2002 phpBB Group

Copyright MQSeries.net. All rights reserved.