Package org.exoplatform.services.jcr.impl.core

Examples of org.exoplatform.services.jcr.impl.core.XASessionImpl


      {
         // remove unused session from user list and put this list at the end
         // threads of same user
         for (Iterator<SoftReference<XASessionImpl>> siter = joinedList.iterator(); siter.hasNext();)
         {
            XASessionImpl xaSession = siter.next().get();
            if (xaSession == null || !xaSession.isLive())
            {
               siter.remove();
            }
         }
View Full Code Here


      {
         // traverse and remove unused sessions and given one
         // threads of same user
         for (Iterator<SoftReference<XASessionImpl>> siter = joinedList.iterator(); siter.hasNext();)
         {
            XASessionImpl xaSession = siter.next().get();
            if (xaSession == null || !xaSession.isLive() || xaSession == userSession)
            {
               siter.remove();
            }
         }
View Full Code Here

         try
         {
            while (it.hasNext())
            {
               SoftReference<XASessionImpl> sr = it.next();
               XASessionImpl xaSession = sr.get();
               if (xaSession != null && xaSession.isLive())
               {
                  xaSession.getTransientNodesManager().getTransactManager().commit();
               }
               hasCommitedXASession = true;
            }
         }
         catch (TransactionException e)
         {
            if (onePhase)
            {
               // rollback now
               while (it.hasNext())
               {
                  SoftReference<XASessionImpl> sr = it.next();
                  XASessionImpl xaSession = sr.get();
                  if (xaSession != null && xaSession.isLive())
                  {
                     xaSession.getTransientNodesManager().getTransactManager().rollback();
                  }
               }

               if (hasCommitedXASession)
               {
View Full Code Here

      ConcurrentLinkedQueue<SoftReference<XASessionImpl>> joinedList = txResources.get(userSession.getUserID());
      if (joinedList != null)
      {
         for (SoftReference<XASessionImpl> sr : joinedList)
         {
            XASessionImpl xaSession = sr.get();
            if (xaSession != null && xaSession.isLive())
            {
               TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
               txManager.start();
            }
         }
      }
   }
View Full Code Here

      ConcurrentLinkedQueue<SoftReference<XASessionImpl>> joinedList = txResources.remove(userSession.getUserID());
      if (joinedList != null)
      {
         for (SoftReference<XASessionImpl> sr : joinedList)
         {
            XASessionImpl xaSession = sr.get();
            if (xaSession != null && xaSession.isLive())
            {
               TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
               txManager.rollback();
            }
         }
      }
   }
View Full Code Here

      {
         // remove unused session from user list and put this list at the end
         // threads of same user
         for (Iterator<SoftReference<XASessionImpl>> siter = joinedList.iterator(); siter.hasNext();)
         {
            XASessionImpl xaSession = siter.next().get();
            if (xaSession == null || !xaSession.isLive())
            {
               siter.remove();
            }
         }
View Full Code Here

      {
         // traverse and remove unused sessions and given one
         // threads of same user
         for (Iterator<SoftReference<XASessionImpl>> siter = joinedList.iterator(); siter.hasNext();)
         {
            XASessionImpl xaSession = siter.next().get();
            if (xaSession == null || !xaSession.isLive() || xaSession == userSession)
            {
               siter.remove();
            }
         }
View Full Code Here

   {
      List<SoftReference<XASessionImpl>> joinedList = txManagers.remove(userSession.getUserID());
      if (joinedList != null)
         for (SoftReference<XASessionImpl> sr : joinedList)
         {
            XASessionImpl xaSession = sr.get();
            if (xaSession != null && xaSession.isLive())
            {
               TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
               txManager.commit();
            }
         }
   }
View Full Code Here

   {
      List<SoftReference<XASessionImpl>> joinedList = txManagers.get(userSession.getUserID());
      if (joinedList != null)
         for (SoftReference<XASessionImpl> sr : joinedList)
         {
            XASessionImpl xaSession = sr.get();
            if (xaSession != null && xaSession.isLive())
            {
               TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
               txManager.start();
            }
         }
   }
View Full Code Here

   {
      List<SoftReference<XASessionImpl>> joinedList = txManagers.remove(userSession.getUserID());
      if (joinedList != null)
         for (SoftReference<XASessionImpl> sr : joinedList)
         {
            XASessionImpl xaSession = sr.get();
            if (xaSession != null && xaSession.isLive())
            {
               TransactionableDataManager txManager = xaSession.getTransientNodesManager().getTransactManager();
               txManager.rollback();
            }
         }
   }
View Full Code Here

TOP

Related Classes of org.exoplatform.services.jcr.impl.core.XASessionImpl

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.