Package org.objectweb.speedo.pm.jdo.api

Examples of org.objectweb.speedo.pm.jdo.api.JDOPOManagerItf


                        SpeedoProperties.IMRICATED_PM_ALLOWED, "false"))
                        .booleanValue();
            start();
        }
        if (imbricatedAuthorized) {
            JDOPOManagerItf pm = (JDOPOManagerItf) pms.lookup(getThis());
            if (pm != null) {
                pm.getSemaphore().P();
                try {
                    if ((cs == null && pm.getConnectionSpec() == null)
                            || (cs != null && cs.equals(pm.getConnectionSpec()))) {
                        if (!pm.isPOMClosed()) {
                            logger.log(BasicLevel.INFO, "reuse the same PersistenceManager (Imbricated)");
                            pm.addUse();
                            return pm;
                        }
                    }
                } finally {
                    pm.getSemaphore().V();
                }
            }
        }
       
        try {
            // Gets a PM from the pool
            Object pr = managedPM.getResource(null);
      logger.log(BasicLevel.DEBUG, "get a persistenceManager from the pool");
            Component ci = ((Interface) pr).getFcItfOwner();
            JDOPOManagerItf pm = (JDOPOManagerItf) ci.getFcInterface("po-manager");
            pm.open(cs);
            bindPM2Thread(pm);
            pm.addUse();
            return pm;
        } catch (Exception e) {
            throw new JDODataStoreException(
                    "Cannot provides a PersistenceManager ", new Exception[]{e});
        }
View Full Code Here

TOP

Related Classes of org.objectweb.speedo.pm.jdo.api.JDOPOManagerItf

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.