Announcement Announcement Module
No announcement yet.
SMB outbound channel adapter and SessionFactory per message Page Title Module
Move Remove Collapse
Conversation Detail Module
  • Filter
  • Time
  • Show
Clear All
new posts

  • SMB outbound channel adapter and SessionFactory per message

    Hi SI users,

    I'm using SMB outbound channel adapter to talk to SMB server. In my current scenario SessionFactory has to be created based on message payload since host and folder are part of the message. I have provided a custom implementation of SessionFactory that takes folder and host. Unfortunately with this configuration I would not be able to pass session factory in the declarative way (on the XML level).

    It seems that one solution will be to create and setup SMB outbound channel adapter pragmatically in the service activator and pass the proper session factory implementation there. However it would require to create all beans one-by-one as <int-smb:outbound-channel-adapter> does under the hood

    Do you know any other approaches and want to share them?

    Any ideas are really appreciated.

    Last edited by krzychu; Mar 26th, 2013, 12:28 PM. Reason: typo

  • #2
    Take a look at the dynamic-ftp sample -

    Essentially, you put your SI configuration fragment in a small context file, create the context and send your message in.

    You can destroy the context when you no longer need it, or cache it, like the ftp sample does.