Hi,

There is a in examples/loan-broker/src/su/servicemix.xml where specify
<property name="brokerURL" value="tcp://localhost:61616" />
I think you also need revise it accordingly.

Freeeman
On 2010-11-12, at 下午5:05, servicemix-user wrote:


hi

i think there is no network issue because i can access my 10.100.2.164 IP
from other system through SSH.
this is my client code. when i access the below code in the same system (ie servicemix running 10.100.2.164 ) it is working fine. but i cant run the
client code from other machine. In my local machine also i cant put
localhost instead 10.100.2.164 to run the client code because i modified
all the configuration files such as servicemix.xml, activemq.xml etc.
is there any other configuration changes needed in servicemix?

public class Servicemix_client implements Runnable {

  private static ConnectionFactory factory;
  private static CountDownLatch latch;
  private static Requestor requestor;

  public static void main(String[] args) throws Exception {
      System.out.println("Connecting to JMS server.");
      ActiveMQConnectionFactory connectionFactory = new
ActiveMQConnectionFactory("tcp:// 10.100.2.164 :61616");
      Connection connection = connectionFactory.createConnection();
      connection.start();
      Session session = connection.createSession(false,
Session.AUTO_ACKNOWLEDGE);
      Destination inQueue =
session.createQueue("demo.org.servicemix.source");
      Destination outQueue = new
ActiveMQQueue("demo.org.servicemix.output");
requestor = MultiplexingRequestor.newInstance(connectionFactory, new
JmsProducerConfig(), inQueue, outQueue);
      if (args.length == 0) {
          new Servicemix_client().run();
      } else {
          int nb = Integer.parseInt(args[0]);
          int th = 30;
          if (args.length > 1) {
              th = Integer.parseInt(args[1]);
          }
          latch = new CountDownLatch(nb);
ExecutorService threadPool = Executors.newFixedThreadPool(th);
          for (int i = 0; i < nb; i++) {
              threadPool.submit(new Servicemix_client());
          }
          latch.await();
      }
      System.out.println("Closing.");
      requestor.close();
      System.exit(0);
  }

  public void run() {
      try {
          System.out.println("Sending request.");
          Message out = requestor.getSession().createMapMessage();
          out.setStringProperty("test1", "1");
          out.setStringProperty("test2", "maruthi");
          out.setStringProperty("test3", "white");
          Message in = requestor.request(null, out);
          if (in == null) {
              System.out.println("Response timed out.");
          }
          else {
            System.out.println(in.getStringProperty("outxml"));
          }
      } catch (Exception e) {
          System.out.println("Error--->"+e);
      } finally {
          if (latch != null) {
              latch.countDown();
          }
      }
  }

}


--
View this message in context: 
http://servicemix.396122.n5.nabble.com/Remote-access-failed-javax-jms-JMSException-edu-emory-mathcs-backport-java-util-concurrent-TimeoutExn-tp3259970p3261659.html
Sent from the ServiceMix - User mailing list archive at Nabble.com.


--
Freeman Fang

------------------------

FuseSource: http://fusesource.com
blog: http://freemanfang.blogspot.com
twitter: http://twitter.com/freemanfang
Apache Servicemix:http://servicemix.apache.org
Apache Cxf: http://cxf.apache.org
Apache Karaf: http://karaf.apache.org
Apache Felix: http://felix.apache.org

Reply via email to