java - Jetty Session Clustering Using XML -
im trying configure jetty session clustering using database. there way change database name. dont want use default name "session". want change table name both sessionidtable , sessiontable having trouble setting configuration using xml. here code :
<?xml version="1.0"?> <!doctype configure public "-//jetty//configure//en" "http://www.eclipse.org/jetty/configure_9_3.dtd"> <configure id="server" class="org.eclipse.jetty.server.server"> <!-- ===================================================================== --> <!-- configure sessionidmanager --> <!-- ===================================================================== --> <set name="sessionidmanager"> <new id="idmgr" class="org.eclipse.jetty.server.session.jdbcsessionidmanager"> <arg> <ref refid="server"/> </arg> <set name="workername"><property name="jetty.jdbcsession.workername" default="node1"/></set> <set name="scavengeinterval"><property name="jetty.jdbcsession.scavenge" default="1800"/></set> <!-- ===================================================================== --> <!-- uncomment either datasource or driver setup , configure --> <!-- ===================================================================== --> <!-- <set name="datasourcename"><property name="jetty.jdbcsession.datasource" default="javax.sql.datasource/default"/></set> <call name="setdriverinfo"> <arg><property name="jetty.jdbcsession.driverclass"/></arg> <arg><property name="jetty.jdbcsession.connectionurl"/></arg> </call> --> </new> </set> <new id="idtableschema " class="org.eclipse.jetty.server.session.sessiontableschema"> <set name="settablename">mysession</set> </new> </configure>
but in logs says :
caused by: java.lang.classnotfoundexception: org.eclipse.jetty.server.session.sessiontableschema @ java.net.urlclassloader$1.run(unknown source) @ java.net.urlclassloader$1.run(unknown source) @ java.security.accesscontroller.doprivileged(native method) @ java.net.urlclassloader.findclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ java.lang.classloader.loadclass(unknown source) @ org.eclipse.jetty.util.loader.loadclass(loader.java:86) @ org.eclipse.jetty.xml.xmlconfiguration$jettyxmlconfiguration.nodeclass(xmlconfiguration.java:364) @ org.eclipse.jetty.xml.xmlconfiguration$jettyxmlconfiguration.newobj(xmlconfiguration.java:754) @ org.eclipse.jetty.xml.xmlconfiguration$jettyxmlconfiguration.configure(xmlconfiguration.java:423) @ org.eclipse.jetty.xml.xmlconfiguration$jettyxmlconfiguration.configure(xmlconfiguration.java:354) @ org.eclipse.jetty.xml.xmlconfiguration.configure(xmlconfiguration.java:262) @ org.eclipse.jetty.xml.xmlconfiguration$1.run(xmlconfiguration.java:1243) @ java.security.accesscontroller.doprivileged(native method) @ org.eclipse.jetty.xml.xmlconfiguration.main(xmlconfiguration.java:1174) ... 7 more
try
<set name="sessiontableschema"> <new id="tableschema" class="org.eclipse.jetty.server.session.jdbcsessionidmanager$sessiontableschema"> <set name="tablename">mysession</set> </new> </set>
it org.eclipse.jetty.server.session.sessiontableschema in jetty documentation links broken. above code way work , matches api documentation. id table handled similarly.
Comments
Post a Comment