More details reuquired. What DB type? persistence.xml? Datasource definition? Application structure etc...
The Database is SQL Server. Datasource definition is as follows
<datasource jndi-name="java:/SENTRYDATA" pool-name="SENTRYDATA" enabled="true" use-java-context="true">
Application structure is as follows
I have a web application calling a REST BASED Service which actually does the call to the DB. Hope that helps
JPA? Datasource @Resource injection? Are you leaving locks behind in the database?
Here is the entry in the persistence.xml
and here is how I'm instansiating it
emf = Persistence.createEntityManagerFactory("ceDataSessionData");
em = emf.createEntityManager();
And after some successful operations, are there any DB locks hanging around?
No there aren't any. Here is the scenario under which it starts happening. When I send normal string to search I do see results coming back. The moment I add any wildcards to the string data. I start seeing this. When I run the stored procedure with the same parameters it works fine and doesn't take long, its only that thru the rest based service I see this error.
Tried cranking up log levels so you can see what is causing the timeout?