[
https://issues.jboss.org/browse/WFLY-6489?page=com.atlassian.jira.plugin....
]
Paul Ferraro commented on WFLY-6489:
------------------------------------
[~glavoie] I think you misunderstood. By "attribute replication", I mean fine
granularity session -> cache entry mapping, where each session attribute is stored in a
separate cache entry. This is enabled via
<replication-config><replication-granularity>ATTRIBUTE</replication-granularity></replication-config>
within jboss-web.xml. This is a typical optimization strategy that only requires
replication of modified session attributes, rather than the whole session. Support for
mutable session attributes with a non-tx cache is a separate issue. I've created a
jira to add support for this:
https://issues.jboss.org/browse/WFLY-6522
"We certainly don't want to replicate the whole session every times it changes as
it is currently too big and we had a lot of performance issues with it in the past."
I strongly encourage you to leverage the marshalling api to supply externalizers for your
session attribute POJOs. This can considerably reduce the size of the replication payload
of your session attributes by eliminating the need to replicate class descriptors.
https://github.com/wildfly/wildfly/blob/master/clustering/marshalling/api...
To use, implement this interface for each custom session attribute class, and enumerate
your externalizer classes in a
/META-INF/services/org.wildfly.clustering.marshalling.Externalizer file within your WAR.
Distributable session may not exist after redirect to same node with
optimistic locking.
----------------------------------------------------------------------------------------
Key: WFLY-6489
URL:
https://issues.jboss.org/browse/WFLY-6489
Project: WildFly
Issue Type: Bug
Components: Clustering
Affects Versions: 8.2.1.Final, 10.0.0.Final, 10.1.0.Final
Reporter: Gabriel Lavoie
Assignee: Paul Ferraro
Priority: Critical
Attachments: wfly-6489-showcase.zip, wildfly-10-session-issue.zip
I'm currently working on porting an application running on EAP 6.1 to WildFly 10 and
am encountering multiple session/authentication issues with clustering enabled. Our login
flow currently starts from a servlet that accepts the credentials, creates the session,
then redirect to the welcome page.
The first time we execute this flow after the startup of a node, the welcome page
can't see at all the session created previously.
- request.getSession() creates yet another session and a new session cookie is returned.
- request.getSession(false) returns "null"
On the second attempt, the flow works as expected.
The issue can be reproduced on both a single node or a two nodes cluster, as long as
<distributable /> is enabled in web.xml.
We are currently using the master build
https://ci.jboss.org/hudson/job/WildFly-latest-master/2244/, but the problem has been
noticed on 10.0.0-Final and also 8.2.1-Final.
I attached a sample web application that I used to reproduce the issue. Our
standalone.xml is also included with the clustering configuration we've been using for
the web/session cache.
--
This message was sent by Atlassian JIRA
(v6.4.11#64026)