You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Mandy Warren <ma...@gmail.com> on 2014/01/06 22:54:14 UTC
ServerLifeCycleListener query
Hi,
Happy New Year :-)
I have written a class which implements ServerLifeCycleListener and
registers a number of interceptors which are applicable to all my services.
I was just wondering if there was any way to also register JAXRS providers
using this mechanism?
Many thanks
Mandy
Sent from a mobile device
Re: ServerLifeCycleListener query
Posted by Mandy Warren <ma...@gmail.com>.
That worked perfectly, many thanks!
Sent from a mobile device
> On 10 Jan 2014, at 15:54, Andrei Shakirin <as...@talend.com> wrote:
>
> Hi Mandy,
>
> Yep, try org.apache.cxf.jaxrs.provider.ProviderFactory for 2.7.8.
>
> Regards,
> Andrei.
>
>> -----Original Message-----
>> From: Mandy Warren [mailto:mandys.inbox@gmail.com]
>> Sent: Freitag, 10. Januar 2014 15:43
>> To: users@cxf.apache.org
>> Subject: Re: ServerLifeCycleListener query
>>
>> It looks like this class exists on the trunk but not in 2.7.8 cxf version we are
>> using, is there an alternative?
>>
>> Many thanks
>> Mandy
>>
>> Sent from a mobile device
>>
>>> On 7 Jan 2014, at 11:11, Sergey Beryozkin <sb...@gmail.com> wrote:
>>>
>>> Hi Mandy
>>>
>>> Happy New Year to you too !
>>> You can try the following:
>>>
>>> import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
>>>
>>> Endpoint e = server.getEndpoint();
>>> // I don't have an access to my computer right now, there should be a
>>> way to get to the endpoint from Server interface
>>>
>>> ServerProviderFactory factory = (ServerProviderFactory)e.get(
>>> ServerProviderFactory.class.getName());
>>> factory.registerUserProviders(list);
>>> // factory.registerUserProvider(object);
>>>
>>> This should do it
>>> Cheers, Sergey
>>>
>>>
>>> On Mon, Jan 6, 2014 at 11:54 PM, Mandy Warren
>> <ma...@gmail.com>wrote:
>>>
>>>>
>>>> Hi,
>>>>
>>>> Happy New Year :-)
>>>>
>>>> I have written a class which implements ServerLifeCycleListener and
>>>> registers a number of interceptors which are applicable to all my services.
>>>> I was just wondering if there was any way to also register JAXRS
>>>> providers using this mechanism?
>>>>
>>>> Many thanks
>>>>
>>>> Mandy
>>>>
>>>> Sent from a mobile device
>>>
>>>
>>>
>>> --
>>> Sergey Beryozkin
>>>
>>> http://sberyozkin.blogspot.com
>>> Talend - http://www.talend.com
RE: ServerLifeCycleListener query
Posted by Andrei Shakirin <as...@talend.com>.
Hi Mandy,
Yep, try org.apache.cxf.jaxrs.provider.ProviderFactory for 2.7.8.
Regards,
Andrei.
> -----Original Message-----
> From: Mandy Warren [mailto:mandys.inbox@gmail.com]
> Sent: Freitag, 10. Januar 2014 15:43
> To: users@cxf.apache.org
> Subject: Re: ServerLifeCycleListener query
>
> It looks like this class exists on the trunk but not in 2.7.8 cxf version we are
> using, is there an alternative?
>
> Many thanks
> Mandy
>
> Sent from a mobile device
>
> > On 7 Jan 2014, at 11:11, Sergey Beryozkin <sb...@gmail.com> wrote:
> >
> > Hi Mandy
> >
> > Happy New Year to you too !
> > You can try the following:
> >
> > import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
> >
> > Endpoint e = server.getEndpoint();
> > // I don't have an access to my computer right now, there should be a
> > way to get to the endpoint from Server interface
> >
> > ServerProviderFactory factory = (ServerProviderFactory)e.get(
> > ServerProviderFactory.class.getName());
> > factory.registerUserProviders(list);
> > // factory.registerUserProvider(object);
> >
> > This should do it
> > Cheers, Sergey
> >
> >
> > On Mon, Jan 6, 2014 at 11:54 PM, Mandy Warren
> <ma...@gmail.com>wrote:
> >
> >>
> >> Hi,
> >>
> >> Happy New Year :-)
> >>
> >> I have written a class which implements ServerLifeCycleListener and
> >> registers a number of interceptors which are applicable to all my services.
> >> I was just wondering if there was any way to also register JAXRS
> >> providers using this mechanism?
> >>
> >> Many thanks
> >>
> >> Mandy
> >>
> >> Sent from a mobile device
> >
> >
> >
> > --
> > Sergey Beryozkin
> >
> > http://sberyozkin.blogspot.com
> > Talend - http://www.talend.com
Re: ServerLifeCycleListener query
Posted by Mandy Warren <ma...@gmail.com>.
It looks like this class exists on the trunk but not in 2.7.8 cxf version we are using, is there an alternative?
Many thanks
Mandy
Sent from a mobile device
> On 7 Jan 2014, at 11:11, Sergey Beryozkin <sb...@gmail.com> wrote:
>
> Hi Mandy
>
> Happy New Year to you too !
> You can try the following:
>
> import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
>
> Endpoint e = server.getEndpoint();
> // I don't have an access to my computer right now, there should be a way
> to get to the endpoint from Server interface
>
> ServerProviderFactory factory = (ServerProviderFactory)e.get(
> ServerProviderFactory.class.getName());
> factory.registerUserProviders(list);
> // factory.registerUserProvider(object);
>
> This should do it
> Cheers, Sergey
>
>
> On Mon, Jan 6, 2014 at 11:54 PM, Mandy Warren <ma...@gmail.com>wrote:
>
>>
>> Hi,
>>
>> Happy New Year :-)
>>
>> I have written a class which implements ServerLifeCycleListener and
>> registers a number of interceptors which are applicable to all my services.
>> I was just wondering if there was any way to also register JAXRS providers
>> using this mechanism?
>>
>> Many thanks
>>
>> Mandy
>>
>> Sent from a mobile device
>
>
>
> --
> Sergey Beryozkin
>
> http://sberyozkin.blogspot.com
> Talend - http://www.talend.com
Re: ServerLifeCycleListener query
Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi Mandy
Happy New Year to you too !
You can try the following:
import org.apache.cxf.jaxrs.provider.ServerProviderFactory;
Endpoint e = server.getEndpoint();
// I don't have an access to my computer right now, there should be a way
to get to the endpoint from Server interface
ServerProviderFactory factory = (ServerProviderFactory)e.get(
ServerProviderFactory.class.getName());
factory.registerUserProviders(list);
// factory.registerUserProvider(object);
This should do it
Cheers, Sergey
On Mon, Jan 6, 2014 at 11:54 PM, Mandy Warren <ma...@gmail.com>wrote:
>
> Hi,
>
> Happy New Year :-)
>
> I have written a class which implements ServerLifeCycleListener and
> registers a number of interceptors which are applicable to all my services.
> I was just wondering if there was any way to also register JAXRS providers
> using this mechanism?
>
> Many thanks
>
> Mandy
>
> Sent from a mobile device
>
--
Sergey Beryozkin
http://sberyozkin.blogspot.com
Talend - http://www.talend.com