Package org.objectweb.fractal.api.control

Examples of org.objectweb.fractal.api.control.ContentController


      tempName = OPTIMISTIC_CONCURRENCY_TEMPLATE;
      }
      //optimistic or dblocking
      logger.log(BasicLevel.INFO, sb.toString());

        ContentController tpmCC = Fractal.getContentController(composite_tpm);
    //fetch the primitive concurrency manager
    BindingController tpmBC = Fractal.getBindingController(
        getSubComponent(composite_tpm, "transactional-persistence-manager"));
    tpmBC.unbindFc("concurrency-manager");

    //Remove the old pessimistic concurrency manager
    BindingController cmBC = Fractal.getBindingController(cm);
        String[] bds = cmBC.listFc();
        for (int i = 0; i < bds.length; i++) {
            cmBC.unbindFc(bds[i]);
        }
    tpmCC.removeFcSubComponent(cm);


    //instanciate the new ConcurrencyManager
    cm = (Component)getADLFactory().newComponent(tempName, null);
    //Add the new concurrency manager into the composite
    tpmCC.addFcSubComponent(cm);
    //bind the server interface of the new concurrency manager
    cmBC = Fractal.getBindingController(cm);
    if (dbLocking) {
            cmBC.bindFc(PConcurrencyManager.STATE_MANAGER_BINDING,
                    tpmCC.getFcInternalInterface("state-manager"));
            cmBC.bindFc(PConcurrencyManager.STORAGE_MANAGER_BINDING,
                    tpmCC.getFcInternalInterface("storage-manager"));
        } else {//optimistic
      cmBC.bindFc(PConcurrencyManager.DEPENDENCY_GRAPH_BINDING,
        getSubComponent(composite_tpm, "dependency-graph")
        .getFcInterface("dependency-graph"));
    }
View Full Code Here

TOP

Related Classes of org.objectweb.fractal.api.control.ContentController

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.