Search code examples
openjpawebsphere-7

OpenJPA on WAS7 - random selects incorrectly returning no rows


First time asking a question...Appreciate your kindness :-)

I wrote a web service that uses openjpa 1.2.2 to retrieve results against an oracle 11g database. I deployed the service to WAS 7.

The service works fine when run one at a time, and it even looks good when run against a single node WAS7 instance.

The problem occurs when I go to a 4 node WAS ND instance. When load is applied (anywhere from 3-20 requests per second), I find that I'm averaging one request that incorrectly returns an empty result in every 1000 requests. There are no exceptions in the logs - just an empty result from the findById method.

Could this be a tuning issue, either in JPA or on the database end? Could it be somewhere else?


Solution

  • Resolved my own issue. There were static calls to SimpleDateFormat that were wreaking havoc on my code. Moving them into a synchronized block where necessary removed the issue.