Zookeeper on portal modules

Hi there,

I am just setting up a new, multicore project for our new service with two cores, one web module and two portal modules. I have read about the Zookeeper module and I quite like the concept of it, I have managed to configure the jgroups for the cores which seems to be working, they are reporting themselfes to the Zookeper server, also the web module is getting the ips from the zookeper and connects to them, so far so good.
But I assumed it will be as simple for the portal module, the module turns up among the appcomponents:
16:47:18.153 INFO c.h.cuba.core.sys.AppComponents - Using app components: [com.haulmont.cuba, com.haulmont.addon.zookeeper, com.haulmont.addon.helium]
but it won’t initialize and fetch the IPs, like with the web modules.
As the portal is a similar spring component, I’d think it should work, although there is no example for this on the module’s description.

Would it be possible to make it work somehow?
Thanks
Gabor

Hi Gabor,

The cuba-zk add-on provides the automatic configuration only for core and web modules.
But I think you can just add the contents of web-spring.xml to your portal’s spring.xml file. The point is to use ZkServerSelector class as an implementation of cuba_ServerSelector bean.

Many thanks, Konstantin, that worked on the first try!