Examples of newInstance()


Examples of org.apache.openejb.BeanContext.newInstance()

        ThreadContext callContext = new ThreadContext(beanContext, null, Operation.INJECTION);
        ThreadContext oldContext = ThreadContext.enter(callContext);

        try {
            final InstanceContext context = beanContext.newInstance();

            if (context.getBean() instanceof MessageDrivenBean) {
                callContext.setCurrentOperation(Operation.CREATE);
                Method create = beanContext.getCreateMethod();
                final InterceptorStack ejbCreate = new InterceptorStack(context.getBean(), create, Operation.CREATE, new ArrayList(), new HashMap());
View Full Code Here

Examples of org.apache.openejb.core.WebContext.newInstance()

            servletContextEvents.put(webAppInfo, sce);

            // listeners
            for (final ListenerInfo listener : webAppInfo.listeners) {
                final Class<?> clazz = webContext.getClassLoader().loadClass(listener.classname);
                final Object instance = webContext.newInstance(clazz);
                if (ServletContextListener.class.isInstance(instance)) {
                    ((ServletContextListener) instance).contextInitialized(sce);
                }

                List<Object> list = listeners.get(webAppInfo);
View Full Code Here

Examples of org.apache.openejb.util.SafeToolkit.newInstance()

            SystemInstance system = SystemInstance.get();

            SafeToolkit toolkit = SafeToolkit.getToolkit("OpenEJB");

            if (appServer == null) {
                ApplicationServer defaultServer = (ApplicationServer) toolkit.newInstance("org.apache.openejb.core.ServerFederation");
                appServer = defaultServer;
            }
            system.setComponent(ApplicationServer.class, appServer);

            /*
 
View Full Code Here

Examples of org.apache.openjpa.enhance.DynamicStorage.newInstance()

            JavaTypes.STRING,
            JavaTypes.OBJECT
        };
        DynamicStorage storage = gen.generateStorage(types,
            "org.apache.openjpa.enhance.Test");
        storage = storage.newInstance();

        storage.setBoolean(0, true);
        storage.setByte(1, (byte) 1);
        storage.setChar(2, 'f');
        storage.setInt(3, 3);
View Full Code Here

Examples of org.apache.openjpa.jdbc.conf.QuerySQLCacheValue.newInstance()

        cacheMap.put(key, value);
    }
   
    public Map createSQLCache() {
        QuerySQLCacheValue querySQLCache = _conf.getQuerySQLCache();
        return (Map)querySQLCache.newInstance();
    }

    public boolean isQuerySQLCacheOn() {
        return _isQuerySQLCache; 
    }
View Full Code Here

Examples of org.apache.openjpa.persistence.query.QueryDefinition.newInstance()

    public void testNew() {
        QueryDefinition q = qb.createQueryDefinition();
        DomainObject customer = q.addRoot(Customer.class);
        DomainObject order = customer.join("orders");
        q.where(order.get("count").greaterThan(100))
         .select(q.newInstance(Customer.class, customer.get("id"),
                                               customer.get("status"),
                                               order.get("count")));
       
       
        String jpql =
View Full Code Here

Examples of org.apache.phoenix.expression.ExpressionType.newInstance()

            DataInputStream input = new DataInputStream(stream);
            int size = WritableUtils.readVInt(input);
            List<Expression> selectExpressions = Lists.newArrayListWithExpectedSize(size);
            for (int i = 0; i < size; i++) {
                ExpressionType type = ExpressionType.values()[WritableUtils.readVInt(input)];
                Expression selectExpression = type.newInstance();
                selectExpression.readFields(input);
                selectExpressions.add(selectExpression);
            }
            return selectExpressions;
        } catch (IOException e) {
View Full Code Here

Examples of org.apache.qpid.server.configuration.plugins.ConfigurationPluginFactory.newInstance()

        for (Entry<List<String>, ConfigurationPluginFactory> entry : factories.entrySet())
        {
            if (entry.getKey().contains(configurationElement))
            {
                ConfigurationPluginFactory factory = entry.getValue();
                plugins.add(factory.newInstance(configurationElement, configuration));
            }
        }
       
        return plugins;
    }
View Full Code Here

Examples of org.apache.qpid.server.plugin.SystemConfigFactory.newInstance()

        brokerOptions.setConfigurationStoreLocation(configFile.getAbsolutePath());

        SystemConfigFactory configFactory =
                (new PluggableFactoryLoader<>(SystemConfigFactory.class)).get(_storeType);

        final SystemConfig parentObject = configFactory.newInstance(_taskExecutor,
                                                                   mock(EventLogger.class),
                                                                   mock(LogRecorder.class),
                                                                   brokerOptions);

        parentObject.open();
View Full Code Here

Examples of org.apache.qpid.server.virtualhost.plugins.VirtualHostPluginFactory.newInstance()

                {
                    String pluginName = entry.getKey();
                    VirtualHostPluginFactory factory = entry.getValue();
                    try
                    {
                        VirtualHostPlugin plugin = factory.newInstance(this);

                        // If we had configuration for the plugin the schedule it.
                        if (plugin != null)
                        {
                            _houseKeepingTasks.scheduleAtFixedRate(plugin, plugin.getDelay() / 2,
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.