Package org.jitterbit.integration.server.jms.messaging

Examples of org.jitterbit.integration.server.jms.messaging.LocationProperties


    public LocationProperties getLocationProperties(long msgId) throws JmsServerException {
        final String sql = "SELECT SendingPropertyKey, SendingPropertyValue " + "FROM JmsSendingPropertiesTab "
                        + "WHERE JmsMsgInstanceId = " + Long.toString(msgId);
        Statement stmt = null;
        ResultSet rows = null;
        LocationProperties locationProps = new LocationProperties();
        try {
            stmt = msgDb.createStatement();
            rows = stmt.executeQuery(sql);
            while (rows.next()) {
                locationProps.addProperty(rows.getString(1), rows.getString(2));
            }
        } catch (SQLException ex) {
            throw new JmsServerException("Failed to get the location properties for the JMS message with id " + msgId,
                            ex);
        } finally {
View Full Code Here


            stmt = tranDbConn.createStatement();
            rows = stmt.executeQuery(sql);
            long opId = -1;
            while (rows.next()) {
                opId = rows.getInt(1);
                LocationProperties locationProperties = opToPropsMap.get(opId);
                if (locationProperties == null) {
                    Map<String, String> props = Maps.newHashMap();
                    String messageSelector = rows.getString(2);
                    if (messageSelector != null) {
                        props.put("Jms.MessageSelector", messageSelector);
                    }
                    locationProperties = new LocationProperties(props);
                    opToPropsMap.put(opId, locationProperties);
                }
                locationProperties.addProperty(rows.getString(3), rows.getString(4));
            }
        } catch (SQLException ex) {
            throw new JmsServerException("Failed to retrieve JMS location info", ex);
        } finally {
            KongaDbUtils.close(rows);
View Full Code Here

        @Override
        public CommandResult handleCommand(Command command) {
            KongaCommandResult result = new KongaCommandResult(command.getCommandName());
            try {
                LocationProperties connectivityProps = new LocationProperties();
                boolean isKey = true;
                String key = "";
                for (String s : command.getArguments()) {
                    if (isKey) {
                        key = s;
                    } else {
                        connectivityProps.addProperty(key, s);
                    }
                    isKey = !isKey;
                }
                ConnectionTester.testConnection(connectivityProps);
                result.addReturnValue("true");
View Full Code Here

TOP

Related Classes of org.jitterbit.integration.server.jms.messaging.LocationProperties

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.