► JEST Servlet must be deployed within the same module scope of the application.
► The unit name of the persistence unit used by the application must be known to JEST Servlet
► The persistence unit must be configured with
openjpa.EntityManagerFactoryPool=true
Once JEST servlet knows the name of the persistence unit, it can
► browse the domain model
► execute query
from any web browser in a meta-data driven, generic fashion
i.e. without knowing anything further about he application.
<servlet> <servlet-name>demo</servlet-name> <servlet-class>demo.SimpleApp</servlet-class> </servlet> <servlet-mapping> <servlet-name>demo</servlet-name> <url-pattern>/*</url-pattern> </servlet-mapping> <!-- Deployment descriptor for JESTServlet. --> <servlet> <servlet-name>jest</servlet-name> <servlet-class>org.apache.openjpa.persistence.jest.JESTServlet</servlet-class> <init-param> <param-name>persistence.unit</param-name> <param-value>jestdemo</param-value> </init-param> </servlet> <servlet-mapping> <servlet-name>jest</servlet-name> <url-pattern>/jest/*</url-pattern> </servlet-mapping>