[
http://opensource.atlassian.com/projects/hibernate/browse/HHH-5697?page=c...
]
Steve Ebersole updated HHH-5697:
--------------------------------
Description:
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}
was: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}}
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....
-
For more information on JIRA, see:
http://www.atlassian.com/software/jira