[hibernate-dev] Hibernate 3.4 + JBoss Cache 2.5 question on stackoverflow
brian.stansberry at redhat.com
Wed Oct 28 22:25:26 EDT 2009
It's semi-maintained, but TBH it seems rather convoluted and thus
I've opened https://jira.jboss.org/jira/browse/JBAS-7411 for this and
will post a link to that on the stackoverflow thread.
There's a deployer that parses a hibernate.cfg.xml into a metadata
object, which includes the set of configuration properties stored as a
key/value pairs. But the property names you use have to map to
properties on the org.jboss.hibernate.jmx.Hibernate class, because the
deployer uses JBoss MC property injection to populate the
o.j.h.jmx.Hibernate object. So you can't use the regular Hibernate
property names, which include '.' and such. Plus it breaks when
Hibernate adds a new property, a la what this user is seeing.
In its start() method the org.jboss.hibernate.jmx.Hibernate class then
builds a Hibernate Configuration object, by mapping it's property
values back to the standard Hibernate configuration property names.
More sensible IMHO is to inject into the o.j.h.jmx.Hibernate object
the original set of parsed key/value pairs via a new setProperties
(Set<BaseNamedElement>) method. The start() method would then build
the Configuration from that set of properties. This would allow any
valid Hibernate property to be used and would remove the need to use
AS-specific property names. The Hibernate MBean interface would then
just expose whatever properties we've chosen to map.
We should of course also support the legacy AS-specific property names.
On Oct 27, 2009, at 12:22 AM, Galder Zamarreno wrote:
> Hi guys,
> AFAIK, the hibernate MBean is no longer maintained, hence why the new
> properties such as hibernate.cache.region.jbc2.cfg.entity are not
> to Hibernate MBean attributes. Am I correct? Would someone from the
> Hibernate team care to provide an answer?
> Galder Zamarreño
> Sr. Software Engineer
> Infinispan, JBoss Cache
> hibernate-dev mailing list
> hibernate-dev at lists.jboss.org
More information about the hibernate-dev