In JBoss, I can place the file ( call it mySettings.properties) in the conf folder inside of server/default. This folder is at the same level as the deploy folder where the actual war and ear files are located.
For Oracle 10g, this file needed to located in the applib folder and this folder is at the same level as the applications folder where the actual ear and war files are located.
Is there a location for WAS 7 where I can place this properties file so that my access method can find it. I know I can package it with the ear itself, but we like the properties file to be outside of the deployable ear so that it can be adjusted to handle external dependencies.
We have a PropertyManagerFactory where we generate an instance and from this instance we retrieve properties like this:
LOGO_LOCATION_PROPERTY is defined in mySettings.properties and the value there may be different depending on where we deploy the ear.
Any answers to my situation will be much appreciated.
Can anyone advise if this is indeed the best way to proceed?
A link to the IBM WAS 7 docs to explain how to accomplish this?
Can the definition of such a shared library be scripted so I can run a script from the command line, or do I need to use the WAS admin console?
Another option is to create a classes directory directly in the WAS profile (in AppServer/profiles/). Anything (jar, property files, etc) placed in this directory is automatically in the classpath of all J2EE applications. A little more brutal since it is impacting the "global" classpath of the app server (in the classpath of all apps while with the shared library you can select which app will use it) but this should work as well.
I will try that as a first choice to see if that works the way I expect it too. This is a zero configuration solution although global in scope.
To be precise, in my profile I see folders called installableApps, bin, firststeps, etc. If I create a classes folder there as well and drop my properties file in there, it will be accessible?
But the Shared Library approach might be better in the long run.
************ Start Display Current Environment ************
WebSphere Platform 184.108.40.206 [ND 220.127.116.11 r0835.03] running with process name zproNode06Cell\zproNode06\server1 and process id 6391
Host Operating System is Linux, version 18.104.22.168-0.12-xen
Java version = 1.6.0, Java Compiler = j9jit24, Java VM name = IBM J9 VM
was.install.root = /local/IBM/WebSphere70x64
user.install.root = /local/IBM/WebSphere70x64/profiles/main
Java Home = /local/IBM/WebSphere70x64/java/jre
In the ws.ext.dirs (WAS extended classpath directories) you have "/local/IBM/WebSphere70x64/profiles/main/classes" which is this classes directory (in my case, my profile is called "main").
A shared library is definitely "cleaner" but more work is needed to put it in place.
FYI, I do not think that a profile backup/restore (using the manageprofiles.sh script) will backup/restore the content of the classes or the shared library directory. These will have to be handled separately.
I don't see the classes folder in the ws.ext.dirs listing in the startServer.log.
What I see is:
ws.ext.dirs = /opt/IBM/SDP/runtimes/base_v7/java/lib:/opt/IBM/SDP/runtimes/base_v7/classes:/opt/IBM/SDP/runtimes/base_v7/lib:/opt/IBM/SDP/runtimes/base_v7/installedChannels:/opt/IBM/SDP/runtimes/base_v7/lib/ext:/opt/IBM/SDP/runtimes/base_v7/web/help:/opt/IBM/SDP/runtimes/base_v7/deploytool/itp/plugins/com.ibm.etools.ejbdeploy/runtime
Classpath = /home/jjs/WAS/base_v7/WTE_APPSRV7_FEP1/properties:/opt/IBM/SDP/runtimes/base_v7/properties:/opt/IBM/SDP/runtimes/base_v7/lib/startup.jar:/opt/IBM/SDP/runtimes/base_v7/lib/bootstrap.jar:/opt/IBM/SDP/runtimes/base_v7/lib/lmproxy.jar:/opt/IBM/SDP/runtimes/base_v7/lib/urlprotocols.jar:/opt/IBM/SDP/runtimes/base_v7/java/lib/tools.jar
My profiles location is: /home/jjs/WAS/base_v7/WTE_APPSRV7_FEP1
But I do see that there is a properties entry in the Classpath and that /home/jjs/WAS/base_v7/WTE_APPSRV7_FEP1/properties already exists in my profiles.
So I expect that I can add my properties file there and it should be picked up. I will test that out and post back results.