Forums

Home » Liferay Portal » English » 6. Portal Framework »

Combination View Flat View Tree View
Threads [ Previous | Next ]
toggle
zheng guang peng
Liferay Without Hibernate
July 31, 2008 6:23 PM
Answer

zheng guang peng

Rank: New Member

Posts: 1

Join Date: June 19, 2008

Recent Posts

Hi :

I’m a user of liferay for some times .

Now I have a question about the architecture of liferay and want to get some help from yours。

From http://www.liferay.com/web/guest/products/portal/architecture/spring_hibernate

I saw the following words:

All data is persisted using Hibernate and is called through the POJO implementations. Liferay used to rely on CMP technology to achieve persistence, but switched over to Hibernate because of its raw speed and flexibility. Liferay is database agnostic and can run on a variety of popular databases.



Yes, hibernate can do this well , it can support many databases and efficient 。 But now , I have a question , In my project , I used other Object Relation Mapping tools ,such as SQL2JAVA . and on the other side,



I’m not familiar with hibernate too . Then now I want to use sql2java instead of hibernate as the persistence layer in Liferay .



I have studied this for several days .And I think this can be done in theory ,and also have some clues :



(1) change the tools , especially the class : ServiceBuilder.java in package com.liferay.portal.tools.servicebuilder

(2) some thing about transaction

(3) xml configure file





I wonder this is not enough and get some more help or advice on this . I can see it a big work , also to keep the more muture version of liferay ,I have more to do .





Very thanks ......
Ganesh Ram
RE: Liferay Without Hibernate
July 31, 2008 8:04 PM
Answer

Ganesh Ram

Rank: Regular Member

Posts: 201

Join Date: February 5, 2008

Recent Posts

Hi Zheng,

I think previous versions of LR were relying only on Hibernate, The Session and Query classes that were used , were the Hibernate Objects.

But now I observe that, LR has their own top level Session and Query objects (they dont use Hibernate ones as the top level any more).

There is a SessionImpl class that takes the HibernateSession in its constructor.
There is also a QueryImpl that takes the HbernateQuery in its constructor.

The purpose of these changes (abstractions) could be that they dont want to couple LR to Hibernate anymore.
If any one wants to use other ORMs like JDO, etc, you would have to have a class like JDOSessionImpl, that takes the JDOSession in its constructor, a JDOQueryImpl that takes JDOQuery, and so on...

HTH,
Ganesh
Michael Saechang
moved thread.
August 1, 2008 10:31 AM
Answer

Michael Saechang

LIFERAY STAFF

Rank: Liferay Master

Posts: 573

Join Date: November 19, 2007

Recent Posts

moved to Portal Framework.
-mike