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

Deployment plan to override values in web.xml and ejb-jar.xml

 
Kalai Selvi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
All,
Could someone tell me if it is possible to use plan.xml to override <env-entry> values in web.xml and ejb-jar.xml.

I have an entry like,. in web.xml and ejb-jar.xml(one entry for each of my EJBs). In my application, I lookup the value using JNDI like, ic.lookup("java:comp/env/my_env"). If I have hardcoded values in web.xml and ejb-jar.xml, everything works fine. Now I need to use deployment plan to override the value to staging and production. My plan.xml looks like this


Relevant portion of my ejb-jar.xml is



I have been looking on the web for solution, the closest one I found was http://forums.oracle.com/forums/thread.jspa?threadID=971474&tstart=223

But still I am not able to get through this. Please let me know what I miss here.
Thanks
 
Kalai Selvi
Ranch Hand
Posts: 45
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Posting the answer just in case, someone will need in future

<xpath>/web-app/env-entry/env-entry-value</xpath> - this was wrong.

the correct expression is <xpath>/web-app/env-entry/[env-entry-name="bm_env"]/env-entry-value</xpath>

Thanks
Kalai
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic