[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-5697) Support for multi-tenancy
Steve Ebersole (JIRA)
noreply at atlassian.com
Tue Dec 7 06:03:13 EST 2010
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-5697?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=39304#action_39304 ]
Steve Ebersole commented on HHH-5697:
-------------------------------------
I believe all that is additionally needed to support "partitioned" schemes would be:
* altering the metamodel to understand the tenant attribute in the domain model
* managing the tenant attribute during insertion
* managing the tenant attribute in select statements (ala filters)
* accounting for tenant in PK definitions (technically this is only required if the id values repeat across tenants, but safe either way).
> Support for multi-tenancy
> -------------------------
>
> Key: HHH-5697
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-5697
> Project: Hibernate Core
> Issue Type: New Feature
> Components: core
> Reporter: Steve Ebersole
> Fix For: 4.0.0.Alpha2
>
>
> Thinking that all that is really needed here is the ability to tell the {{Session}} (session creation options?) which tenant it is for. Then, this could be "handled" or "applied" by the {{ConnectionProvider}}
> For example:
> {code}
> Session s = ...;
> s.setTenant( "customer1" );
> {code}
> or somehow passed along to the {{openSession}} call.
> Then this could be passed to the {{ConnectionProvider}}, or maybe the {{Session}} itself is passed along:
> {code}
> public interface ConnectionProvider {
> ...
> public Connection getConnection(String tenant);
> }
> {code}
> or
> {code}
> public interface ConnectionProvider {
> ...
> public Connection getConnection(Session session);
> }
> {code}
> or even another:
> {code}
> public interface ConnectionProvider {
> ...
> public static interface ConnectionOptions {
> public String getTenant();
> ...
> }
> public Connection getConnection(ConnectionOptions options);
> }
> {code}
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://opensource.atlassian.com/projects/hibernate/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the hibernate-issues
mailing list