Hi, I have a Webapp, deployed in JBoss-3.2.1, which basically consists of an AppServlet ( derived from org.apache.velocity.servlet.VelocityServlet ) that, depending of the Request, loads a Template in handleRequest(Request,Response,Context) which displays CMP2-Entity-Trees. Because you can have only access to CMR within the same transaction, I need a UserTransaction in the Servlet.
In createContext(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response) I fetch an InitialContext, resolve an UserTransaction, store it in request.getSession() and call tx.begin(); In requestCleanup(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, Context context) I get the Transaction back out of the HttpSession and call commit. In error(javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response, java.lang.Exception cause) I retrieve also the TransactionObject from the Session and do a rollback. In my understanding this three methods are strongly related to each Request; therefore for any call on createContext() there is a call either to requestCleanup() or error(). Now, 1000 times it works as expected - but the next time the transaction will be created and not freed... resulting in a failure of retrieving a new transaction over the time cause of locking from an earlier generated ... Do you have any ideas? Best regards, Thomas Veith ______________________________________________________________________________ ComputerBild 15-03 bestaetigt: Den besten Spam-Schutz gibt es bei WEB.DE FreeMail - Deutschlands beste E-Mail - http://s.web.de/?mc=021121 --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
