Package org.apache.cayenne.remote

Examples of org.apache.cayenne.remote.QueryMessage


            }
        };
        DataContext context = new DataContext(parent, new ObjectStore(
                new MockDataRowStore()));

        QueryMessage message = new QueryMessage(new MockQuery());
        new ClientServerChannel(context).onQuery(null, message.getQuery());
        assertTrue(genericDone[0]);
    }
View Full Code Here


                return createServerSession();
            }
        };

        try {
            service.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // serializable exception thrown
                    throw new CayenneRuntimeException();
                }
            });

            fail("Expected to throw");
        }
        catch (Exception ex) {
            Util.cloneViaSerialization(ex);
        }

        try {
            service.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // non-serializable exception thrown
                    throw new MockUnserializableException();
View Full Code Here

            }
        };
        DataContext context = new DataContext(parent, new ObjectStore(
                new MockDataRowStore()));

        QueryMessage message = new QueryMessage(new MockQuery());
        new ClientServerChannel(context).onQuery(null, message.getQuery());
        assertTrue(genericDone[0]);
    }
View Full Code Here

                return super.onQuery(context, query);
            }
        };
        DataContext context = (DataContext) runtime.newContext(parent);

        QueryMessage message = new QueryMessage(new MockQuery());
        new ClientServerChannel(context).onQuery(null, message.getQuery());
        assertTrue(genericDone[0]);
    }
View Full Code Here

        c.setBlockingMessages(true);
        assertTrue(c.isBlockingMessages());

        try {
            c.sendMessage(new QueryMessage(new NamedQuery("dummy")));
        }
        catch (AssertionFailedError e) {
            // expected...
            return;
        }
View Full Code Here

                return createServerSession();
            }
        };

        try {
            handler.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // serializable exception thrown
                    throw new CayenneRuntimeException();
                }
            });

            fail("Expected to throw");
        }
        catch (Exception ex) {
            Util.cloneViaSerialization(ex);
        }

        try {
            handler.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // non-serializable exception thrown
                    throw new MockUnserializableException();
View Full Code Here

            }
        };
        DataContext context = new DataContext(parent, new ObjectStore(
                new MockDataRowStore()));

        QueryMessage message = new QueryMessage(new MockQuery());
        new ClientServerChannel(context).onQuery(null, message.getQuery());
        assertTrue(genericDone[0]);
    }
View Full Code Here

                return createServerSession();
            }
        };

        try {
            service.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // serializable exception thrown
                    throw new CayenneRuntimeException();
                }
            });

            fail("Expected to throw");
        }
        catch (Exception ex) {
            Util.cloneViaSerialization(ex);
        }

        try {
            service.processMessage(new QueryMessage(null) {

                @Override
                public Query getQuery() {
                    // non-serializable exception thrown
                    throw new MockUnserializableException();
View Full Code Here

TOP

Related Classes of org.apache.cayenne.remote.QueryMessage

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.