Wednesday, May 14, 2008

Using JPA in a web application

I usually work creating my entity data model classes using JPA and creating session beans (or stateless/web services beans) in an EJB module to acces this data. Later, I create a web/desktop application to access entities through the previous module.

But sometimes you need/want to do a more quickly/ugly job working with entities directly from your web application. For those (like me today ;)) I put here this link to a JEE5 blueprint named: Design Choices in a Web-only Application Using Java Persistence.
Among other things, It talks about using container or application managed entity managers.

1 comment:

  1. In web applications, sometimes it's useful to consider different ways for managing the entity manager lifecycle. I think using a request scope entity manager is suitable for many situations.

    ReplyDelete

Note: Only a member of this blog may post a comment.