You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Marc Logemann <li...@logemann.org> on 2009/03/18 11:14:21 UTC

LoggingInterceptor and ResourceInjetction

Hi,

i have two questions:

1) I am using the loggingInterceptor via Feature definition on the cxf  
Bus. This works ok but i dont want to log to system.out but to a log  
channel instead. How to achieve that?

2) CXF always tries to inject into webservice classes where i have  
@Resource annotations on properties. This fails. But these @Resource  
annotations were fulfilled by Spring, so CXF dont need to try anyhing  
in that area. How to avoid that?

I expose my webservices via:

     <jaxws:endpoint
             id="workplaceManager"
             implementor="#workplaceDaoImpl"
             address="/WorkplaceManagerService"/>

So as you can see. The implementor is a spring based bean which  
already got its injectios on the properties by Spring. Disabling  
@Resource injection completely would lead that i am missing some  
features like WebserviceContext injection right? I dont use stuff like  
that but perhaps in the future.....

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de





Re: LoggingInterceptor and ResourceInjetction

Posted by Daniel Kulp <dk...@apache.org>.
Slowing working backword through my overloaded  inbox......

On Wed March 18 2009 6:14:21 am Marc Logemann wrote:
> 2) CXF always tries to inject into webservice classes where i have
> @Resource annotations on properties. This fails. But these @Resource
> annotations were fulfilled by Spring, so CXF dont need to try anyhing
> in that area. How to avoid that?

Can you try with CXF 2.2?   2.2 tries to detect if Spring is handling it and 
turns itself off.   The problem is that Spring REFUSES to inject the 
WebServiceContext (they actually have that hardcoded as an exclusion in their 
code) so we HAVE to do that one.   But we do try to detect when we can not do 
it for the others.

> I expose my webservices via:
>
>      <jaxws:endpoint
>              id="workplaceManager"
>              implementor="#workplaceDaoImpl"
>              address="/WorkplaceManagerService"/>
>
> So as you can see. The implementor is a spring based bean which
> already got its injectios on the properties by Spring. Disabling
> @Resource injection completely would lead that i am missing some
> features like WebserviceContext injection right? I dont use stuff like
> that but perhaps in the future.....



-- 
Daniel Kulp
dkulp@apache.org
http://www.dankulp.com/blog

Re: LoggingInterceptor and ResourceInjetction

Posted by Marc Logemann <li...@logemann.org>.
Hi,

please ignore question (1). This is good explained at: http://cwiki.apache.org/CXF20DOC/debugging.html

---
regards
Marc Logemann
http://www.logemann.org
http://www.logentis.de




Am 18.03.2009 um 11:14 schrieb Marc Logemann:

> Hi,
>
> i have two questions:
>
> 1) I am using the loggingInterceptor via Feature definition on the  
> cxf Bus. This works ok but i dont want to log to system.out but to a  
> log channel instead. How to achieve that?
>
> 2) CXF always tries to inject into webservice classes where i have  
> @Resource annotations on properties. This fails. But these @Resource  
> annotations were fulfilled by Spring, so CXF dont need to try  
> anyhing in that area. How to avoid that?
>
> I expose my webservices via:
>
>    <jaxws:endpoint
>            id="workplaceManager"
>            implementor="#workplaceDaoImpl"
>            address="/WorkplaceManagerService"/>
>
> So as you can see. The implementor is a spring based bean which  
> already got its injectios on the properties by Spring. Disabling  
> @Resource injection completely would lead that i am missing some  
> features like WebserviceContext injection right? I dont use stuff  
> like that but perhaps in the future.....
>
> ---
> regards
> Marc Logemann
> http://www.logemann.org
> http://www.logentis.de
>
>
>
>