Class Schemas

java.lang.Object
org.openxava.web.Schemas

public final class Schemas extends Object
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 Details

    • setDefaultSchema

      public static void setDefaultSchema(javax.servlet.http.HttpServletRequest request)
      Sets the default JPA schema into XPersistence based on organization or default schema information available in the current request/session context.
      • If session attribute naviox.organization is present and not empty, it uses it as default schema.
      • Otherwise, it tries with context attribute xava_defaultSchema.