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

MDB : dynamic selector

I have several servers running the same code but each handling specific messages (they are spread by geographical area and must should treat all messages related to their area) I thought to use a single queue and a message selector to filter the…
fred
  • 192
  • 1
  • 12
2
votes
0 answers

Can we change MDB configurations at run time?

Can we change MDB configurations at run time? How? Any Example or link?
user574557
  • 243
  • 5
  • 14
2
votes
1 answer

MDB connected to Oracle AQ via a datasource

Im trying to create a MDB (JBoss AS 6) that connect to an Oracle AD queue. I got the following example to work: @MessageDriven(name = "TestMdb", activationConfig = { @ActivationConfigProperty(propertyName="destinationType", propertyValue =…
Andrea Polci
  • 1,011
  • 13
  • 27
2
votes
1 answer

WAS 7.0 - default interceptors in MDBs

I'm having problems advising MDBs with default interceptors in Websphere 7.0 AS. I have tested the same code using Glassfish AS and it works fine. The strange thing is that WAS interceptor is applied for stateless beans but not for…
Marcin Michalski
  • 1,266
  • 13
  • 17
2
votes
1 answer

How to stop message delivery to a Message Driven Bean?

Question Is it possible to stop a Message Driven Bean (programmatically), so that it doesn't consume new messages, but processes running transactions as usual? (This is a follow up of How to stop message processing before undeploying?). Given JBoss…
Christian Strempfer
  • 7,291
  • 6
  • 50
  • 75
2
votes
1 answer

What other possibilities beside MDBs exist in Java to program message consumers?

I have read that there are many ways of handling JMS(Java Messaging Service) messages, MDB(Message Driven Bean) is just one of them. So what are other possibilities beside MDBs exist in Java to program message consumers?
Kum
  • 333
  • 7
  • 20
2
votes
1 answer

How to stop message processing before undeploying?

Given: A JMS message queue. A timer service which puts messages to that queue periodically (from a database). A JEE6 message-driven bean which reads from the queue. The timer service and the message-driven bean are part of different deployment…
Christian Strempfer
  • 7,291
  • 6
  • 50
  • 75
2
votes
1 answer

How to handle Multithreaded insertions with unique constrain in the database using JPA/Hibernate?

in a message driven bean i persist entries to lookup-table with unique entries. Basicly i create a select statement with the criteria api and if i don't find an entry, i create one. Currently this code is running into mysql errors because in certain…
Laures
  • 5,389
  • 11
  • 50
  • 76
2
votes
0 answers

JBoss 5.1.0. GA shutdown

On a 5.1.0GA. server,at shutdown : Normally, when I call shutdown on the jboss, I would expect that the following happens: all MDBs do stop processing any further JMS all (Quartz) jobs are closing down jboss is shutting down itself However, it…
Sergiu
  • 2,502
  • 6
  • 35
  • 57
2
votes
2 answers

Message Driven Bean and message consumption order

I have an MDB that gets subscribed to a topic which sends messages whose content is eventually persisted to a DB. I know MDBs are pooled, and therefore the container is able to handle more than one incoming message in parallel. In my case, the order…
2
votes
1 answer

Health check API for message-driven beans

I'd like to be able to do a health check on a deployed Message-Driven Bean in Production. My initial idea was to add a health() method ensuring that the JMS Queue (for reading) and the Database (for writing) are both available, and then expose this…
Thomas Naskali
  • 551
  • 5
  • 19
2
votes
1 answer

What is the use of @TransactionAttribute

In below MDB code fragment which will be deployed in JBoss and IBM MQ as the message provider, what is the use of @TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED) annotation? Why is it kept on class level? import javax.ejb.*; import…
2
votes
2 answers

Java Connector Architecture and TCP/IP

So my most basic question here is: how do you build TCP interfaces into your Java EE applications? Instead of interacting with a legacy EIS, I need to interact with a block of TCP/IP ports. Ideally, I'd like a message-driven bean to have it's…
Joseph Weissman
  • 5,697
  • 5
  • 46
  • 75
2
votes
1 answer

Event driven programming with weblogic MDB

I am building an application which acts as an event listener and based on the events received it needs to execute certain steps or work-flow. Is it better to have events posted to a single queue and MDB invoking different business logic components…
lazy
  • 21
  • 1
2
votes
2 answers

How to enable MessageDrivenContext injection?

I'd like to explicity set a transaction to rollback in a JavaEE MDB: private MessageDrivenContext context; @MessageDriven(mappedName = "jms/ReaderQueue", activationConfig = { @ActivationConfigProperty( propertyName =…
Synesso
  • 37,610
  • 35
  • 136
  • 207