1 Reply Latest reply: Apr 26, 2012 2:51 AM by jaikiran pai RSS

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

    Roshan Pradeep Newbie

      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.