[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[xmlblaster] bug in multiple (parallel) connections
A problem with multiple connection shows up in the following code,
which sets up IOR, SOCKET, XML-RPC, and RMI connections:
XmlBlasterConnection con_corba_;
XmlBlasterConnection con_xmlrpc_;
XmlBlasterConnection con_socket_;
XmlBlasterConnection con_rmi_;
String[] conargs = new String[4];
String ip = prop.getProperty("ap1_ip");
conargs[0]="-client.protocol";
conargs[1]="IOR";
conargs[2]="-ior.file";
conargs[3]="djmproxy1.ior";
con_corba_ = new XmlBlasterConnection (conargs);
conargs = new String[6];
conargs[0]="-client.protocol";
conargs[1]="SOCKET";
conargs[2]="-socket.hostname";
conargs[3]=ip;
conargs[4]="-socket.port";
conargs[5]=prop.getProperty("ap1_socket");
con_socket_ = new XmlBlasterConnection (conargs);
conargs[1]="XML-RPC";
conargs[2]="-xmlrpc.hostname";
conargs[3]=ip;
conargs[4]="-xmlrpc.port";
conargs[5]=prop.getProperty("ap1_xmlrpc");
con_xmlrpc_ = new XmlBlasterConnection (conargs);
conargs[1]="RMI";
conargs[2]="-rmi.hostname";
conargs[3]=ip;
conargs[4]="-rmi.registryPort";
conargs[5]=prop.getProperty("ap1_rmi");
con_rmi_ = new XmlBlasterConnection (conargs);
XmlBlasterConnection con = con_xmlrpc_;
con.connect (connectQos, null)
con.publish (...)
The strage thing is that the log printout from the client indicates
that the RMI connection is being setup, and a trace with tethereal
confirmed that RMI traffic goes out of the client when it publishes
messages. Switching the order of the last two connection
initializations to
conargs[1]="RMI";
conargs[2]="-rmi.hostname";
conargs[3]=ip;
conargs[4]="-rmi.registryPort";
conargs[5]=prop.getProperty("ap1_rmi");
con_rmi_ = new XmlBlasterConnection (conargs);
conargs[1]="XML-RPC";
conargs[2]="-xmlrpc.hostname";
conargs[3]=ip;
conargs[4]="-xmlrpc.port";
conargs[5]=prop.getProperty("ap1_xmlrpc");
con_xmlrpc_ = new XmlBlasterConnection (conargs);
XmlBlasterConnection con = con_xmlrpc_;
con.connect (connectQos, null)
con.publish (...)
seems to have the effect that now the XML_RPC connection is being
used.
Overall, it seems that multiple connections cannot be used in
parallel, although this is what I need.
Comments ?
--
matighet at bbn.com BBN Technologies