Hi all,
I just noticed that "ISPN-4276 - Make JPA cache store work in Karaf"
was resolved.
I trust that a single instance might work now, but we need to take
into considerations some limitations of running Hibernate in OSGi, in
particular the caveats documented here:
http://docs.jboss.org/hibernate/orm/4.2/devguide/en-US/html/ch17.html#d5e...
The classloader being overriden by an OSGi deployment, it overrides a
static which affects all instances of Hibernate running in a specified
classloader. This is meant to be fixed in Hibernate ORM 5.0.
Considering that a JPACacheStore can handle a single entity, and
consequentially we need to suggest users to use a separate Cache for
each type - but you can't give this suggestion when running in Karaf
so "work in Karaf" is still needing some love unless we intend to
resolve only the single Cache - single type use case.
This is in addition of the functional limitations (like no support for
relations) that we already discussed in a different context: in OSGi,
you can't run more than one JPACacheStore currently.
Where should these limitations be tracked?
-- Sanne