A
Albretch
How do you programatically get a Reference to the currently running
instance of the PersistentManager TC/a webapp is using?
I am trying to use the hsql's in-memory driver, which aparantly TC
accepts in the JDBCStore tags, as you can check after setting:
JAVA_OPTS="-verbose:class"
in the catalina.(bat|sh) file and running:
catalina run > debug.txt
.. . .
[Loaded java.sql.Driver from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.jdbcDriver]
[Loaded java.sql.DriverManager from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.SQLPermission from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.DriverInfo from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.Trace]
[Loaded org.hsqldb.Trace$1TraceCallerException]
[Loaded org.hsqldb.Trace$1TraceException]
[Loaded org.hsqldb.jdbcConnection]
[Loaded java.sql.Statement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.PreparedStatement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.CallableStatement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.ResultSet from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.DatabaseMetaData from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.Database]
.. . .
Of course, if you comment out the:
<Manager className="org.apache.catalina.session.PersistentManager"
....
section of the server.xml file non of this would show up
I need to know how to know for sure what type of PersistentManager TC
is using:
I looked into the code of:
public class org.apache.catalina.session.JDBCStore extends StoreBase
implements Store
and did notice that there were some default settings in the ctor
....
sessionTable = "tomcat$sessions";
sessionAppCol = "app";
sessionIdCol = "id";
sessionDataCol = "data";
sessionValidCol = "valid";
sessionMaxInactiveCol = "maxinactive";
sessionLastAccessedCol = "lastaccess";
....
but I didn't see any "CREATE TABLE" statements
instance of the PersistentManager TC/a webapp is using?
I am trying to use the hsql's in-memory driver, which aparantly TC
accepts in the JDBCStore tags, as you can check after setting:
JAVA_OPTS="-verbose:class"
in the catalina.(bat|sh) file and running:
catalina run > debug.txt
.. . .
[Loaded java.sql.Driver from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.jdbcDriver]
[Loaded java.sql.DriverManager from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.SQLPermission from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.DriverInfo from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.Trace]
[Loaded org.hsqldb.Trace$1TraceCallerException]
[Loaded org.hsqldb.Trace$1TraceException]
[Loaded org.hsqldb.jdbcConnection]
[Loaded java.sql.Statement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.PreparedStatement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.CallableStatement from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.ResultSet from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded java.sql.DatabaseMetaData from C:\JApps\jdk\jre\lib\rt.jar]
[Loaded org.hsqldb.Database]
.. . .
Of course, if you comment out the:
<Manager className="org.apache.catalina.session.PersistentManager"
....
section of the server.xml file non of this would show up
I need to know how to know for sure what type of PersistentManager TC
is using:
I looked into the code of:
public class org.apache.catalina.session.JDBCStore extends StoreBase
implements Store
and did notice that there were some default settings in the ctor
....
sessionTable = "tomcat$sessions";
sessionAppCol = "app";
sessionIdCol = "id";
sessionDataCol = "data";
sessionValidCol = "valid";
sessionMaxInactiveCol = "maxinactive";
sessionLastAccessedCol = "lastaccess";
....
but I didn't see any "CREATE TABLE" statements