title: No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here
body: <p>What is this error about? "<strong>No Hibernate Session bound to thread, and configuration does not allow creation of non-transactional one here</strong>".
  My spring config file looks something like this.</p>
  
  <pre><code>&lt;bean id="jndiDataSource"
      class="org.springframework.jndi.JndiObjectFactoryBean"&gt;
      &lt;property name="jndiName"&gt;
          &lt;value&gt;java:/devDS&lt;/value&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  &lt;bean id="stsaDBFactory"
      class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"&gt;
      &lt;property name="dataSource" ref="jndiDataSource" /&gt;
      &lt;property name="annotatedClasses"&gt;
          &lt;list&gt;
              &lt;value&gt;xx.yy.zz.User&lt;/value&gt;
              &lt;value&gt;xx.yy.UserResponse&lt;/value&gt;
  
          &lt;/list&gt;
      &lt;/property&gt;
      &lt;property name="hibernateProperties"&gt;
          &lt;props&gt;
              &lt;prop key="hibernate.show_sql"&gt;true&lt;/prop&gt;
              &lt;prop key="hibernate.hbmddl.auto"&gt;create&lt;/prop&gt;
          &lt;/props&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  
  &lt;!-- ################################### Aspects ################################################## --&gt;
  
  &lt;bean id="txManager"
      class="org.springframework.orm.hibernate3.HibernateTransactionManager"&gt;
      &lt;property name="sessionFactory"&gt;
          &lt;ref local="stsaDBFactory" /&gt;
      &lt;/property&gt;
  &lt;/bean&gt;
  </code></pre>
  
  <p>All the DAO test passes when i test them outside of the container using junit. When I deploy it in jBoss as a portal app,I get this exception. Also it works fine if i remove the portal specific configuration and make it a simple web app and deploy it on jboss.Any idea?</p>