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
1
vote
1 answer

How to set the principal of a MessageDriven bean using annotations?

I'm running on glassfish v4 and I use a messagedriven bean. Currently I'm defining the principal under which the bean runs in the glassfish-ejb-jar.xml like: MessageConsumerBean
Roland
  • 7,525
  • 13
  • 61
  • 124
1
vote
1 answer

JMS - Redelivery flow in a queue

Configuration I´m using EJB 3 in OC4J 10.1.3.x The problem I create a queue producer with CLIENT_ACKNOWLEDGE orientation, like: queueConnection = queueConnectionFactory.createQueueConnection(); queueSession =…
andolffer.joseph
  • 613
  • 2
  • 10
  • 24
1
vote
1 answer

MDB with spring beans doesn't autowire beans from another package

I am using following MDB to connect to WMQ: @MessageDriven(name = "EventListener", activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue = "javax.jms.Queue"), @ActivationConfigProperty(propertyName =…
1
vote
1 answer

Wildfly JMS: MDB beans idle when messages exist

I am using the bundled JMS implementation on Wildfly 8.1 (HornetQ) to OCR a large number of documents. I want to have a pool of 3 MDBs consuming the messages of a Queue with the documents to be OCRed. Each MDB starts a process with the Apache…
Markos Fragkakis
  • 7,499
  • 18
  • 65
  • 103
1
vote
0 answers

put back messages to queue when MDB is suspended weblogic

I am using a MDB deployed in Weblogic 10.3.5 consuming messages from a queue. I'm suspending MDB programmatically but in weblogic console → queue supervision, there are pending messages. What can I do to put pending messages back into the queue? Or…
Tavo Sanchez
  • 141
  • 6
1
vote
1 answer

MDB(Message Driven Bean) failing on server startup

Several people seem to have the same problem(see this and this): If you startup a glassfish(v 4) server with an MDB(Message Driven Bean) and there are messages to be consumed, the MDB will start consuming the messages while the container is still…
Roland
  • 7,525
  • 13
  • 61
  • 124
1
vote
0 answers

why message getting re-delivered to a MDB

We have a MDB running on weblogic 12c with the following definition @TransactionManagement(TransactionManagementType.BEAN) @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "destinationType", propertyValue =…
1
vote
0 answers

How to decouple MDB and classes sending soap requests

We connect to external partners webservices via a MDB on Websphere. One MDB contain code for 15 partners. When the MDB receive a message it finds out which partner it is for and calls the partnerHandler class. The class communicate with the exernal…
1
vote
1 answer

Glassfish: Why are there 2 pools for the same MDB: one in ejb and one in war?

SCENARIO: I have a java maven ear project that I run on GF 3.1.2. In that project I want to use a MDB defined in an individual ejb module so i put it as a dependency. So the structure is as follows: ProjectEAR: - ProjectEJB -…
Emde
  • 31
  • 4
1
vote
1 answer

MDB not receiving message from stateless session bean

I have using stateless bean as JMS message producer: package com.cts.businesslogic; import javax.annotation.Resource; import javax.ejb.LocalBean; import javax.ejb.Stateless; import javax.jms.Connection; import javax.jms.ConnectionFactory; import…
user613114
  • 2,731
  • 11
  • 47
  • 73
1
vote
3 answers

How make sure that singleton message driven bean processes one message at a time?

How can I make sure that my singleton message driven bean processes one message at a time? @Singleton public class MyMdb implements MessageListener { @Override public void onMessage(final Message message) { ... } } Making the…
1
vote
0 answers

Cannot deploy MDB with durable subscription(topic) in EJB2.1 for Glassfish 4

I am in the process of migrate from OC4J to glassfish and struggles to deploy MDBs with durable subscriptions on Glassfish4 The class MyObserver implements MessageDrivenBean and MessageListener and is registered with a topic Created topic: …
gon
  • 46
  • 5
1
vote
1 answer

MDB Message Throttling

I am using EJB MDB 3.0 and WAS 7 server in my Application. I have 7 MDBs, so there are 7 Queues and 7 Activation Specifications created on WAS Server. I have set the all the 7 Activation Specs maxPoolDepth to 6 and the Resource Adapter customer…
1
vote
1 answer

Inteceptors doesn't work in Message Driven Bean

I was trying to use method level interceptor from message driven bean. But i use it, interceptor was not called but when i used interceptor on class level or if put @interceptors(sampleInterceptor.class) on onMessage method it's working. Any body…
user9090
  • 23
  • 5
1
vote
1 answer

EJB 3.1 Message-driven beans bindings in Websphere 8 using Listener ports

Does anybody know how to configure the EJB 3.1 deployment descriptor in Websphere 8 and the ibm-ejb-jar-bnd.xml file for a message-driven bean that uses a listener port instead of an activation specification? The IBM info center is quite vague on…
Rida
  • 11
  • 1
  • 2