-
1. Re: Need facilities to run clustered examples
timfox Apr 3, 2009 8:20 AM (in response to gaohoward)"gaohoward" wrote:
S
But in JBM 2.0 do we have this service? or we have a different technique?
JNDI is a service independent of JBM 2.0 -
2. Re: Need facilities to run clustered examples
gaohoward Apr 3, 2009 8:32 AM (in response to gaohoward)Thanks Tim, I'll take a look at JNDI project.
-
3. Re: Need facilities to run clustered examples
timfox Apr 3, 2009 8:36 AM (in response to gaohoward)If you explain what you're trying to achieve a bit more, maybe I can help more.
-
4. Re: Need facilities to run clustered examples
gaohoward Apr 3, 2009 8:46 AM (in response to gaohoward)I'm trying to build a simple clustered queue example. My plan is:
1. Start two JBM clustered nodes.
2. Deploy one distributed queue
3. In the example code, create connection to the cluster using jndi, then send and receive a message from the queue. Also I want to show that the connection creation is round-robin between the two nodes. (like in 1.4)
In 1.4 we start two nodes with their own JNDI ports and the example just use one JNDI port on one node, I follow this first but I can't make the ports setting for each node work. -
5. Re: Need facilities to run clustered examples
ataylor Apr 3, 2009 8:49 AM (in response to gaohoward)Howard, Ive updated your config so you can now start 2 servers, take a look to see h ow I've done it. Ive commented out the clustering config in the second config file for now, I'll leave this for you to do.
If you explain what you're trying to achieve a bit more, maybe I can help more.
I think what Howard is talking about is how we curently use jndi at the moment. We start the naming bean via the mc and then lookup localhost:1099 etc. With HA jndi tho it will round robin requests to the different servers, the question is, to we need to support this standalone and if not, how does Howard deal with this in the example. -
6. Re: Need facilities to run clustered examples
timfox Apr 3, 2009 8:53 AM (in response to gaohoward)I'm assuming you want to create a clustered *JMS* example, not clustered core.
In JBM 2.0 you don't need JNDI.
You can create connection factories directly on the client side. You can specify the UDP group address of the cluster for discovery and it will automatically connect without having to know the addresses of each server.
If you don't want to create your connection factory directly, you can look up the connection factory via JNDI from a particular server.
If you don't know all the JNDI server addresses on the client, you could use HA-JNDI on the server (which also uses its own discovery mechanism).
However, so far, the standalone server doesn't start an HA-JNDI service, we would need to add it. (This would probably be useful).
We should probably create different clustered examples showing both techniques:
1) Instantiating connection factory directly
2) Using HAJNDI -
7. Re: Need facilities to run clustered examples
gaohoward Apr 3, 2009 8:54 AM (in response to gaohoward)Thanks Andy, I'll take a look.
-
8. Re: Need facilities to run clustered examples
gaohoward Apr 3, 2009 8:57 AM (in response to gaohoward)Thanks Tim, +1 we need to show both, that's better. Let me have a look how to add HA-JNDI first.
-
9. Re: Need facilities to run clustered examples
gaohoward Apr 3, 2009 10:27 AM (in response to gaohoward)As discussed, we can use JNDI on one node or not to use JNDI at all. So the simple solution so far is to use JNDI.
I got two server started now. -
10. Re: Need facilities to run clustered examples
timfox Apr 3, 2009 10:29 AM (in response to gaohoward)I'd say using JNDI is more complex.
With JNDI you need to get initial context, lookup object etc.
Without JNDI you just instantiate the object directly.