|
View:
New views
2 Messages
—
Rating Filter:
Alert me
|
|
|
CXF, don't want it to init lazy Spring beans at startupAs 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 |
|
|
Re: CXF, don't want it to init lazy Spring beans at startupWhat version of CXF? I know some fixes in this area were added to CXF 2.2.4. Can you provide a small test case? Dan On Tue November 3 2009 12:27:04 pm Kessel, Christopher wrote: > 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 > -- Daniel Kulp dkulp@... http://www.dankulp.com/blog |
| Free embeddable forum powered by Nabble | Forum Help |