Well, warp-persist became Guice-Persist... and it is part of 3.0:

<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-persist</artifactId>
<version>3.0-rc3</version>
</dependency>

<dependency>
<groupId>com.google.inject.extensions</groupId>
<artifactId>guice-servlet</artifactId>
<version>3.0-rc3</version>
</dependency>

cheers

Cristiano

On 10/03/11 12:01, Witold Czaplewski wrote:
IMO warp-persist is dead and Guice 3.0 should be final soon (rc3 is out now):
http://code.google.com/p/google-guice/downloads/list


Witold

Am Thu, 10 Mar 2011 15:31:19 +0100
schrieb Bas Gooren<b...@iswd.nl>:

Which is basically warp-persist, but integrated into guice. But as far
as I know, it will be only be integrated as of guice 3.0;

Bas

Op 10-3-2011 15:29, nino martinez wael schreef:
I'd go for guice persist if thats an option..

2011/3/10 Bas Gooren<b...@iswd.nl>

Have a look at databinder or warp-persist for a better implementation.

Should you go with your own implementation, do not forget to clear the
ThreadLocal at the end of the request to prevent:
a) leaking
b) re-using an EntityManager from a previous request (most if not all
application servers use a thread pool)

Bas

Op 10-3-2011 13:12, Duro schreef:

   Hi guys, is this an option to store the JPA entity manager for a wicket
webapp:
public class DBUtil {
     private static EntityManagerFactory entityManagerFactory = Persistence
             .createEntityManagerFactory("db");
     private static ThreadLocal<EntityManager>   emHolder = new
ThreadLocal<EntityManager>() {
         protected EntityManager initialValue() {
             return entityManagerFactory.createEntityManager();
         };
     };

     public static User getUser(String userName) {
         return emHolder.get().find(User.class, userName);
     }

..................

If not, thanks for possible better solutions, Juraj

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@wicket.apache.org
For additional commands, e-mail: users-h...@wicket.apache.org

Reply via email to