The <inherits> element only affects service attributes. So, your child
service will need to invoke the parent service.
-Adrian
On 3/21/2013 7:07 AM, Deepak Agarwal wrote:
> Hello,
>
> I have a requirement where I want to keep common 'operations' (not
> attributes) in one service and then want to extend it with several
> services. Here, I want that while running child services base service
> method gets run first (just in a normal polymorphism concept).
>
> Is it possible to define these services in services.xml OOTB ?
>
> In my knowledge so far services defined in the services.xml can
> inherit/override the attributes but the following doesn't work
>
> <service name="ParentService" engine="groovy"
> location="component://mycomp/webapp/mycomp/WEB-INF/action/folder/Parent.groovy"></service>
>
> <service name="ChildService" engine="groovy"
> location="component://mycomp/webapp/mycomp/WEB-INF/action/folder/Child.groovy">
> <implements service="ParentService"/>
> </service>
>
> Or, probably only 'implements' is supported and hence only interfaces can
> be implemented and no support for extending services.
>