Announcement Announcement Module
Collapse
No announcement yet.
How do I share webservicetemplate with different messagesender Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • How do I share webservicetemplate with different messagesender

    Hi there,
    In my application, there is a login form that takes the username and password. Depending on the username/password, I need to make a call using a webservicetemplate. I have a bean - BusinessService which has a webserviceTemplate injected. (defaultURI, marshaller etc. are defined)

    Before actually making a "sendAndReceive" call in the doBusiness method, I would like to switch credentials on the messageSender. Is that threadsafe.

    If two different users log on at the same time and call doBusiness - will I be able to use the injected webserviceTemplate with different message sender.

    Is this how webservicetemplate is designed to be used. Or do I need to instantiate a webservicetemplate everytime with the user credentials and then use it.


    Thanks
    Pramod
Working...
X