This week's book giveaway is in the Design forum.
We're giving away four copies of Design for the Mind and have Victor S. Yocco on-line!
See this thread for details.
Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Properties

 
aakash bath
Greenhorn
Posts: 12
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 293
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic