Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Jetty 9.4.x 2140 infinispan expired sessions #3457

Merged
merged 50 commits into from Apr 18, 2019

Conversation

janbartel
Copy link
Contributor

#2140

Adds the ability to Infinispan and Hazelcast to query to find expired sessions, as per the other SessionDataStores. This means that sessions can be scavenged by jetty (rather than relying on configuring infinispan or hazelcast with time-to-live on each entry), so HttpSessionListeners can be correctly called when the sessions are scavenged.

At the same time, infinispan has been updated to version 9.4.8, and support for the old infinispan-7 dropped.

lachlan-roberts and others added 30 commits May 16, 2018 15:28
Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
…140-InfinispanExpiredSessions

Signed-off-by: Lachlan Roberts <lachlan@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
deserialisation; classname of hotrod remote cache has changed

Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel requested review from olamy and sbordet March 12, 2019 23:40
Copy link
Member

@olamy olamy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice job (maybe some very minor/cosmetic changes)

@@ -24,6 +24,7 @@
import org.eclipse.jetty.session.infinispan.InfinispanSessionDataStoreFactory;
import org.junit.jupiter.api.AfterAll;
import org.junit.jupiter.api.BeforeAll;
import org.junit.jupiter.api.Test;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unused import


baos = new ByteArrayOutputStream();
IO.copy(is, baos);
is.close();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no need to close

Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel changed the title Jetty 9.4.x 2140 infinispan expired sessions Jetty 9.4.x 2140 infinispan expired sessions DO NOT MERGE Mar 22, 2019
@janbartel
Copy link
Contributor Author

I've just found an issue with hazelcast, so don't merge this PR yet until I can resolve it. Basically, the problem is that if I enable indexing on the SessionData.expiry field, then for some reason, hazelcast then uses a separate thread to re-read the SessionData after storing it! So far I haven't been able to find a way to avoid this - I may have to make it configurable whether to support queries on hazelcast, with the documented caveat that if you do, you won't be able to store session attributes of classes that exist only inside the webapp.

janbartel and others added 10 commits March 26, 2019 15:36
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
environment work for serialization/deserialization.

Signed-off-by: Jan Bartel <janb@webtide.com>
Signed-off-by: olivier lamy <oliver.lamy@gmail.com>
…40-InfinispanExpiredSessions

Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel changed the title Jetty 9.4.x 2140 infinispan expired sessions DO NOT MERGE Jetty 9.4.x 2140 infinispan expired sessions Apr 18, 2019
Signed-off-by: Jan Bartel <janb@webtide.com>
@janbartel janbartel merged commit b6809f5 into jetty-9.4.x Apr 18, 2019
@janbartel janbartel deleted the jetty-9.4.x-2140-InfinispanExpiredSessions branch April 18, 2019 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants