Hi all,
In RAP project we are using embedded Jetty for our cluster tests with sessions persistence in H2. Our implementation is based on the example shown in [1]. The code which we are using in Jetty 9.3.x is:
---------
public SessionManager createSessionManager( Server server ) {
  JDBCSessionManager result = new JDBCSessionManager();
  result.setSaveInterval( SAVE_INTERVAL );
  return result;
}

public SessionIdManager createSessionIdManager( Server server ) {
  JDBCSessionIdManager result = new JDBCSessionIdManager( server );
  result.setScavengeInterval( SCAVENGE_INTERVAL );
  result.setWorkerName( generateNodeName() );
  Driver driver = databaseServer.getDriver();
  String connectionUrl = databaseServer.getConnectionUrl();
  result.setDriverInfo( driver, connectionUrl );
  return result;
}
---------
What I understand from the migration guide is that in Jetty 9.4.x we don't have (JDBC)SessionManager anymore and the functionality is handled by SessionHandler. That's clear. (JDBC)SessionIdManager is replaced by DefaultSessionIdManager. I have 3 questions:
1. What is the replacement of setSaveInterval?
2. To set scavenge interval I have to create HouseKeeper and set it on DefaultSessionIdManager. Right?
3. How to set the database driver info in session id manager?
Could you provide some code snippets that answer the questions above?

Thanks in advance,
Ivan

[1] https://wiki.eclipse.org/Jetty/Feature/Session_Clustering_Using_a_Database
_______________________________________________
jetty-users mailing list
[email protected]
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/jetty-users

Reply via email to