File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

env-entry tag

 
aakash bhatt
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What is the use of env-entry tag in deployment descriptor. Can i have an example

Thanks,
aakash
 
Jason Hunt
Ranch Hand
Posts: 51
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
with env-entry tag, the bean providers don't need to hard code some value in their bean code. for example if they want to get the tax rate of current year, they can creat a env-entry in the DD and in the bean code, they just do a jndi lookup to get the value.

 
aakash bhatt
Ranch Hand
Posts: 182
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Jason,

Thanks for the reply.
Could you pl elaborate more, or give a code example on this.

Thanks,
aakash
 
Ryan P. Kane
Greenhorn
Posts: 16
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Here's an example from an assignment I had to do for class last week. I used the env-entry to provide JDBC info, so I didn't have to hard code it.


In my java code, I did the following:



Hope that helps,
Ryan
[ August 05, 2004: Message edited by: Ryan P. Kane ]
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic