{"action":"created","comment":{"url":"https://api.github.com/repos/wso2/andes/pulls/comments/28949144","id":28949144,"diff_hunk":"@@ -913,4 +913,706 @@ protected void close(ResultSet resultSet, String task) {\n             }\n         }\n     }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public void createSlot(long messageCount, long startMessageId, long endMessageId, String storageQueueName,\n+                                     boolean isSlotActive, String destinationOfMessage) throws AndesException {\n+\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_INSERT_SLOT, PreparedStatement.RETURN_GENERATED_KEYS);\n+\n+            preparedStatement.setLong(1, messageCount);\n+            preparedStatement.setLong(2, startMessageId);\n+            preparedStatement.setLong(3, endMessageId);\n+            preparedStatement.setString(4, storageQueueName);\n+            preparedStatement.setBoolean(5, isSlotActive);\n+            preparedStatement.setString(6, destinationOfMessage);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_CREATE_SLOT);\n+            throw new AndesException(\"Error occurred while creating new slot.\" + RDBMSConstants.TASK_CREATE_SLOT +\n+                                     \", \" + e.getMessage(), e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_CREATE_SLOT);\n+            close(connection, RDBMSConstants.TASK_CREATE_SLOT);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public void deleteSlot(long startMessageId, long endMessageId) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement = connection.prepareStatement(RDBMSConstants.PS_DELETE_SLOT);\n+\n+            preparedStatement.setLong(1, startMessageId);\n+            preparedStatement.setLong(2, endMessageId);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_DELETE_SLOT);\n+            throw new AndesException(\"Error occurred while deleting slot\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_DELETE_SLOT);\n+            close(connection, RDBMSConstants.TASK_DELETE_SLOT);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public void deleteSlotsByQueueName(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_DELETE_SLOTS_BY_QUEUE_NAME);\n+\n+            preparedStatement.setString(1, queueName);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_DELETE_SLOT_BY_QUEUE_NAME);\n+            throw new AndesException(\"Error occurred while deleting slots by queue name\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_DELETE_SLOT_BY_QUEUE_NAME);\n+            close(connection, RDBMSConstants.TASK_DELETE_SLOT_BY_QUEUE_NAME);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override public void deleteMessageIdsByQueueName(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_DELETE_MESSAGE_IDS_BY_QUEUE_NAME);\n+\n+            preparedStatement.setString(1, queueName);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_DELETE_MESSAGE_ID_BY_QUEUE_NAME);\n+            throw new AndesException(\"Error occurred while deleting message ids by queue name\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_DELETE_MESSAGE_ID_BY_QUEUE_NAME);\n+            close(connection, RDBMSConstants.TASK_DELETE_MESSAGE_ID_BY_QUEUE_NAME);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override public void createSlotAssignment(String nodeId, String queueName, long startMsgId,\n+                                               long endMsgId)\n+            throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_INSERT_SLOT_ASSIGNMENT);\n+\n+            preparedStatement.setString(1, nodeId);\n+            preparedStatement.setString(2, queueName);\n+            preparedStatement.setLong(3, startMsgId);\n+            preparedStatement.setLong(4, endMsgId);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_CREATE_SLOT_ASSIGNMENT);\n+            throw new AndesException(\"Error occurred while creating a slot assignment\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_CREATE_SLOT_ASSIGNMENT);\n+            close(connection, RDBMSConstants.TASK_CREATE_SLOT_ASSIGNMENT);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override public void deleteSlotAssignment(long startMessageId, long endMessageId)\n+            throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_DELETE_SLOT_ASSIGNMENT);\n+\n+            preparedStatement.setLong(1, startMessageId);\n+            preparedStatement.setLong(2, endMessageId);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_DELETE_SLOT_ASSIGNMENT);\n+            throw new AndesException(\"Failed to delete a slot assignment\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_DELETE_SLOT_ASSIGNMENT);\n+            close(connection, RDBMSConstants.TASK_DELETE_SLOT_ASSIGNMENT);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public void deleteSlotAssignmentByQueueName(String nodeId, String queueName)\n+            throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement = connection\n+                    .prepareStatement(RDBMSConstants.PS_DELETE_SLOT_ASSIGNMENT_BY_QUEUE_NAME);\n+\n+            preparedStatement.setString(1, nodeId);\n+            preparedStatement.setString(2, queueName);\n+\n+            preparedStatement.executeUpdate();\n+\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.PS_DELETE_SLOT_ASSIGNMENT_BY_QUEUE_NAME);\n+            throw new AndesException(\"Error occurred while deleting a slot assignment\", e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.PS_DELETE_SLOT_ASSIGNMENT_BY_QUEUE_NAME);\n+            close(connection, RDBMSConstants.PS_DELETE_SLOT_ASSIGNMENT_BY_QUEUE_NAME);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public Slot selectUnAssignedSlot(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        Slot unAssignedSlot = null;\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_UNASSIGNED_SLOT);\n+            preparedStatement.setString(1, queueName);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            if(resultSet.next()) {\n+                unAssignedSlot = new Slot();\n+                unAssignedSlot.setSlotId(resultSet.getLong(RDBMSConstants.SLOT_ID));\n+                unAssignedSlot.setMessageCount(resultSet.getLong(RDBMSConstants.MESSAGE_COUNT));\n+                unAssignedSlot\n+                        .setStartMessageId(resultSet.getLong(RDBMSConstants.START_MESSAGE_ID));\n+                unAssignedSlot.setEndMessageId(resultSet.getLong(RDBMSConstants.END_MESSAGE_ID));\n+                unAssignedSlot.setStorageQueueName(\n+                        resultSet.getString(RDBMSConstants.STORAGE_QUEUE_NAME));\n+            }\n+\n+            return unAssignedSlot;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_SELECT_UNASSIGNED_SLOTS);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_SELECT_UNASSIGNED_SLOTS, e);\n+        } finally {\n+            close(resultSet, RDBMSConstants.TASK_SELECT_UNASSIGNED_SLOTS);\n+            close(preparedStatement, RDBMSConstants.TASK_SELECT_UNASSIGNED_SLOTS);\n+            close(connection, RDBMSConstants.TASK_SELECT_UNASSIGNED_SLOTS);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    @Override\n+    public long getQueueToLastAssignedId(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        long messageId = 0L;\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_QUEUE_TO_LAST_ASSIGNED_ID);\n+            preparedStatement.setString(1, queueName);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            while (resultSet.next()) {\n+                messageId = resultSet.getLong(RDBMSConstants.MESSAGE_ID);\n+            }\n+            return messageId;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_GET_QUEUE_TO_LAST_ASSIGNED_ID);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_GET_QUEUE_TO_LAST_ASSIGNED_ID, e);\n+        } finally {\n+            close(resultSet, RDBMSConstants.TASK_GET_QUEUE_TO_LAST_ASSIGNED_ID);\n+            close(preparedStatement, RDBMSConstants.TASK_GET_QUEUE_TO_LAST_ASSIGNED_ID);\n+            close(connection, RDBMSConstants.TASK_GET_QUEUE_TO_LAST_ASSIGNED_ID);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public void setQueueToLastAssignedId(String queueName, long messageId) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet;\n+\n+        try {\n+\n+            connection = getConnection();\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_QUEUE_TO_LAST_ASSIGNED_ID);\n+            preparedStatement.setString(1, queueName);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            connection.setAutoCommit(false);\n+\n+            if(resultSet.next()){\n+                preparedStatement =\n+                        connection.prepareStatement(RDBMSConstants.PS_UPDATE_QUEUE_TO_LAST_ASSIGNED_ID);\n+                preparedStatement.setLong(1, messageId);\n+                preparedStatement.setString(2, queueName);\n+            } else {\n+                preparedStatement =\n+                        connection.prepareStatement(RDBMSConstants.PS_INSERT_QUEUE_TO_LAST_ASSIGNED_ID);\n+\n+                preparedStatement.setString(1, queueName);\n+                preparedStatement.setLong(2, messageId);\n+            }\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_SET_QUEUE_TO_LAST_ASSIGNED_ID);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_SET_QUEUE_TO_LAST_ASSIGNED_ID,\n+                    e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_SET_QUEUE_TO_LAST_ASSIGNED_ID);\n+            close(connection, RDBMSConstants.TASK_SET_QUEUE_TO_LAST_ASSIGNED_ID);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public long getNodeToLastPublishedId(String nodeId) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        long messageId = 0L;\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_NODE_TO_LAST_PUBLISHED_ID);\n+            preparedStatement.setString(1, nodeId);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            while (resultSet.next()) {\n+                messageId = resultSet.getLong(RDBMSConstants.MESSAGE_ID);\n+            }\n+            return messageId;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_GET_NODE_TO_LAST_PUBLISHED_ID);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_GET_NODE_TO_LAST_PUBLISHED_ID, e);\n+        } finally {\n+            close(resultSet, RDBMSConstants.TASK_GET_NODE_TO_LAST_PUBLISHED_ID);\n+            close(preparedStatement, RDBMSConstants.TASK_GET_NODE_TO_LAST_PUBLISHED_ID);\n+            close(connection, RDBMSConstants.TASK_GET_NODE_TO_LAST_PUBLISHED_ID);\n+        }\n+    }\n+\n+    /**\n+     *{@inheritDoc}\n+     */\n+    public void setNodeToLastPublishedId(String nodeId, long messageId) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet;\n+\n+        try {\n+\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_NODE_TO_LAST_PUBLISHED_ID);\n+            preparedStatement.setString(1, nodeId);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            connection.setAutoCommit(false);\n+\n+            if(resultSet.next()){\n+                preparedStatement =\n+                        connection.prepareStatement(RDBMSConstants.PS_UPDATE_NODE_TO_LAST_PUBLISHED_ID);\n+                preparedStatement.setLong(1, messageId);\n+                preparedStatement.setString(2, nodeId);\n+            } else {\n+                preparedStatement =\n+                        connection.prepareStatement(RDBMSConstants.PS_INSERT_NODE_TO_LAST_PUBLISHED_ID);\n+\n+                preparedStatement.setString(1, nodeId);\n+                preparedStatement.setLong(2, messageId);\n+            }\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_SET_NODE_TO_LAST_PUBLISHED_ID);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_SET_NODE_TO_LAST_PUBLISHED_ID,\n+                    e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_SET_NODE_TO_LAST_PUBLISHED_ID);\n+            close(connection, RDBMSConstants.TASK_SET_NODE_TO_LAST_PUBLISHED_ID);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public TreeSet<String> getMessagePublishedNodes() throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        TreeSet<String> nodeList = new TreeSet<String>();\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_MESSAGE_PUBLISHED_NODES);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            while (resultSet.next()) {\n+                nodeList.add(resultSet.getString(RDBMSConstants.NODE_ID));\n+            }\n+            return nodeList;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_GET_MESSAGE_PUBLISHED_NODES);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_GET_MESSAGE_PUBLISHED_NODES, e);\n+        } finally {\n+            close(resultSet, RDBMSConstants.TASK_GET_MESSAGE_PUBLISHED_NODES);\n+            close(preparedStatement, RDBMSConstants.TASK_GET_MESSAGE_PUBLISHED_NODES);\n+            close(connection, RDBMSConstants.TASK_GET_MESSAGE_PUBLISHED_NODES);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public void setSlotState(long startMessageId, long endMessageId, SlotState slotState)\n+            throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement = connection.prepareStatement(RDBMSConstants.PS_SET_SLOT_STATE);\n+            preparedStatement.setLong(1, startMessageId);\n+            preparedStatement.setLong(2, endMessageId);\n+            preparedStatement.setInt(3, slotState.getCode());\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_SET_SLOT_STATE);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_SET_SLOT_STATE, e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_SET_SLOT_STATE);\n+            close(connection, RDBMSConstants.TASK_SET_SLOT_STATE);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public Slot getOverlappedSlot(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        Slot overlappedSlot = null;\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_SELECT_OVERLAPPED_SLOT);\n+            preparedStatement.setString(1, queueName);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            if(resultSet.next()) {\n+                overlappedSlot.setSlotId(resultSet.getLong(RDBMSConstants.SLOT_ID));\n+                overlappedSlot.setMessageCount(resultSet.getLong(RDBMSConstants.MESSAGE_COUNT));\n+                overlappedSlot\n+                        .setStartMessageId(resultSet.getLong(RDBMSConstants.START_MESSAGE_ID));\n+                overlappedSlot.setEndMessageId(resultSet.getLong(RDBMSConstants.END_MESSAGE_ID));\n+                overlappedSlot.setStorageQueueName(\n+                        resultSet.getString(RDBMSConstants.STORAGE_QUEUE_NAME));\n+            }\n+            return overlappedSlot;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_GET_OVERLAPPED_SLOT);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_GET_OVERLAPPED_SLOT, e);\n+        } finally {\n+            close(resultSet, RDBMSConstants.TASK_GET_OVERLAPPED_SLOT);\n+            close(preparedStatement, RDBMSConstants.TASK_GET_OVERLAPPED_SLOT);\n+            close(connection, RDBMSConstants.TASK_GET_OVERLAPPED_SLOT);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public void addMessageId(String queueName, long messageId) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+\n+        try {\n+\n+            connection = getConnection();\n+            connection.setAutoCommit(false);\n+\n+            preparedStatement =\n+                    connection.prepareStatement(RDBMSConstants.PS_INSERT_SLOT_MESSAGE_ID);\n+\n+            preparedStatement.setString(1, queueName);\n+            preparedStatement.setLong(2, messageId);\n+\n+            preparedStatement.executeUpdate();\n+            connection.commit();\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_ADD_MESSAGE_ID);\n+            throw new AndesException(\n+                    \"Error occurred while \" + RDBMSConstants.TASK_ADD_MESSAGE_ID, e);\n+        } finally {\n+            close(preparedStatement, RDBMSConstants.TASK_ADD_MESSAGE_ID);\n+            close(connection, RDBMSConstants.TASK_ADD_MESSAGE_ID);\n+        }\n+    }\n+\n+    /**\n+     * {@inheritDoc}\n+     */\n+    public TreeSet<Long> getMessageIds(String queueName) throws AndesException {\n+        Connection connection = null;\n+        PreparedStatement preparedStatement = null;\n+        ResultSet resultSet = null;\n+        TreeSet<Long> messageIdSet = new TreeSet<Long>();\n+\n+        try {\n+            connection = getConnection();\n+\n+            preparedStatement = connection.prepareStatement(RDBMSConstants.PS_GET_MESSAGE_IDS);\n+            preparedStatement.setString(1, queueName);\n+            resultSet = preparedStatement.executeQuery();\n+\n+            while (resultSet.next()) {\n+                messageIdSet.add(resultSet.getLong(RDBMSConstants.MESSAGE_ID));\n+            }\n+            return messageIdSet;\n+\n+        } catch (SQLException e) {\n+            rollback(connection, RDBMSConstants.TASK_GET_MESSAGE_IDS);","path":"modules/andes-core/broker/src/main/java/org/wso2/andes/store/rdbms/RDBMSAndesContextStoreImpl.java","position":612,"original_position":612,"commit_id":"1e41f1095613d74276841e9636bfd89c4d2f9417","original_commit_id":"1e41f1095613d74276841e9636bfd89c4d2f9417","user":{"login":"Asitha","id":919462,"avatar_url":"https://avatars.githubusercontent.com/u/919462?v=3","gravatar_id":"","url":"https://api.github.com/users/Asitha","html_url":"https://github.com/Asitha","followers_url":"https://api.github.com/users/Asitha/followers","following_url":"https://api.github.com/users/Asitha/following{/other_user}","gists_url":"https://api.github.com/users/Asitha/gists{/gist_id}","starred_url":"https://api.github.com/users/Asitha/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Asitha/subscriptions","organizations_url":"https://api.github.com/users/Asitha/orgs","repos_url":"https://api.github.com/users/Asitha/repos","events_url":"https://api.github.com/users/Asitha/events{/privacy}","received_events_url":"https://api.github.com/users/Asitha/received_events","type":"User","site_admin":false},"body":"We are not using transactions here? Why are we calling rollback?","created_at":"2015-04-23T09:37:56Z","updated_at":"2015-04-23T09:37:56Z","html_url":"https://github.com/wso2/andes/pull/102#discussion_r28949144","pull_request_url":"https://api.github.com/repos/wso2/andes/pulls/102","_links":{"self":{"href":"https://api.github.com/repos/wso2/andes/pulls/comments/28949144"},"html":{"href":"https://github.com/wso2/andes/pull/102#discussion_r28949144"},"pull_request":{"href":"https://api.github.com/repos/wso2/andes/pulls/102"}}},"pull_request":{"url":"https://api.github.com/repos/wso2/andes/pulls/102","id":33513802,"html_url":"https://github.com/wso2/andes/pull/102","diff_url":"https://github.com/wso2/andes/pull/102.diff","patch_url":"https://github.com/wso2/andes/pull/102.patch","issue_url":"https://api.github.com/repos/wso2/andes/issues/102","number":102,"state":"open","locked":false,"title":"Implement a mechanism to save information in RDBMS","user":{"login":"AnujaLK","id":484263,"avatar_url":"https://avatars.githubusercontent.com/u/484263?v=3","gravatar_id":"","url":"https://api.github.com/users/AnujaLK","html_url":"https://github.com/AnujaLK","followers_url":"https://api.github.com/users/AnujaLK/followers","following_url":"https://api.github.com/users/AnujaLK/following{/other_user}","gists_url":"https://api.github.com/users/AnujaLK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnujaLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnujaLK/subscriptions","organizations_url":"https://api.github.com/users/AnujaLK/orgs","repos_url":"https://api.github.com/users/AnujaLK/repos","events_url":"https://api.github.com/users/AnujaLK/events{/privacy}","received_events_url":"https://api.github.com/users/AnujaLK/received_events","type":"User","site_admin":false},"body":"This code will replace hazelcast maps to RDBMS information saving","created_at":"2015-04-17T04:28:51Z","updated_at":"2015-04-23T09:37:56Z","closed_at":null,"merged_at":null,"merge_commit_sha":"9733f17ede2a58cd3a504519830380743629e77c","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/wso2/andes/pulls/102/commits","review_comments_url":"https://api.github.com/repos/wso2/andes/pulls/102/comments","review_comment_url":"https://api.github.com/repos/wso2/andes/pulls/comments{/number}","comments_url":"https://api.github.com/repos/wso2/andes/issues/102/comments","statuses_url":"https://api.github.com/repos/wso2/andes/statuses/1e41f1095613d74276841e9636bfd89c4d2f9417","head":{"label":"AnujaLK:slot-info","ref":"slot-info","sha":"1e41f1095613d74276841e9636bfd89c4d2f9417","user":{"login":"AnujaLK","id":484263,"avatar_url":"https://avatars.githubusercontent.com/u/484263?v=3","gravatar_id":"","url":"https://api.github.com/users/AnujaLK","html_url":"https://github.com/AnujaLK","followers_url":"https://api.github.com/users/AnujaLK/followers","following_url":"https://api.github.com/users/AnujaLK/following{/other_user}","gists_url":"https://api.github.com/users/AnujaLK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnujaLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnujaLK/subscriptions","organizations_url":"https://api.github.com/users/AnujaLK/orgs","repos_url":"https://api.github.com/users/AnujaLK/repos","events_url":"https://api.github.com/users/AnujaLK/events{/privacy}","received_events_url":"https://api.github.com/users/AnujaLK/received_events","type":"User","site_admin":false},"repo":{"id":33649363,"name":"andes","full_name":"AnujaLK/andes","owner":{"login":"AnujaLK","id":484263,"avatar_url":"https://avatars.githubusercontent.com/u/484263?v=3","gravatar_id":"","url":"https://api.github.com/users/AnujaLK","html_url":"https://github.com/AnujaLK","followers_url":"https://api.github.com/users/AnujaLK/followers","following_url":"https://api.github.com/users/AnujaLK/following{/other_user}","gists_url":"https://api.github.com/users/AnujaLK/gists{/gist_id}","starred_url":"https://api.github.com/users/AnujaLK/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AnujaLK/subscriptions","organizations_url":"https://api.github.com/users/AnujaLK/orgs","repos_url":"https://api.github.com/users/AnujaLK/repos","events_url":"https://api.github.com/users/AnujaLK/events{/privacy}","received_events_url":"https://api.github.com/users/AnujaLK/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/AnujaLK/andes","description":"","fork":true,"url":"https://api.github.com/repos/AnujaLK/andes","forks_url":"https://api.github.com/repos/AnujaLK/andes/forks","keys_url":"https://api.github.com/repos/AnujaLK/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/AnujaLK/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/AnujaLK/andes/teams","hooks_url":"https://api.github.com/repos/AnujaLK/andes/hooks","issue_events_url":"https://api.github.com/repos/AnujaLK/andes/issues/events{/number}","events_url":"https://api.github.com/repos/AnujaLK/andes/events","assignees_url":"https://api.github.com/repos/AnujaLK/andes/assignees{/user}","branches_url":"https://api.github.com/repos/AnujaLK/andes/branches{/branch}","tags_url":"https://api.github.com/repos/AnujaLK/andes/tags","blobs_url":"https://api.github.com/repos/AnujaLK/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/AnujaLK/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/AnujaLK/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/AnujaLK/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/AnujaLK/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/AnujaLK/andes/languages","stargazers_url":"https://api.github.com/repos/AnujaLK/andes/stargazers","contributors_url":"https://api.github.com/repos/AnujaLK/andes/contributors","subscribers_url":"https://api.github.com/repos/AnujaLK/andes/subscribers","subscription_url":"https://api.github.com/repos/AnujaLK/andes/subscription","commits_url":"https://api.github.com/repos/AnujaLK/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/AnujaLK/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/AnujaLK/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/AnujaLK/andes/issues/comments{/number}","contents_url":"https://api.github.com/repos/AnujaLK/andes/contents/{+path}","compare_url":"https://api.github.com/repos/AnujaLK/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/AnujaLK/andes/merges","archive_url":"https://api.github.com/repos/AnujaLK/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/AnujaLK/andes/downloads","issues_url":"https://api.github.com/repos/AnujaLK/andes/issues{/number}","pulls_url":"https://api.github.com/repos/AnujaLK/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/AnujaLK/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/AnujaLK/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/AnujaLK/andes/labels{/name}","releases_url":"https://api.github.com/repos/AnujaLK/andes/releases{/id}","created_at":"2015-04-09T05:01:09Z","updated_at":"2015-04-21T06:44:01Z","pushed_at":"2015-04-23T07:50:52Z","git_url":"git://github.com/AnujaLK/andes.git","ssh_url":"git@github.com:AnujaLK/andes.git","clone_url":"https://github.com/AnujaLK/andes.git","svn_url":"https://github.com/AnujaLK/andes","homepage":null,"size":64210,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"wso2:master","ref":"master","sha":"55e02630eabf91657a815e327a7a508f338edc86","user":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"repo":{"id":20559270,"name":"andes","full_name":"wso2/andes","owner":{"login":"wso2","id":533043,"avatar_url":"https://avatars.githubusercontent.com/u/533043?v=3","gravatar_id":"","url":"https://api.github.com/users/wso2","html_url":"https://github.com/wso2","followers_url":"https://api.github.com/users/wso2/followers","following_url":"https://api.github.com/users/wso2/following{/other_user}","gists_url":"https://api.github.com/users/wso2/gists{/gist_id}","starred_url":"https://api.github.com/users/wso2/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wso2/subscriptions","organizations_url":"https://api.github.com/users/wso2/orgs","repos_url":"https://api.github.com/users/wso2/repos","events_url":"https://api.github.com/users/wso2/events{/privacy}","received_events_url":"https://api.github.com/users/wso2/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/wso2/andes","description":"","fork":false,"url":"https://api.github.com/repos/wso2/andes","forks_url":"https://api.github.com/repos/wso2/andes/forks","keys_url":"https://api.github.com/repos/wso2/andes/keys{/key_id}","collaborators_url":"https://api.github.com/repos/wso2/andes/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/wso2/andes/teams","hooks_url":"https://api.github.com/repos/wso2/andes/hooks","issue_events_url":"https://api.github.com/repos/wso2/andes/issues/events{/number}","events_url":"https://api.github.com/repos/wso2/andes/events","assignees_url":"https://api.github.com/repos/wso2/andes/assignees{/user}","branches_url":"https://api.github.com/repos/wso2/andes/branches{/branch}","tags_url":"https://api.github.com/repos/wso2/andes/tags","blobs_url":"https://api.github.com/repos/wso2/andes/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/wso2/andes/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/wso2/andes/git/refs{/sha}","trees_url":"https://api.github.com/repos/wso2/andes/git/trees{/sha}","statuses_url":"https://api.github.com/repos/wso2/andes/statuses/{sha}","languages_url":"https://api.github.com/repos/wso2/andes/languages","stargazers_url":"https://api.github.com/repos/wso2/andes/stargazers","contributors_url":"https://api.github.com/repos/wso2/andes/contributors","subscribers_url":"https://api.github.com/repos/wso2/andes/subscribers","subscription_url":"https://api.github.com/repos/wso2/andes/subscription","commits_url":"https://api.github.com/repos/wso2/andes/commits{/sha}","git_commits_url":"https://api.github.com/repos/wso2/andes/git/commits{/sha}","comments_url":"https://api.github.com/repos/wso2/andes/comments{/number}","issue_comment_url":"https://api.github.com/repos/wso2/andes/issues/comments{/number}","contents_url":"https://api.github.com/repos/wso2/andes/contents/{+path}","compare_url":"https://api.github.com/repos/wso2/andes/compare/{base}...{head}","merges_url":"https://api.github.com/repos/wso2/andes/merges","archive_url":"https://api.github.com/repos/wso2/andes/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/wso2/andes/downloads","issues_url":"https://api.github.com/repos/wso2/andes/issues{/number}","pulls_url":"https://api.github.com/repos/wso2/andes/pulls{/number}","milestones_url":"https://api.github.com/repos/wso2/andes/milestones{/number}","notifications_url":"https://api.github.com/repos/wso2/andes/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/wso2/andes/labels{/name}","releases_url":"https://api.github.com/repos/wso2/andes/releases{/id}","created_at":"2014-06-06T10:04:24Z","updated_at":"2015-04-23T08:23:05Z","pushed_at":"2015-04-23T08:23:05Z","git_url":"git://github.com/wso2/andes.git","ssh_url":"git@github.com:wso2/andes.git","clone_url":"https://github.com/wso2/andes.git","svn_url":"https://github.com/wso2/andes","homepage":null,"size":65889,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":33,"mirror_url":null,"open_issues_count":7,"forks":33,"open_issues":7,"watchers":0,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/wso2/andes/pulls/102"},"html":{"href":"https://github.com/wso2/andes/pull/102"},"issue":{"href":"https://api.github.com/repos/wso2/andes/issues/102"},"comments":{"href":"https://api.github.com/repos/wso2/andes/issues/102/comments"},"review_comments":{"href":"https://api.github.com/repos/wso2/andes/pulls/102/comments"},"review_comment":{"href":"https://api.github.com/repos/wso2/andes/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/wso2/andes/pulls/102/commits"},"statuses":{"href":"https://api.github.com/repos/wso2/andes/statuses/1e41f1095613d74276841e9636bfd89c4d2f9417"}}}}