08-31-2007 11:27 PM
AuthenticationUtils.startSession(USERNAME, PASSWORD);
System.out.println("Session started.");
try
{
for (int i = 0; i < 5; i++)
{
Reference reference = new Reference(STORE, null, xpath);
Predicate predicate = new Predicate(
new Reference[] {reference}, STORE, null);
Node[] nodes =
WebServiceFactory.getRepositoryService().get(predicate);
Thread.sleep(1 * 60000);
}
}
finally
{
// End the session
AuthenticationUtils.endSession();
System.out.println("Session ended.");
}
}
09-05-2007 11:39 AM
09-14-2007 09:50 AM
09-17-2007 05:42 AM
07-13-2008 08:02 PM
…So.. my question is what would be the best method to handle this? Force the session to be kept alive or listen (somehow) for session death and then re-establish?
If there's a standard way to do this please forgive my ignorance.
11-23-2009 09:01 AM
12-11-2009 10:41 AM
07-11-2010 08:13 PM
07-16-2010 02:58 AM
As a reply to my own question:
I set the session-timeout of the Alfresco web-app to 0 in web.xml and it seems to do the trick.
My connection stays open for days with nonstop datatraffic from downloading files.
12-02-2010 07:26 PM
AuthenticationUtils.startSession(username, password, timeoutInterval);
…where timeoutInterval is the age of your ticket in milliseconds.AuthenticationUtils.isCurrentTicketTimedOut()
It will return true if the ticket is expired. In this case you might want to destroy the session created during a valid login operation.Tags
Find what you came for
We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.