7 Replies Latest reply on Mar 22, 2007 9:48 PM by Emmanuel Bernard

    Move *HibernateSession to a Proxy implementation

    Emmanuel Bernard Master

      I am trying to implement http://jira.jboss.com/jira/browse/EJBTHREE-714 and avoid too tight dependency between the container and Hibernate.

      I would like to use a proxy based implementation for TransactionScopedHibernateSession, ExtendedHibernateSession rather than a tradtional implementation approach. It will avoid breakage when a method is added to either
      org.hibernate.classic.Session.class
      org.hibernate.engine.SessionImplementor.class
      org.hibernate.jdbc.JDBCContext.Context.class
      org.hibernate.event.EventSource.class

      I am looking for something similar to http://fisheye.jboss.org/browse/Hibernate/branches/Branch_3_2/Hibernate3/src/org/hibernate/context/ThreadLocalSessionContext.java?r=10125
      method #wrap()

      Does anyone see something bad in this strategy?