Matt is right - it definitely should work. I'm pretty sure I have done this
in the past without issue. In terms of transaction/session handling the
OpenSessionInViewFilter should take care of making sure the session is
opened/closed once per request. The tx advice interceptors on the manager
methods should open and close transactions on the same session - so you
should definitely not have lazy loading issues. And by default transactions
should be propogated. One thing to check - everything is thread based. I'm
assuming you are not spawning another thread to call the second manager?

Mike


On 7/12/07, Dale Newfield <[EMAIL PROTECTED]> wrote:

Michael Horwitz wrote:
> The thing to check with lazy loading exceptions is whether you have the
> OpenSessionInViewFilter enabled in your web.xml

I do have that enabled, but this isn't in the view layer.  This is while
the action is running, it calls a manager which does stuff.

I have some business logic that must now trigger other business logic to
fire, and that's in another manager.  I've gotten spring to inject that
other manager into the first manager, and I'm calling out from one to
the next.  Within that next manager I get this exception.  Somehow when
one manager is injected into another, it doesn't have knowledge of the
current session?

Problems like these were why I had earlier decided that managers should
only call daos (and not other managers), but Matt said this should
work...  (...and I've yet to find a clean way for this business logic to
cascade around without either calling manager to manager or replicating
code...)  (...I guess I could promote certain methods to BaseManager,
but that is pretty ugly...)

-Dale

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


Reply via email to