Hi,
        My 2 cents... I had to implement similar functionalities
And I used a plugIn... 
I would go for writing a common GenericService interface, and
And a GenericServiceFactory implemented as plugin (so that you
Get your specific service from the factory).

How do you create specific GenericService implementation? You either
Leave it to the Factory whenever u call
genericFactory.getGenericService()
Or if you know already which services you will need you can specify the 
GenericService class name as init properties for the plugIn. 

Have fun
        marco


-----Original Message-----
From: Kommineni, Sateesh (GE Consumer & Industrial)
[mailto:[EMAIL PROTECTED] 
Sent: 25 February 2004 16:05
To: Struts Users Mailing List
Subject: RE: Common Services across Different Actions.

Hi All,

   Why can't we have this sort of functionality in the Framework itself.
A Base class for a Generic Service and all the Custom Services classes
that User wants can extend that Service and details can be entered in
the struts-config.xml . 
  Right now i am planning to have another xml for services and when the
BaseClass is initialized all the Services are created and are stored in
a map which can be accessed by the Derived ActionClasses.
  Or we can create each service as a Plug-in (in which case we don't
need another XML File) and store them in a Class which is implements the
ServiceLocator pattern and all the Custom Action Classes can get these
Services from that Service Locator.

  Let me know your ideas..

Thanks
Sateesh

   



-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 25, 2004 9:24 PM
To: Struts Users Mailing List
Subject: Re: Common Services across Different Actions.


I like to use a ServiceLocater (created and initialized at application
start)
exposed through the BaseAction.

Rick DeBay

On Wed, 25 Feb 2004 17:50 , Kommineni, Sateesh \(GE Consumer &
Industrial\)
<[EMAIL PROTECTED]> sent:

>
>Hi All,
>
>   In our Application we have identified few common Services which we
are
planning to develop as reusable components.
>
>   The approaches we identified are
>
>  1) Representing each service as a Plug-in so that we can initialize
all the
Service when the Web App is initialized .
>
>  2) Create a BaseAction and have all the resources available in that
Action
class . Sub Class all your Custom Actions from the BaseAction.
>
>Is there any Other Approach that we are missing here  
>
>Thanks a lot
>Sateesh





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


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


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

Reply via email to