Hi,

Alessandro Colantoni wrote:
I understand you do not have a deadlock, but you have a process very slow.
As Armin said a timeout on the transaction is not available on Ojb. It will
be very useful, as it avoid problems with bad operation.

To support PB-tx timeout OJB has to start a background thread which periodically checks for timed out PB-tx - I don't like this idea (this can cause all known thread issues like deadlocks, ...).

regards,
Armin


Anyway, what the
timeout will not be the solution. I was asking a timeout not to solve the
problem, but just to avoid kill the process manually when there are problem. Of course if there are problem something is going wrong in the code, and the
bug has to be fixed anyway.
In my opinion, what you should do is to force ojb to print out the query
where your debugger is stuck.
Than try to execute the same query directly on your database. The problem
could be there
To force to print out queries you have to edit the file
OJB-logging.properties.
change the entry
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=WARM
in
org.apache.ojb.broker.accesslayer.sql.SqlGeneratorDefaultImpl.LogLevel=DEBUG

I hope this is helpful

Alessandro





On 2/28/07, Ferrer, Eric <[EMAIL PROTECTED]> wrote:

Alessandro,

It's the same problem, although I connect to numerous database I do get
page locks in MSSQL but once the process finishes blocking everything
runs smoothly.  However there are time I perform a database query and
the process just seems to hang, latterly my debugger is stuck on the
call to the database.  There is no large resultset expect, the table is
properly index just some time of connectivity issue.  When this happens
I want to set a time out setting and attempt to have the code/driver/or
database cancel the transaction.

-----Original Message-----
From: Alessandro Colantoni [mailto:[EMAIL PROTECTED]
Sent: Wednesday, February 28, 2007 2:02 AM
To: OJB Users List
Subject: Re: Connection timeout

Hi Eric,
I fixed the issue. I had a typical deadlock, with two transaction
working on
the same objects, where each one was waiting the other one finishing his
job. Anyway I'm working with just one database.
I don't think we're talking about the same problem, anyway try telling
something more about your problem, sure you will be helped.
greetings
Alessandro


On 2/27/07, Ferrer, Eric <[EMAIL PROTECTED]> wrote:
>
> Alessandro,
>
> Did you code around your stall or did you fix the issue causing the
> stall.  Sometimes I swear I notice connectivity issues between 3 of
the
> external database I talk to.  Sometimes the problem self fixes as
> connectivity improves but other times we have a dead process that is
> waiting on its transaction to complete and is literally stalled on the
> query execution remotely.
>
> Thanks
> -Eric
>
> -----Original Message-----
> From: Alessandro Colantoni [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, February 07, 2007 4:29 AM
> To: OJB Users List
> Subject: Re: Connection timeout
>
> Hi Armin,
> thanks the same.
>
> I asked that because in an application I made a mistake that got in a
> stall
> :-(
> Of course I solved the problem, but I thought that a mistake can
occur,
> and some resource can keep blocked.
> So I thought that if I could set some timeout, at rollback the
resource
> will
> be available again , and the problem could be solved later (for
example
> during the night) without affecting the user. My application is in
> test phase, and I'm sure that now stall are impossible, but you
know...
> Anyway thanks again for the excellent support you do.
>
> Greetings
> Alessandro
>
>
> On 2/6/07, Armin Waibel <[EMAIL PROTECTED]> wrote:
> >
> > Hi Alessandro,
> >
> > Alessandro Colantoni wrote:
> > > Hi all.
> > > I'm using ojb1.4 with persistence broker.
> > > I would know if there is any way to set a timeout for the broker,
so
> if
> > it
> > > doesn't end his job in the timeout limit a rollback is done and an
> > > exception
> > > thrown.
> >
> > Sorry no. OJB expects that all PB instances/PB-tx are closed/handled
> by
> > the user.
> >
> > regards,
> > Armin
> >
> > > Thanks in advance for the help.
> > >
> > > Alessandro
> > >
> >
> >
---------------------------------------------------------------------
> > To unsubscribe, e-mail: [EMAIL PROTECTED]
> > For additional commands, e-mail: [EMAIL PROTECTED]
> >
> >
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to