Package org.apache.ws.util.lock

Examples of org.apache.ws.util.lock.Lock


   }

   private Lock acquireLock( Object resourceId )
   throws ResourceException
   {
      Lock lock = m_lockManager.getLock( getNonNullKey( resourceId ) );
      try
      {
         lock.acquire(  );
      }
      catch ( InterruptedException ie )
      {
         throw new ResourceException( ie );
      }
View Full Code Here


   public void remove( Object resourceId )
   throws ResourceUnknownException,
          ResourceException
   {
      Resource resource = null;
      Lock     lock = acquireLock( resourceId );
      try
      {
         resource = get( resourceId );

         try
         {
            resource.destroy(  );
         }
         catch ( RuntimeException re )
         {
            throw new ResourceException( MSG.getMessage( Keys.FAILED_TO_DESTROY_RESOURCE, resource, re ) );
         }

         Resource removedResource = (Resource) m_resources.remove( getNonNullKey( resourceId ) );
         if ( removedResource instanceof PropertiesResource )
         {
            notifyResourceDeletedListeners( removedResource );
         }

         LOG.debug( MSG.getMessage( Keys.REMOVED_RESOURCE_WITH_KEY,
                                    resource.getClass(  ).getName(  ),
                                    String.valueOf( resourceId ) ) );
         if ( m_cache != null )
         {
            m_cache.remove( resource );
         }
      }
      finally
      {
         lock.release(  );
      }
   }
View Full Code Here

   }

   private Lock acquireLock( Object resourceId )
   throws ResourceException
   {
      Lock lock = m_lockManager.getLock( getNonNullKey( resourceId ) );
      try
      {
         lock.acquire(  );
      }
      catch ( InterruptedException ie )
      {
         throw new ResourceException( ie );
      }
View Full Code Here

TOP

Related Classes of org.apache.ws.util.lock.Lock

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.