[hibernate-issues] [Hibernate-JIRA] Commented: (HHH-2153) Not possible to overwrite System property defaults with hibernate.properties (e.g. use cglib bytecode provider in jboss)

Kasra Rasaee (JIRA) noreply at atlassian.com
Fri Aug 15 12:17:06 EDT 2008


    [ http://opensource.atlassian.com/projects/hibernate/browse/HHH-2153?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_30895 ] 

Kasra Rasaee commented on HHH-2153:
-----------------------------------

Shouldn't the order of properties be loaded in the order of 
System first then hibernate.properties?

Changing the container settings wouldn't necessarily be the ideal solution, 
I'd think the application should take precedence over the container settings?

Also we ran into a javassist deserialization problem on remote invocation calls;
when loading some objects containing lazy proxies enhanced by javassist, our
callee application would through an exception since it did not include the javassist 
library in the classpath.

Hibernate has a direct dependency on cglib and not javassist, as a result of
this, when remote invocation tries to deserialize the javassist proxy it would
throw a NoClassDef exception.

The way I see it there are two options: 

1. Add the javassist to the desktop app classpath
2. Change the bytecode provider to cglib
    - since hibernate.properties seems to be completely overwritten, for now we have no choice but to 
change the container setting, now I'm not entirely sure if we can do this since there are hundreds of applications running and any number of them can be impacted.

A different solution (such as changing the order of properties loading) would be nice to have.


Thanks,


Kaz-

> Not possible to overwrite System property defaults with hibernate.properties (e.g. use cglib bytecode provider in jboss)
> ------------------------------------------------------------------------------------------------------------------------
>
>                 Key: HHH-2153
>                 URL: http://opensource.atlassian.com/projects/hibernate/browse/HHH-2153
>             Project: Hibernate3
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 3.2.0.ga
>         Environment: JBoss 4.0.4GA, hibernate 3.2.0.ga
>            Reporter: Armin Haaf
>
> It is not possible to set the bytecode provider by hibernate.properties, because jboss ejb3.deployer sets it in System.properties. System.properties is added to the GLOBAL_PROPERTIES in Environment.class after hibernate.properties and overwrites the values in hibernate.properties. A solution would be to change the order of adding the properties to GLOBAL_PROPERTIES. First add System.properties, then add hibernate.properties, to be able to overwrite as needed

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

        



More information about the hibernate-issues mailing list