Examples of PessimisticConcurrencyManagerAC


Examples of org.objectweb.perseus.concurrency.pessimistic.PessimisticConcurrencyManagerAC

           
            //policy= mutex | rw-fifo | rw-reader
            strval = getProperty(props,
                    TRANSACTION_LOCKING_PESSIMISTIC_POLICY,
                    TRANSACTION_LOCKING_PESSIMISTIC_POLICY_RW_FIFO, true);
            PessimisticConcurrencyManagerAC pcmAC = null;
            if (!strval.equals(TRANSACTION_LOCKING_PESSIMISTIC_POLICY_RW_FIFO)) {
                pcmAC = (PessimisticConcurrencyManagerAC)
                    Fractal.getAttributeController(cm);
                    strval = strval.toUpperCase();
                    if (!strval.startsWith("POLICY_")) {
                        strval = "POLICY_" + strval;
                    }
                pcmAC.setPolicy(strval);
                sb.append(LocaleHelper.getSpeedoRB().getString("lockpol")).append(strval);
            }

            //locking level = instance | field
            strval = getProperty(props,
                    TRANSACTION_LOCKING_LEVEL_ENABLETHIN,
                    "false", true);
            boolean b = BooleanHelper.parse(strval, false);
            if (b) {
              logger.log(BasicLevel.INFO, LocaleHelper.getSpeedoRB().getString("thinlock"));
                pcmAC = (PessimisticConcurrencyManagerAC)
                    Fractal.getAttributeController(cm);
                pcmAC.setThinkLockAllowed(true);
                sb.append(LocaleHelper.getSpeedoRB().getString("thlklvl"));
            }
          logger.log(BasicLevel.INFO, sb.toString());
              return;
          }
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.