Skip to Content.
Sympa Menu

grouper-users - Re: Re: RE: [grouper-users] SQL loader jobs, change log consumer and obtaining group description

Subject: Grouper Users - Open Discussion List

List archive

Re: Re: RE: [grouper-users] SQL loader jobs, change log consumer and obtaining group description


Chronological Thread 
  • From: Scott Koranda <>
  • To: Chris Hyzer <>
  • Cc: grouper-users <>
  • Subject: Re: Re: RE: [grouper-users] SQL loader jobs, change log consumer and obtaining group description
  • Date: Fri, 18 Apr 2014 16:37:04 -0500

Hi,

So in my custom change log consumer for a GROUP_ADD event after I have called

String name =
changeLogEntry.retrieveValueForLabel(ChangeLogLabels.GROUP_ADD.name)

and

String uuid =
changeLogEntry.retrieveValueForLabel(ChangeLogLabels.GROUP_ADD.id)

and I want to use the Grouper API to get the description for the group
I think I want to call

Group group = GroupFinder.findByUuid(session, uuid)

To do that I need a Session object.

What is the correct way to obtain a Session object inside of the
processChangeLogEntries() method? How do I dispose of it correctly
when I am finished with it?

Thanks,

Scott


On Thu, Apr 17, 2014 at 10:03 AM, Chris Hyzer
<>
wrote:
> Deep in the api, the only way to create a group is by specifying the
> extension and display extension, then if you want to add a description, you
> can update the group. I think in the loader this happens with one groupsave
> call which does the insert and update in one transaction. This means it's
> impossible for a change log consumer to not get the description. But yes,
> if this isn't ok, and we want the description to not get another change log
> event, I could do that. Chris
>
>
> -------- Original message --------
> From: Scott Koranda
> <>
> Date: 04/17/2014 10:46 AM (GMT-05:00)
> To: Chris Hyzer
> <>
> Cc: grouper-users
> <>
> Subject: Re: RE: [grouper-users] SQL loader jobs, change log consumer and
> obtaining group description
>
>
> On Thu, Apr 17, 2014 at 9:42 AM, Chris Hyzer
> <>
> wrote:
>> Seems like it's not impossible for a race condition to occur, but the
>> change
>> log processing from temp occurs 10 seconds before change log consumers are
>> executed, so I think that update would happen when you need it to almost
>> always.
>
> Ok, thanks.
>
>>If you want me too fix that please open a jira and assign to me
>
> Do you mean "fix" that the group description does not appear in the
> addGroup change log event? Is that what you are willing to consider?
>
> Cheers,
>
> Scott
>
>>
>> Thanks
>> Chris
>>
>>
>>
>> -------- Original message --------
>> From: Scott Koranda
>> <>
>> Date: 04/17/2014 10:02 AM (GMT-05:00)
>> To: grouper-users
>> <>
>> Subject: [grouper-users] SQL loader jobs, change log consumer and
>> obtaining
>> group description
>>
>>
>> Hello,
>>
>> I am using Grouper 2.1.5.
>>
>> When groups are created using an SQL loader job that has a
>> grouperLoaderGroupQuery defined that includes a column for the
>> GROUP_DESCRIPTION the change log has two distinct entries for each
>> loaded group:
>>
>> 1) an 'addGroup' event that includes, among other things, the group
>> name but that does not include the group description
>>
>> 2) an 'updateGroup' event that includes the group description
>>
>> If a change log consumer were to take the addGroup event and do a
>> query using the Grouper API to get the group description is it
>> guaranteed to always find it? Or is it only reliable to obtain the
>> group description after receiving the updateGroup event? What if the
>> database/grouper is under heavy load? Is there any scenario where
>> querying for the group description after receiving the addGroup event
>> can fail under heavy load?
>>
>> Thanks,
>>
>> Scott K



Archive powered by MHonArc 2.6.16.

Top of Page