@ Bean @ SneakyThrows public HazelcastInstance hazelcastInstance ( ) { val hzConfigResource = casProperties . getWebflow ( ) . getSession ( ) . getHzLocation ( ) ; val configUrl = hzConfigResource . getURL ( ) ; val config = new XmlConfigBuilder ( hzConfigResource . getInputStream ( ) ) . build ( ) ; config . setConfigurationUrl ( configUrl ) ; config . setInstanceName ( this . getClass ( ) . getSimpleName ( ) ) . setProperty ( "hazelcast.logging.type" , "slf4j" ) . setProperty ( "hazelcast.max.no.heartbeat.seconds" , "300" ) ; return Hazelcast . newHazelcastInstance ( config ) ; }
Hazelcast instance that is used by the spring session repository to broadcast session events . The name of this bean must be left untouched .