File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Tomcat and the fly likes Tomcat creating new cluster rather than joing to same cluster group Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Products » Tomcat
Bookmark "Tomcat creating new cluster rather than joing to same cluster group " Watch "Tomcat creating new cluster rather than joing to same cluster group " New topic
Author

Tomcat creating new cluster rather than joing to same cluster group

Pramesh Patil
Greenhorn

Joined: Jan 17, 2013
Posts: 2
Hi,
I have one question related to tomcat/jboss and JGroup.
I have 2 application one deployed on Tomcat and another is on JBOSS and i am using Jgroup for event notification.
Tomcat APP -> only act as Receiver
JBOSS APP -> act as Receiver and Sender

I have started JBOSS first and expected that when i am starting tomcat. It should join to same cluster group.Because cluster name and multicast ip is same.
But Tomcat create new cluster.

When i replace Tomcat with JBOSS. The event notification work fine.

Any one having any idea about this kind of commuincation or what changes i need to do in tomcat container ?

Thanks in advance.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15657
    
  15

Tomcat and JBoss are not interchangeable. What you are proposing is an asymmetric cluster where one server has full J2EE capabilities but the other does not. Because of that, not only is it impossible to shift many functions at will between one server and another, there's an entire class of deployments (EAR) that can't be shifted at all.

JBoss is not a container for a Tomcat server. JBoss is a J2EE container that happens to use an embedded Tomcat to manage its servlet and JSP functions. At one time, in fact, you had the option to select either Tomcat or Jetty to perform that role.

So you can cluster Tomcat and you can cluster JBoss, but mix and match isn't a realistic option.


Customer surveys are for companies who didn't pay proper attention to begin with.
Pramesh Patil
Greenhorn

Joined: Jan 17, 2013
Posts: 2
Thanks Tim for reply.

I am not trying to do asymmertic cluster.(Or not using Tomcat/JBoss clustering. we are using non-cluster environment)
Scenario:
One web site is hosted on JBOSS server(its basically Admin application that will allow to do configuration changes at DB) And other is hosted on TOMCAT.
We want to send event notification to TOMCAT hosted site that configuration changes done at other site (i.e. JBOSS hosted sited).
To achvie this we have added JGROUP ..Using JGroup we are creating the JChannel with Same Cluster name and multicast IP address.
As per JGroup Specification, When we create channel with same Name. It will Join the same cluster group. But it failed Because one application hosted on Tomcat.
If I Host same application on JBOSS server (It means Admin is on JBOSS and other is also on JBoss) then event notification using JGroup work fine.
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 15657
    
  15

OK. Some things needed clarification.

First, your problem isn't specifically a problem with Tomcat, it's with a multicast notification system named "JGroups". (http://jgroups.org)

Second, this isn't a cluster in the accepted sense, it's a notification group. I think that the fact that one of their examples said "Cluster" confused you.

What I suspect is that your Tomcat server and your JBoss servers are doing is that they're using different mechanisms to construct and host their channels. For example, the JBoss implementations might be layering themselves over JMS, which isn't part of Tomcat. So Tomcat might be using a raw socket listener or something other than JMS.

That's about as far as I can go, though. At that point it requires detailed knowledge of how JGroups works.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Tomcat creating new cluster rather than joing to same cluster group
 
Similar Threads
JMS in Jboss cluster
JMS Client Fail Over Problem?
Session replication with Tomcat 6
JBoss 4.0.4 is slow down in every 20 days
A question about clustering and jms