wood burning stoves 2.0*
The moose likes BEA/Weblogic and the fly likes Deployment plan to override values in web.xml and ejb-jar.xml Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Products » BEA/Weblogic
Bookmark "Deployment plan to override values in web.xml and ejb-jar.xml" Watch "Deployment plan to override values in web.xml and ejb-jar.xml" New topic
Author

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

Kalai Selvi
Ranch Hand

Joined: Jan 08, 2007
Posts: 45
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

Joined: Jan 08, 2007
Posts: 45
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
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Deployment plan to override values in web.xml and ejb-jar.xml
 
Similar Threads
BMP Deployment descriptors
Adjusting ejb-jar.xml settings with Admin UI
How to create an environmental entry in WLS?
weblogic 8 to 10 migration..ErrorCouldnot locate bean ejb-jar.xml with EJB1.1
EJB 1.1 Migration from WebLogic 5 to WebLogic 10