diff --git a/src/reference/antora/modules/ROOT/pages/message.adoc b/src/reference/antora/modules/ROOT/pages/message.adoc index afadf8cb1d..5397739326 100644 --- a/src/reference/antora/modules/ROOT/pages/message.adoc +++ b/src/reference/antora/modules/ROOT/pages/message.adoc @@ -433,4 +433,4 @@ class PiiMessage

extends GenericMessage

{ } ---- -The this `PiiMessageBuilderFactory` could be registered as a bean, and whenever the framework logs the message (e.g. in case of `errorChannel`), the `password` header will be masked. \ No newline at end of file +Then this `PiiMessageBuilderFactory` could be registered as a bean, and whenever the framework logs the message (e.g. in case of `errorChannel`), the `password` header will be masked. \ No newline at end of file diff --git a/src/reference/antora/modules/ROOT/pages/smb.adoc b/src/reference/antora/modules/ROOT/pages/smb.adoc index 6d17fbf470..8f1245c934 100644 --- a/src/reference/antora/modules/ROOT/pages/smb.adoc +++ b/src/reference/antora/modules/ROOT/pages/smb.adoc @@ -95,6 +95,23 @@ public SmbSessionFactory smbSessionFactory() { } ---- +[[smb-session-caching]] +== SMB Session Caching + +The `SmbSessionFactory` initiates a new connection every time when a `Session` is requested. +In most cases that is not necessary and `Session` could be cached. +For that purpose, the `SmbSessionFactory` as mentioned earlier should be wrapped into an instance of `CachingSessionFactory`: +[source,java] +---- +@Bean +public CachingSessionFactory cachingSessionFactory(SmbSessionFactory smbSessionFactory) { + cachingSessionFactory cachingSessionFactory = new CachingSessionFactory(smbSessionFactory, 10); + cachingSessionFactory.setSessionWaitTimeout(1000); + return cachingSessionFactory; +} +---- +And then its bean can be injected into channel adapters described below. + [[smb-inbound]] == SMB Inbound Channel Adapter