Check out [1] for some sample code.
[1]
http://weblogs.java.net/blog/2005/12/04/introduction-using-java-persistence-api-web-application-java-ee-environment
glassfish_at_javadesktop.org wrote:
> Hi everyone !
> I'm doing a little application with jsf/ejb/glassfish/eclipseLink
>
> I'm trying to persist some objects in my database but they are just staying the time of the session, when I restart glassfish they have dissapeared from the base
> Before i used an EntityTransaction et with a persist() I did a begin and after my code a commit.
> But if have an error that say that I can't une an EntityTransation with JPA.
>
> So how can I persist an object in base with JTA ?? :/
> [Message sent by forum member 'manta7']
>
> http://forums.java.net/jive/thread.jspa?messageID=394953
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>
>