1 Reply Latest reply on Mar 18, 2003 1:43 PM by Michael Remijan

    SpyObjectMessage NOT instanceof ObjectMessage??

    Michael Remijan Newbie

      Hi,

      In the onMessage(Message inMessage) method of a message driven bean, I'm trying a simple if statement:

      <<<<<<<<<<<<<<<<<<<<
      if (inMessage instanceof javax.jms.ObjectMessage)
      {
      ...
      }
      >>>>>>>>>>>>>>>>>>>>

      and it never evaluates to true even though it reports its class as being of type org.jboss.mq.SpyObjectMessage and my client is sending an ObjectMessage:

      <<<<<<<<<<<<<<<<<<<<
      ...
      ObjectMessage om = session.createObjectMessage();
      om.setObject(new Integer(100));
      sender.send(om);
      ...
      >>>>>>>>>>>>>>>>>>>>

      Any ideas??