This application presents Shared Collection sample. Users can modify the collection rendered on the page and see modifications from other users instantly. (All connections do share same map).
If you are interested in accessing shared collection from java, you can check out tests - class SharedMap is java.util.Map implementation which does exactly that.
Run the example as follows:
mvn clean test-compile exec:java
Run the example as follows: deploy:
$AS_MAIN/bin/asadmin deploy --force ./target/*war
From a web browser, visit: