commons-dev mailing list archives

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

I'm just starting using the messenger (build: commons-messenger-20040215.jar) with bea weblogic
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) {
      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(
        at weblogic.jms.frontend.FEManager.invoke(
        at weblogic.jms.dispatcher.Request.wrappedFiniteStateMachine(
        at weblogic.jms.dispatcher.DispatcherImpl.dispatchSyncNoTran(
        at weblogic.jms.client.JMSSession.createDestination(
        at weblogic.jms.client.JMSSession.createTopic(
        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(

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

Messenger.xml is:

<?xml version="1.0" encoding="UTF-8"?>
  <messenger name="sercom">
    <jndi lookupName="ProActivJMSConnectionFactory">

Thanks in advance,


View raw message