performance problem with JMS

From: Christian \ (Christian.Gulich_at_IN.Stud.TU-Ilmenau.de)
Date: 08/23/04

  • Next message: Keith: "Re: Remove unicode from SQL"
    Date: Mon, 23 Aug 2004 15:25:55 +0200
    
    

    Hi,

    I use JMS for communication between a client and a "server", which is
    executed in an oracle database. Oracle supplies "Advanced Queuing",
    which implements the JMS-Interfaces.
    The first messages are sent very fast, often less than 100ms. But when
    time goes on, this time increases to more than one second. My code
    implements a MessageListener, where the server receives messages from
    the clients and processes them. The important parts look like this:

       QueueConnection m_qconn;
       QueueSession m_qsession;
       QueueSender m_sender_seekAnswer;

       public void onMessage (Message m) {
         try {
           MapMessage msg = (MapMessage)m;
           long newPos = msg.getLong("newPosition");
           long answer;
           ...
           MapMessage msgAnswer=streamvideo.m_qsession.createMapMessage();
           msgAnswer.setLong("newPosition", answer);
           m_sender_seekAnswer.send(msgAnswer);
           m_qsession.commit();
         }
         catch (JMSException ex) {
         }
       }

    where m_qsession and m_sender_seekAnswer are initialized in these methods:

       private void initQueueSession () {
         QueueConnectionFactory qcfact;
         m_qsession = null;
         try {
           qcfact = AQjmsFactory.getQueueConnectionFactory(
                 "host", "TestDB", 1521, "thin");
           m_qconn = qcfact.createQueueConnection("Tester", "pass");
           m_qsession = m_qconn.createQueueSession(
                 true, Session.CLIENT_ACKNOWLEDGE);
           m_qconn.start();
         }
         catch (Exception ex) {
         }
       }

       private void initSender() throws AQException, JMSException {
         Queue queue;
         queue=((AQjmsSession)m_qsession).getQueue("TESTER", "JMS_ANSWER_Q");
         m_sender_seekAnswer=((AQjmsSession)m_qsession).createSender(queue);
       }

    The described delay occurs at
         m_qsession.commit();

    If I do not use a transacted QueueSession and create m_qsession with
         m_qsession = m_qconn.createQueueSession(
                 false, Session.AUTO_ACKNOWLEDGE);
    the same beviour accours at
         m_sender_seekAnswer.send(msgAnswer);

    Do you have any ideas, what could cause this problem?
    Besides the sender there is a receiver too, which is created from
    m_qsession. Maybe this is a problem?

    Thanks in advance
    Christian

    X'Post: comp.lang.java.programmer, comp.lang.java.databases
    F'up: comp.lang.java.programmer


  • Next message: Keith: "Re: Remove unicode from SQL"

    Relevant Pages

    • performance problem with JMS
      ... I use JMS for communication between a client and a "server", ... executed in an oracle database. ... public void onMessage { ...
      (comp.lang.java.programmer)
    • DBD::Proxy - cannot do table_info
      ... via DBD::Proxy to an oracle database and the method returns this to the client: ... On the server side I see this: ... provide a hint or two? ...
      (perl.dbi.users)
    • Re: How to configure application server to connect to a two-node oracle RAC database
      ... i have to install the OCI driver on the application server as i ... Does the Oracle Database 10G Client CD ...
      (comp.databases.oracle.server)
    • Re: What doesnt lend itself to OO?
      ... >> proxy and instructs the server to constuct the real object. ... rather than client code. ... If 'clock' is instantiated in the server, ... > for the server interface at the OOA level. ...
      (comp.object)
    • This is going straight to the pool room
      ... or not the client has privilege to do what they're trying to do, ... The server environment is this: ... 3GL User action Routines that Tier3 will execute on your behalf during the ... Routine Name: USER_INIT ...
      (comp.os.vms)