commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wiechert, Holger-Fa.IKS" <Holger.Wiechert-Fa....@ProACTIV.de>
Subject Howto messenger: how to setup messenger to encapsulate bea weblogic topics or queues?
Date Tue, 17 Feb 2004 11:20:02 GMT
Hi,

I'm just starting using the messenger (build: commons-messenger-20040215.jar) with bea weblogic
6.1.
Maybe someone has an idea about what's wrong.
The following code gets an exception:

import org.apache.commons.messenger.Messenger;
import org.apache.commons.messenger.MessengerManager;
import javax.jms.Destination;
import javax.jms.JMSException;
import javax.jms.TextMessage;

public class MessTest {

  public void addAMessage(String text)  {
    try {
      Messenger messenger = MessengerManager.get("sercom");
      Destination destination = messenger.getDestination( "MyJMSQueue" );
      TextMessage message = messenger.createTextMessage(text);
      messenger.send( destination, message );
    }
    catch (JMSException ex) {
      ex.printStackTrace();
      throw new IllegalStateException(ex.getMessage());
    }

  }
}


Bea's System.out/err:

- Looking up: ProActivJMSConnectionFactory in JNDI
- Created JMS session: weblogic.jms.client.JMSSession@1014f9
- Using topic: MyJMSQueue
weblogic.jms.common.JMSException: Invalid destination name: MyJMSQueue
        at weblogic.jms.frontend.FEManager.destinationCreate(FEManager.java:150)
        at weblogic.jms.frontend.FEManager.invoke(FEManager.java:374)
        at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(Request.java:585)
        at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyncNoTran(DispatcherImpl.java:332)
        at weblogic.jms.client.JMSSession.createDestination(JMSSession.java:1454)
        at weblogic.jms.client.JMSSession.createTopic(JMSSession.java:957)
        at org.apache.commons.messenger.DefaultMessenger.getTopic(Unknown Source)
        at org.apache.commons.messenger.MessengerSupport.getDestination(Unknown Source)
        at de.proactiv.pbv.products.rentenkonto.fe.struts.MessTest.addAMessage(MessTest.java:26)
        ....

The queue "MyJMSQueue" exists on BEA (I also tried with topics, same result).

Messenger.xml is:

<?xml version="1.0" encoding="UTF-8"?>
<manager>
  <messenger name="sercom">
    <jndi lookupName="ProActivJMSConnectionFactory">
      <property>
        <name>com.sun.jms.internal.java.naming.factory.initial</name>
        <value>weblogic.jndi.WLInitialContextFactory</value>
      </property>          
    </jndi>
  </messenger>
</manager>


Thanks in advance,

Holger












Mime
View raw message