RE: MOM replay management : OpenJMS MOM 0.7.5.
"Tim Anderson" <[email protected]>
| Newsgroups | gmane.comp.java.openjms.devel |
|---|---|
| Message-ID | <[email protected]> |
Make sure that:
. each server is starting up with the correct configuration file
By default, they load $OPENJMS_HOME/config/openjms.xml.
. each server configuration file has the correct IP address
One of the servers might be connecting to the embedded RMI
registry of the other. I don't recall the behaviour in 0.7.5,
but it wouldn't hurt to set the appropriate IP addresses for
RMIConfiguration, e.g:
<RmiConfiguration embeddedRegistry="true"
registryHost="172.26.44.73"
registryPort="1099">
</RmiConfiguration>
-----Original Message-----
From: openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
[mailto:openjms-developer-admin-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org]On Behalf Of Julien
Schreiber
Sent: Monday, 8 December 2003 9:23 PM
To: openjms-developer-5NWGOfrQmneRv+LV9MX5uipxlwaOVQ5f@public.gmane.org
Cc: 'Régis Lebrun'
Subject: Re: [openjms-developer] MOM replay management : OpenJMS MOM
0.7.5.
Hi,
I have a short question raised when I ran some tests in order to analyse
the former problems (described below).
Can you confirm that the MOM where the messages are sent to corresponds to
the IP address described in the MomServer.xml config file ?
Just to remind you about our problem : We are using 2 Moms running on 2
servers (hardware implementation).
What we saw during our tests is that the sender running on the first
server seems to send messages on the remote Mom by using an interface that
doesn't correspond to the IP address described in the MomServer.xml config
file, but through an interface mentionned in the /etc/hosts file :
-> messages are sent on the address "172.26.47.14" , instead of
172.26.44.73
- bt1flocur21 is the "hostname" of the remote server
- We are using SUN V880 (Solaris 8.0)
****************************************
In the /etc/hosts file
172.26.47.14 bt1flocur21
****************************************
I have this configuration in the MomServer.xml file :
<!-- Optional. This represents the default configuration -->
<ServerConfiguration host="172.26.44.73" embeddedJNDI="true" />
****************************************
In our config file :
publiclocConfigGeneral.mom.1.host=172.26.44.73
publiclocConfigGeneral.mom.1.port=1099
****************************************
Here is the code we use to initialize our mom connections :
private Context getRmiContext() throws Exception {
/*
* connect to the JNDI server and get a reference to root context
*/
Hashtable props = new Hashtable();
// default value (to be passed in config files)
String jndiname = "JndiServer";
String mode = "rmi";
logger_.debug ("getRmiContext: host: " + host_ + ", jndiname:" +
jndiname + ", mode: " + mode + ", port: " +port_);
String modeType = RmiJndiInitialContextFactory.class.getName();
/*
* put information regarding connection in the Hashtable
*/
props.put(Context.PROVIDER_URL, "rmi://" + host_ + ":" + port_ +
"/" + jndiname);
props.put(Context.INITIAL_CONTEXT_FACTORY, modeType);
/*
* create context
*/
Context context = new InitialContext(props);
return context;
}
}
With host_ and port_ set with the values retrieved in our config file.
Thanks in advance for your help !
Julien