On 02/06/07, Mansour <[EMAIL PROTECTED]> wrote:
Hello every one:
I am trying to access my business  layer from Actions. However, I need
to hold a reference to the business layer facade and access it from any
Actions classes. I am saving the reference to servicesFacade in a
session and retrieving it in the Action. I am having no problem with
this, but I don't know if this is the proper way to do it. Is there
other alternatives ?
I need an advice.


I've done a similair thing and stored a reference to the layer in the
session. However, I extended the base struts 2 action with a
layer-aware interface to get the reference to a layer and an
interceptor to inject the reference. All my actions extend the new
base class and I can retrieve the business layer with a simple
getLayer() method. This means I don't need to fiddle around with the
session object in my actions.

YMMV

Regards
Roger

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

Reply via email to