0 Replies Latest reply on May 22, 2002 7:23 PM by tripperm

    Entity Bean Prepared Statements

    tripperm

      Currently I am running a high traffic web application using the combined JBoss 2.4.3 - Tomcat 3.2.3 container. I'm running into a lot of problems with conccurrent users locking each other ( and JBoss ) with Pessimistic Locking exceptions. I understand why this is occurring and am looking for ways around it. I know that ordering all my calls to certain entity beans would solve some of the issues, but there are times when the business processes simply will not allow this. My only resort at this point seems to be using JDBC sql calls to retrieve some of my data, instead of ejb entity bean lookups.

      Fine so far, but I don't want the overhead of creating a prepared statement over and over again every time I need to retrieve some data from a session controller bean. Now I would suspect that when JBoss loads up entity beans, and finds finders on those beans, it must do some caching of prepared statements. My question ( sorry it took so long to get to it ) is this; Can I, from my code, get access to these cached prepared statements, if they even exist? Or is there a better way to get around my problem ( i.e. newer JBoss version, etc.)?

      Thanks.