Package org.openxava.web
Class Schemas
java.lang.Object
org.openxava.web.Schemas
Utility methods related to JPA schema resolution in web requests.
Centralizes the logic to set the default JPA schema for the current request/session, to keep code DRY across servlets.
- Since:
- 7.6
- Author:
- Javier Paniza
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidsetDefaultSchema(javax.servlet.http.HttpServletRequest request) Sets the default JPA schema intoXPersistencebased on organization or default schema information available in the current request/session context.
-
Method Details
-
setDefaultSchema
public static void setDefaultSchema(javax.servlet.http.HttpServletRequest request) Sets the default JPA schema intoXPersistencebased on organization or default schema information available in the current request/session context.- If session attribute
naviox.organizationis present and not empty, it uses it as default schema. - Otherwise, it tries with context attribute
xava_defaultSchema.
- If session attribute
-