0 Replies Latest reply on Jul 4, 2005 7:19 AM by glyn_walters

    Advice needed on locking issues

    glyn_walters

      Hi

      I am using a session bean to create CMP EJBs. I am using "Standard CMP 2.x EntityBean with CI in Commit Option C" with cache-invalidation so that I can maintain their state in a cluster. The backend is a sql server database. With asynchronous calls to the session bean to create EJBs, the database quickly deadlocks. I assume this is because sql server is quick to promote to page locking. Even if I strip this down to the bare bones of a home.create(testID) I get database deadlocking if the session bean is invoked from asyncronous threads.

      I am thinking that I might need to force all the database calls to go through a single thread. In a cluster that could be to use an HASingleton to single thread all these types of writable calls. Although this does seem to limit the scalablilty of the cluster.

      Does anyone have any advice on this? Has anyone used sql server succesfully in a CMP environment?

      Thanks
      Glyn