Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] When to use GrouperSession.staticGrouperSession() ?

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] When to use GrouperSession.staticGrouperSession() ?


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Tom Zeller <>, Grouper Dev <>
  • Subject: RE: [grouper-dev] When to use GrouperSession.staticGrouperSession() ?
  • Date: Wed, 14 Apr 2010 22:41:27 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

Well, the staticGrouperSession is not a traditional static, it's a
threadlocal. So when your thread starts one, then anywhere in the thread can
use that with GrouperSession.staticGrouperSession()... we created that so we
don't have to pass it around or store it somewhere, so might as well use it,
right?

Thanks,
Chris

-----Original Message-----
From:


[mailto:]
On Behalf Of Tom Zeller
Sent: Wednesday, April 14, 2010 5:42 PM
To: Grouper Dev
Subject: [grouper-dev] When to use GrouperSession.staticGrouperSession() ?

Chris,

Should the grouper DataConnectors for shibboleth use
GrouperSession.staticGrouperSession() ? (No)

Instead, they should call GrouperSession.start(Subject) and then store
the GrouperSession as a class variable ? (Yes)

It's OK for the stored GrouperSession class variable to be long-lived ? (Yes)

Or should I start a new session every time I query Grouper for data ? (No)

I started using GrouperSession.staticGrouperSession(), but then
realized that this would use any grouper session stored in the jvm,
which wasn't what I wanted, since the subjectId used to start the
session needs to be configurable.

Thanks!
TomZ



Archive powered by MHonArc 2.6.16.

Top of Page