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
3
votes
1 answer

Stateless EJB not injected in message driven bean (MDB)

I have a message driven bean (MDB) that implements MessageListener and has several EJB attributes but non of them are injected so I have to inject them manually. The MDB also has a resource and a CDI bean that are injected fine. Why the EJBs are not…
3
votes
0 answers

Null EntityManager/EJB Injected into MDB

I have a message-driven bean (MDB) deployed to WebLogic 12.1.3. I tried to inject an entity manager into the MDB using the @PersistenceContext annotation, but the entity manager is null. I also tried injecting a simple stateless session bean and it…
Steven P.
  • 941
  • 5
  • 15
3
votes
3 answers

Weblogic 10.3 MDB throwing javax.sql.DataSource exception

Here are the applications that I'm using: Weblogic 10.3.3 Websphere MQ 7.0 Oracle 11g Express Edition (DB) Here is the current process flow: A message is read off a Websphere MQ queue by Weblogic and processed by the MDB The MDB saves the message…
Naqeeb
  • 245
  • 4
  • 10
3
votes
1 answer

Is it possible to stop an MDB from receiving messages in Liberty Profile?

In a full WAS it is possible to stop and restart a JMS activation specification, either by using the administrative console or by using the J2CMessageEndpoint MBean. My question is if the J2CMessageEndpoint MBean will be available in Liberty…
Zvempa
  • 33
  • 3
3
votes
1 answer

How do I pause / suspend a message-driven bean from consuming?

I know I could re-enqueue, but I'd like to know if I can enable/disable anything using the internals or JMX I am using TomEE+ 1.6.0, which relies on ActiveMQ
Leo
  • 6,480
  • 4
  • 37
  • 52
3
votes
1 answer

How do I change a specific MDB max-pool-size at runtime on Glassfish

I'd like to be able to change the max-pool-size value at runtime. Currently I have to modify the xml and restart Glassfish. Any ideas?
Preston
  • 3,273
  • 4
  • 26
  • 35
3
votes
2 answers

Handling connection errors in a MDB

Is it possible to manage connection timeouts or errors in a MessageDrivenBean? You can make the factory to retry connecting a certain number of times but... is it possible to make some actions each time that a reconnection retrial is neccesary? Is…
Rafa de Castro
  • 2,474
  • 1
  • 24
  • 44
3
votes
1 answer

How to inject a Stateless Session Bean into a Message Driven Bean?

I'm trying to inject a remote stateless session bean in a message driven bean. I've been looking this post: How to inject a Session Bean into a Message Driven Bean? The Session Bean and the Message Driven Bean are in two diff. Here an exemple of…
3
votes
2 answers

Message Driven bean external configuration for JBoss with IBM MQ

I am working on a Notification Service using IBM MQ messaging provider with JBoss eap 6.1 environment. I am successfully able to send messages via MQ JCA provider rar i.e. wmq.jmsra.rar file. However on consumer part my current configuration looks…
Mohit Dhuper
  • 423
  • 1
  • 8
  • 17
3
votes
3 answers

How to acknowledge messages in Message Driven Beans

In the JMS documentation I read that Message Driven Beans doesn't support CLIENT_ACKNOWLEDGE mode, only DUPS_OK_ACKNOWLEDGE and AUTO_ACKNOWLEDGE. As I understand it, in AUTO_ACKNOWLEDGE mode, the message is acknowledged (deleted from the…
Amer A.
  • 1,025
  • 2
  • 16
  • 22
3
votes
1 answer

Setting activation config properties in MessageDrivenBeans dynamically

I am experiencing some difficulties trying to get our MDBs to use dynamically loaded properties in different environments. @MessageDriven(activationConfig = { @ActivationConfigProperty(propertyName = "providerURL", propertyValue =…
3
votes
2 answers

JBoss AS7 hangs after MDB lock

I'm currently getting an intermittent exception in JBoss AS7 that, unfortunately, I cannot yet reproduce. We are currently running two applications that are basically set as producer/consumer of JMS messages. We are using the default HornetQ…
Isabelle
  • 631
  • 1
  • 7
  • 14
3
votes
1 answer

Consuming MQ Messages: JMS Listener vs Message Driven Bean

Our IBM MQ Series queue Q1 will be receiving XML messages that we need to consume, invoke XSLT and place the resulting XML on another queue Q2. The size of the messages is small (up to 5KB). We can have 50 different types of XML messages. They are…
JavaUser201
  • 107
  • 1
  • 4
  • 11
2
votes
1 answer

Race condition on MDB: which is the best way to handle it?

I have an event-driven application based on MDB, spring integration and JPA for persistence. The application is deployed on weblogic 10.3 with a max-pool-size default value (16). My application need to handle some messages that modfies DB. Imagine…
2
votes
1 answer

How to configure the pool-size for a Message driven Bean in JBoss 6?

I want to configure a bigger pool size for my message consumer in my java ee application, as the consumption of a message requires some time (mostly waiting). How can i do this? I would prefer a solution that uses annotation. Is this task dependant…
Laures
  • 5,389
  • 11
  • 50
  • 76