You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@aries.apache.org by LongkerDandy <lo...@gmail.com> on 2010/09/28 10:48:58 UTC
BluePrint service with abstract class
Hi
I know I can export a service with a implemented interface.
Can I export a service from a extending abstract class?
Thanks
LongkerDandy
Re: BluePrint service with abstract class
Posted by LongkerDandy <lo...@gmail.com>.
Nevermind, I should ref to javax.servlet.Servlet
On Tue, Sep 28, 2010 at 10:11 PM, LongkerDandy <lo...@gmail.com>wrote:
> I'm try to export a http service like this:
> <bean id="webconsole"
> class="org.chii2.medialibrary.web.WebConsoleServlet">
> </bean>
>
> <service ref="webconsole" interface="javax.servlet.http.HttpServlet">
> <service-properties>
> <entry key="alias" value="/medialibrary" />
> </service-properties>
> </service>
> But it doesn't seems to work with Felix HTTP(Whiteboard) Service.
> If I use activator instead, it will work then.
> Do I miss something?
>
> Regards
> LongkerDandy
>
>
> On Tue, Sep 28, 2010 at 5:07 PM, Timothy Ward <ti...@apache.org>wrote:
>
>>
>> Hi,
>>
>>
>>
>> That is absolutely fine. The "interface" attribute of the service and
>> reference elements does not refer to a Java interface, but to API
>> interface. If the abstract class is your API then that is what you
>> should export.
>>
>>
>>
>> Regards,
>>
>>
>>
>> Tim
>>
>> ________________________________
>> > Date: Tue, 28 Sep 2010 16:48:58 +0800
>> > Subject: BluePrint service with abstract class
>> > From: longkerdandy@gmail.com
>> > To: aries-user@incubator.apache.org
>> >
>> > Hi
>> >
>> > I know I can export a service with a implemented interface.
>> > Can I export a service from a extending abstract class?
>> >
>> > Thanks
>> > LongkerDandy
>>
>>
>
>
Re: BluePrint service with abstract class
Posted by LongkerDandy <lo...@gmail.com>.
I'm try to export a http service like this:
<bean id="webconsole"
class="org.chii2.medialibrary.web.WebConsoleServlet">
</bean>
<service ref="webconsole" interface="javax.servlet.http.HttpServlet">
<service-properties>
<entry key="alias" value="/medialibrary" />
</service-properties>
</service>
But it doesn't seems to work with Felix HTTP(Whiteboard) Service.
If I use activator instead, it will work then.
Do I miss something?
Regards
LongkerDandy
On Tue, Sep 28, 2010 at 5:07 PM, Timothy Ward <ti...@apache.org>wrote:
>
> Hi,
>
>
>
> That is absolutely fine. The "interface" attribute of the service and
> reference elements does not refer to a Java interface, but to API
> interface. If the abstract class is your API then that is what you
> should export.
>
>
>
> Regards,
>
>
>
> Tim
>
> ________________________________
> > Date: Tue, 28 Sep 2010 16:48:58 +0800
> > Subject: BluePrint service with abstract class
> > From: longkerdandy@gmail.com
> > To: aries-user@incubator.apache.org
> >
> > Hi
> >
> > I know I can export a service with a implemented interface.
> > Can I export a service from a extending abstract class?
> >
> > Thanks
> > LongkerDandy
>
>
RE: BluePrint service with abstract class
Posted by Timothy Ward <ti...@apache.org>.
Hi,
That is absolutely fine. The "interface" attribute of the service and
reference elements does not refer to a Java interface, but to API
interface. If the abstract class is your API then that is what you
should export.
Regards,
Tim
________________________________
> Date: Tue, 28 Sep 2010 16:48:58 +0800
> Subject: BluePrint service with abstract class
> From: longkerdandy@gmail.com
> To: aries-user@incubator.apache.org
>
> Hi
>
> I know I can export a service with a implemented interface.
> Can I export a service from a extending abstract class?
>
> Thanks
> LongkerDandy