Results 1 to 1 of 1
- 07-05-2012, 03:03 PM #1Member
- Join Date
- Jul 2012
- Rep Power
Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in SOAP proxy object at runtime
We have written a server application wrapper which internally uses the SOAP webservices. This server application runs on TOMCAT and should handle multiple clients.
In the current implementation, we used to create a proxy object (for SOAP service) for each client requesting to our server. The proxy object contains the bindingprovider information attached. This proxy object is created at the first call while requesting for startsession.
We used to save this proxy object along with the sessionID in the HashMap for any further request to the server application. So when next time a request comes, we used to fetch the respective service object from HashMap and this object was used to call the new SOAP API.
Now we are facing memory issue (outofMemory) because we save complete objects for each client. So at some point of time the Java memory gets full, if there are many clients working concurrently.
To avoid the same, we are wondering if we can create just one SOAP proxy object for all the clients and at runtime we just keep on changing the bindingprovider credentials value for the proxy object i.e. USERNAME_PROPERTY/PASSWORD_PROPERTY at runtime.
As this credentials needs to be present with proxy object for making every soap api request. Please suggest if we can go for this kind of approach.
- By Johnny2009 in forum New To JavaReplies: 0Last Post: 12-10-2011, 12:24 PM
- By ChrisNY in forum NetBeansReplies: 0Last Post: 08-14-2010, 10:09 AM
- By email@example.com in forum New To JavaReplies: 0Last Post: 03-02-2010, 09:07 AM
- By Onra in forum New To JavaReplies: 1Last Post: 02-26-2010, 01:20 AM
- By nilantha in forum Advanced JavaReplies: 2Last Post: 03-22-2009, 07:41 PM