Package org.apache.cayenne.access

Examples of org.apache.cayenne.access.ClientServerChannel


    public void testSyncNewDeletedObject() throws Exception {
        // this resets snapshot cache...
        createDataContext();
        deleteTestData();

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here


    public void testSyncNewObjectIntoDirtyContext() throws Exception {
        // this resets snapshot cache...
        createDataContext();
        deleteTestData();

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        createDataContext();

        deleteTestData();
        createTestData("testSyncSimpleProperty");

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        createDataContext();

        deleteTestData();
        createTestData("testSyncToOneRelationship");

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        createDataContext();

        deleteTestData();
        createTestData("testSyncToManyRelationship");

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        createDataContext();

        deleteTestData();
        createTestData("testSyncToManyRelationship");

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        createDataContext();

        deleteTestData();
        createTestData("testSyncManyToManyRelationship");

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

        // this resets snapshot cache...
        createDataContext();

        deleteTestData();

        DataChannel serverChannel = new ClientServerChannel(getDomain());
        ClientChannel clientChannel = new ClientChannel(
                new LocalConnection(serverChannel),
                true);

        CayenneContext c1 = new CayenneContext(clientChannel);
View Full Code Here

    protected AccessStack buildAccessStack() {
        return CayenneResources.getResources().getAccessStack(MULTI_TIER_ACCESS_STACK);
    }

    private CayenneContext createClientContext() {
        ClientServerChannel serverChannel = new ClientServerChannel(getDomain());
        LocalConnection connection = new LocalConnection(
                serverChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
        ClientChannel clientChannel = new ClientChannel(connection);
        return new CayenneContext(clientChannel);
View Full Code Here

    protected ObjectContext getClientContext() {
        if (clientContext == null) {

            // create with this test case DataContext to allow callers to poke on the
            // server side as well as the client
            ClientServerChannel clientServerChannel = new ClientServerChannel(
                    (DataContext) getContext());
            LocalConnection connection = new LocalConnection(clientServerChannel);
            ClientChannel channel = new ClientChannel(connection);
            clientContext = new CayenneContext(channel);
        }
View Full Code Here

TOP

Related Classes of org.apache.cayenne.access.ClientServerChannel

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.