File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Web Services and the fly likes XML RPC Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Web Services
Bookmark "XML RPC " Watch "XML RPC " New topic
Author

XML RPC

Gaurav.S Singh
Greenhorn

Joined: Feb 04, 2012
Posts: 5

Hi all,

I need a best way to implemented this logic

I have to build a XMLRPC server using Apache XML RPC API 3.1.x, my XMLRPC server have more than one client at a time.
XMLRPC server have connections to other server (near 8 to 10) by using these server's connection it process client requests and and send back responses to its client , connections to other server are not thread safe and not serilizable in nature (i put all these connection objects in side a hash map or Hash table ), but i have to keep alive(to keep alive a thread also send keep alive command to these connections on a scheduler basis ) these connections all time .Due connections are not serialized/threadsafe i can process one client request at a time (one kind of request), i want to add a queue to listen a client request and one by one process them ,
Due to multithread nature of XMLRPC server it listen all the request coming in a single time instance due to this a java Heap out of memory problem comes (because all Request Workers are try to use shared resource(Connections hash map or hash table) ),

I can not use connection pooling due non serilizable nature of connections ,

As per my perception ,if i use a request and response queue and process one request and send its response at a time the problem is solved but i am unable to trace request ...and there is no clue how to implement a queue to log the requests .

Kindly suggest me a way to implement this , are some new way to implement this i am open to change my way or API's /architecture .
i also Submitted a code view of current developed server .
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML RPC