You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by chamal <pe...@gmail.com> on 2013/09/20 16:29:44 UTC

Proxy Pool

Hi,

I need make HTTPS WS calls based on different WSS security credentials.
Because I am having different WS token, I need to create a pool of proxies
to avoid threading issues.

I have tried multiple methods of creating pools and they are failing on the
second create call. 

I tried using the non spring method in my java class as in the sample -
demo/hw_https/client/ClientNonSpring.java. 

I do the following in a loop. New the service and crate the proxy. It works
for the first loop and fails in the second create attempt.

        SOAPService ss = new SOAPService(wsdlURL, SERVICE_NAME);
        Greeter port = ss.getPort(PORT_NAME, Greeter.class);     


java.lang.IllegalStateException: BeanFactory not initialized or already
closed - call 'refresh' before accessing beans via the ApplicationContext
java.lang.IllegalStateException: BeanFactory not initialized or already
closed - call 'refresh' before accessing beans via the ApplicationContext
                at
org.springframework.context.support.AbstractRefreshableApplicationContext.getBeanFactory(AbstractRefreshableApplicationContext.java:171)
                at
org.springframework.context.support.AbstractApplicationContext.containsBean(AbstractApplicationContext.java:1091)
                at
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:145)
                at
org.apache.cxf.configuration.spring.ConfigurerImpl.configureBean(ConfigurerImpl.java:115)
                at
org.apache.cxf.frontend.ClientProxyFactoryBean.configureObject(ClientProxyFactoryBean.java:104)[179:org.apache.cxf.cxf-rt-frontend-simple:2.6.0.fuse-71-047]
                at
org.apache.cxf.frontend.ClientProxyFactoryBean.create(ClientProxyFactoryBean.java:131)[179:org.apache.cxf.cxf-rt-frontend-simple:2.6.0.fuse-71-047]
                at
org.apache.cxf.jaxws.JaxWsProxyFactoryBean.create(JaxWsProxyFactoryBean.java:156)
                at
org.apache.cxf.jaxws.ServiceImpl.createPort(ServiceImpl.java:469)
                at
org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:336)
                at
org.apache.cxf.jaxws.ServiceImpl.getPort(ServiceImpl.java:323)
                at
javax.xml.ws.Service.getPort(Service.java:46)[:2.0.0.fuse-71-047]

I removed all CSF from spring xml and it did not help either.

What is the recommended method for creating a pool of proxies ? Or how can I
do this differently?

Thanks,
Chamal




--
View this message in context: http://cxf.547215.n5.nabble.com/Proxy-Pool-tp5734316.html
Sent from the cxf-user mailing list archive at Nabble.com.