@@ -83,8 +83,8 @@ public SyncQueueItemVO dequeueFromOne(final long queueId, final Long msid) {
8383 return Transaction .execute (new TransactionCallback <SyncQueueItemVO >() {
8484 @ Override
8585 public SyncQueueItemVO doInTransaction (TransactionStatus status ) {
86- SyncQueueVO queueVO = _syncQueueDao .lockRow (queueId , true );
87- if (queueVO == null ) {
86+ SyncQueueVO queueVO = _syncQueueDao .findById (queueId );
87+ if (queueVO == null ) {
8888 s_logger .error ("Sync queue(id: " + queueId + ") does not exist" );
8989 return null ;
9090 }
@@ -139,11 +139,11 @@ public List<SyncQueueItemVO> dequeueFromAny(final Long msid, final int maxItems)
139139 @ Override
140140 public void doInTransactionWithoutResult (TransactionStatus status ) {
141141 List <SyncQueueItemVO > l = _syncQueueItemDao .getNextQueueItems (maxItems );
142- if (l != null && l .size () > 0 ) {
143- for (SyncQueueItemVO item : l ) {
144- SyncQueueVO queueVO = _syncQueueDao .lockRow (item .getQueueId (), true );
145- SyncQueueItemVO itemVO = _syncQueueItemDao .lockRow (item .getId (), true );
146- if (queueReadyToProcess (queueVO ) && itemVO .getLastProcessNumber () == null ) {
142+ if (l != null && l .size () > 0 ) {
143+ for (SyncQueueItemVO item : l ) {
144+ SyncQueueVO queueVO = _syncQueueDao .findById (item .getQueueId ());
145+ SyncQueueItemVO itemVO = _syncQueueItemDao .findById (item .getId ());
146+ if (queueReadyToProcess (queueVO ) && itemVO .getLastProcessNumber () == null ) {
147147 Long processNumber = queueVO .getLastProcessNumber ();
148148 if (processNumber == null )
149149 processNumber = new Long (1 );
@@ -184,8 +184,8 @@ public void purgeItem(final long queueItemId) {
184184 @ Override
185185 public void doInTransactionWithoutResult (TransactionStatus status ) {
186186 SyncQueueItemVO itemVO = _syncQueueItemDao .findById (queueItemId );
187- if (itemVO != null ) {
188- SyncQueueVO queueVO = _syncQueueDao .lockRow (itemVO .getQueueId (), true );
187+ if (itemVO != null ) {
188+ SyncQueueVO queueVO = _syncQueueDao .findById (itemVO .getQueueId ());
189189
190190 _syncQueueItemDao .expunge (itemVO .getId ());
191191
@@ -213,8 +213,8 @@ public void returnItem(final long queueItemId) {
213213 @ Override
214214 public void doInTransactionWithoutResult (TransactionStatus status ) {
215215 SyncQueueItemVO itemVO = _syncQueueItemDao .findById (queueItemId );
216- if (itemVO != null ) {
217- SyncQueueVO queueVO = _syncQueueDao .lockRow (itemVO .getQueueId (), true );
216+ if (itemVO != null ) {
217+ SyncQueueVO queueVO = _syncQueueDao .findById (itemVO .getQueueId ());
218218
219219 itemVO .setLastProcessMsid (null );
220220 itemVO .setLastProcessNumber (null );
0 commit comments