Skip to content

Commit 02362e9

Browse files
author
pferraro
committed
JGroups 3.0 upgrade.
Convert tests from EasyMock to Mockito. git-svn-id: https://ha-jdbc.svn.sourceforge.net/svnroot/ha-jdbc/trunk@2516 882a69a1-a10d-0410-8702-ae3607fe02de
1 parent e431c80 commit 02362e9

38 files changed

Lines changed: 1109 additions & 1694 deletions

pom.xml

Lines changed: 24 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@
5353
<dependency>
5454
<groupId>org.quartz-scheduler</groupId>
5555
<artifactId>quartz</artifactId>
56-
<version>2.0.1</version>
56+
<version>2.0.2</version>
5757
<exclusions>
5858
<exclusion>
5959
<groupId>org.slf4j</groupId>
@@ -73,14 +73,14 @@
7373
<dependency>
7474
<groupId>org.jgroups</groupId>
7575
<artifactId>jgroups</artifactId>
76-
<version>2.12.1.Final</version>
76+
<version>3.0.0.Beta1</version>
7777
<optional>true</optional>
7878
</dependency>
7979
<!-- Optional logging dependencies -->
8080
<dependency>
8181
<groupId>org.slf4j</groupId>
8282
<artifactId>slf4j-api</artifactId>
83-
<version>1.6.1</version>
83+
<version>1.6.2</version>
8484
<optional>true</optional>
8585
</dependency>
8686
<dependency>
@@ -92,20 +92,21 @@
9292
<dependency>
9393
<groupId>org.jboss.logging</groupId>
9494
<artifactId>jboss-logging</artifactId>
95-
<version>3.0.0.Beta5</version>
95+
<version>3.0.0.GA</version>
9696
<optional>true</optional>
9797
</dependency>
9898
<!-- Optional state manager dependencies -->
9999
<dependency>
100100
<groupId>com.sleepycat</groupId>
101101
<artifactId>je</artifactId>
102-
<version>4.1.7</version>
102+
<version>4.1.10</version>
103103
<optional>true</optional>
104104
</dependency>
105105
<dependency>
106106
<groupId>org.tmatesoft.sqljet</groupId>
107107
<artifactId>sqljet</artifactId>
108108
<version>1.0.4</version>
109+
<!--version>1.0.7</version-->
109110
<optional>true</optional>
110111
</dependency>
111112
<dependency>
@@ -125,35 +126,36 @@
125126
<dependency>
126127
<groupId>junit</groupId>
127128
<artifactId>junit</artifactId>
128-
<version>4.8.2</version>
129+
<version>4.9</version>
129130
<scope>test</scope>
130131
</dependency>
131132
<dependency>
132-
<groupId>org.easymock</groupId>
133-
<artifactId>easymock</artifactId>
134-
<version>3.0</version>
133+
<groupId>org.mockito</groupId>
134+
<artifactId>mockito-core</artifactId>
135+
<version>1.9.0-rc1</version>
135136
<scope>test</scope>
136137
</dependency>
137138
<dependency>
138139
<groupId>org.hsqldb</groupId>
139140
<artifactId>hsqldb</artifactId>
140-
<version>2.0.0</version>
141+
<version>2.2.4</version>
142+
<!--version>2.2.5</version-->
141143
<scope>test</scope>
142144
</dependency>
143145
<dependency>
144146
<groupId>com.h2database</groupId>
145147
<artifactId>h2</artifactId>
146-
<version>1.3.154</version>
148+
<version>1.3.159</version>
147149
<scope>test</scope>
148150
</dependency>
149151
<dependency>
150152
<groupId>org.apache.derby</groupId>
151153
<artifactId>derby</artifactId>
152-
<version>10.7.1.1</version>
154+
<version>10.8.1.2</version>
153155
<scope>test</scope>
154156
</dependency>
155157
</dependencies>
156-
158+
157159
<build>
158160
<resources>
159161
<resource>
@@ -171,7 +173,7 @@
171173
<plugin>
172174
<groupId>org.apache.maven.plugins</groupId>
173175
<artifactId>maven-enforcer-plugin</artifactId>
174-
<version>1.0</version>
176+
<version>1.0.1</version>
175177
<configuration>
176178
<rules>
177179
<requireJavaVersion>
@@ -240,7 +242,7 @@
240242
<plugin>
241243
<groupId>org.apache.maven.plugins</groupId>
242244
<artifactId>maven-site-plugin</artifactId>
243-
<version>3.0-beta-3</version>
245+
<version>3.0</version>
244246
<configuration>
245247
<reportPlugins>
246248
<plugin>
@@ -299,7 +301,8 @@
299301
<dependency>
300302
<groupId>org.apache.maven.doxia</groupId>
301303
<artifactId>doxia-module-docbook-simple</artifactId>
302-
<version>1.1.5-SNAPSHOT</version>
304+
<version>1.2</version>
305+
<!--version>1.1.5-SNAPSHOT</version-->
303306
</dependency>
304307
</dependencies>
305308
</plugin>
@@ -314,27 +317,27 @@
314317
<plugin>
315318
<groupId>org.apache.maven.plugins</groupId>
316319
<artifactId>maven-project-info-reports-plugin</artifactId>
317-
<version>2.3.1</version>
320+
<version>2.4</version>
318321
</plugin>
319322
<plugin>
320323
<groupId>org.apache.maven.plugins</groupId>
321324
<artifactId>maven-changes-plugin</artifactId>
322-
<version>2.4</version>
325+
<version>2.6</version>
323326
</plugin>
324327
<plugin>
325328
<groupId>org.apache.maven.plugins</groupId>
326329
<artifactId>maven-jxr-plugin</artifactId>
327-
<version>2.2</version>
330+
<version>2.3</version>
328331
</plugin>
329332
<plugin>
330333
<groupId>org.apache.maven.plugins</groupId>
331334
<artifactId>maven-javadoc-plugin</artifactId>
332-
<version>2.7</version>
335+
<version>2.8</version>
333336
</plugin>
334337
<plugin>
335338
<groupId>org.codehaus.mojo</groupId>
336339
<artifactId>findbugs-maven-plugin</artifactId>
337-
<version>2.3.1</version>
340+
<version>2.3.2</version>
338341
</plugin>
339342
<plugin>
340343
<groupId>com.googlecode.fluido-skin</groupId>

