-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 
Author Message
 Post subject: Disable CGLIb Optimization
PostPosted: Wed Aug 06, 2008 4:40 pm 
Newbie

Joined: Wed Aug 06, 2008 4:32 pm
Posts: 1
Hi,
I am trying to disable cglib optimization.
I have put following in in hibernate.properties.

hibernate.bytecode.use_reflection_optimizer=false

But Hibernate is still using cglib optimization. Any pointers ??


Hibernate version: 3.2.6..ga
Mapping documents: Annotations
database : MySql

Traces :
com.cds.plugins.hibernate.HibernateSession Creating AnnotationConfiguration
org.hibernate.cfg.annotations.Version Hibernate Annotations 3.2.0.GA
org.hibernate.cfg.Environment Hibernate 3.2.6
org.hibernate.cfg.Environment loaded properties from resource hibernate.properties: {hibernate.cglib.use_reflection_optimizer=false, hibernate.bytecode.use_reflection_optimizer=false}
org.hibernate.cfg.Environment Property [hibernate.cglib.use_reflection_optimizer] has been renamed to [hibernate.bytecode.use_reflection_optimizer]; update your properties appropriately
org.hibernate.cfg.Environment Bytecode provider name : cglib
org.hibernate.cfg.Environment using JDK 1.4 java.sql.Timestamp handling
com.cds.plugins.hibernate.HibernateSession Cache is disabled with no optimization
org.hibernate.cfg.AnnotationBinder Binding entity from annotated class: com.cds.plugins.policyengine.model.Policy
org.hibernate.cfg.annotations.EntityBinder Bind entity com.cds.plugins.policyengine.model.Policy on table POLICY
org.hibernate.cfg.AnnotationBinder Binding entity from annotated class: com.cds.plugins.policyengine.model.Doctor
org.hibernate.cfg.annotations.EntityBinder Bind entity com.cds.plugins.policyengine.model.Doctor on table DOCTOR
org.hibernate.cfg.AnnotationBinder Binding entity from annotated class: com.cds.plugins.policyengine.model.Clinic
org.hibernate.cfg.annotations.EntityBinder Bind entity com.cds.plugins.policyengine.model.Clinic on table CLINIC
org.hibernate.cfg.annotations.CollectionBinder Mapping collection: com.cds.plugins.policyengine.model.Policy.clinics -> CLINIC
org.hibernate.cfg.annotations.CollectionBinder Mapping collection: com.cds.plugins.policyengine.model.Clinic.doctors -> DOCTOR
org.hibernate.connection.DriverManagerConnectionProvider Using Hibernate built-in connection pool (not for production use!)
org.hibernate.connection.DriverManagerConnectionProvider Hibernate connection pool size: 20
org.hibernate.connection.DriverManagerConnectionProvider autocommit mode: false
org.hibernate.connection.DriverManagerConnectionProvider using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://192.168.12.243/policyengine
org.hibernate.connection.DriverManagerConnectionProvider connection properties: {user=policy, password=****}
org.hibernate.cfg.SettingsFactory RDBMS: MySQL, version: 4.1.20
org.hibernate.cfg.SettingsFactory JDBC driver: MySQL-AB JDBC Driver, version: mysql-connector-java-5.0.6 ( $Date: 2007-03-09 22:13:57 +0100 (Fri, 09 Mar 2007) $, $Revision: 6341 $ )
org.hibernate.dialect.Dialect Using dialect: org.hibernate.dialect.MySQLInnoDBDialect
org.hibernate.transaction.TransactionFactoryFactory Using default transaction strategy (direct JDBC transactions)
org.hibernate.transaction.TransactionManagerLookupFactory No TransactionManagerLookup configured (in JTA environment, use of read-write or transactional second-level cache is not recommended)
org.hibernate.cfg.SettingsFactory Automatic flush during beforeCompletion(): disabled
org.hibernate.cfg.SettingsFactory Automatic session close at end of transaction: disabled
org.hibernate.cfg.SettingsFactory JDBC batch size: 15
org.hibernate.cfg.SettingsFactory JDBC batch updates for versioned data: disabled
org.hibernate.cfg.SettingsFactory Scrollable result sets: enabled
org.hibernate.cfg.SettingsFactory JDBC3 getGeneratedKeys(): enabled
org.hibernate.cfg.SettingsFactory Connection release mode: auto
org.hibernate.cfg.SettingsFactory Maximum outer join fetch depth: 2
org.hibernate.cfg.SettingsFactory Default batch fetch size: 1
org.hibernate.cfg.SettingsFactory Generate SQL with comments: disabled
org.hibernate.cfg.SettingsFactory Order SQL updates by primary key: disabled
org.hibernate.cfg.SettingsFactory Order SQL inserts for batching: disabled
org.hibernate.cfg.SettingsFactory Query translator: org.hibernate.hql.ast.ASTQueryTranslatorFactory
org.hibernate.hql.ast.ASTQueryTranslatorFactory Using ASTQueryTranslatorFactory
org.hibernate.cfg.SettingsFactory Query language substitutions: {}
org.hibernate.cfg.SettingsFactory JPA-QL strict compliance: disabled
org.hibernate.cfg.SettingsFactory Second-level cache: enabled
org.hibernate.cfg.SettingsFactory Query cache: disabled
org.hibernate.cfg.SettingsFactory Cache provider: org.hibernate.cache.NoCacheProvider
org.hibernate.cfg.SettingsFactory Optimize cache for minimal puts: disabled
org.hibernate.cfg.SettingsFactory Structured second-level cache entries: disabled
org.hibernate.cfg.SettingsFactory Statistics: disabled
org.hibernate.cfg.SettingsFactory Deleted entity synthetic identifier rollback: disabled
org.hibernate.cfg.SettingsFactory Default entity-mode: pojo
org.hibernate.cfg.SettingsFactory Named query checking : enabled
org.hibernate.impl.SessionFactoryImpl building session factory
sandbox Restricted permission is (java.lang.reflect.ReflectPermission suppressAccessChecks)
sandbox CodeLocation URL is file:/usr/code/cache/HL7Bladelet/HL7Bladelet/cglib-2.1_3.jar
sandbox (java.io.FilePermission /usr/code/cache/HL7Bladelet/HL7Bladelet/cglib-2.1_3.jar read)
sandbox (java.lang.reflect.ReflectPermission suppressAccessChecks)


Top
 Profile  
 
 Post subject: Re: Disable CGLIb Optimization
PostPosted: Wed Aug 13, 2008 8:59 am 
Newbie

Joined: Wed Aug 13, 2008 8:02 am
Posts: 1
Shekhar wrote:
Hi,
I am trying to disable cglib optimization.
I have put following in in hibernate.properties.

hibernate.bytecode.use_reflection_optimizer=false

But Hibernate is still using cglib optimization. Any pointers ??


Try adding @Proxy(lazy=false) to each of your entities. I discover that this annotation is treated like @Entity. Placing it in only your super class won't help.


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 2 posts ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.