Package org.jboss.ejb

Examples of org.jboss.ejb.BeanLock.sync()


      if(id != null)
      {
         BeanLock lock = container.getLockManager().getLock(id);
         try
         {
            lock.sync();
            if(canPassivate(instance))
            {
               try
               {
                  remove(id);
View Full Code Here


            }
         }
         else
         {
            // Use the blocking sync
            lock.sync();
            lockedBean = true;
         }

         if (canPassivate(ctx))
         {
View Full Code Here

            SecurityActions.createAndSetSecurityContext(mi.getPrincipal(), mi.getCredential(),
                  securityDomain , null);
            //SecurityActions.pushSubjectContext(mi.getPrincipal(), mi.getCredential(), null);
         }

         lock.sync();
         try
         {          
            // Get context
            try
            {
View Full Code Here

            AllowedOperationsAssociation.popInMethodFlag();

            if (validContext)
            {
               // Still a valid instance
               lock.sync();
               try
               {

                  // release it
                  ctx.unlock();
View Full Code Here

      if(id != null)
      {
         BeanLock lock = container.getLockManager().getLock(id);
         try
         {
            lock.sync();
            if(canPassivate(instance))
            {
               try
               {
                  remove(id);
View Full Code Here

         
         // Is the context now with an identity? in which case we need to insert
         if (ctx.getId() != null)
         {
            BeanLock lock = container.getLockManager().getLock(ctx.getCacheKey());
            lock.sync(); // lock all access to BeanLock
            try
            {
               // Check there isn't a context already in the cache
               // e.g. commit-option B where the entity was
               // created then removed externally
View Full Code Here

            }
         }
         else
         {
            // Use the blocking sync
            lock.sync();
            lockedBean = true;
         }

         if (canPassivate(ctx))
         {
View Full Code Here

            SecurityActions.createAndSetSecurityContext(mi.getPrincipal(), mi.getCredential(),
                  securityDomain , null);
            //SecurityActions.pushSubjectContext(mi.getPrincipal(), mi.getCredential(), null);
         }

         lock.sync();
         try
         {          
            // Get context
            try
            {
View Full Code Here

            AllowedOperationsAssociation.popInMethodFlag();

            if (validContext)
            {
               // Still a valid instance
               lock.sync();
               try
               {

                  // release it
                  ctx.unlock();
View Full Code Here

         finally
         {
   
            // we are done with the method, decrease the count, if it reaches 0 it will wake up
            // the next thread
            lock.sync();
            lock.endInvocation(mi);
            lock.releaseSync();
         }
      }
      finally
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.