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
0
votes
0 answers

How to handle Connection Error in Message Driven Beans?

I have a Message Driven Bean listening to MQ Receiver Queue for incoming Messages. My MDB is implementing MessageListener and overriding OnMessage method, where I can handle any exception related to the received messages. All the Connection & Queue…
0
votes
1 answer

Inject a String into a Message Driven Bean

I want to configure the behaviour of one of my mdbs with string. i created a setMessageType method and want to inject the identifier string into the mdb by configuration in the ejb-jar (deployment descriptor). I know how do declare a bean in the…
0
votes
1 answer

mdbcontext.setRollbacksOnly() wipes out insertions done by ejb method annotated with @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW)

I am using mdb-jms. I have created an EJB stateless class that has 2 methods. (i) Method insertInput() is annotated as @TransactionAttribute(TransactionAttributeType.REQUIRES_NEW), does an insertion to the table. (ii) method getInput()…
0
votes
1 answer

MDB onMessage does not begin until ejbTimeout ends. Shouldn't it start asynchronously?

We have a javax.ejb.TimedObject which queues messages to an MDB like so... ctx = new InitialContext(); QueueConnectionFactory qCF = (QueueConnectionFactory) ctx .lookup("java:comp/env/jms/queueconnfactory"); Queue q = (Queue)…
Cal
  • 1,625
  • 4
  • 20
  • 30
0
votes
1 answer

MDB stop working after this exception

I have an enterprise event-driven application. I have 16 MDBs that read from a JMS queue. When I got some uncontrolled exceptions I receive this stack : ####
Massimo Ugues
  • 4,373
  • 8
  • 43
  • 56
0
votes
1 answer

Wrong Spring AppContext found in EAR

I have an EAR with multiple MDBs in it. Each MDB jar has its own application context. When a message arrives I can see from the logging that the appropriate MDB initialises, but it obtains the application context from different MDB! I thought each…
Synesso
  • 37,610
  • 35
  • 136
  • 207
0
votes
1 answer

What's the point of defining Timer on MDB Message Driven Bean?

What's the point of defining Timer on MDB Message Driven Bean ? Is it anyhow different from a timer on SLSB stateless sesstion bean or Singleton bean? MDB are intended form message processing, why would I want to clutter them with timers? Slsb or…
bastiat
  • 1,799
  • 2
  • 19
  • 38
0
votes
1 answer

Websphere Liberty How to get a MDB Listener working?

I'm trying to get an MDB Listener working in Websphere Liberty v16.0.0.4 but I don't get a message in my messages.log that the application that needs to use the MDB Listener has been bound to the activation spec. I have the following information: …
0
votes
2 answers

Correct way to write an activation spec in Open Liberty for Apache Qpid for Azure Service Bus

I have successfully configured Apache Qpid JMS client (0.41.0) in Open Liberty to send messages to an Azure Service Bus queue. My server.xml looks like this:
0
votes
1 answer

MDB Consumer not consuming messages from JMS queue in cluster environment of JBoss EAP 7

I have a clustered environment created with JBoss EAP 7.2 server. Following are the details : DC-Server JMS-Server 1 JMS-Server 2 AppDeployment Server I'm deploying my consumer MDB on AppDeployment Server and my JMS are configured on JMS nodes…
Abhijeet
  • 4,069
  • 1
  • 22
  • 38
0
votes
1 answer

Message-driven Beans in Open Liberty 19.0.0.3 do not activate when accessing ActiveMQ

I've got an OpenLiberty application server accessing Active MQ 5.15.18 via a Resource adapter, but I'm not able to properly configure the activation spec so the MDB is activated when a new message comes in. The application is able to put messages in…
0
votes
2 answers

Overwrite annotated Destination of MDB in a deployment descriptor

I developed a Message Driven bean that will now be used for multiple destinations. I want to define the Target Destination not by annotation (which would force me to change the code for each new destination) but in the deployment descriptor. In Java…
0
votes
2 answers

How to recover from deadlocks in Message Driven Beans in GlassFish?

I am running into a deadlock situation when receiving messages on a pool of MDBs in GlassFish. If I receive multiple messages that concurrently try to update the same set of rows, the MDB throws a LockAcquisitionException. Unfortunately the…
Naresh
  • 23,937
  • 33
  • 132
  • 204
0
votes
2 answers

EJB3 MessageDrivenBean throws exception This class is not trusted to be serialized as ObjectMessage payload when consuming an external ActiveMQ Queue

I'am using a message-driven bean with @MessageDriven to consume a external ActiveMQ Queue in a docker container, and on the ObjectMessage payload is required to use a java pojo (ArquivoRetornoDTO). So, when the onMessage method is called is thrown…
0
votes
0 answers

listening to IBM mq using message driven beans in Websphere application server

I have an application in springboot which is using jms to receive messages from ibm mq synchronously i.e., using .receive() method which is running fine, Now, I am implementing another process to run in background to receive async messages which is…
Harsha
  • 87
  • 1
  • 14