-
1. Re: No session failover for singelton
pferraro Mar 27, 2017 11:45 AM (in response to darrenpimenta)Can you elaborate on what you mean by "session"? It is also unclear to me whether you are using the singleton service facility (i.e. a singleton MSC service) or the singleton deployment facility.
Can you post some details of your deployment/configuration?
-
2. Re: No session failover for singelton
darrenpimenta Mar 28, 2017 12:21 PM (in response to pferraro)Thanks Paul,
Using the single deployment facility as per the documentation here HA Singleton Features - WildFly 10 - Project Documentation Editor.
In the full-ha profile in domain.xml
<subsystem xmlns="urn:jboss:domain:singleton:1.0">
<singleton-policies default="default">
<singleton-policy name="default" cache-container="server" quorum="3">
<simple-election-policy/>
</singleton-policy>
</singleton-policies>
</subsystem>
...
<cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">
<transport lock-timeout="60000"/>
<replicated-cache name="default" mode="SYNC">
<transaction mode="BATCH"/>
</replicated-cache>
</cache-container>
Deployment is a test war that uses jaxrs, with a singleton-deployment.xml file in META-INF.
Sets an attribute(long) on the session and then gets the attribute and increments it each time the resource is accessed.
-
3. Re: No session failover for singelton
lpeano Oct 28, 2017 8:55 AM (in response to darrenpimenta)You can not do this in sinhleton deployment service yoi must use sinbleton MSC seevice.
-
4. Re: No session failover for singelton
pferraro Oct 30, 2017 6:58 AM (in response to darrenpimenta)OK - I understand now. Singleton web deployments are not designed to be used with traditional distributed web sessions (i.e. in-memory replication). Since there is only one node running your application at a time, there is no node to which to replicate/distribute your sessions. However, if you configured your web session cache as a local-cache using shared persistence (e.g. database, shared file system, etc.) then your web sessions will always be available, even when deployed as a singleton deployment.