Examples of BrokerFactory


Examples of org.apache.openjpa.kernel.BrokerFactory

            ConfigurationProvider cp = pd.load(resource, name, m);
            if (cp == null) {
                return null;
            }

            BrokerFactory factory = getBrokerFactory(cp, poolValue, BundleUtils.getBundleClassLoader());
            OpenJPAConfiguration conf = factory.getConfiguration();
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);           
            pd.checkPuNameCollisions(_log,name);
           
            // add enhancer
            loadAgent(factory);
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

            if (!Configurations.containsProperty(BrokerValue.KEY, cp.getProperties())) {
                cp.addProperty("openjpa." + BrokerValue.KEY, getDefaultBrokerAlias());
            }

            // OPENJPA-1491 If running under OSGi, use the Bundle's ClassLoader instead of the application one
            BrokerFactory factory;
            if (BundleUtils.runningUnderOSGi()) {
                factory = getBrokerFactory(cp, poolValue, BundleUtils.getBundleClassLoader());
            } else {
                factory = getBrokerFactory(cp, poolValue, pui.getClassLoader());
            }

            OpenJPAConfiguration conf = factory.getConfiguration();
            setPersistenceEnvironmentInfo(conf, pui);
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
            // now we can log any transformer exceptions from above
            if (transformerException != null) {
                if (_log.isTraceEnabled()) {
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

                // check if we've already warned for this query-factory combo
                StoreContext ctx = resolver.getQueryContext().getStoreContext();
                String query = currentQuery();
                if (ctx.getBroker() != null && query != null) {
                    String key = getClass().getName() + ":" + query;
                    BrokerFactory factory = ctx.getBroker().getBrokerFactory();
                    Object hasWarned = factory.getUserObject(key);
                    if (hasWarned != null)
                        break;
                    else
                        factory.putUserObject(key, Boolean.TRUE);
                }
                Log log = conf.getLog(OpenJPAConfiguration.LOG_QUERY);
                if (log.isWarnEnabled())
                    log.warn(_loc.get("query-extensions-warning", clause,
                        currentQuery()));
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

            ConfigurationProvider cp = pd.load(resource, name, m);
            if (cp == null) {
                return null;
            }

            BrokerFactory factory = getBrokerFactory(cp, poolValue, null);
            OpenJPAConfiguration conf = factory.getConfiguration();
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
            pd.checkPuNameCollisions(_log,name);
           
            loadAgent(_log, conf);
           
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

            // should be doing proper resource management.
            if (!Configurations.containsProperty(BrokerValue.KEY, cp.getProperties())) {
                cp.addProperty("openjpa." + BrokerValue.KEY, getDefaultBrokerAlias());
            }

            BrokerFactory factory = getBrokerFactory(cp, poolValue, pui.getClassLoader());
            if (transformerException != null) {
                Log log = factory.getConfiguration().getLog(OpenJPAConfiguration.LOG_RUNTIME);
                if (log.isTraceEnabled()) {
                    log.warn(_loc.get("transformer-registration-error-ex", pui), transformerException);
                } else {
                    log.warn(_loc.get("transformer-registration-error", pui));
                }
            }
           
            // Create appropriate LifecycleEventManager
            OpenJPAConfiguration conf = factory.getConfiguration();
            _log = conf.getLog(OpenJPAConfiguration.LOG_RUNTIME);
            loadValidator(_log, conf);
            // We need to wait to preload until after we get back a fully configured/instantiated
            // BrokerFactory. This is because it is possible that someone has extended OpenJPA
            // functions and they need to be allowed time to configure themselves before we go off and
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

        try {
            ConfigurationProvider cp = pd.load(resource, name, m);
            if (cp == null)
                return null;

            BrokerFactory factory = Bootstrap.newBrokerFactory(cp, null);
            return JPAFacadeHelper.toEntityManagerFactory(factory);
        } catch (Exception e) {
            throw PersistenceExceptions.toPersistenceException(e);
        }
    }
View Full Code Here

Examples of org.apache.openjpa.kernel.BrokerFactory

                cp.getProperties())) {
                cp.addProperty("openjpa." + BrokerValue.KEY,
                    BrokerValue.NON_FINALIZING_ALIAS);
            }

            BrokerFactory factory = Bootstrap.newBrokerFactory(cp,
                pui.getClassLoader());
            if (transformerException != null) {
                Log log = factory.getConfiguration().getLog(
                    OpenJPAConfiguration.LOG_RUNTIME);
                if (log.isTraceEnabled()) {
                    log.warn(
                        _loc.get("transformer-registration-error-ex", pui),
                        transformerException);
View Full Code Here

Examples of org.neo4j.kernel.ha.BrokerFactory

    };
   
    public static BrokerFactory wrapBrokerAndSetPlaceHolderDb(
            final PlaceHolderGraphDatabaseService placeHolderDb, final Broker broker )
    {
        return new BrokerFactory()
        {
            @Override
            public Broker create( GraphDatabaseService graphDb, Map<String, String> graphDbConfig )
            {
                placeHolderDb.setDb( graphDb );
View Full Code Here

Examples of org.neo4j.kernel.ha.BrokerFactory

    }

    private BrokerFactory defaultBrokerFactory( final GraphDatabaseService graphDb,
            final Map<String, String> config )
    {
        return new BrokerFactory()
        {
            @Override
            public Broker create( GraphDatabaseService graphDb, Map<String, String> config )
            {
                return new ZooKeeperBroker( graphDb,
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.