[jboss-jira] [JBoss JIRA] (WFLY-5478) allow custom scoped persistence unit name hint in persistence unit definition
Scott Marlow (JIRA)
issues at jboss.org
Tue Oct 6 15:45:00 EDT 2015
[ https://issues.jboss.org/browse/WFLY-5478?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Scott Marlow updated WFLY-5478:
-------------------------------
Description:
Consider allowing applications to override the scoped persistence unit name, so instead of using names like "test2.ear/w2.war#warPUnit_PU", the application can specify a unique (across all deployments on the app server) name.
The idea is that application deployments can include a persistence unit hint "jboss.as.jpa.scopedname" that specifies the unique scoped persistence unit name that will be used for several internal settings (e.g. hibernate.cache.region_prefix will be set to the scopedname value unless the application specifies a different hibernate.cache.region_prefix value).
The WildFly management console does not yet work with applications that specify the jboss.as.jpa.scopedname. Once this change is merged to WildFly, a management console change should be requested.
was:
Consider allowing applications to override the scoped persistence unit name, so instead of using names like "test2.ear/w2.war#warPUnit_PU", the application can specify a unique (across all deployments on the app server) name.
The idea is that application deployments can include a "Activity
All
Comments
Work Log
History
Activity
Links Hierarchy
Ascending order - Click to sort in descending order
Permalink Edit Delete
smarlow Scott Marlow added a comment - 12 minutes ago
Example output with a quick start deployment that contains persistence unit definition:
<persistence version="2.1"
xmlns="http://xmlns.jcp.org/xml/ns/persistence" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="
http://xmlns.jcp.org/xml/ns/persistence
http://xmlns.jcp.org/xml/ns/persistence/persistence_2_1.xsd">
<persistence-unit name="primary">
<!-- If you are running in a production environment, add a managed
data source, this example data source is just for devleopment and testing! -->
<!-- The datasource is deployed as WEB-INF/hibernate4-quickstart-ds.xml, you
can find it in the source at src/main/webapp/WEB-INF/hibernate4-quickstart-ds.xml -->
<jta-data-source>java:jboss/datasources/Hibernate4QuickstartDS</jta-data-source>
<properties>
<!-- Properties for Hibernate -->
<property name="hibernate.hbm2ddl.auto" value="create-drop" />
<property name="hibernate.show_sql" value="false" />
<property name="jboss.as.jpa.scopedname
> allow custom scoped persistence unit name hint in persistence unit definition
> -----------------------------------------------------------------------------
>
> Key: WFLY-5478
> URL: https://issues.jboss.org/browse/WFLY-5478
> Project: WildFly
> Issue Type: Feature Request
> Components: JPA / Hibernate
> Affects Versions: JBoss AS7 7.1.1.Final, 8.0.0.Final, 9.0.0.Final, 10.0.0.CR2
> Reporter: Scott Marlow
> Assignee: Scott Marlow
>
> Consider allowing applications to override the scoped persistence unit name, so instead of using names like "test2.ear/w2.war#warPUnit_PU", the application can specify a unique (across all deployments on the app server) name.
> The idea is that application deployments can include a persistence unit hint "jboss.as.jpa.scopedname" that specifies the unique scoped persistence unit name that will be used for several internal settings (e.g. hibernate.cache.region_prefix will be set to the scopedname value unless the application specifies a different hibernate.cache.region_prefix value).
> The WildFly management console does not yet work with applications that specify the jboss.as.jpa.scopedname. Once this change is merged to WildFly, a management console change should be requested.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)
More information about the jboss-jira
mailing list