*
The moose likes BEA/Weblogic and the fly likes Properties Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Properties" Watch "Properties" New topic
Author

Properties

aakash bath
Greenhorn

Joined: Mar 15, 2002
Posts: 12
hi all
What benefit do we get by using Properties
Properties p=new Properties();
p.putContext.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
Regards,
Aakash
Joe McGuire
Ranch Hand

Joined: Mar 19, 2001
Posts: 293
Aakash,
I'm not familiar with the putContext method of the java.util.Properties class (couldn't find it in any of it's parent classes either - deprecated method?).
The environment can also be set using the setProperty method of the Properties class, but I don't see any advantage to doing that unless you're also going to use some of the additional functionality found in the Properties class that's not found in it's parent, java.util.Hashtable. Not that I think it matters too much performance-wise, but it's one less parent's constructor to call.
--------------------
Joe McGuire
Sun Certified Java™ 2 Programmer, BEA WLS Certified Developer
 
GeeCON Prague 2014
 
subject: Properties