users@glassfish.java.net

Re: JMS Topic to MDB to EJB to JPA - Data Integrity/Insertion Problems

From: Sivakumar Thyagarajan <Sivakumar.Thyagarajan_at_Sun.COM>
Date: Wed, 09 Apr 2008 20:32:07 +0530

Hi jamesdh

glassfish_at_javadesktop.org wrote:
> I hope it is clear what I am saying here. Each individual
> ObjectMessage I am passing onto the Topic I have *insured* is unique,
> so if the MDB and JPA were working correctly, I should not encounter
> any errors even if I straight up persisted/committed the objects to
> the DB.
>
> However, the MDB and/or JPA do not seem to be working correctly
> *only* when the data is passed in at a fast rate. Its as though
> multiple instances of the MDB are processing the same ObjectMessage,
> and the only way that could be happening is if JMS or the MDB simply
> are not working properly.

I understand that you are using auto-ack and I am assuming you are using
  CMT. The problem for this could unfortunately lie anywhere from the
app to MDB container to JPA runtime.

In order to debug this issue further could you try the following:
- Ensure that a duplicate message has been delivered. You could print
the Message object in the MDB and grep the server log to ensure that the
same Message ID appears against two MDBs (possibly two different AS threads)
- Ensure that the duplicate message delivery (if one exists) is not a
redelivery.
- What is the transaction isolation level of the query? I see that a
QueryHint Lock mode sets the Tx isolation level in Toplink Essentials.
Does modifying that help?
https://glassfish.dev.java.net/javaee5/persistence/entity-persistence-support.html#Query_Hints
- Does disabling Toplink shared cache or pessismistic locking help?
http://weblogs.java.net/blog/guruwons/archive/2006/09/understanding_t_1.html
- Does this happen when you use Hibernate with GlassFish as well?
http://blogs.sun.com/theaquarium/entry/running_hibernate_in_glassfish
- Could you share your MDB sources, deployment descriptors, domain.xml,
server.log etc if the above suggestions do not help you?

Thanks
--Siva.


>
> This seriously irks me because I've used Hibernate/JBoss (granted almost 3 years ago now) to pass hundreds of objects a second over JMS without problems, and I've also done similar things with Hibernate/JBoss in passing objects and then persisting them, again without problems. I try to do a dozen a second and Glassfish pukes on me.
> [Message sent by forum member 'jamesdh' (jamesdh)]
>
> http://forums.java.net/jive/thread.jspa?messageID=268257
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe_at_glassfish.dev.java.net
> For additional commands, e-mail: users-help_at_glassfish.dev.java.net
>