Questions tagged [message-driven-bean]

A message-driven bean is an enterprise bean that allows J2EE/Java EE applications to process messages asynchronously.

A message-driven bean is an enterprise bean that allows J2EE/Java EE applications to process messages asynchronously. It acts as a JMS message listener, which is similar to an event listener except that it receives messages instead of events. The messages may be sent by any J2EE/Java EE component, or by a JMS application, or a system that does not use Java technology at all.

Resources:

438 questions
2
votes
1 answer

How can I prioritize messages on different queues?

A resource allocation/prioritizing problem. I'm working on a Java EE application which has a number of Message Driven Beans (MDB) which receive messages from different JMS queues, let's say queue A/MDB A and queue B/MDB B for simplicity. When there…
DagR
  • 2,900
  • 3
  • 24
  • 36
2
votes
1 answer

How to do statistics collection in MDBs state of the art?

I have multiple MDBs (and plenty of mdb instances) as consumers for messages. I have to collect certain statistics inside these Beans and send them every X (currently 30) seconds to a JMS destination. Is it ok to do this in the bean itself? for…
Laures
  • 5,389
  • 11
  • 50
  • 76
2
votes
3 answers

MDB Message consumer delay

Is there any option in hornetq to set message consumer delay. if so kindly help with an example. Our Req: We need MDB to read message with a constant 2 min delay.
vairam
  • 471
  • 1
  • 11
  • 26
2
votes
3 answers

How to configure pool size of Message Driven Bean

I would like to configure the pool size of a MDB but just one. I deploy my application on JBOSS 6 or Glassfish 3 so the solution must be standard. I found for JBOSS maxSession for @ActivationConfigProperty but it is not standard For glassfish i…
Pindi
  • 23
  • 1
  • 3
2
votes
1 answer

Connecting JBoss 5.1 MDBs to Websphere MQ queues

I'm trying to upgrade a system running jboss3.x to jboss5.1. The system uses MDB's listening on queues in WebSphere MQ, so the 'message-driven' is connected to a Container/'invoker-proxy-binding' via 'configuration-name' - the standard way to…
2
votes
1 answer

Weblogic/Message Driven Bean processing issue

Technologies: Jave EE, Weblogic 10.3, JMS Scenario: An EJB module, say Module_1, with 3 distinct Message Driven Bean (MDB) classes monitoring 3 different Java Mssage Queues (JMS). Messages are constantly being added to these beans. Problem: Once…
Bhushan
  • 18,329
  • 31
  • 104
  • 137
2
votes
1 answer

Are there limitations on deploying an MDB in a JBoss WAR?

We are not seeing our Message Driven Bean receive any messages when deployed in a war in JBoss 4.2.3. Are there any known limitations on using MDBs in WAR deployments?
Adam
  • 3,675
  • 8
  • 45
  • 77
2
votes
2 answers

Call to slow service over HTTP from within message-driven bean (MDB)

I have a message driven bean which serves messages in a following way: 1. It takes data from incoming message. 2. Calls external service via HTTP (literally, sends GET requests using HttpURLConnection), using the data from step 1. No matter how long…
anenvyguest
  • 163
  • 8
2
votes
1 answer

How to view Message list in HornetQ

We have limited the number of maxSession to 5 @ActivationConfigProperty(propertyName = "maxSession", propertyValue = "5") If more than 5 concurrent request comes, then it has to wait in the queue. Is there any option to view the number of waiting…
vairam
  • 471
  • 1
  • 11
  • 26
2
votes
1 answer

SessionContext RollBackOnly and MDB's

Having an MDB that receives a message in a transaction and then does several EJB calls if I call in one of those EJB's this.sessionContext.setRollbackOnly() will this trigger the JMS message's redelivery ? All the EJB methods are marked with…
Sergiu
  • 2,502
  • 6
  • 35
  • 57
2
votes
1 answer

JMS/MDB rollback

We have a application, which reads of JMS and does some database transactions, all as part of one XA transaction.. If we find the message has some problems, we want to rollback the database, but we don’t want the rollback off JMS to have us read the…
Sergiu
  • 2,502
  • 6
  • 35
  • 57
2
votes
1 answer

JMS setRollbackOnly - inconsistent behaviour

Please have a look at the following Message Driver Bean. The message comes in, we call clearProperties() on it to unlock and be able set some other properties on it. At the end we call setRollbackOnly() on the MessageDrivenContext so that the…
2
votes
2 answers

Glassfish v3: Can't Deploy MessageDriven Bean - Missing Destination JNDI Name

I am trying to deploy an ear that contains an EJB jar. The jar only contains one MDB class: package my.package; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.jms.JMSException; import…
sdoca
  • 7,832
  • 23
  • 70
  • 127
2
votes
2 answers

JMS and JTA Transactions in Java EE

I think I am not getting something right with JMS and JTA. I am running in a Java EE container with all CMTs. Here is what I am doing: In an SLSB, write something to the database From the same method of the SLSB, post a message to a JMS queue An…
Masum
  • 61
  • 1
  • 6
2
votes
3 answers

MDBs and durability

For durability to make sense, should the app server in which an MDB is deployed to be separated from the JMS Provider (server), so that if the app server shuts down and is restarted later, the MDB can be sent the messages that it had missed while…