Skip to Content.
Sympa Menu

grouper-users - RE: [grouper-users] multiple instances of custom change log consumer with different configurations

Subject: Grouper Users - Open Discussion List

List archive

RE: [grouper-users] multiple instances of custom change log consumer with different configurations


Chronological Thread 
  • From: Chris Hyzer <>
  • To: Scott Koranda <>, grouper-users <>
  • Subject: RE: [grouper-users] multiple instances of custom change log consumer with different configurations
  • Date: Thu, 3 Jul 2014 04:12:31 +0000
  • Accept-language: en-US

The logic method processChangeLogEntries() has a param
ChangeLogProcessorMetadata which as a field:

/**
* name of consumer in config file
* @return consumer name
*/
public String getConsumerName() {
return consumerName;
}

Thanks,
Chris


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


[mailto:]
On Behalf Of Scott Koranda
Sent: Wednesday, July 02, 2014 2:33 PM
To: grouper-users
Subject: [grouper-users] multiple instances of custom change log consumer
with different configurations

Hello,

I have a single custom change log consumer class that extends
ChangeLogConsumerBase. I want to run two instances of this custom
change log consumer independently so that each instance processes
changes to two different sets of groups. I want two instances so that
their operation and maintenance can be decoupled since the two
different sets of groups have significantly different requirements
around provisioning.

I expect that in grouper-loader.properties I can simply do

changeLog.consumer.name01.class = org.my.MyClass
changeLog.consumer.name02.class = org.my.MyClass

I need the class instances, however, to be able to understand if they
are associated with 'name01' or 'name02' so they can carry out
slightly different operations--the overall logic of the consumer is
that same but there are a few differences in how each will need to
process the changes.

I could certainly make a copy of MyClass -> MyClass2 but I would
prefer to have a single code base and deal with the few minor
differences with configuration rather than two distinct classes.

Is there an elegant way for the class to understand if it is
associated with 'name01' or 'name02'?

Thanks,

Scott



Archive powered by MHonArc 2.6.16.

Top of Page