src/main/java/net/sf/hajdbc/distributed/Command.java

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -34,18 +34,4 @@ public interface Command<R, C> extends Serializable
3434
* @return the result of this command.
3535
*/
3636
R execute(C context);
37-
38-
/**
39-
* Unmarshals the rpc response to the expected execution result type.
40-
* @param object the rpc response
41-
* @return the execution result
42-
*/
43-
R unmarshalResult(Object object);
44-
45-
/**
46-
* Marshals the execution result to a suitable rpc response.
47-
* @param result the execution result
48-
* @return the rpc response
49-
*/
50-
Object marshalResult(R result);
5137
}

src/main/java/net/sf/hajdbc/distributed/CommandDispatcher.java

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,4 +56,10 @@ public interface CommandDispatcher<C> extends Lifecycle
5656
* @return the local member.
5757
*/
5858
Member getLocal();
59+
60+
/**
61+
* Returns the group coordinator.
62+
* @return the group coordinator.
63+
*/
64+
Member getCoordinator();
5965
}

src/main/java/net/sf/hajdbc/distributed/Stateful.java

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@
1717
*/
1818
package net.sf.hajdbc.distributed;
1919

20+
import java.io.IOException;
21+
import java.io.ObjectInput;
22+
import java.io.ObjectOutput;
23+
2024
/**
2125
* Used by the command dispatcher to handle state transfer between members.
2226
*
@@ -28,11 +32,11 @@ public interface Stateful
2832
* Returns the state of this object.
2933
* @return the current state.
3034
*/
31-
byte[] getState();
35+
void readState(ObjectInput input) throws IOException, ClassNotFoundException;
3236

3337
/**
3438
* Sets the state of this object.
3539
* @param state the state
3640
*/
37-
void setState(byte[] state);
41+
void writeState(ObjectOutput output) throws IOException;
3842
}

0 commit comments

Comments
 (0)