Examples of LocalConnection


Examples of org.apache.cayenne.remote.service.LocalConnection

            callbackRegistry.addListener(
                    LifecycleEvent.POST_ADD,
                    MtTable1.class,
                    "prePersistMethod");

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            Persistent clientObject = context.newObject(ClientMtTable1.class);
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

        public void prePersist(Object entity) {
        }
            });

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            ClientMtTable1 object = context.newObject(ClientMtTable1.class);
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

        public void prePersist(Object entity) {
        }
            });

            ClientConnection connection = new LocalConnection(csChannel);
            ClientChannel channel = new ClientChannel(connection);

            CayenneContext context = new CayenneContext(channel);

            ClientMtReflexive o1 = context.newObject(ClientMtReflexive.class);
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

            callbackRegistry.clear();
        }
    }

    public void testRollbackChanges() throws Exception {
        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);

        CayenneContext context = new CayenneContext(channel);
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

    public void testCreateFault() throws Exception {
        createTestData("prepare");

        // must attach to the real channel...
        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);

        CayenneContext context = new CayenneContext(channel);
        ObjectId id = new ObjectId("MtTable1", MtTable1.TABLE1_ID_PK_COLUMN, new Integer(
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

        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

Examples of org.apache.cayenne.remote.service.LocalConnection

    @Inject
    protected Provider<ClientRuntime> clientRuntimeProvider;

    public ClientServerChannel get() throws ConfigurationException {

        LocalConnection connection = (LocalConnection) clientRuntimeProvider
                .get()
                .getConnection();
       
        ClientServerDataChannelDecorator channelDecorator = (ClientServerDataChannelDecorator) connection.getChannel();
        return (ClientServerChannel) channelDecorator.getDelegate();
    }
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

    @Inject
    protected Provider<ClientRuntime> clientRuntimeProvider;

    private ClientServerDataChannelDecorator getChannelDecorator() {

        LocalConnection connection = (LocalConnection) clientRuntimeProvider
                .get()
                .getConnection();

        return (ClientServerDataChannelDecorator) connection.getChannel();
    }
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

        ClientConnection connection = runtime.getConnection();
        assertNotNull(connection);
        assertTrue(connection instanceof LocalConnection);

        LocalConnection localConnection = (LocalConnection) connection;
        assertTrue(localConnection.getChannel() instanceof ClientServerChannel);
        ClientServerChannel clientServerChannel = (ClientServerChannel) localConnection
                .getChannel();
        assertSame(channel, ((DataContext) clientServerChannel.getParentChannel())
                .getChannel());
    }
View Full Code Here

Examples of org.apache.cayenne.remote.service.LocalConnection

    protected Provider<DataChannel> clientServerChannelProvider;

    public ClientConnection get() throws ConfigurationException {

        DataChannel clientServerChannel = clientServerChannelProvider.get();
        return new LocalConnection(
                clientServerChannel,
                LocalConnection.HESSIAN_SERIALIZATION);
    }
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.