I am trying to implement jdbc session for embedded jetty server in order to share the sessions across nodes(TO avoid users losing their sessions when a deployment happens) in an openshift environment. The existing official documentations (https://www.eclipse.org/jetty/documentation/9.4.32.v20200930/configuring-sessions-jdbc.html) have implementation details for Jetty distribution implementation only. There is a similar but incomplete solution at How to setup embeded Jetty to use JDBC sessions
// Configure a JDBCSessionDataStoreFactory.
JDBCSessionDataStoreFactory sessionDataStoreFactory = new JDBCSessionDataStoreFactory();
sessionDataStoreFactory.setGracePeriodSec(3600);
sessionDataStoreFactory.setSavePeriodSec(0);
sessionDataStoreFactory.setDatabaseAdaptor(...);
JDBCSessionDataStore.SessionTableSchema schema = new JDBCSessionDataStore.SessionTableSchema();
schema.setAccessTimeColumn("accessTime");
schema.setContextPathColumn("contextPath");
// ... more configuration here
sessionDataStoreFactory.setSessionTableSchema(schema);
// Add the SessionDataStoreFactory as a bean on the server.
server.addBean(sessionDataStoreFactory);
Here it was not clear on how to create a DatabaseAdaptor object. Could someone help on this?