Oct 31st, 2012, 09:26 AM
PropertyPlaceHolderConfigurer reading ejb-jar.xml
I'm using Spring to create my EJB proxies and Web Services portType. I put some variables parameters such as jndi, endpoints url,etc.. in a environnement.properties file which is read with a PropertyPlaceHolderConfigurer.
The problem is that in my entreprise, the middleware team only wants to change deployment descriptors such as web.xml, ejb-jar.xml... (not *.properties) when moving from Test environnement to Acceptance environnement.
So I would like to put my variables in my DD.
Is there a simple way to use PropertyPlaceHolderConfigurer with DD such as ejb-jar.xml?
thanks in advance.
Nov 9th, 2012, 05:33 AM
No... web.xml and ejb-jar-.xml and other technology specific deployment descriptors aren't processed by spring and never will be...
Editing those from environment to environment is something I wouldn't recommend, you are basically changing your deployment artifact which in my book I, as a developer, cannot garantue the quality of... You should deploy artifacts as is and configuration should be externalized from the artifact in, you probably guessed it, property files...
Tags for this Thread