@@ -0,0 +1,1690 @@
+package net.seannos.example.multitenant.util.debug;%0A%0Aimport java.io.IOException;%0Aimport java.io.PrintWriter;%0Aimport java.util.List;%0A%0Aimport javax.persistence.EntityManager;%0Aimport javax.persistence.EntityManagerFactory;%0Aimport javax.persistence.Persistence;%0Aimport javax.persistence.PersistenceContext;%0Aimport javax.persistence.PersistenceContextType;%0Aimport javax.persistence.PersistenceUnit;%0Aimport javax.persistence.Query;%0Aimport javax.servlet.ServletException;%0Aimport javax.servlet.annotation.WebServlet;%0Aimport javax.servlet.http.HttpServlet;%0Aimport javax.servlet.http.HttpServletRequest;%0Aimport javax.servlet.http.HttpServletResponse;%0A%0Aimport net.seannos.example.multitenant.model.Tenant;%0A%0A@WebServlet(urlPatterns = %22/debug/tenant%22)%0Apublic class DebugServlet extends HttpServlet %7B%0A%0A%09@PersistenceContext(unitName = %22default%22)%0A%09EntityManager em;%0A%0A%09@Override%0A%09protected void doGet(HttpServletRequest req, HttpServletResponse resp)%0A%09%09%09throws ServletException, IOException %7B%0A%09%09List%3CTenant%3E tenants = getTenants();%0A%09%09resp.setContentType(%22text/html%22);%0A%09%09PrintWriter writer = resp.getWriter();%0A%09%09for (Tenant t : tenants) %7B%0A%09%09%09writer.println(%22ID:%22 + t.getId() + %22%3Cbr/%3E%22);%0A%09%09%09writer.println(%22Realm:%22 + t.getRealm() + %22%3Cbr/%3E%22);%0A%09%09%09writer.println(%22JSON:%22 + t.getJson() + %22%3Cbr/%3E%22);%0A%09%09%7D%0A%09%09writer.flush();%0A%09%09writer.close();%0A%09%7D%0A%0A%09@Override%0A%09protected void doPost(HttpServletRequest req, HttpServletResponse resp)%0A%09%09%09throws ServletException, IOException %7B%0A%09%09String value = req.getParameter(%22command%22);%0A%09%7D%0A%0A%09private List%3CTenant%3E getTenants() %7B%0A%09%09Query query = em.createQuery(%22select t from Tenant t%22, Tenant.class);%0A%09%09List%3CTenant%3E tenants = (List%3CTenant%3E) query.getResultList();%0A%09%09return tenants;%0A%09%7D%0A%7D%0A

Add a servlet to confirm Tenant table.