Win a copy of Think Java: How to Think Like a Computer Scientist this week in the Java in General forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

XML RPC

 
Gaurav.S Singh
Greenhorn
Posts: 5
Eclipse IDE Java Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic