1 Reply Latest reply on Nov 12, 2007 6:10 AM by Daniel Henninger

    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