Package org.apache.cayenne.configuration.server

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


    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
        ObjectIdRelationshipFilter filter = new ObjectIdRelationshipFilter();
        runtime.getDataDomain().addFilter(filter);
        runtime.getDataDomain().getEntityResolver().getCallbackRegistry().addListener(
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

        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

    assertNotNull(name);

    String location = "cayenne-" + name + ".xml";
    runtime = runtimeCache.get(location);
    if (runtime == null) {
      runtime = new ServerRuntime(location);
      runtimeCache.put(name, runtime);

      // setup schema

      // TODO: should that be drop/create?
View Full Code Here

public class Main {

  public static void main(String[] args) {

    ServerRuntime cayenneRuntime = new ServerRuntime("cayenne-d1.xml");
    ObjectContext context = cayenneRuntime.getContext();

    T1 t1 = context.newObject(T1.class);
    t1.setName("Root");
    context.commitChanges();
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.getContext();

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

    /* ** put your initialization code in here ** */
  }
 
  @Override
  protected ServerRuntime createRuntime() {
    return new ServerRuntime("cayenne-project.xml");
  }
View Full Code Here

public class AdaptrexService implements IAdaptrexService {

  private Adaptrex adaptrex;

  public AdaptrexService(ApplicationGlobals globals, RegistryShutdownHub registryShutdownHub) throws Exception {
    ServerRuntime rt = new ServerRuntime("cayenne-sandbox.xml");
    CayennePersistenceManager cpm = new CayennePersistenceManager(rt);
    this.adaptrex = new Adaptrex(cpm);
    this.adaptrex.initialize(globals.getServletContext());
   
    registryShutdownHub.addRegistryShutdownListener(new Runnable() {
View Full Code Here

      throw new RuntimeException(
          "Cayenne requires a default factory " +
          "name to be specified in adaptrex.properties");
    }
   
    this.factory = new ServerRuntime(factoryName + ".xml");
    this.readOnlySession = (DataContext) this.factory.getContext();
    this.name = factoryName;
    this.dataDomain = factory.getDataDomain();
   
    try {
View Full Code Here

      throw new RuntimeException(
          "Cayenne requires a default factory " +
          "name to be specified in adaptrex.properties");
    }
   
    this.factory = new ServerRuntime(factoryName + ".xml");
    this.readOnlySession = (DataContext) this.factory.getContext();
    this.name = factoryName;
    this.dataDomain = factory.getDataDomain();
   
    try {
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.