Examples of ClientConnection


Examples of org.apache.cayenne.remote.ClientConnection

        final ClientMtTable1 inflated = new ClientMtTable1();
        inflated.setPersistenceState(PersistenceState.COMMITTED);
        inflated.setObjectId(gid);
        inflated.setGlobalAttribute1("abc");

        ClientConnection connection = mock(ClientConnection.class);
        when(connection.sendMessage((ClientMessage) any())).thenAnswer(
                new Answer<Object>() {

                    public Object answer(InvocationOnMock invocation) {
                        ClientMessage arg = (ClientMessage) invocation.getArguments()[0];
View Full Code Here

Examples of org.apache.cayenne.remote.ClientConnection

public class Main {

  public static void main(String[] args) {

    ClientConnection connection = new HessianConnection(
        "http://localhost:8080/cayenne-service", "cayenne-user",
        "secret", null);

    DataChannel channel = new ClientChannel(connection);
View Full Code Here

Examples of org.apache.cayenne.remote.ClientConnection

                .getAccessStack(MULTI_TIER_ACCESS_STACK);
    }

    protected ObjectContext createObjectContext() {
        // wrap ClientServerChannel in LocalConnection to enable logging...
        ClientConnection connector = new LocalConnection(new ClientServerChannel(
                getDomain()), LocalConnection.HESSIAN_SERIALIZATION);
        return new CayenneContext(new ClientChannel(connector));
    }
View Full Code Here

Examples of org.apache.cayenne.remote.ClientConnection

    public void testCommitChangesPrimitives() {

        DataContext dataContext = createDataContext();

        ClientConnection connection = new LocalConnection(new ClientServerChannel(
                getDomain()));
        ClientChannel channel = new ClientChannel(connection);
        CayenneContext context = new CayenneContext(channel);
        ClientMtTableBool obj = context.newObject(ClientMtTableBool.class);
View Full Code Here

Examples of org.apache.cayenne.remote.ClientConnection

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

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

            CayenneContext context = new CayenneContext(channel);

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

Examples of org.apache.cayenne.remote.ClientConnection

            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.ClientConnection

        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.harmony.rmi.client.ClientConnection

                clientRefLog.log(RMILog.BRIEF, Messages.getString("rmi.log.101", //$NON-NLS-1$
                        new Object[]{op[opnum].toString(), opnum, hash}));
            }
            logClientCall(obj, op[opnum].toString());
        }
        ClientConnection conn = ClientConnectionManager.getConnection(ep);
        RemoteCall call = new ClientRemoteCall(conn);

        if (clientRefLog.isLoggable(RMILog.VERBOSE)) {
            //rmi.log.102=Created new call {0}
            clientRefLog.log(RMILog.VERBOSE, Messages.getString("rmi.log.102", call)); //$NON-NLS-1$
        }

        try {
            // write method signature
            DataOutputStream dout = new DataOutputStream(conn.getOutputStream());
            dout.writeByte(RMIProtocolConstants.CALL_MSG);
            ObjectOutputStream oout =
                    (ObjectOutputStream) call.getOutputStream();
            objId.write(oout);
            oout.writeInt(opnum);
View Full Code Here

Examples of org.hsqldb.ClientConnection

                 */
                sessionProxy = DatabaseManager.newSession(connType, database,
                        user, password, props, null, zoneSeconds);
            } else if (connType == DatabaseURL.S_HSQL
                       || connType == DatabaseURL.S_HSQLS) {
                sessionProxy = new ClientConnection(host, port, path,
                        database, isTLS, user, password, zoneSeconds);
                isNetConn = true;
            } else if (connType == DatabaseURL.S_HTTP
                       || connType == DatabaseURL.S_HTTPS) {
                sessionProxy = new ClientConnectionHTTP(host, port, path,
View Full Code Here

Examples of org.hsqldb.ClientConnection

                 */
                sessionProxy = DatabaseManager.newSession(connType, database,
                        user, password, props, null, zoneSeconds);
            } else if (connType == DatabaseURL.S_HSQL
                       || connType == DatabaseURL.S_HSQLS) {
                sessionProxy = new ClientConnection(host, port, path,
                        database, isTLS, isTLSWrapper, user, password, zoneSeconds);
                isNetConn = true;
            } else if (connType == DatabaseURL.S_HTTP
                       || connType == DatabaseURL.S_HTTPS) {
                sessionProxy = new ClientConnectionHTTP(host, port, path,
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.