嵌入在tomcat中的Hazelcast

问题描述:

我需要在Tomcat中启动Hazelcast,而无需单独的war文件. 因此,将hazelcast.jar放到lib文件夹中,hazelczast.xml放在某处...接下来呢? 还是不可能?

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?

第一步是好的,只需将Hazelcast lib和配置放在Tomcat的libs文件夹中.接下来,如果您不需要单独的WAR文件,则是构建一个小的Valve类来启动/关闭Hazelcast节点. 问题是:您想用这个实现什么,因为对于实际用途,您可能必须访问Hazelcast实例本身(应该可以将其作为属性放置在HttpRequest中).

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).

克里斯