Hi Pinaki,

pls find below the code:

public void myMethod(UserBean userBean) throws Exception {
  final String taskName = someConstantInterface.TASK_XYZ_NAME;
  TaskManagerLocal taskManager = null;
  try {
        taskManager = getTaskManager(); //retrieve manager ref from JNDI
        taskManager.startTask(taskName);
        taskLockAcquired = true;

    // **** here certain business logic happens that may fail with an
exception ***/

        taskManager.finishTask(taskName);
        return retSentFiles;
  } catch (Exception e) {
        if (taskLockAcquired) {
                taskManager.finishTask(taskName);
        }
        throw e;
  }
}




-----
Kind regards
Matthias
-- 
View this message in context: 
http://openjpa.208410.n2.nabble.com/cursor-prepared-statement-problem-with-WebLogic-10-3-2-tp5724027p5744103.html
Sent from the OpenJPA Users mailing list archive at Nabble.com.

Reply via email to