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: Tom Zeller <>
  • To: Chris Hyzer <>
  • Cc: Grouper Dev <>
  • Subject: Re: [grouper-dev] When to use GrouperSession.staticGrouperSession() ?
  • Date: Wed, 14 Apr 2010 22:40:47 -0500
  • Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:from:date :x-google-sender-auth:message-id:subject:to:cc:content-type :content-transfer-encoding; b=XHvGfrd5RgOxprLoYQllXB9Y6xqELdv2e1Bb43YQUtdZfIQe0QtM+tSH+C+S4SEnIo 8THNv8aoBAPnXSxLBLE9gevzPcbsCZxHjc/n4AdIs/CbObXChdNx0lX4ORnY8O06dvt1 a9B1eRjnxiEK7G2G2wVlpVrw+s/Y6pJ10Z5l0=

Right. I guess I was looking for a method like
GrouperSession.staticGrouperSession(Subject) which would return a
threadlocal session started by the given subject. A junit test wasn't
passing and I realized I started a threadlocal root session in the
test setup ... oops.

On Wed, Apr 14, 2010 at 9:41 PM, Chris Hyzer
<>
wrote:
> 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