문제

I need to start Hazelcast within Tomcat without separate war-file. So put hazelcast.jar into lib folder, hazelczast.xml somewhere... What next? Or it is not possible?

도움이 되었습니까?

해결책

First step was ok, just place Hazelcast lib and configuration inside the libs folder of Tomcat. Next thing, if you don't want a separate WAR file, is to build a small Valve class that starts up / shuts down the Hazelcast node. The question is: What do you want to achieve with this, since for a practical use you will likely have to access the Hazelcast instance itself (which should be possible to place it as an attribute inside the HttpRequest).

Chris

다른 팁

It should be possible. But you need to have some piece of code calling Hazelcast.newHazelcastInstance, or else nothing will happen.

I have found it easiest to just use Spring Boot and start hazelcast in the spring context.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top