cxf-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Kessel, Christopher" <ckes...@transunion.com>
Subject CXF, don't want it to init lazy Spring beans at startup
Date Tue, 03 Nov 2009 17:27:04 GMT
As a noob to CXF, I'll apologize first if this has been asked. I looked
in the CXF manual, particular the FAQ, and did a quick search on Stack
Overflow and didn't find anything definitive.  Google seems to hint I'm
screwed, but it's hard to tell for sure.

 

The problem: 

Our Spring files defined a number of services as "lazy-init=true".
Essentially, we have lazy beans that only get inited in certain
execution contexts, such as mock services that would only end up being
used in a dev environment.  We have similar cases with both client and
server beans defined in the same spring file, but only one or the other
ends up instantiated depending on whether it's the client or server
running. In fact, the classpath may not even hold the client class in
the classpath if it's the server instance being started.

 

What I'm running into with CXF is the
org.apache.cxf.resource.ResourceManager is causing all the lazy beans to
init, or at least trying to resolve them, and throwing errors since many
of them aren't supposed to run in that particular instance (e.g. lazy
client beans being inited in the server instance).

 

Is there a way to tell CXF to not look at the lazy beans or define some
sort of exclude list? Otherwise I'm looking at a huge refactor of our
Spring files  L. 

 

Thanks,

Chris

 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message