Should work.. just make sure you only have one EntityManager instance per request. I use a command pattern so I have one place where I can handle the transaction (create transaction before command handler executes and commit afterwards). But command pattern as well as DTO's leads to lots of classes for a simple server request...don't know if I would choose it again (command, command result, command handler, JPA entity, DTO class, possibly DAO class). Also JPA's query language (JPQL) does not support everything that native SQL supports so you have to keep that in mind (but sure you can also execute native SQL queries with JPA if there is no other possibility).
Currently I am looking into myBatis (http://www.mybatis.org/) for a new projects. It uses native SQL and has some nice code generator support. Maybe you should take a look at it, as you already have native SQL for a given database. -- J. -- You received this message because you are subscribed to the Google Groups "Google Web Toolkit" group. To view this discussion on the web visit https://groups.google.com/d/msg/google-web-toolkit/-/6EMadWq1s3oJ. To post to this group, send email to google-web-toolkit@googlegroups.com. To unsubscribe from this group, send email to google-web-toolkit+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/google-web-toolkit?hl=en.