[jboss-jira] [JBoss JIRA] Closed: (JBAS-7411) Hibernate deployer not flexible enough to keep up with Hibernate config changes

Brian Stansberry (JIRA) jira-events at lists.jboss.org
Tue Nov 17 15:50:44 EST 2009


     [ https://jira.jboss.org/jira/browse/JBAS-7411?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Brian Stansberry closed JBAS-7411.
----------------------------------

    Fix Version/s: JBossAS-6.0.0.M2
                       (was: JBossAS-6.0.0.M3)
       Resolution: Done


> Hibernate deployer not flexible enough to keep up with Hibernate config changes
> -------------------------------------------------------------------------------
>
>                 Key: JBAS-7411
>                 URL: https://jira.jboss.org/jira/browse/JBAS-7411
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Hibernate service
>    Affects Versions: JBossAS-5.1.0.GA
>            Reporter: Brian Stansberry
>            Assignee: Brian Stansberry
>             Fix For: JBossAS-6.0.0.M2
>
>
> The mechanism for parsing and deploying a hibernate.cfg.xml file is overly fragile and prone to falling out of date with respect to configuration options that Hibernate supports. See http://stackoverflow.com/questions/1443192/jbosscache-as-a-second-level-cache-for-hibernate-in-jboss-5/ for an example of how this has broken.
> 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.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jboss-jira mailing list