Examples of ArrayHandler


Examples of org.apache.commons.dbutils.handlers.ArrayHandler

        map.put("data", TEST_MESSAGE);
        client.send("jdbc://writeMap?type=2", new DefaultMuleMessage(map, muleContext));

        QueryRunner qr = jdbcConnector.getQueryRunner();
        Object[] obj2 =
            (Object[]) qr.query(jdbcConnector.getConnection(), "SELECT DATA FROM TEST WHERE TYPE = 2", new ArrayHandler());
        assertNotNull(obj2);
        assertEquals(1, obj2.length);
        assertEquals(TEST_MESSAGE, obj2[0]);
    }
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

        long t0 = System.currentTimeMillis();
        while (System.currentTimeMillis() - t0 < 20000)
        {
            Object[] rs =
                (Object[]) qr.query(jdbcConnector.getConnection(), "SELECT COUNT(*) FROM TEST WHERE TYPE = 2", new ArrayHandler());
            assertNotNull(rs);
            assertEquals(1, rs.length);
            if (((Number)rs[0]).intValue() > 0)
            {
                break;
            }
            Thread.sleep(100);
        }

        Object[] obj2 =
            (Object[]) qr.query(jdbcConnector.getConnection(), "SELECT DATA FROM TEST WHERE TYPE = 2", new ArrayHandler());
        assertNotNull(obj2);
        assertEquals(1, obj2.length);
        assertEquals(TEST_MESSAGE + " Received", obj2[0]);
    }
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

    private ArrayHandler arrayHandler;

    public JdbcObjectStore()
    {
        this.arrayHandler = new ArrayHandler();
        this.maxEntries = -1;
    }
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 1 AND ACK IS NULL", new ArrayHandler());
                    // Delivery was successful so row should be acknowledged (marked read).
                    return (queryResult == null);
                }
                catch (Exception e)
                {
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 2 AND ACK IS NULL", new ArrayHandler());
                    // Delivery failed so row should not be acknowledged (marked read).
                    return (queryResult != null && queryResult.length == 1);
                }
                catch (Exception e)
                {
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 3 AND ACK IS NULL", new ArrayHandler());
                    // Delivery failed so row should not be acknowledged (marked read).
                    return (queryResult != null && queryResult.length == 1);
                }
                catch (Exception e)
                {
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 4 AND ACK IS NULL", new ArrayHandler());
                    // Exception occurs after the SEDA queue for an asynchronous request, so from the client's
                    // perspective, the message has been delivered successfully.
                    return (queryResult == null);
                }
                catch (Exception e)
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 2 AND ACK IS NULL", new ArrayHandler());
                    // Exception occurs after the SEDA queue for an asynchronous request, so from the client's
                    // perspective, the message has been delivered successfully.
                    // Note that this behavior is different from services because the exception occurs before
                    // the SEDA queue for services.
                    return (queryResult == null);
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 3 AND ACK IS NULL", new ArrayHandler());
                    // Exception occurs after the SEDA queue for an asynchronous request, so from the client's
                    // perspective, the message has been delivered successfully.
                    // Note that this behavior is different from services because the exception occurs before
                    // the SEDA queue for services.
                    return (queryResult == null);
View Full Code Here

Examples of org.apache.commons.dbutils.handlers.ArrayHandler

            public boolean isSatisfied()
            {
                try
                {
                    Object[] queryResult = (Object[]) qr.query(jdbcConnector.getConnection(),
                        "SELECT DATA FROM TEST WHERE TYPE = 4 AND ACK IS NULL", new ArrayHandler());
                    // Although a component exception occurs after the SEDA queue, the use of transactions
                    // bypasses the SEDA queue, so message should get redelivered.
                    return (queryResult != null && queryResult.length == 1);
                }
                catch (Exception e)
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.