Package org.hornetq.core.persistence

Examples of org.hornetq.core.persistence.OperationContext


      setStarted(false);
   }
  
   public void waitContextCompletion()
   {
      OperationContext formerCtx = storageManager.getContext();
     
      try
      {
         try
         {
View Full Code Here


      }
   }

   public void close(final boolean failed)
   {
      OperationContext formerCtx = storageManager.getContext();
     
      try
      {
         storageManager.setContext(sessionContext);
View Full Code Here

      setStarted(false);
   }

   public void waitContextCompletion()
   {
      OperationContext formerCtx = storageManager.getContext();

      try
      {
         try
         {
View Full Code Here

      }
   }

   public void close(final boolean failed)
   {
      OperationContext formerCtx = storageManager.getContext();

      try
      {
         storageManager.setContext(sessionContext);
View Full Code Here

         sync();
      }

      void sync() throws Exception
      {
         OperationContext originalTX = OperationContextImpl.getContext();

         try
         {
            // We only want to sync paging here, no need to wait for any other events
            OperationContextImpl.clearContext();

            for (PagingStore store : storesToSync)
            {
               store.sync();
            }

            // We can't perform a commit/sync on the journal before we can assure page files are synced or we may get
            // out of sync
            OperationContext ctx = OperationContextImpl.getContext();

            if (ctx != null)
            {
               // if null it means there were no operations done before, hence no need to wait any completions
               ctx.waitCompletion();
            }
         }
         finally
         {
            OperationContextImpl.setContext(originalTX);
View Full Code Here

         server.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true, false);

         final CountDownLatch pageUp = new CountDownLatch(0);
         final CountDownLatch pageDone = new CountDownLatch(1);

         OperationContext ctx = new OperationContext()
         {

            public void onError(int errorCode, String errorMessage)
            {
            }
View Full Code Here

         server.createQueue(PagingTest.ADDRESS, PagingTest.ADDRESS, null, true, false);

         final CountDownLatch pageUp = new CountDownLatch(0);
         final CountDownLatch pageDone = new CountDownLatch(1);

         OperationContext ctx = new OperationContext()
         {

            public void onError(int errorCode, String errorMessage)
            {
            }
View Full Code Here

      if (securityStore != null)
      {
         securityStore.authenticate(username, password);
      }
      final OperationContext context = storageManager.newContext(getExecutorFactory().getExecutor());
      final ServerSessionImpl session = internalCreateSession(name, username, password, minLargeMessageSize, connection, autoCommitSends, autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, context);

      sessions.put(name, session);

      return session;
View Full Code Here

   {
      synchronized (replicationLock)
      {
         while (!pendingTokens.isEmpty())
         {
            OperationContext ctx = pendingTokens.poll();
            try
            {
               ctx.replicationDone();
            }
            catch (Throwable e)
            {
               HornetQServerLogger.LOGGER.errorCompletingCallbackOnReplicationManager(e);
            }
View Full Code Here

      if (securityStore != null)
      {
         securityStore.authenticate(username, password);
      }
      final OperationContext context = storageManager.newContext(getExecutorFactory().getExecutor());
      final ServerSessionImpl session = internalCreateSession(name, username, password, minLargeMessageSize, connection, autoCommitSends, autoCommitAcks, preAcknowledge, xa, defaultAddress, callback, context);

      sessions.put(name, session);

      return session;
View Full Code Here

TOP

Related Classes of org.hornetq.core.persistence.OperationContext

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.