Class WebUtil


  • public class WebUtil
    extends Object
    A helper class to retrieve and store CayenneRuntime in the ServletContext. All Cayenne web configuration objects, such as CayenneFilter and org.apache.cayenne.rop.ROPServlet, are using this class to access runtime.
    Since:
    3.1
    • Constructor Detail

      • WebUtil

        public WebUtil()
    • Method Detail

      • getCayenneRuntime

        public static org.apache.cayenne.configuration.CayenneRuntime getCayenneRuntime​(javax.servlet.ServletContext context)
        Retrieves CayenneRuntime previously stored in provided context via setCayenneRuntime(ServletContext, CayenneRuntime). May return null if no runtime was stored.
      • setCayenneRuntime

        public static void setCayenneRuntime​(javax.servlet.ServletContext context,
                                             org.apache.cayenne.configuration.CayenneRuntime runtime)
        Stores CayenneRuntime in the servlet context. It can be later retrieve via getCayenneRuntime(ServletContext).