Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] RE: Attestation question

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] RE: Attestation question


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Nathan Kopp <>, "" <>
  • Subject: RE: [grouper-users] RE: Attestation question
  • Date: Fri, 6 May 2011 17:34:08 -0400
  • Accept-language: en-US
  • Acceptlanguage: en-US

You are talking about GrouperSession callback handler right?

The benefit is that it will add the session to the stack (since you could
open one inside of another), and that stack is in a thread local so it
doesn't need to be passed everywhere, and then it will take it out of the
stack in a finally block for you, so everything is nice and tidy. You know
how regular JDBC lends itself to running out of cursors since people don't
close statements in finally blocks properly? It prevents things like that...
There are also callback handlers in the DB code (for reasons above), and in
the transaction code...

Thanks,
Chris

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


[mailto:]
On Behalf Of Nathan Kopp
Sent: Friday, May 06, 2011 4:22 PM
To:

Subject: RE: [grouper-users] RE: Attestation question

What is the benefit of using the callback+handler? Does that properly manage
the threadlocals used by things like group.addMember()?

-Nathan


>>> I haven't really discovered a consistent pattern that would help me to
>>> understand the proper ways to use sessions.
>>
> Anyways, as a rule you should start a GrouperSession as who you want to act
>> as, either a regular subject or GrouperSystem.
>>
>> Another complication is things are only well defined for the UI, WS, and
>> client.  The API is a free-for-all, which is why you are confused...
>
>I, too, have wondered how to use grouper sessions properly in the API.
>
>The data connector plugins for the shibboleth attribute resolver
>re-use a private GrouperSession instance per DataConnector, which then
>uses callbacks :
>




Archive powered by MHonArc 2.6.16.

Top of Page