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

Still classloading issues #74

Open
helge79 opened this issue Jan 20, 2020 · 1 comment
Open

Still classloading issues #74

helge79 opened this issue Jan 20, 2020 · 1 comment

Comments

@helge79
Copy link

helge79 commented Jan 20, 2020

When two applications in Tomcat share a class definition the latter one will not be able to deserialize the attribute from the session because I assume the first application will hold the reference to this class. A ClassCastException will be thrown then.

To illustrate the issue I have set up a project based on your Hazelcast's docker images. See https://github.com/helge79/hazelcast-session-classloading-issue for details. Instead of putting a simple String in the session I will use a class called StringHolder for it. I will built an application and deploy it as example.war and example2.war. If example2.war is deployed before example.war I will not be able to get the session attribute back in /example.

And I think this is intended as described in #55 and #56 because it is not possible to change the class loader after initialisation. But how is it possible to have one instance per Tomcat in a P2P scenario at all then? How is this supposed to work? What am I missing here? Are there any configuration issue on my end?

@alparslanavci
Copy link
Contributor

Hi @helge79, I checked this issue, and you are correct that it is not working as expected when you deploy multiple web applications on a single Tomcat container. In coming versions, there will be some improvements in Hazelcast's dynamic class loading, we are planning to use them to resolve this issue.

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

No branches or pull requests

2 participants