multi-tenant / grails-hibernate-hijacker

Plugin for intercepting Hibernate sessions, events and participate in configuration post processing

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Overide one of the hibernate SessionContext calsses instead?

basejump opened this issue · comments

see recent answer here
http://stackoverflow.com/a/34773630

is there a reason this was not done?

@kimble any insight on this would be great? I know you had a blog post on it but its no longer active. we are maybe resurrecting some of this for a project.Thanks

I usually have a reason, but i rarely remember it and I'm sorry to say this is the case today as well. Overriding the "currentSession" seems to be the obvious way to go.. Perhaps not all sessions are acquired through the CurrentSessionContext implementation? Or it was difficult to hook into this in Grails when hibernate-hijacker was implemented? Dealing with api-changes in Hibernate? Or perhaps I was completely ignorant and implemented a really complex solution to a fairly simple problem :-)

Thanks for getting back to me. Your response is more or less what I expected when I asked you about code from 6 years ago. :-)
What are working on these days?

Hehe if I'm perfectly honest I can have a hard time recalling why I did things the way I did six days ago as well :-) I've moved to Oslo and I'm currently working as a consultant implementing an administrative system for the public health sector.