code: public void acquire() 
      { 
          if (_hasAcquired)
              return;
  
          // Deliver the onAcquire event to registered listeners
          for (ResourceEvents resourceListener : _listeners)
              resourceListener.onAcquire();
  
          // Register this ResourceContext with associated container context
          _containerContext.addResourceContext(this, _bean);
  
          // Set the flag to indicate resources have been acquired.
          _hasAcquired = true;
      }
docs: ResourceContext.acquire()