File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes EJB and other Java EE Technologies and the fly likes env-entry tag Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "env-entry tag" Watch "env-entry tag" New topic

env-entry tag

aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
What is the use of env-entry tag in deployment descriptor. Can i have an example

Jason Hunt
Ranch Hand

Joined: Sep 09, 2002
Posts: 51
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.

SCJP, SCWCD, SCBCD, SCDJWS, OCA9i,<br />IBM Certified WAS5.0 Admin<br />IBM Certified Solution Developer - WebSphere Studio 5.0<br />IBM Certified Solution Developer - XML and related Technologies
aakash bhatt
Ranch Hand

Joined: Jan 09, 2003
Posts: 182
Hi Jason,

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

Ryan P. Kane

Joined: Jun 18, 2004
Posts: 16
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,
[ August 05, 2004: Message edited by: Ryan P. Kane ]
I agree. Here's the link:
subject: env-entry tag
It's not a secret anymore!