struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Stasica <gstas...@googlemail.com>
Subject Re: struts2+hibernate+spring - lazyInitaializationException
Date Mon, 19 Jul 2010 17:38:20 GMT
hi,

thanks for your replies

lukasz
i'm not sure where the problem exactly is but after my additional test i
don't think it's s2 related... i'll try to check hibernate

brian
i've done tests with your changes but to no avail... still the same problem
even when my dao implementation class has a transaction annotation i.e.

@Repository("bookBean")
@Transactional
class BookDaoImpl {.
.....



On Mon, Jul 19, 2010 at 6:22 PM, Brian Thompson <elephantium@gmail.com>wrote:

> Looks to me like the session is being closed in the scope of
> hibernateTemplate.get().
>
> I don't see a transactionManager mentioned in the XML ... you could
> try adding something like this in the XML configuration file:
>
>        <bean id="transactionManager"
>
>  class="org.springframework.orm.hibernate.HibernateTransactionManager">
>                <property name="sessionFactory" ref="sessionFactory" />
>        </bean>
>
>        <tx:annotation-driven transaction-manager="transactionManager" />
>
> n.b. I haven't tested the above config, so it probably won't work
> as-is.  Hopefully it helps, though.
>
> -Brian
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
> For additional commands, e-mail: user-help@struts.apache.org
>
>


-- 
Greg Stasica

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message