File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Properties
 
Similar Threads
Bound & Constraints properties
Common resource for all configurable parameters.
WA #1.....word association
Passing runtime parameters to EJB
How not to hard-code file location in java?