]
Steve Ebersole closed HHH-5697.
-------------------------------
Resolution: Fixed
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
Assignee: Steve Ebersole
Fix For: 4.0.0.Alpha2
Time Spent: 13h 4m
Remaining Estimate: 0h
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: