Spring 1.1 + Hibernate 2.1 을 Spring 1.2 + Hibernate 3.0 으로 바 꾸 었 습 니 다.
Spring 1.1+Hibernate 2.1
Spring 1.2+Hibernate 3.0
post , ,
(1) Hibernate3 SessionFactoryUtils doesn't call "setReadOnly(true)" anymore。
open session in view filter, ( bug), filter , 。
(2) Acegi ,Spring 1.2 0.8.2 。
(3) Hibernate 3 reference 2 , 。
(4) Spring 1.1.4 , LazyConnectionDataSourceProxy, lazy connection ( DB )
(5) HibernateException unchecked exception , ,
hibernateTemplate 。
I make use of Hibernate metadata as well as Spring. Here's my list of
all the changes I had to make to run my application with HB3 on
WebLogic. This may repeat some of this information above and is not
meant to be exhaustive.
1. global replace net.sf.hibernate to org.hibernate (be sure to include
the XML configuration files as well)
2. global replace org.springframework.orm.hibernate to
org.springframework.orm.hibernate3 (be sure to include the XML
configuration files as well)
3. global replace net.sf.hibernate.expression.Expression to
org.hibernate.criterion.Expression
4. global replace net.sf.hibernate.expression.Order to
org.hibernate.criterion.Order
5. convert method call getHibernateTemplate.getNamedQuery(Session sess,
String query) to session.getNamedQuery(String query)
6. convert method call getHibernateTemplate().createCriteria(session,
getReferenceClass()) to session.createCriteria(getReferenceClass())
7. Add new EntityMode.POJO parameter as follows to:
ClassMetadata.getPropertyValue(dest,
SkipFields.TCN.toString().substring(1), EntityMode.POJO)
8. Add new EntityMode.POJO parameter as follows to:
classMetadata.getMappedClass(EntityMode.POJO)
9. global replace HibernateProxyHelper.getClass(object) to
HibernateProxyHelper.getClassWithoutInitializingProxy(object);
10. Convert method call: propertyTypes.isPersistentCollectionType()) to
propertyTypes.isCollectionType())
11. Update the DTD as follows:
<!DOCTYPE hibernate-configuration
PUBLIC "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
"http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
12. Replace in the HBM files any instance of “<generator class=”vm” />
to of “<generator class=”native” />
13. Add lazy=”false” to any class or association if you don’t use to use
lazy initialization. However, this is strongly discouraged and thus why
the default is now set to true.
14. Caching is now enabled by default using the EHCache. If you want to
disable this, you must do this from the hibernate.cfg.xml. Again, this
is strongly discouraged.
15. Remove all the previous versions of the .jars associated with
Hibernate and replace them with the new versions.
16. On BEA, you have to move antlr-2.7.5H3.jar to the PRE_CLASSPATH of
the server to run inside BEA because BEA includes this tool in their
system classpath that is inconsistent.
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
다양한 언어의 JSONJSON은 Javascript 표기법을 사용하여 데이터 구조를 레이아웃하는 데이터 형식입니다. 그러나 Javascript가 코드에서 이러한 구조를 나타낼 수 있는 유일한 언어는 아닙니다. 저는 일반적으로 '객체'{}...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.