Ok,
I now have my tiny jms client submitting messages, but the ejb doesn't
consume them.

I use the atm example as guideline and have this running. However when I
have a look at the atm example, I notice that neither does atm logs !!1 That
is, there doesn't appear anything in the table com_acme_atm_ejb_mainlog
table, whereas other tables are filled!!

What are the specific orion requirements, such that the jms-ejb consumes the
message ?? ( I am running on 1.4.7) and how can I debug the problem (look at
the topics's or somthing like that )?? I don't get any output from orion in
any log !! (strange!!!)

I will shortly explain my client and ejb hereunder as they are really short:
The ejb-jar.xml:
--------
<ejb-jar>
 <enterprise-beans>
    <message-driven>
      <description>JMS logger</description>
      <ejb-name>Hello</ejb-name>
      <ejb-class>HelloMSGBean.HelloBean</ejb-class>
      <transaction-type>Container</transaction-type>
      <message-selector>JMSType='mainLogMessage'</message-selector>
      <message-driven-destination>
        <destination-type>javax.jms.Topic</destination-type>
      </message-driven-destination>
    </message-driven>
 </enterprise-beans>
</ejb-jar>
--------

The onmessage part in the ejb:
------------
  public void onMessage(Message message) {
    System.out.println("onMessage");

    TextMessage textmessage = null;
    if (message instanceof TextMessage) {
      textmessage = (TextMessage)message;
    } else {
      return;
    }
----------

The client part:
---------------
  ctx=new InitialContext(p);

tcf=(TopicConnectionFactory)ctx.lookup("java:comp/env/jms/theTopicConnection
Factory");
  tcon = tcf.createTopicConnection();
  tcon.start();
   tsession = tcon.createTopicSession(false, Session.AUTO_ACKNOWLEDGE);
   topic = (Topic)ctx.lookup("java:comp/env/jms/theTopic");
   tpublisher = tsession.createPublisher(topic);
   TextMessage message = tsession.createTextMessage();
   message.setJMSType("mainLogMessage");
   message.setText("Hello, World");
   tpublisher.publish(message);
----------------

The part in the jms.xml file (I am not sure if this is necessary!!!??):
-------------
 <topic name="Demo Topic" location="jms/theTopic">
  <description>A dummy topic</description>
 </topic>
--------------

The application-client.xml:
-----------------
<application-client>
 <display-name>Something</display-name>
 <resource-ref>
  <res-ref-name>jms/theTopicConnectionFactory</res-ref-name>
  <res-type>javax.jms.TopicConnectionFactory</res-type>
  <res-auth>Container</res-auth>
 </resource-ref>
 <resource-ref>
  <res-ref-name>jms/theTopic</res-ref-name>
  <res-type>javax.jms.Topic</res-type>
  <res-auth>Container</res-auth>
 </resource-ref>
</application-client>
----------------

That's it, but the ejb doesn't print anything to the STDOUT.
What am I doing wrong ????.

Eddie

Reply via email to