Results 1 to 2 of 2

Thread: Spring Integration XMPP for MULTIPLE OAuth Connections.

  1. #1

    Question Spring Integration XMPP for MULTIPLE OAuth Connections.

    Hi,

    I am writting a web service that receives an gtalk 'access_token' and should get friends and send messages throw gtalk from and to multiple users.

    Based on spring integration xmpp sample code and the manual, I was able to make it working for a SINGLE user with oauth by writting my own ConnectionConfiguration setting (SASL Mechanism) as I needed and injecting this xmpp connection as a singleton/normal spring bean directly into the "outbound-channel-adapter" name space
    rather than use "xmpp-connection" namespace to create the connection.

    I am new with Spring Integration and my challange starts exactly because my web service will serve multiple different users simultaneously. In other words, I can not use the XMPPConnection as a singleton into the "outbound-channel-adapter" namespace once each different user has different oauth data.

    Do you have any suggestion to solve this situation with spring integration?

    Thanks in advance.

  2. #2
    Join Date
    Oct 2005
    Location
    Boston, MA
    Posts
    2,840

    Default

    You can explicitly provide the xmpp-connection reference to the adapter rather than relying on the default bean name (which is "xmppConnection"). That way you can define multiple XmppConnection beans. In fact, you can use the xmpp-connection element in the XML namespace; just be sure to provide an explicit value for its "id" attribute rather than relying on the default there as well.

    Hope that helps.
    -Mark

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •