2,395 Views 1 Replies Last post: Nov 12, 2007 6:10 AM by Daniel Henninger RSS
Bronze 8 posts since
Sep 13, 2007
Currently Being Moderated

Nov 12, 2007 5:22 AM

Deadlock in RosterItemProvider

 

Hi all,

 

 

 

 

 

I have an openfire plugin which launch cuncurrent threads to managed user roster.

 

 

A problem raised during the test, a deadlock in the SequenceManager.next() method.

 

 

The problem was fixed exchanging the order of

 

 

SequenceManager.nextID(JiveConstants.ROSTER);

 

 

and

 

 

DbConnectionManager.getConnection();

 

 

in this way:

 

 

            long rosterID = SequenceManager.nextID(JiveConstants.ROSTER);

            con = DbConnectionManager.getConnection();

 

 

The nextID method call the DbConnectionManager.getConnection() as well, then when there is no longer available db connection the thread block all db accesses.

 

 

 

 

 

Giancarlo Frison

 

 

Tags: roster, deadlock, create_item
Daniel Henninger KeyContributor 2,954 posts since
Aug 10, 2005
Currently Being Moderated
Nov 12, 2007 6:10 AM in response to: Giancarlo Frison
Re: Deadlock in RosterItemProvider

Fixed  =)  (in trunk at least)

More Like This

  • Retrieving data ...

Bookmarked By (0)