Hi all,
currenlty i use the eclipselink2.4 to realize all persistent operations (yet vaadin 6.8.x). My Application
MainApp
extends the com.vaadin.Application and implements com.vaadin.terminal.gwt.server.HttpServletRequestListener.
In the
onRequestStart
method will be
one time
created the javax.persistence.EntityManagerFactory instance (i use the boolean trigger to determinate, whether this instance was already creaded.
If it is needed to save/delete/change operations, that can be initiated on the Vaadin GUI, the helper class will be call, to do it. The entityManagerFactory will be get ( The ThreadLocal pattern is used for
MainApp
to get this entityManagerFactory )
Now i want to migrate to the hibernate. First of all i read this hibernate documentation to avoid the antipaterns trap and other bad smalls
link1
,
link2
,
I found some addons like hibcontainer, but i don’t use that. Furthermore i look at the
com.vaadin.service.ApplicationContext.TransactionListener interface, but i would be don’t use that too.
Is it correct, if i will be realize the persistence using the hibernate like the approach, described above for EclipseLink having regard to the hibernate documentation??
Or the realization of TransactionListener is a Must-Have??
Thanks a lot for your answers!