Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] Proper way to get a Grouper Session in a Change Log Consumer

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] Proper way to get a Grouper Session in a Change Log Consumer


Chronological Thread 
  • From: Chris Hyzer <>
  • To: John Gasper <>, "" <>
  • Subject: RE: [grouper-dev] Proper way to get a Grouper Session in a Change Log Consumer
  • Date: Thu, 11 Sep 2014 18:00:08 +0000
  • Accept-language: en-US

Just start one, and close in a finally block

 

    GrouperSession grouperSession = null;

   

    try {

     

      grouperSession = GrouperSession.startRootSession();

     

      //do work

     

    } finally {

      GrouperSession.stopQuietly(grouperSession);

    }

 

 

Thanks,

Chris

 

From: [mailto:] On Behalf Of John Gasper
Sent: Thursday, September 11, 2014 1:48 PM
To:
Subject: [grouper-dev] Proper way to get a Grouper Session in a Change Log Consumer

 

Hi all,

With regards to Grouper 2.2, what is the proper way to get the Grouper Session for use in a Change Log Consumer? What is more proper?  Doing a startRootSession() & close it upon every invocation of processChangeLogEntries(), or would one do something like private static GrouperSession gs & init that just once? If there is a third, better option that insight would be greatly appreciated.

Thanks,
John


---
John Gasper
IAM Consultant
Unicon, Inc.
PGP/GPG Key: 0xbafee3ef




Archive powered by MHonArc 2.6.16.

Top of Page