cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Campbell <ccampb...@quaris.com>
Subject Re: POJO service lifecycle
Date Tue, 21 Aug 2007 19:13:47 GMT
Works! Thanks. Only thing I had to do was add a bean definition for
the implementor, then reference that bean in the implementor
attribute for the jaxws:endpoint - previously I just had the
jaxws:endpoint in the config...

so I now have

<bean id="SomeServiceImpl" class="test.SomeServiceImpl"/>

<jaxws:endpoint id="someService"
                   implementor="#SomeServiceImpl"
                   address="/SomeService" />

Where test.SomeServiceImpl implements DisposableBean

Thanks again.


Ray Krueger wrote:
> Spring is used behind the scenes for everything in CXF though. You
> should be able to implement those. Again, if you're willing to and it
> makes sense.
> 
> I'm also totally guessing on this, give it a shot, see if it works :)
> 
> 
> On 8/21/07, Chris Campbell <ccampbell@quaris.com> wrote:
>> I am using the CXFServlet to load the endpoints, so the spring
>> interfaces do not work. Is there a CXF way to do this?
>>
>> Ray Krueger wrote:
>>> You can probably implement Spring's InitializingBean and
>>> DisposableBean interfaces. Those are called during the BeanFactory
>>> lifecycle.
>>> http://www.springframework.org/docs/api/org/springframework/beans/factory/InitializingBean.html
>>> http://www.springframework.org/docs/api/org/springframework/beans/factory/DisposableBean.html
>>>
>>> This implies that Spring is instantiating your impl, and not cxf. I'm
>>> not sure if that's the case though. This also implies that your ok
>>> with implementing Spring interfaces :P
>>>
>>>
>>> On 8/21/07, Chris Campbell <ccampbell@quaris.com> wrote:
>>>> I have a POJO web service configured as a jaxws endpoint in a
>>>> servlet container.
>>>>
>>>>   <jaxws:endpoint id="someService"
>>>>                   implementor="test.SomeServiceImpl"
>>>>                   address="/SomeService" />
>>>>
>>>> The implementor needs to be informed when it is shutdown, how do I
>>>> get CXF to do this?
>>>>
> 

Mime
View raw message