Description of problem:
Adding a "jvmRoute" in standalone.xml profile produces errors in <distributable /> applications.
Version-Release number of selected component (if applicable):
JBoss EAP 6.1.0.GA (AS 7.2.0.Final-redhat-8)
Add a "jvmRoute" property in standalone.xml and deploy a <distributable /> application.
Steps to Reproduce:
1. Unzip EAP 6.1.
2. Add a "jvmRoute" system property with value "test".
3. Deploy attachment application.
10:48:27,861 ERROR [org.infinispan.interceptors.InvocationContextInterceptor] (ServerService Thread Pool -- 52) ISPN000136: Execution error: org.infinispan.marshall.NotSerializableException: org.jboss.as.clustering.registry.RegistryService$1
Caused by: an exception which occurred:
Application deployed without errors.
This scenario can be valid:
- Customer wants a farming architecture, where a mod_jk is used to load balance request but not clustering needed.
- Customer can have a third party application with <distributable /> in their web.xml.
- A possible workaround can be to remove <distributable /> but ideal fix should be that if jvmRoute is present EAP 6.1 should detect if infinispan is configure in distributable/clustering instead of local.
Created attachment 761971 [details]
Created attachment 761972 [details]
Test case 2
Same error with Serializable objects in session
Fixing the bug by making the transport address in RegistryService serializable.
There should be no change in behaviour (except the missing exception).
The fix was :
The LOCAL_ADDRESS of the RegistryService which is serialized to be shared in the cluster was initialized to its default value because of the missing clustering configuration. This default initialisation was not serializable which provoked this exception.
Thus initialising the LOCAL_ADDRESS with a default value serializable fixed the issue.