Author: ay
Date: Thu Jun 14 07:48:08 2012
New Revision: 1350115
URL: http://svn.apache.org/viewvc?rev=1350115&view=rev
Log:
Merged revisions 1350114 via svn merge from
https://svn.apache.org/repos/asf/cxf/trunk
........
r1350114 | ay | 2012-06-14 09:44:49 +0200 (Thu, 14 Jun 2012) | 1 line
add reconnect attributes in rmstore schema (CXF-4362) et al
........
Modified:
cxf/branches/2.6.x-fixes/ (props changed)
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
Propchange: cxf/branches/2.6.x-fixes/
('svn:mergeinfo' removed)
Propchange: cxf/branches/2.6.x-fixes/
------------------------------------------------------------------------------
--- svnmerge-integrated (original)
+++ svnmerge-integrated Thu Jun 14 07:48:08 2012
@@ -1 +1 @@
-/cxf/trunk:1-1348209,1348845,1348862,1348866,1349016,1349264,1349307,1349406,1349549,1349714-1349717,1349723,1349825
+/cxf/trunk:1-1348209,1348845,1348862,1348866,1349016,1349264,1349307,1349406,1349549,1349714-1349717,1349723,1349825,1350114
Modified:
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
URL:
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java?rev=1350115&r1=1350114&r2=1350115&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
(original)
+++
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/java/org/apache/cxf/ws/rm/persistence/jdbc/RMTxStore.java
Thu Jun 14 07:48:08 2012
@@ -107,10 +107,13 @@ public class RMTxStore implements RMStor
MESSAGES_TABLE_COLS, MESSAGES_TABLE_KEYS);
private static final String CREATE_DEST_SEQUENCE_STMT_STR
- = "INSERT INTO CXF_RM_DEST_SEQUENCES (SEQ_ID, ACKS_TO, ENDPOINT_ID,
PROTOCOL_VERSION) "
+ = "INSERT INTO CXF_RM_DEST_SEQUENCES "
+ + "(SEQ_ID, ACKS_TO, ENDPOINT_ID, PROTOCOL_VERSION) "
+ "VALUES(?, ?, ?, ?)";
private static final String CREATE_SRC_SEQUENCE_STMT_STR
- = "INSERT INTO CXF_RM_SRC_SEQUENCES VALUES(?, 1, '0', ?, ?, ?, ?)";
+ = "INSERT INTO CXF_RM_SRC_SEQUENCES "
+ + "(SEQ_ID, CUR_MSG_NO, LAST_MSG, EXPIRY, OFFERING_SEQ_ID,
ENDPOINT_ID, PROTOCOL_VERSION) "
+ + "VALUES(?, 1, '0', ?, ?, ?, ?)";
private static final String DELETE_DEST_SEQUENCE_STMT_STR =
"DELETE FROM CXF_RM_DEST_SEQUENCES WHERE SEQ_ID = ?";
private static final String DELETE_SRC_SEQUENCE_STMT_STR =
@@ -120,7 +123,7 @@ public class RMTxStore implements RMStor
private static final String UPDATE_SRC_SEQUENCE_STMT_STR =
"UPDATE CXF_RM_SRC_SEQUENCES SET CUR_MSG_NO = ?, LAST_MSG = ? WHERE
SEQ_ID = ?";
private static final String CREATE_MESSAGE_STMT_STR
- = "INSERT INTO {0} VALUES(?, ?, ?, ?)";
+ = "INSERT INTO {0} (SEQ_ID, MSG_NO, SEND_TO, CONTENT) VALUES(?, ?, ?,
?)";
private static final String DELETE_MESSAGE_STMT_STR =
"DELETE FROM {0} WHERE SEQ_ID = ? AND MSG_NO = ?";
private static final String SELECT_DEST_SEQUENCE_STMT_STR =
@@ -984,7 +987,7 @@ public class RMTxStore implements RMStor
return connection;
}
- private void verifyConnection() {
+ protected synchronized void verifyConnection() {
if (createdConnection && nextReconnectAttempt > 0
&& (maxReconnectAttempts < 0 || maxReconnectAttempts >
reconnectAttempts)) {
if (System.currentTimeMillis() > nextReconnectAttempt) {
@@ -1001,7 +1004,7 @@ public class RMTxStore implements RMStor
}
}
- private synchronized void updateConnectionState(SQLException e) {
+ protected synchronized void updateConnectionState(SQLException e) {
if (e == null) {
// reset the previous error status
reconnectDelay = 0;
Modified:
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
URL:
http://svn.apache.org/viewvc/cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd?rev=1350115&r1=1350114&r2=1350115&view=diff
==============================================================================
---
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
(original)
+++
cxf/branches/2.6.x-fixes/rt/ws/rm/src/main/resources/schemas/configuration/wsrm-manager.xsd
Thu Jun 14 07:48:08 2012
@@ -192,6 +192,22 @@
</xs:documentation>
</xs:annotation>
</xs:attribute>
+ <xs:attribute name="initialReconnectDelay" type="xs:long"
default="60000">
+ <xs:annotation>
+ <xs:documentation>
+ The initialy delay before attempting to reconnect to the
database. The subsequent
+ delay follows the exponential backoff algorithm.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
+ <xs:attribute name="maxReconnectAttempts" type="xs:int" default="10">
+ <xs:annotation>
+ <xs:documentation>
+ The maximum number of attemps taken to reconnect to the
database after a connection error.
+ The value of 0 indicates no attempt, while a negative value
indicates no limit.
+ </xs:documentation>
+ </xs:annotation>
+ </xs:attribute>
</xs:extension>
</xs:complexContent>
</xs:complexType>