JPAContainer general example

Hello everyone.
I’m leaving JSF - Seam technologies instead Vaadin, so I’m looking for an example on how to work with JPAContainerFactory, I’m not sure how to instantiate it (inside an event listener, like application variable, or so).

Thank you in advance.

After a quick google search for “vaadin jpacontainerfactory example” i found 3 examples even though i’ve never used the JPAContainer before:

Number 1

Number 2

Number 3