when I do,
final ResourceResolver resourceResolver =
resolverFactory.getAdministrativeResourceResolver(null);
final Session session = resourceResolver.adaptTo(Session.class);
....
do I need to call session.logout();?
maybe
Session session = null;
try {
resolver = resolverFactory.getAdministrativeResourceResolver(null);
session = resolver.adaptTo(Session.class);
//spawn thread.. pass session..etc
} catch (...) {
} finally {
if (session != null && session.isLive()) {
session.logout();
}
}
If I spawn threads and pass session, I'll have to pass call back too.
session.logout() in finally block will cause problem with the spawned
threads.
Or, do I have to session.logout() at all given I get the Session object
through
resolverFactory.getAdministrativeResourceResolver(null).adaptTo(Session.class)
??
Thanks.
Sam
On Wed, Dec 15, 2010 at 10:31 AM, Jean-Christophe Kautzmann <
[email protected]> wrote:
> Hi,
>
> this is to let you know that a tutorial about 'Getting Resources and
> Properties in Sling' [1] has been added to the Sling documentation.
>
> Cheers,
> JC
>
> [1]
> http://sling.apache.org/site/getting-resources-and-properties-in-sling.html
>
>