• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Changing USERNAME_PROPERTY/PASSWORD_PROPERTY values in service proxy object at runtime?

 
Greenhorn
Posts: 10
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
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.
 
reply
    Bookmark Topic Watch Topic
  • New Topic