Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / CORBA / June 2006

Tip: Looking for answers? Try searching our database.

Jacorb - reading properties

Thread view: 
yuval.steinberg@gmail.com - 06 Jun 2006 15:54 GMT
In Jacorb 1.3 I could read properties from the jacorb.properties file
by using:
org.jacorb.util.Environment.getProperty(propertyName);

I'm upgrading now to 2.2.4, but it doesn't work any more.
What should I use ?
Nick Cross - 07 Jun 2006 09:11 GMT
> In Jacorb 1.3 I could read properties from the jacorb.properties file
> by using:
> org.jacorb.util.Environment.getProperty(propertyName);
>
> I'm upgrading now to 2.2.4, but it doesn't work any more.
> What should I use ?

Please see chapter 3.1 of the ProgrammingGuide - it states there how
properties are found and loaded in. It is not recommended to use calls
such as the one above as the internal API may change.

Cheers

Nick

Signature

Nick Cross                                 nick.cross@prismtech.com
OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware

yuval.steinberg@gmail.com - 07 Jun 2006 09:59 GMT
Thanks, but that section only states which files are loaded, and how to
load new property files.

But what I need is to extract one of the properties of these files
(without reading the file myself...), which I was able to do in the
past using the command I stated.

> > In Jacorb 1.3 I could read properties from the jacorb.properties file
> > by using:
[quoted text clipped - 14 lines]
> Nick Cross                                 nick.cross@prismtech.com
> OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware
Nick Cross - 07 Jun 2006 10:37 GMT
JacORB 2.2 onwards has had a new configuration system written for it.
This works on a 'instance' basis so accessing properties in a static way
will be more tricky - why do you wish access a property? Is it a JacORB
one?

Cheers

Nick

--
Nick Cross                                 nick.cross@prismtech.com
OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware

> Thanks, but that section only states which files are loaded, and how to
> load new property files.
[quoted text clipped - 21 lines]
>> Nick Cross                                 nick.cross@prismtech.com
>> OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware
yuval.steinberg@gmail.com - 07 Jun 2006 10:44 GMT
No, it's not a Jacorb's property, but one we added to the Jacorb's
file.
Actually, it's old code which I didn't want to change to much, and
which worked with Jacorb 1.3.30. The only reason I want to extract that
property is to have as few changes as I can in my old code.

Can I do that, or don't I have any other option than to load a property
file by my own ?

> JacORB 2.2 onwards has had a new configuration system written for it.
> This works on a 'instance' basis so accessing properties in a static way
[quoted text clipped - 34 lines]
> >> Nick Cross                                 nick.cross@prismtech.com
> >> OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware
Nick Cross - 07 Jun 2006 11:16 GMT
One option then would to use the static
org.jacorb.config.JacORBConfiguration.getConfiguration
and have your own properties scoped within the JacORB properties file so
you can extract them from the Configuration object. See the
org.jacorb.config hierarchy for the new configuration system.

Cheers

Nick

> No, it's not a Jacorb's property, but one we added to the Jacorb's
> file.
[quoted text clipped - 43 lines]
>>>> Nick Cross                                 nick.cross@prismtech.com
>>>> OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware

Signature

Nick Cross                                 nick.cross@prismtech.com
OpenFusion CORBA & OpenSplice DDS   http://prismtech.com/middleware



Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.