Author: david.lloyd(a)jboss.com
Date: 2008-07-03 00:56:02 -0400 (Thu, 03 Jul 2008)
New Revision: 4344
Modified:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/AbstractCloseable.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/FutureReplyImpl.java
remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java
Log:
Minor bugfixes
Modified:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/AbstractCloseable.java
===================================================================
---
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/AbstractCloseable.java 2008-07-03
04:48:51 UTC (rev 4343)
+++
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/AbstractCloseable.java 2008-07-03
04:56:02 UTC (rev 4344)
@@ -42,6 +42,9 @@
private Set<CloseHandler<T>> closeHandlers;
protected AbstractCloseable(final Executor executor) {
+ if (executor == null) {
+ throw new NullPointerException("executor is null");
+ }
this.executor = executor;
}
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java
===================================================================
---
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-03
04:48:51 UTC (rev 4343)
+++
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/EndpointImpl.java 2008-07-03
04:56:02 UTC (rev 4344)
@@ -88,7 +88,7 @@
public void start() {
// todo security check
if (executor == null) {
- executorService = Executors.newCachedThreadPool(new
NamingThreadFactory(Executors.defaultThreadFactory(), "Remoting endpoint %s"));
+ executor = executorService = Executors.newCachedThreadPool(new
NamingThreadFactory(Executors.defaultThreadFactory(), "Remoting endpoint %s"));
setExecutor(executorService);
}
state.requireTransition(State.INITIAL, State.UP);
@@ -99,6 +99,7 @@
if (executorService != null) {
executorService.shutdown();
executorService = null;
+ executor = null;
}
// todo
}
Modified:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/FutureReplyImpl.java
===================================================================
---
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/FutureReplyImpl.java 2008-07-03
04:48:51 UTC (rev 4343)
+++
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/FutureReplyImpl.java 2008-07-03
04:56:02 UTC (rev 4344)
@@ -43,7 +43,7 @@
private final ReplyHandler<O> replyHandler = new Handler();
private final Object lock = new Object();
// @protectedby lock
- private State state = State.WAITING;
+ private State state = State.NEW;
// @protectedby lock
private RemoteRequestContext remoteRequestContext;
// @protectedby lock
Modified: remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java
===================================================================
---
remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java 2008-07-03
04:48:51 UTC (rev 4343)
+++
remoting3/trunk/standalone/src/main/java/org/jboss/cx/remoting/Remoting.java 2008-07-03
04:56:02 UTC (rev 4344)
@@ -19,6 +19,7 @@
endpointImpl.create();
try {
endpointImpl.start();
+ ok = true;
return endpointImpl;
} finally {
if (! ok) {
Show replies by date