[jboss-jira] [JBoss JIRA] (WFLY-2933) Can't use system properties to set persistence-unit element content in persistence.xml
Scott Marlow (JIRA)
issues at jboss.org
Fri Feb 14 08:27:28 EST 2014
[ https://issues.jboss.org/browse/WFLY-2933?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12944663#comment-12944663 ]
Scott Marlow commented on WFLY-2933:
------------------------------------
This is a good example of a question that could first be asked on https://community.jboss.org/en/wildfly before creating a bug report. Fewer people see a bug report than a question in the forums. Please post in the forum next time if its possible that your issue isn't actually a bug. I'm sure that you were convinced that it was, so I'll stop rambling about the forums now. :)
You didn't list the steps to recreate but I'm wondering if you knew to update spec-descriptor-property-replacement to true. Probably not as I don't see that described in https://docs.jboss.org/author/display/WFLY8/Documentation.
Open your wildfly/standalone/configuration/standalone.xml (or whichever configuration your using) and change from:
{quote}
<subsystem xmlns="urn:jboss:domain:ee:2.0">
<spec-descriptor-property-replacement>false</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
{quote}
To:
{quote}
<subsystem xmlns="urn:jboss:domain:ee:2.0">
<spec-descriptor-property-replacement>true</spec-descriptor-property-replacement>
<jboss-descriptor-property-replacement>true</jboss-descriptor-property-replacement>
{quote}
I suspect that will help. Let us know.
Scott
> Can't use system properties to set persistence-unit element content in persistence.xml
> --------------------------------------------------------------------------------------
>
> Key: WFLY-2933
> URL: https://issues.jboss.org/browse/WFLY-2933
> Project: WildFly
> Issue Type: Bug
> Security Level: Public(Everyone can see)
> Components: JPA / Hibernate
> Affects Versions: 8.0.0.Final
> Reporter: Grégory Bévan
> Assignee: Scott Marlow
> Fix For: 8.0.1.Final
>
>
> I want to set dinamically content of "jta-data-source" element in persistence.xml file by using system properties passed on command line.
> The following link shows it's possible for previous JBoss version : http://www.mastertheboss.com/jpa-configuration/how-to-use-an-env-variable-in-your-persistencexml
> I've tested on JBoss 7.1.0.Final and it works.
> It goes with the possibility to define expression in datasource subsystem as described in WFLY-2160
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list