Win a copy of Rust Web Development this week in the Other Languages forum!

Bruce Snyder

author
+ Follow
since Nov 03, 2010
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Bruce Snyder

If the JndiObjectFactoryBean and the DMLC are both not marked to not start up by default, then I'm not sure where the connection is coming from. If I had this problem, I would grab a thread dump from the app while it's running so that I could locate the stack trace containing the JMS Connection object. This might help you understand where the connection is originating.

Bruce
10 years ago
Well the error states that 'Client id, TCAnsPaperSubscriber471, is in use.' So it seems like a client id is being used twice. The error detail is also telling you where that client id is being used:

"The JNDI name weblogic.jms.connection.clientid.TCAnsPaperSubscriber471 was found, and was bound to an object of type weblogic.jms.frontend.FEClientIDSingularAggregatable : FEClientIDSingularAggregatable(SingularAggregatable(<6176547454817656908.1>:302):TCAnsPaperSubscriber471)"



Bruce
10 years ago
As the error indicates, the destination cannot be reached. Can you send messages to the topic using that connection?

I find it easiest to troubleshoot situations by breaking things down to the simplest possible case. Using the Spring SingleConnectionFactory and JmsTemplate, I would do this:

  • Look up the connection
  • Send a message
  • Receive a message

  • If that works, then receive the message using the Spring DMLC and a listener instead of the JmsTemplate.

    Hope that helps.

    Bruce
    10 years ago
    By default, the DMLC will start up automatically when the Spring application context is started. This is controlled by the autoStartup property in the AbstractJmsListeningContainer set to true. There's no need to start up the listeners as you mentioned because they get invoked each time a message arrives in the DMLC.

    Which message listener interface does your TCDataSubscriber bean implement? For more info, see the Spring Reference Doc's section named Receiving a message.

    Bruce
    10 years ago
    Yes, more than one MDB can listen to the same queue. The only way to target certain messages for certain MDBs is to use JMS selectors. You can find more info about JMS selectors in The JMS API Programming Model.

    Bruce
    Message Broker - The message-oriented middleware server that hosts messaging destinations (i.e., queues and topics) for the purposes of asynchronous communication. Sometimes known as a queue manager
    Message Queue - A messaging destination that uses a queue data structure to hold messages and is hosted by the message broker. The alternative to a queue is a topic which provides publish/subscribe semantics.
    Resource Adapter - A Java EE Resource Adapter is a component that allows communication between a Java EE application and an enterprise information system such as a database server, a messaging server, a CRM server, an ERP server, etc.

    More information about JMS and related concepts can be found in the The Java Message Service API.

    Hope that helps.

    Bruce
    In ActiveMQ, failover is commonly used to refer to the Failover Transport. Based on your question, I suspect that you are referring to ActiveMQ Master/Slave and, more specifically, Shared File System Master Slave. This is the only thing that would refer to disk storage in ActiveMQ besides message persistence and you haven't mentioned that.

    The ActiveMQ shared filesystem master/slave functionality utilizes a shared filesystem to provide a high availability configuration. The only requirement is that the filesystem support locking. Using the shared filesystem to store broker data, many instances of ActiveMQ can be pointed at the same data store location on the filesystem. The first broker instance that gets a lock on the data store location is considered the master and any other brokers pointed at this same location will remain in a warm standby state. If the master broker fails, then the lock on the data store location is released and the next broker to grab the lock will become the new master. There are some diagrams demonstrating this functionality in the Shared File System Master Slave doc. And there's some more information in ActiveMQ In Action.

    Bruce
    I just wrote a series of articles about ActiveMQ and Tomcat and the first article in the series was just made available this week:

    ActiveMQ and Tomat: Perfect Partners

    This is the first article in a three-part series about using ActiveMQ and Tomcat together. For more information, check out chapter 8 of the forthcoming ActiveMQ In Action book.

    Bruce
    FWIW, I just wrote a series of articles on the topic of ActiveMQ and Tomcat for the TomcatExpert.com website. The first article in the series was just made available this week:

    ActiveMQ and Tomat: Perfect Partners

    The example in the article uses an HTML form to post a message to an ActiveMQ queue which is consumed by the Spring message listener container. Pretty simple stuff really. The article provides a brief description of using ActiveMQ and Tomcat which was excerpted from the forthcoming book ActiveMQ In Action which contains much more detail on this topic in chapter 8.

    If you have any questions, let me know.

    Bruce
    11 years ago