Author |
Message
|
gauravg |
Posted: Mon Aug 08, 2016 4:23 am Post subject: Jar files precedence deployed alongwith Bar file in IIB 10 |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 08, 2016 4:30 am Post subject: |
|
|
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 |
|
 |
gauravg |
Posted: Mon Aug 08, 2016 6:27 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Mon Aug 08, 2016 6:36 am Post subject: |
|
|
 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 |
|
 |
gauravg |
Posted: Mon Aug 08, 2016 7:04 am Post subject: |
|
|
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 |
|
 |
mqjeff |
Posted: Mon Aug 08, 2016 7:07 am Post subject: |
|
|
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 |
|
 |
Vitor |
Posted: Mon Aug 08, 2016 7:07 am Post subject: |
|
|
 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 |
|
 |
stoney |
Posted: Mon Aug 08, 2016 9:27 am Post subject: |
|
|
Centurion
Joined: 03 Apr 2013 Posts: 140
|
|
Back to top |
|
 |
Vitor |
Posted: Mon Aug 08, 2016 9:29 am Post subject: |
|
|
 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 |
|
 |
smdavies99 |
Posted: Mon Aug 08, 2016 10:47 am Post subject: |
|
|
 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 |
|
 |
|