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?
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
<singleton-policy name="default" cache-container="server" quorum="3">
<cache-container name="server" aliases="singleton cluster" default-cache="default" module="org.wildfly.clustering.server">
<replicated-cache name="default" mode="SYNC">
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.
You can not do this in sinhleton deployment service yoi must use sinbleton MSC seevice.
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.