http://noon.gilead.free.fr/gilead/index.php?page=f-a-q
1) Download ZIP:
http://sourceforge.net/project/showfiles.php?group_id=239931&package_id=291834&release_id=639455
Import jar files into Maven2 repo:
mvn install:install-file -DgroupId=net.sf.gilead -DartifactId=adapter-core -Dversion=1.2.0.29 -Dpackaging=jar -Dfile=*download location*/gilead-1.2.0.29/dist/adapter-core-1.2.0.29.jar
mvn install:install-file -DgroupId=net.sf.gilead -DartifactId=adapter4gwt -Dversion=1.2.0.29 -Dpackaging=jar -Dfile=*download location*/gilead-1.2.0.29/dist/adapter4gwt-1.2.0.29.jar
mvn install:install-file -DgroupId=net.sf.gilead -DartifactId=hibernate-util -Dversion=1.2.0.29 -Dpackaging=jar -Dfile=*download location*/gilead-1.2.0.29/dist/hibernate-util-1.2.0.29.jar
mvn install:install-file -DgroupId=net.sf.beanlib -DartifactId=beanlib -Dversion=3.3.0beta21 -Dpackaging=jar -Dfile=*download location*/gilead-1.2.0.29/adapter-core/lib/beanlib-3.3.0beta21b.jar
mvn install:install-file -DgroupId=net.sf.beanlib -DartifactId=beanlib-hibernate -Dversion=3.3.0beta21 -Dpackaging=jar -Dfile=*download location*/gilead-1.2.0.29/adapter-core/lib/beanlib-hibernate-3.3.0beta21b.jar
2) replace in XYZ.gwt.xml
<inherits name="net.sf.hibernate4gwt.Hibernate4Gwt15" />
with
<inherits name="net.sf.gilead.Adapter4Gwt15" />
3) replace LazyPojo with LightEntity
import net.sf.hibernate4gwt.pojo.java5.LazyPojo;
public class BaseDTO extends LazyPojo
with
import net.sf.gilead.pojo.java5.LightEntity;
public class BaseDTO extends LightEntity
4) replace
import net.sf.hibernate4gwt.core.HibernateBeanManager;
import net.sf.hibernate4gwt.gwt.HibernateRemoteService;
public class SomeClassImpl extends HibernateRemoteService
with
import net.sf.gilead.core.PersistentBeanManager;
import net.sf.gilead.gwt.PersistentRemoteService;
public class SomeClassImpl extends PersistentRemoteService
5) change how you get the beans:
ApplicationContextFactory application = ApplicationContextFactory.getInstance();
setBeanManager((PersistentBeanManager) application.getBean("hibernateBeanManager"));
addressDao = (AddressDao) application.getBean("addressDao");
It also seems like there were some issues with merging arrays that was
fixed in the 1.1.1 version of hibernate4gwt http://hibernate4gwt.sourceforge.net/news.html
We have had some issues with merging objects that contain Lists or
Sets of other objects and getting classcastexception errors. hopefully
going to the new version will fix these issues.
Make sure all classes that extend PersistentRemoteService have these lines in there constructor:
ReplyDeleteXmlBeanFactory application = ApplicationContextFactory.getXmlBeanFactoryInstance();
setBeanManager((PersistentBeanManager) application.getBean("hibernateBeanManager"));