struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Gabriel Belingueres" <belingue...@gmail.com>
Subject Re: Struts - Spring - hibernate and lazy initialization
Date Wed, 02 Apr 2008 20:14:35 GMT
Try to post a stack trace or something more meaningful, but first of
all, as a general architectural guideline, try first to refactor your
code to avoid circular dependencies.

2008/4/2, Yayo <eduyayo@gmail.com>:
> Hi,
>
> I'm developing  a struts - spring based application.
>
> I've got actions-delegates-managers and daos and I use the open session in
> view filter from hibernate.
>
> In some cases I've got to return lazy results to the user so I've got to
> launch a new worker thread and taht new one doesn't have an hibernate
> session attached so I've added hibernateInterceptors to my managers.
>
> The new addition crashes the application because (as I've found on the net)
> there's a circular reference as my DAOs need the sessionfactory and the
> hibernate interceptor too.
>
> I've found that using lazy initializing of one of the services in the
> ciruclar references should do the job but it's still crashing afterall,
> maybe I don't know what is the one to be lazily initialized...
>
> any idea??
>
> --
> "Sit tibi terra levis"
>
> http://yayocaturas.blogspot.com/
>

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org


Mime
View raw message