Hi Aaron,

I appreciate the explanation, it clarified how Stripersist fits in with JPA 
(and Hibernate). 

Best,
Dan



----- Original Message ----
From: Aaron Porter <[email protected]>
To: Stripes Users List <[email protected]>
Sent: Mon, October 26, 2009 2:30:47 PM
Subject: Re: [Stripes-users] Resources for learning/understanding stripersist

Hi Dan,
There's really not much to Stripersist. It's designed to mostly work 
transparently like the Formatters and TypeConverters that are built into 
the system. If your ActionBean has a field User user (which is an 
Entity) then you could call your ActionBean with something like 
"MyActionBean.action?user=1234" and Stripersist would try to load the 
User with id=1234 and stuff it into your ActionBean.

Stripersist.getEntityManager() will return a JPA EntityManager that you 
can do normal JPA things with. You don't have to worry about closing the 
EntityManager as Stripersist does that for you when the request is complete.

Besides that, you need to know that by default Stripersist does 
everything inside of a transaction and will not commit the transaction 
until you explicitly call Stripersist.commit(). The latest version in 
SVN has a new feature that allows you to turn off automatic transactions.

Aaron



      

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Stripes-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/stripes-users

Reply via email to