Dynamic and Static Discovery cluster with Apache TomEE

Hey there!

On my last post Are there different types of clusters? we saw two different types of clusters: Dynamic Discovery and Static Discovery. To see details, see the post! 😉

Now let’s see quickly how we can set them up at the Apache TomEE. One of the types – the Dynamic – we have already seen in the post How to build an Apache TomEE cluster. So we will do just a little zoom to see where the things are done.

 

Dynamic Discovery

At the “Engine” node you should put this code (see the post mentioned above for detailed code):

<Cluster
className=”org.apache.catalina.ha.tcp.SimpleTcpCluster”
channelSendOptions=”6″>
<Manager…
<Channel…
<Valve…
<Deployer…
<ClusterListener…
</Cluster>

 

Static Discovery

At the same “Engine” node you should put this:

<Cluster className=”org.apache.catalina.ha.tcp.SimpleTcpCluster”channelSendOptions=”6″>
<Channel className=”org.apache.catalina.tribes.group.GroupChannel”>
<Interceptor className=”org.apache.catalina.tribes.group.interceptors.StaticMembershipInterceptor”>
<Member className=”org.apache.catalina.tribes.membership.StaticMember” port=”4000″ host=”server1″ uniqueId=”{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1}” />
<Member className=”org.apache.catalina.tribes.membership.StaticMember” port=”4000″ host=”server2″ uniqueId=”{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2}” />
<Member className=”org.apache.catalina.tribes.membership.StaticMember” port=”4000″ host=”server3″ uniqueId=”{0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,3}” />
</Interceptor>
</Channel>
</Cluster>

 

So as you can see, with the Static Discovery you use the StaticMember at the Member node instead of McastService used at the Dynamic Discovery. To see the functional differences between them see my last post Are there different types of clusters?.

Hope you enjoy building your own TomEE cluster! If you have any particular experience to share, please leave it at the comments bellow. See you!

16 thoughts on “Dynamic and Static Discovery cluster with Apache TomEE”

    1. Elder Moraes says:

      Thank you! Hope it was helpful.

  1. I was suggested this website by means of my cousin. I am not positive whether this put up is written via him as nobody else know such exact about my trouble. You are incredible! Thank you!

  2. Hello there! I know this is kinda off topic nevertheless I’d figured I’d ask. Would you be interested in trading links or maybe guest authoring a blog post or vice-versa? My website discusses a lot of the same topics as yours and I think we could greatly benefit from each other. If you happen to be interested feel free to shoot me an email. I look forward to hearing from you! Excellent blog by the way!

  3. Hello would you mind stating which blog platform you’re using? I’m planning to start my own blog soon but I’m having a difficult time choosing between BlogEngine/Wordpress/B2evolution and Drupal. The reason I ask is because your layout seems different then most blogs and I’m looking for something unique. P.S My apologies for being off-topic but I had to ask!

    1. Elder Moraes says:

      Hey there!

      No problem at all on asking about it. I’m using WordPress and get some theme (can’t remember which one – can check it if you must), but I customized it a little. So maybe that’s why it seems kinda unique!

      Cheers

  4. Hmm it appears like your website ate my first comment (it was super long) so I guess I’ll just sum it up what I had written and say, I’m thoroughly enjoying your blog. I as well am an aspiring blog writer but I’m still new to the whole thing. Do you have any tips for first-time blog writers? I’d certainly appreciate it.|

    1. Elder Moraes says:

      Sure I do: go to simpleprogrammer.com and register for John Sonmez course! If free and will help you out.

  5. Hello, I do think your blog may be having browser compatibility issues. Whenever I look at your website in Safari, it looks fine however, when opening in IE, it has some overlapping issues. I simply wanted to give you a quick heads up! Besides that, fantastic website!

    1. Elder Moraes says:

      Thanks for the heads up!

  6. Thanks for a marvelous posting! I definitely enjoyed reading it,
    you will be a great author.I will be sure to bookmark your blog and
    will come back at some point. I want to encourage one to continue your
    great writing, have a nice afternoon!

    1. Elder Moraes says:

      Thanks for you kind words! Hope to keep helping you.

      Are there any related topic that you would like to read here?

Leave a Reply

Your email address will not be published. Required fields are marked *