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 Index » WebSphere Message Broker (ACE) Support » Jar files precedence deployed alongwith Bar file in IIB 10

Post new topic  Reply to topic
 Jar files precedence deployed alongwith Bar file in IIB 10 « View previous topic :: View next topic » 
Author Message
gauravg
PostPosted: Mon Aug 08, 2016 4:23 am    Post subject: Jar files precedence deployed alongwith Bar file in IIB 10 Reply with quote

Novice

Joined: 12 Jan 2016
Posts: 14

Hi,

We are facing a issue in terms of jar file loading precedence. There are 2 jar files(A and B) each having message.properties file under locale folder with same hierarchy in both.

Both Jar files are deployed in single execution group as part of Bar file only. There is nothing put under Execution group shared class, nor in Broker shared classes directory.

When checked the order of classpath loaded for these jar files, A is deployed first as compared to B.

Problem :- since A and B are referring to same property name "message.properties" (though different content ), A's property file is loaded and hence business scenario failed because B's property file was expected.

So how this order by of classpath loading is decided? Is it random or how can we forcibly ensure to make load B's property file first than A's.

Please suggest.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 08, 2016 4:30 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Please be exactly clear what you mean about a message.properties file.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
gauravg
PostPosted: Mon Aug 08, 2016 6:27 am    Post subject: Reply with quote

Novice

Joined: 12 Jan 2016
Posts: 14

message.properties can be any property file with key value pair. As per business scenario, key passed would be used to fetch value from this property.

Thanks
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 08, 2016 6:36 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

gauravg wrote:
message.properties can be any property file with key value pair. As per business scenario, key passed would be used to fetch value from this property.


As previously discussed many times on this forum, do not use this mechanism with IIB. It's not WAS, not matter how many times Java developers like to pretend it is.

You are on a short road to pain and misery. The posted problem is just the first of many you will encounter. Pick any of the supported mechanisms to store and supply these property values to your flow code.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
gauravg
PostPosted: Mon Aug 08, 2016 7:04 am    Post subject: Reply with quote

Novice

Joined: 12 Jan 2016
Posts: 14

Hi,

Can you please elaborate on below approach.
Please suggest correct approach for IIB. How to load values from key-value pair based property file.

Thanks
Back to top
View user's profile Send private message
mqjeff
PostPosted: Mon Aug 08, 2016 7:07 am    Post subject: Reply with quote

Grand Master

Joined: 25 Jun 2008
Posts: 17447

Don't use a property file.

Use search to find other discussions of how to store properties and use them from IIB, without using a property file.

Don't use a property file.

Review the documentation on the functions IIB has for storing configuration and runtime data for message flows and business logic.
_________________
chmod -R ugo-wx /
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 08, 2016 7:07 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

gauravg wrote:
Please suggest correct approach for IIB.


Any mix of:


    UDP
    User configurable services
    Promoted properties
    Database tables


gauravg wrote:
How to load values from key-value pair based property file.


Like I said above - don't
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
stoney
PostPosted: Mon Aug 08, 2016 9:27 am    Post subject: Reply with quote

Centurion

Joined: 03 Apr 2013
Posts: 140

There is no way to control the order that deployed JAR files get loaded into the Java class loader.
It's not entirely clear how you want the class loading to work; do you want A.jar to see A.jar's copy of message.properties, and B.jar to see B.jar's copy of message properties?
If so you need to isolate the JAR files into separate class loaders, and that means they will need to be put into separate applications or shared libraries.
There's some information about Java class loading in IIB here:
https://developer.ibm.com/integration/blog/2015/06/23/application-isolation-for-java-in-ibm-integration-bus-v10-and-v9-0-0-3/
Back to top
View user's profile Send private message
Vitor
PostPosted: Mon Aug 08, 2016 9:29 am    Post subject: Reply with quote

Grand High Poobah

Joined: 11 Nov 2005
Posts: 26093
Location: Texas, USA

stoney wrote:
If so you need to isolate the JAR files into separate class loaders, and that means they will need to be put into separate applications or shared libraries


One of the many reasons you should not continue with this method. This rabbit hole goes a long, long way down.
_________________
Honesty is the best policy.
Insanity is the best defence.
Back to top
View user's profile Send private message
smdavies99
PostPosted: Mon Aug 08, 2016 10:47 am    Post subject: Reply with quote

Jedi Council

Joined: 10 Feb 2003
Posts: 6076
Location: Somewhere over the Rainbow this side of Never-never land.

Vitor wrote:
stoney wrote:
If so you need to isolate the JAR files into separate class loaders, and that means they will need to be put into separate applications or shared libraries


One of the many reasons you should not continue with this method. This rabbit hole goes a long, long way down.


some of us have been using this product for years and on mission critical systems.
We don't use Java properties because we know how much trouble they bring.

See my sig for my thoughts on what you are trying to do.
_________________
WMQ User since 1999
MQSI/WBI/WMB/'Thingy' User since 2002
Linux user since 1995

Every time you reinvent the wheel the more square it gets (anon). If in doubt think and investigate before you ask silly questions.
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic  Reply to topic Page 1 of 1

MQSeries.net Forum Index » WebSphere Message Broker (ACE) Support » Jar files precedence deployed alongwith Bar file in IIB 10
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.