Hi,
I have a strange behaviour about the second database i use. It seems that
using broker = PersistenceBrokerFactory.createPersistenceBroker(rushDb);
always return the same broker/connection.
My connection pool is setup as it have to keep 2 idle connections
available, and it never
Hi Bruno,
Bruno CROS wrote:
Hi,
I have a strange behaviour about the second database i use. It seems that
using broker =
PersistenceBrokerFactory.createPersistenceBroker(rushDb);
always return the same broker/connection.
My connection pool is setup as it have to keep 2 idle connections
Hi Armin,
In fact, i looked at the DB connections in the DB console. It was a bad
idea, because connection disappear !! I looked with netstat -a , and i saw
several sockets/connections...
Well, i was experiencing some freezes with these connections with a pool
setup maxActive set to -1. I
Ok, this really solved. Final procedure code (works on SQL2K and SQL2K5):
code
CREATE PROCEDURE OJB_NEXTVAL_PROC
@SEQ_NAME varchar(150)
AS
declare @MAX_KEY BIGINT
set nocount off
set @MAX_KEY = 0
UPDATE OJB_NEXTVAL_SEQ
SET @MAX_KEY = MAX_KEY = MAX_KEY + 1
WHERE SEQ_NAME = @SEQ_NAME
--
Hi Armin,
Thanks for the idea to detect broker leak. It will show some bad coded
methods, even they have been checked : commit never reached, broker not
closed... no commit/abort !!! (find one, arghh )
Meanwhile, there was still some open broker detected. When i look into
code, i found some
I've used a similar solution, but when I get a broker, first I check if
one broker was already taken for this thread (and a usage counter is
incremented).
Then, when I start one operation, I just check if there is not already a
transaction. If there is no transaction, then I open one. Finally,