Retrieving a non pooled session
By default, HST request processing is done by pooled JCR sessions. However, it is possible to get hold of non-pooled JCR sessions. A developer has to make sure to logout these sessions manually, as they are not part of the HST resource lifecycle management.
When using non pooled JCR sessions, take care of logging them out when you are done using them.
Getting a non pooling repository
Repository repository = HstServices .getComponentManager() .getComponent(Repository.class.getName() + ".delegating");
With above non pooling repository instance, you can acquire a session as follows:
Session mySession = repository.login(credentials);
The credentials argument above is
not allowed to be one of the pooled credentials as described at
Retrieving a pooled session.