[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-6047) allow nesting of ServiceRegistry
Steve Ebersole (JIRA)
noreply at atlassian.com
Thu Mar 24 15:21:08 EDT 2011
[ http://opensource.atlassian.com/projects/hibernate/browse/HHH-6047?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=41851#action_41851 ]
Steve Ebersole commented on HHH-6047:
-------------------------------------
Would really love to "discriminate" the types of services expected/allowed in each. For example, "basic" or "non-contextual" services would live in one registry while services which require access to or are better implemented as scoped to the session factory would live in a second. The basic registry would be the parent of the {{SessionFactory}}-specific one.
I went dow this path:
{code}
public interface Service<T> extends Serializable {
}
public interface ServiceRegistry<T> extends Serializable {
public <R extends Service> R getService(Class<R> serviceRole);
public <R extends Service<T>> void registerService(Class<R> serviceRole, R service);
public <R extends Service<T>> void registerServiceInitiator(ServiceInitiator<R> initiator);
}
{code}
but started running into typing issues way beyond my skills.
> allow nesting of ServiceRegistry
> --------------------------------
>
> Key: HHH-6047
> URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-6047
> Project: Hibernate Core
> Issue Type: Task
> Components: core
> Affects Versions: 4.0.0.Alpha1
> Reporter: Steve Ebersole
> Assignee: Steve Ebersole
> Fix For: 4.0.0.Alpha2
>
>
> Parent delegation pattern
--
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