[jpa-spec issues] [JIRA] Commented: (JPA_SPEC-17) Dynamic persistence unit
- From: "arjan tijms (JIRA)" <
- Subject: [jpa-spec issues] [JIRA] Commented: (JPA_SPEC-17) Dynamic persistence unit
- Date: Wed, 24 Apr 2013 16:20:58 +0000 (UTC)
- Auto-submitted: auto-generated
arjan tijms commented on JPA_SPEC-17:
With that method, how would you actually add a new persistence unit at
runtime, or alternatively let an existing persistence unit point to a
> Dynamic persistence unit
> Key: JPA_SPEC-17
> URL: https://java.net/jira/browse/JPA_SPEC-17
> Project: jpa-spec
> Issue Type: New Feature
> Reporter: likenootherufo
> Assignee: ldemichiel
> Without changing code and redeploying my application, I need to be able to
> switch persistence units in some of my EJBs based on client connected to
> It is similar to multitenancy, but whereas there a single DB is divided
> into equal shares and shared between multiple tenants, here a single tenant
> wants multiple DBs appearing as a single one.
> During runtime based on the client connected to the EJB, the specific
> database should be selected.
> Currently I achieve this using JDBC connections and just changing the
> database connection details based on client connected.
> The database connection details are stored in the main system database and
> retrieved when the client connects.
> This allows the system to grow with ease as new client databases can be
> created on the fly and simply linked to the client
> in the database.
> Ideally I would like to dynamically add new persistence units to the system
> (persistence.xml) and then in my database
> link these persistence units to a given client. When the client connects,
> the system loads the required persistence unit.
This message is automatically generated by JIRA.
If you think it was sent incorrectly contact one of the administrators:
For more information on JIRA, see: http://www.atlassian.com/software/jira