Skip to Content.
Sympa Menu

grouper-dev - RE: [grouper-dev] 2.1.2 hook writer not writing?

Subject: Grouper Developers Forum

List archive

RE: [grouper-dev] 2.1.2 hook writer not writing?


Chronological Thread 
  • From: Jim Fox <>
  • To: Chris Hyzer <>
  • Cc: Grouper Dev <>
  • Subject: RE: [grouper-dev] 2.1.2 hook writer not writing?
  • Date: Tue, 11 Dec 2012 11:24:14 -0800 (PST)


Possibly saving you some time,

I turned on

hibernate.connection.autocommit = true

and now get the database updates. However, the updates worked
just fine on 1.6 with autocommit off.

What's the effect of autocommit (aside from this working)?
Is there a way for me to issue commit from the hook instead?

Jim



On Tue, 11 Dec 2012, Chris Hyzer wrote:

Date: Tue, 11 Dec 2012 10:59:57 -0800
From: Chris Hyzer
<>
To: Jim Fox
<>,
Grouper Dev
<>
Subject: RE: [grouper-dev] 2.1.2 hook writer not writing?

Can you send me your full hook (or sanitized or whatever)... more info,
grouper.properties entry, etc and I will try to reproduce

Also, what are you running? UI? GSH? Make sure your hook java and
grouper.properties is correct in that env... it should work :)

Thanks,
Chris

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


[mailto:]
On Behalf Of Jim Fox
Sent: Tuesday, December 11, 2012 1:55 PM
To: Grouper Dev
Subject: [grouper-dev] 2.1.2 hook writer not writing?




I'm working on an upgrade to grouper 2.1.2. I have some hooks that
do this operation:

int status = HibernateSession.bySqlStatic().executeSql(
"insert into uw_activity (time, action, group_id, data, actors) values (?, ?,
?, ?, ?)",
GrouperUtil.toList((Object)now.getTime(), (Object) action,
(Object) groupId, (Object) data, (Object) userIds));
log.debug("hook writer " + action + " status: " + status);
// try very simple insert as well
status = HibernateSession.bySqlStatic().executeSql("insert into xxx values
('abcd','efgh','z')");
log.debug("hook extra status: " + status);



On 1.6 this always wrote a record to the 'uw_activity' table. Now I never see
anything show up in 'uw_activity'.
The log shows the status return to be '1'.
Nothing in the 'xxx' table either. It also returns status=1


Grouper debug shows the hook running:

GrouperHooksUtils.executeHook(490) - START: Hook
UWMembershipHooks.membershipPostCommitAddMember id: RKVM6ID7
HibernateSession.<init>(151) - Not using nested transactions, converting
transaction type to: READ_WRITE_NEW
HibernateSession.<init>(151) - Not using nested transactions, converting
transaction type to: READ_WRITE_NEW
GrouperHooksUtils.executeHook(496) - END (normal): Hook
UWMembershipHooks.membershipPostCommitAddMember id: RKVM6ID7 (4ms)

Is there something else I need to do now to get the hooks to write
to the DB?

Jim








Archive powered by MHonArc 2.6.16.

Top of Page