Tomcat's PersistentManager

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top