Hi,

I have a server CXF - OSGi, as delared

Bus bus = BusFactory.*getDefaultBus*();

WorkQueueManager wqm = bus.getExtension(WorkQueueManager.*class*);

AutomaticWorkQueueImpl wq = *new* AutomaticWorkQueueImpl("udp-transport");

wq.setHighWaterMark(25); ///number of threads, *min*: 5, max: 2^31-1,
default: 25

wq.setQueueSize(64); ///queue size, *min*: 1, max: 2^31-1, default:256

     //System.out.println("5th and 1mem");

//any other settings here

wqm.addNamedWorkQueue("udp-transport", wq);

JaxWsServerFactoryBean factory = *new* JaxWsServerFactoryBean();

factory.setAddress("udp://192.168.56.1:9393/print");

factory.setServiceClass(Service.*class*);

factory.setServiceBean(*this*);

factory.getInInterceptors().add(*new* LoggingInInterceptor());

factory.getOutInterceptors().add(*new* LoggingOutInterceptor());

factory.create().start();

I use my two queues to save requests and responses at server side.

 inputList = *new* ConcurrentLinkedQueue<Job>();

returnList = *new* CopyOnWriteArrayList<Job>();

inputList saves requests from clients

returnList saves results of requests.

 When a client sends a message to the server, the server saves this message
into inputList and then looks for results of this message in returnList and
returns it to the client

An independent thread reads inputList and calculate it, then returns
results to returnList

 Problem: I run 100 clients sending msgs at the same time to server. With
the above configuration, server can receive 91 msgs and RETURNS also these
91 msgs to client.

 However, there are only 62 clients receiving the returns, although I set
timeout of clients with a high value (the waiting time to receiving the
results). Clients are configured as follows

 factory = *new* JaxWsProxyFactoryBean();

factory.getInInterceptors().add(*new* LoggingInInterceptor());

factory.getOutInterceptors().add(*new* LoggingOutInterceptor());

factory.setServiceClass(Service.*class*);

 factory.setAddress("udp://192.168.56.1:9393/print");

Map<String, Object> props = *new* HashMap<String,Object>();

props.put("cxf.synchronous.timeout", *new* Integer(3000000));

factory.setProperties(props);

service = (Service) factory.create();

I think this problem is related to connection timeout between client and
server apart from "cxf.synchronous.timeout" value of a client.

 *Question:*

I can configure the connection timeout at the server or client side, can't
i? How to configure the connection timeout ?

Best regards,

Reply via email to