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

HazelcastHttpSession getAttributeNames returns entries that were only read but not written #7033

eysegal opened this issue Dec 9, 2015 · 2 comments


None yet
4 participants
Copy link

commented Dec 9, 2015

Reopening #6868.
HazelcastHttpSession::getAttributeNames returns entries (with null values) if HazelcastHttpSession::getAttribute was called with those entry names.
So, in the example below, we call hazelcastHttpSession.getAttribute("test") it's being returned when calling hazelcastHttpSession.getAttributeNames().

This is the test code that reproduces it ("test" is printed even though it was only read, not write):

            package test;

            import java.util.Enumeration;

            import javax.servlet.FilterConfig;
            import javax.servlet.ServletContext;
            import javax.servlet.ServletException;

            import org.eclipse.jetty.servlet.ServletContextHandler;
            import org.eclipse.jetty.servlet.ServletContextHandler.Context;

            import com.hazelcast.web.HazelcastHttpSession;
            import com.hazelcast.web.WebFilter;

            public class HazelcastSessionParamCheck {
                public static void main(String[] args) throws ServletException {

                    WebFilter filter = new WebFilter();
                    final Context servletContext = new ServletContextHandler().new Context(); 

                    FilterConfig filterConfig = new FilterConfig() {

                        public ServletContext getServletContext() {
                            // TODO Auto-generated method stub
                            return servletContext;

                        public Enumeration<String> getInitParameterNames() {
                            // TODO Auto-generated method stub
                            return null;

                        public String getInitParameter(String name) {
                            // TODO Auto-generated method stub
                            return null;

                        public String getFilterName() {
                            // TODO Auto-generated method stub
                            return null;
                    HazelcastHttpSession hazelcastHttpSession = new HazelcastHttpSession(filter, "sessionId", null, true, true); 
                    Enumeration<String> sessionAttributeNames = hazelcastHttpSession.getAttributeNames();
                    while (sessionAttributeNames.hasMoreElements()) {


With this maven configuration:

            <project xmlns="" xmlns:xsi="" xsi:schemaLocation="">




@kobalski kobalski added this to the 3.6 milestone Dec 9, 2015

@kobalski kobalski self-assigned this Dec 9, 2015

@mesutcelik mesutcelik modified the milestones: 3.6, 3.6.1 Dec 10, 2015

@enesakar enesakar modified the milestones: 3.6.1, 3.6.2 Feb 26, 2016


This comment has been minimized.

Copy link

commented Feb 28, 2016

Can you please fix it for 3.6.2? We're waiting for a long time for this fix, which is actually a regression bug since it was ok in 3.4...
It's preventing us from upgrading from 3.4 to the latest...



This comment has been minimized.

Copy link

commented Mar 18, 2016

fixed by #7766

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.