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

What is the bean scope and context holder for Spring Cloud Stream?

For REST call, we can use Request-scoped bean and RequestContextHolder to access the HTTP request context. For message-driven microservices using Spring Cloud Stream, what are the equivalent bean scope and context holder that we can use to access…
wltheng
  • 750
  • 1
  • 11
  • 26
2
votes
0 answers

Wildfly - MDB stops processing other messages after error occur in one message

To simplify the problem I've configured an MDB with only one session. import javax.annotation.Resource; import javax.ejb.ActivationConfigProperty; import javax.ejb.MessageDriven; import javax.ejb.MessageDrivenContext; import…
Camilla
  • 489
  • 5
  • 14
2
votes
1 answer

JavaEE- messaging system with JMS and MDB

I am pretty new to JavaEE and I try to build a messaging system using jms and mdb. I want to do the following: - a server for handling messages which is realized by a mdb - different clients who should communicate - clients should just…
mLe
  • 73
  • 8
2
votes
1 answer

Error deploying MDB with multiple queue names in OpenEJB

The following error appeared at Tomcat/OpenEJB startup after upgrading to OpenEJB 3.1.3: ERROR - Unable to register MBean java.lang.IllegalStateException: javax.management.MalformedObjectNameException: Invalid character ',' in key part of property …
topchef
  • 19,091
  • 9
  • 63
  • 102
2
votes
1 answer

Should a message driven bean be deployed in .ear files?

I have an application which is build as a .war file, we have a new requirement to read the JMS queues, i've tried to add ejb-jar.xml file and pointed to the message listener, but no messages were received by the deployed application, and deploy logs…
Zeus
  • 6,386
  • 6
  • 54
  • 89
2
votes
1 answer

EJB module - files

Can anyone explain me what are ibm-ejb-jar-bnd.xmi , ejb-jar.xml ,ibm-ejb-jar-ext.xmi and ibm_ejbext.properties. What are these files and what is configured in these files. What is the need of all these files in ejb project. What does…
2
votes
1 answer

SpringBeanAutowiringInterceptor for MDB on Weblogic injection failure

I have a JavaEE 6 application using EJB and Spring 4 with a simple MDB that receive a single bean injection, but, each time I send a message to this MDB, below log appears: com.oracle.pitchfork.interfaces.LifecycleCallbackException: Failure to…
irobson
  • 825
  • 8
  • 20
2
votes
2 answers

MDB Listener for inbound JCA adapter doesn't start in WildFly

Does somebody managed to deploy in WildFly (9.0.2 or 10.0) a MDB bean which listening for standalone JCA adapter? I've just created an inbound JCA adapter (using ironjacamar-1.2.6) and deployed it on WildFly. Like this: @Activation(messageListeners…
Maxim Karavaev
  • 186
  • 1
  • 9
2
votes
1 answer

MessageDriverBean - Retry mechanism

I've been reading around SO and some other google results and I got confused, some say I've to call context.setRollbackOnly(); other say it is not required as the MDB will do it by himself. So, I've a MessageDrivenBean class that receives messages…
dazito
  • 7,740
  • 15
  • 75
  • 117
2
votes
1 answer

Unclear EJB 3.1 spec: Message Driven Bean superclasses allowed or not?

The EJB 3.1 spec is unclear to me in whether Message Driven Bean superclasses are allowed. Can anyone shed any light on this? Section 5.6.2, page 151 says: A message-driven bean class must not have a superclass that is itself a message-driven bean…
jhyot
  • 3,733
  • 1
  • 27
  • 44
2
votes
2 answers

How to install WebSphere MQ resource adapter (wmq.jmsra.rar) in JBoss 6.2 EAP?

Design: I have a queue manager (EXAMPLE.QM) with Server-connection channel (EXAMPLE.CHANNEL), request queue (EXAMPLE.TEST.QUEUE), and reply queue (EXAMPLE.TEST.REPLY). My application will be using a message driven bean (MDB) to listen on…
2
votes
1 answer

Java EE 6 + JPA - Exception: Message Driven Bean cant be managed bean

I create an Enterprise Application CustomerApp that also generated two projects CustomerApp-ejb and CustomerApp-war. In the CustomerApp-ejb, I create a SessionBean call CustomerSessionBean.java as below. package com.customerapp.ejb; import…
2
votes
0 answers

JMS limit MDB threads - process messages one by one

I am new to JMS and I need some help with managing the JMS/MDB threads. When I have 20 messages queued and I "start" the MDB all messages are being delibvered at the same time and processed imidiatelly. What I need is to have only one message that…
2
votes
1 answer

Message Driven Bean and deployment descriptor

I have simple Message Driven Bean @Named @MessageDriven(mappedName = "jms/myQueue") public class TestMDB implements MessageListener { @Override public void onMessage(Message msg) { //... } } How can I achieve the same using only…
Joel
  • 473
  • 2
  • 7
  • 22
2
votes
1 answer

Injecting jms resource in servlet & best practice for MDB

using ejb 3.1, servlet 3.0 (glassfish server v3) Scenario: I have MDB that listen to jms messages and give processing to some other session bean (Stateless). Servelet injecting jms resource. Question 1: Why servlet can`t inject jms resources when…
kislo_metal
  • 446
  • 10
  • 27