Re: Exceptions thrown from onMessage() method of MDBs.

Dave Glasser <[email protected]>
Newsgroups gmane.comp.java.sun.ejb.general
Message-ID <[email protected]>
Thanks Sanjeev, for your reply. I did finally figure out that it was a
JMS issue, and not an EJB issue that I was dealing with. I wish the EJB
spec had given a hint, though, something like "the configuration of the
message queue will determine if a new bean instance will be created and
the onMessage() call retried...". I changed the appropriate JMS setting
in the Weblogic console (which unfortunately was set to unlimited
retries with a 0 millisecond delay) and the problem went away.


--- sanjeev kasarabada <[email protected]> wrote:
> Dave,
>        Looks like it is a RunTimeException occuring in
> the MDB. When this happens the MDB is removed from the
> container. At the same time the message is redelivered
> by the JMS server to the MDB since the onMessage() has
> not returned succesfully. A new MDB is created and the
> whole cycle repeats again. This is totally correct
> behaviour as per the JMS specification. It is up to
> you to fix the RunTimeException.
> Hope it helps.
> Thanx,
> Sanjeev
>
> --- Dave Glasser <[email protected]> wrote:
> > I have a third-party app (IOW, not my code) that
> > uses a message driven
> > bean to send emails. I'm running it in Weblogic 6.1.
> > Any time the
> > onMessage() method of the MDB fails, it wraps any
> > resulting exception
> > in an EJBException and throws the EJBException.
> >
> > What happens next is that Weblogic will discard the
> > MDB (per the EJB
> > 2.0 spec), and then create a new MDB instance and
> > retry the call to
> > onMessage(). This cycle continues as long as the
> > onMessage() call keeps
> > failing, and this can result in an endless cycle
> > which fills the log
> > files, or in some cases sends thousands of email
> > messages until the
> > server is killed.
> >
> > I'm not all that familiar with MDB, and I haven't
> > found anything in the
> > EJB 2.0 spec or in the Weblogic 6.1 docs that
> > specifies that the
> > container will retry onMessage() calls that fail.
> > Can anyone provide
> > any insight into this? How can I get the container
> > to simply give up
> > when an onMessage() call fails? Is this a
> > Weblogic-specific behavior
> > for which there is some configuration setting I can
> > change?
> >
> >
> > __________________________________
> > Do you Yahoo!?
> > New Yahoo! Photos - easier uploading and sharing.
> > http://photos.yahoo.com/
> >
> >
>
===========================================================================
> > To unsubscribe, send email to [email protected]
> > and include in the body
> > of the message "signoff EJB-INTEREST".  For general
> > help, send email to
> > [email protected] and include in the body of the
> > message "help".
>
>
> __________________________________
> Do you Yahoo!?
> New Yahoo! Photos - easier uploading and sharing.
> http://photos.yahoo.com/
>
>
===========================================================================
> To unsubscribe, send email to [email protected] and include in
> the body
> of the message "signoff EJB-INTEREST".  For general help, send email
> to
> [email protected] and include in the body of the message "help".


__________________________________
Do you Yahoo!?
New Yahoo! Photos - easier uploading and sharing.
http://photos.yahoo.com/

===========================================================================
To unsubscribe, send email to [email protected] and include in the body
of the message "signoff EJB-INTEREST".  For general help, send email to
[email protected] and include in the body of the message "help".
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.