Read only archive ; use https://github.com/JacORB/JacORB/issues for new issues

Bug 486

Summary: Can't specify jacorb.properties location
Product: JacORB Reporter: Kevin McCarthy <king_ramen>
Component: ORBAssignee: Simon McQueen <sm>
Status: RESOLVED INVALID    
Severity: enhancement    
Priority: P3    
Version: 2.2   
Hardware: All   
OS: All   

Description Kevin McCarthy 2004-06-07 02:22:50 UTC
The "cascading search" for jacorb.properties has always been problematic. 
Recent circumstances make it even worse.

I am doing cluster development, and to simplify my environment, I am using the 
same JAR files, classpath, etc. for all members.

I would like to have a separate jacorb.properties file for each cluster member, 
but the "detection" algoritm would force me to either:

1. Create a separate user account for each cluster member
2. Create separate launch directories for each member
3. Create separate directories for jacorb.properties and use different 
CLASSPATHS.

None of those solutions is as nice as simply passing:

-Djacorb.properties=/path/to/some/file/called/anything

to the JVM. Such a behavior should take precedence over the "automatic" 
detection algorithm as a way to allow people to specify unambiguously the 
location of the file.

The changes to code are minimal. Thank you for the great software and for 
considering this request!
Comment 1 Simon McQueen 2004-06-07 11:17:42 UTC
Hi Kevin,

Just to clarify - have you tried using -Dcustom.props=/path/to/some/file ?

If so in what way does it not meet your requirements ?
Comment 2 Kevin McCarthy 2004-06-07 15:41:00 UTC
No, I did not try that, since it is not an advertised feature. :)

According to the JacORB 2.2 documentation on page 16, properties are searched 
for:

1. in the lib directory of the JDK installation. (The JDK’s home directory 
denoted by the
system property ”java.home”).

2. in the user home directory. (This is denoted by the system 
property ”user.home”. On
Windows, this is c:\documents\username, on Unixes it’s ˜user. If in doubt where
your home directory is, write a small Java programm that prints out this 
property.

3. on the class path.

There is no referece to a "custom.props" system property.

I tried using such a property and it loaded IN ADDITION to jacorb.properties, 
and not instead of.

[configuration loaded from classpath resource 
file:/home/kevin/development/ucp/conf/jacorb.properties]

[configuration loaded from /home/kevin/development/ucp/conf/jacorb.properties.2]

This presented issues (obviously) but I can work around it if such behaviour is 
desired.

Thanks,
Kevin

Comment 3 Gerald Brose 2004-06-07 15:52:35 UTC
Custom properties are perhaps not advertised, but they are documented
in the Programming Guide :-). (beginning p. 17)

Cheers, Gerald.
Comment 4 Simon McQueen 2004-06-07 15:59:28 UTC
As Gerald points out custom.props are documented in the next two parts of
section 3.1.1.

I will close this as invalid unless you have any objection ?