For a test that uses JNDI to get the connection factorys and queus then we'll need to create two initial contexts.
I don't know if the example framework currently supports that.
I also added a clustered topic example.
Note that I didn't update the readme etc - that still needs to be done but it gives an idea of how to put these clustering examples together.
>>>For a test that uses JNDI to get the connection factorys and queus then we'll need to create two initial contexts.
I think we can configure JNDI on each means config file using different ports. But there is only one client-jndi.properties, so i think for clustered example, we have to hard-code the jndi ENV.
I think using JNDI for connection factory and queue lookup in clustered examples is more consistent with other jms examples. We can show more of other ways to do this in the core examples.
One thing that I found confusing is the usage of two beans files - one for each server.
We need 2 beans configs as the naming server ports are configured in them. I could still create 2 configs dirs to make things simpler but each would have its own beans file and configuration.
This meant I had to change all the directories journal, bindings, large messages so each server was using a distinct set.
You will have to do this anyway since the they are created relatively from the example base dir not the config dir.
Ive made the examples a lot simpler to write.
each server now has its own config, this will be in server0, server1 etc.
there should also be a client-jndi.properties in each config. Then in the code you can call getContext(id) where id is the server you want to connect too.