Package org.apache.cayenne.configuration.server

Examples of org.apache.cayenne.configuration.server.ServerRuntime


        WebConfiguration configAdapter = new WebConfiguration(config);

        String configurationLocation = configAdapter.getConfigurationLocation();
        Collection<Module> modules = configAdapter.createModules(new WebModule());

        ServerRuntime runtime = new ServerRuntime(
                configurationLocation,
                modules);
       
        WebUtil.setCayenneRuntime(config.getServletContext(), runtime);
    }
View Full Code Here


        Map<String, String> eventBridgeParameters = configAdapter.getOtherParameters();

        Collection<Module> modules = configAdapter.createModules(new ROPServerModule(
                eventBridgeParameters));

        ServerRuntime runtime = new ServerRuntime(configurationLocation, modules);

        DataChannel channel = runtime.getChannel();

        RemoteService service = runtime.getInjector().getInstance(RemoteService.class);

        SerializerFactory serializerFactory = HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                channel.getEntityResolver());
View Full Code Here

public class Main {

    public static void main(String[] args) {

        // starting Cayenne
        ServerRuntime cayenneRuntime = new ServerRuntime("cayenne-project.xml");

        // getting a hold of ObjectContext
        ObjectContext context = cayenneRuntime.newContext();

        newObjectsTutorial(context);
        selectTutorial(context);
        deleteTutorial(context);
    }
View Full Code Here

        if (configurationLocation == null) {
            throw new NullPointerException("Null 'configurationLocation', "
                    + "annotate your test case with @UseServerRuntime");
        }

        return new ServerRuntime(configurationLocation, new ServerExtraModule());
    }
View Full Code Here

    private ServerRuntime runtime;

    @Override
    protected void setUp() throws Exception {

        runtime = new ServerRuntime("cayenne-lifecycle.xml");

        // a filter is required to invalidate root objects after commit
        UuidRelationshipFilter filter = new UuidRelationshipFilter();
        runtime.getDataDomain().addFilter(filter);
        runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(
View Full Code Here

    private TableHelper rootTable;
    private TableHelper e1Table;

    @Override
    protected void setUp() throws Exception {
        runtime = new ServerRuntime("cayenne-lifecycle.xml");

        // a filter is required to invalidate root objects after commit
        UuidRelationshipFilter filter = new UuidRelationshipFilter();
        runtime.getDataDomain().addFilter(filter);
        runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(
View Full Code Here

    private ServerRuntime runtime;

    @Override
    protected void setUp() throws Exception {
        runtime = new ServerRuntime("cayenne-lifecycle.xml");
    }
View Full Code Here

        WebConfiguration configAdapter = new WebConfiguration(config);

        String configurationLocation = configAdapter.getConfigurationLocation();
        Collection<Module> modules = configAdapter.createModules(new WebModule());

        ServerRuntime runtime = new ServerRuntime(configurationLocation, modules
                .toArray(new Module[modules.size()]));

        WebUtil.setCayenneRuntime(config.getServletContext(), runtime);
    }
View Full Code Here

        Map<String, String> eventBridgeParameters = configAdapter.getOtherParameters();

        Collection<Module> modules = configAdapter.createModules(new ROPServerModule(
                eventBridgeParameters));

        ServerRuntime runtime = new ServerRuntime(configurationLocation, modules
                .toArray(new Module[modules.size()]));

        DataChannel channel = runtime.getChannel();

        RemoteService service = runtime.getInjector().getInstance(RemoteService.class);

        SerializerFactory serializerFactory = HessianConfig.createFactory(
                HessianService.SERVER_SERIALIZER_FACTORIES,
                channel.getEntityResolver());
View Full Code Here

public class Main {

  public static void main(String[] args) {

    // starting Cayenne
    ServerRuntime cayenneRuntime = new ServerRuntime(
        "cayenne-UntitledDomain.xml");

    // getting a hold of ObjectContext
    ObjectContext context = cayenneRuntime.getContext();

    newObjectsTutorial(context);
    selectTutorial(context);
    deleteTutorial(context);
  }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.configuration.server.ServerRuntime

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.