Hi All...

I'm trying to port Spring from 1.2.6 to 2.0.1. I have an Interceptor that extends LocalSessionFactoryBean.


Code:
<bean id="sessionFactory"  class="org.boa.finance.persistence.AuditSessionFactory">
        <property name="dataSource"><ref bean="dataSource"/></property>
        .....

This is instantiated no problems. I have an operation in AuditSessionFactory that makes the call..

Code:
sessionFactory = (SessionFactory)localSessionFactory.getObject();
     final Session session = SessionFactoryUtils.getSession(sessionFactory,false);

Here's some other info

Code:
<bean id="transactionManager" class="org.springframework.orm.hibernate3.HibernateTransactionManager">
        <property name="sessionFactory"><ref bean="sessionFactory"/></property>
    </bean>

     <bean id="hibernateInterceptor" class="org.springframework.orm.hibernate3.HibernateInterceptor">
        <property name="sessionFactory"><ref bean="sessionFactory"/></property>
    </bean>

This works fine in 1.2.6. When I try to run with 2.0.1, I notice during Jboss startup the following..

[AuditSessionFactory] Building new Hibernate SessionFactory

And then I get the error below...

13:39:23,174 ERROR [LogInterceptor] EJBException in method: public abstract org.boa.finance.UserStatus[] org.boa.finance.ejb.SiteAuthorizationService.getAl lUserStatusCodes(), causedBy:
java.lang.IllegalStateException: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
at org.springframework.orm.hibernate3.SessionFactoryU tils.doGetSession(S
essionFactoryUtils.java:367)
at org.springframework.orm.hibernate3.SessionFactoryU tils.getSession(Ses
sionFactoryUtils.java:198)

This is happening on the line

Code:
Session session = SessionFactoryUtils.getSession(sessionFactory, false);

I tried passing true to getSession, but no luck.

Any ideas are appreciated...thanks in advance!