On 7 February 2012 14:03, Scott Marlow <smarlow(a)redhat.com> wrote:
On 02/07/2012 03:28 AM, Galder Zamarreño wrote:
> (I'd have preferred the cc'd guys had continued with the conversation in the
dev list...)
Its good that you responded on the other email thread, otherwise, I
might of missed this.
>
> So, Hibernate 3.6.x support is a potential requirement coming down the line the in
AS7. Users are asking for it ...
>
> So Scott is voicing his concerns with Hibernate 2LC which now builds custom commands
to deal with evict all situations. The previous solution used existing caches as a
notification bus which was a PITA to maintain.
>
> Module custom commands and their factories are kept at the cache manager level and
they're loaded with the cache manager CL, so that means that the AS7 Infinispan
subsystem is hooked to Hibernate 4.0.x now because on startup, Infinispan loads commands
and their factories, so any custom commands need to be available on at that point. This
makes it hard for AS7 to support other Hibernate versions.
>
> According to Paul, they might be able to workardound this for AS 7.1.1 by allow
attaching specific classloaders to a cache manager, but they don't do it in AS7 7.1.0,
hence why Hibernate and AS7 subsystem need to be within same classloader.
>
> Although Paul's suggestion should work, I still think there's room for
improvement in our custom commands (kinda related to
https://issues.jboss.org/browse/ISPN-1835). There's a difference between cache-level
commands (i.e.
http://goo.gl/OkvU4) and global commands which are not associated with a
particular cache (i.e.
http://goo.gl/isR00). So, the lifecycle and the classloader used
for each should be different.
>
> Thoughts?
I think that describes my concern well.
I'm not that worried about OGM (unless someone wants double buffering
;), its more about users wanting to package in different versions in
Hibernate (newer/older).
Even if someone wanted double buffering, OGM was already upgraded to
use Hibernate 4, so this doesn't apply.
For me, the root issue is that we currently need the Infinispan
classloader to see the Hibernate-Infinispan classloader as a static
dependency. That is a dependency that I would like to avoid.
I also have community users asking to use the Hibernate-Infinispan
second level cache integration with Hibernate 3.6.x against AS7. I
opened an email thread to discuss this on Hibernate-dev ml. I need to
know the direction that we are going (with regard to 2lc integration
with Infinispan), so we make the right patch for Hibernate 3.6.x use (if
we make one at all).
Rather than have Infinispan look for the custom commands via the
Hibernate-Infinispan service loader, could we instead pass them into
Infinispan somehow from the Hibernate-Infinispan module (via a SPI
rather than a service loader?).
I don't think that's a trivial change, but I would like a similar solution.
I have the problem of having the end-user application need to load
custom commands, which seems to be still an unsolvable problem -
unless I start my own Infinispan instance.
Cheers,
Sanne