JBoss Community

Using environment variables in persistence.xml for property name/value pairs

created by Roshan Pradeep in EJB3 - View the full discussion

Hi All

 

I want to use an environment variable in my persistence.xml for property name/value pairs. I tried, but getting this error from XML parser.

 

Environment

Windows 7, JBoss 5.1, EJB3

 

My Change in persistence.xml

 

<properties>

          <property name="server.nodes" value=${server.host.list}/>

</properties>

 

run.bat change

set "JAVA_OPTS=%JAVA_OPTS% -Dorg.jboss.resolver.warning=true -Dserver.host.list=app1,app2,app12"

 

Error

org.jboss.xb.binding.JBossXBException: Failed to parse source: Open quote is expected for attribute "value" associated with an  element type  "property".

 

Is this possible (parameterize the properties in persistence.xml). Thanks.

Reply to this message by going to Community

Start a new discussion in EJB3 at Community