Hi,
I've got strange problem with Hibernate used as database persistence system
when invoking a few database queries in separate jobs.
My screnario looks this way:
I have a class called LogonManager (extends Job) which calls about 10 job steps using:
protected IStatus run(final IProgressMonitor monitor)
{
final IWorkbench workbench = PlatformUI.getWorkbench();
final IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
final Shell shell = window != null ? window.getShell() : null;
final IRunnableWithProgress runnableWithProgress = new IRunnableWithProgress()
{
public void run(final IProgressMonitor monitor) throws InvocationTargetException, InterruptedException
{
try
{
monitor.beginTask("my job", , IProgressMonitor.UNKNOWN);
for (ILogonStep step : steps)
{
monitor.subTask(step.getLogonStepName());
step.execLogonStep(new SubProgressMonitor(monitor, 1));
}
}
finally
{
monitor.done();
}
}
}
}
Each step does some database querying by opeing its own transaction, sending query,
getting results and doing something with them.
Unfortunately lately my application hungs up at random steps, and I have discovered
that it stop when calling:
session.createQuery(...)
Does anyone have any idea what problem can be here?
|