You are viewing limited content. For full access, please sign in.

Question

Question

Session timeout for LFJRA (Java SDK) users sessions

asked on September 22, 2017 Show version history

We are running Laserfiche Rio 9.1

 

 

Below I have a picture of the local userids in the LF Admin Console that are connecting using the Laserfiche SDK Java.

 

We have the  LF Admin Console repository option set to time out sessions at 200 mins.

It seems that timeout option does not apply to the LFJRA/8.3 users sessions.

1. Is there another system setting that we can change that would timeout the LFJRA/8.3 users sessions?

2. Otherwise, is there a script that you can give us to run that would timeout the LFJRA/8.3 users sessions?

 

 

Thanks

Brian

 

0 0

Answer

SELECTED ANSWER
replied on September 25, 2017

The code sample is in c#. You can run this in a WF SDK script if it is connecting with a user that has the "Manage Connections" privilege.

0 0

Replies

replied on September 22, 2017

The timeout set in the admin console is enforced on the client side because it is application dependent. Can you update the JRA application to detect when it is idle and log the user out? A script that terminates old connections could lead to unintended behavior if the JRA application is not designed to recover.

0 0
replied on September 22, 2017

We have the JRA application set to close the connection and logout when it is complete,

but still there is a bug somewhere and some connections remain.

 

What function or method would you use to detect an idle connection?

 

Thanks!

 

Brian 

0 0
replied on September 22, 2017

I see now, the real issue is that there are "dangling" connections that need to be cleaned up automatically. In that case, a connection cleanup script is probably the best way to go if you can't figure out why the connections aren't closing. It would enumerate the active connections and terminate the JRA connections with an idle time larger than a predefined age. In RepositoryAccess you would accomplish it like this:

foreach (SessionInfo otherSession in Repository.EnumSessions(session))
{
    if (otherSession.SessionId == session.Id)
        continue; // Current session

    if (otherSession.ApplicationName.Contains("LFJRA"))
    {
        TimeSpan idleTime = DateTime.UtcNow.Subtract(otherSession.LastActivityUtc);
        if (idleTime.TotalMinutes > 60)
            Repository.TerminateSession(otherSession.SessionId, session);
    }
}

 

1 0
replied on September 25, 2017

Sorry.

What script language are you showing?

Is this a script we can place inside a Laserfiche Workflow SDK script?

Is Laserfiche Workflow a place to do this?

 

Thanks!

 

0 0
SELECTED ANSWER
replied on September 25, 2017

The code sample is in c#. You can run this in a WF SDK script if it is connecting with a user that has the "Manage Connections" privilege.

0 0
You are not allowed to follow up in this post.

Sign in to reply to this post.