Not sure if you have seen the new session docs here:
https://www.eclipse.org/jetty/documentation/9.4.x/session-management.html

source wise, might be quickest to take a look at the tests for jdbc
sessions here:

https://github.com/eclipse/jetty.project/blob/jetty-9.4.x/tests/test-sessions/test-jdbc-sessions/src/test/java/org/eclipse/jetty/server/session/JdbcTestServer.java

that shows the creation, I think we might need to get some more embedded
examples up in this area, will take a look at that

cheers
Jesse

--
jesse mcconnell
[email protected]

On Wed, Feb 1, 2017 at 2:09 AM, Ivan Furnadjiev <[email protected]>
wrote:

> 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
>
_______________________________________________
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