Author: david.lloyd(a)jboss.com
Date: 2008-03-26 19:03:23 -0400 (Wed, 26 Mar 2008)
New Revision: 3786
Added:
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml
Removed:
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml
Modified:
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
Log:
Add executor if one is not given
Modified: remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java
===================================================================
---
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java 2008-03-26
18:03:17 UTC (rev 3785)
+++
remoting3/trunk/core/src/main/java/org/jboss/cx/remoting/core/CoreEndpoint.java 2008-03-26
23:03:23 UTC (rev 3786)
@@ -8,6 +8,8 @@
import java.util.EnumSet;
import java.util.concurrent.ConcurrentMap;
import java.util.concurrent.Executor;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ExecutorService;
import org.jboss.cx.remoting.Endpoint;
import org.jboss.cx.remoting.RemotingException;
import org.jboss.cx.remoting.Session;
@@ -44,6 +46,7 @@
private OrderedExecutorFactory orderedExecutorFactory;
private Executor executor;
+ private ExecutorService executorService;
static {
Logger.getLogger("org.jboss.cx.remoting").info("JBoss Remoting
version %s", Version.VERSION);
@@ -96,10 +99,18 @@
}
public void start() {
+ if (executor == null) {
+ executorService = Executors.newCachedThreadPool();
+ setExecutor(executorService);
+ }
state.requireTransition(State.INITIAL, State.UP);
}
public void stop() {
+ if (executorService != null) {
+ executorService.shutdown();
+ executorService = null;
+ }
// todo
}
Deleted:
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml
===================================================================
---
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml 2008-03-26
18:03:17 UTC (rev 3785)
+++
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml 2008-03-26
23:03:23 UTC (rev 3786)
@@ -1,15 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- JBoss Remoting Deployer
--->
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="RemotingMetaDataParser"
class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
- <constructor>
-
<parameter>org.jboss.cx.remoting.metadata.RemotingMetaData</parameter>
- </constructor>
- <property name="name">jboss-remoting.xml</property>
- <property name="registerWithJBossXB">true</property>
- <!-- TODO - build management info from annotations -->
- </bean>
-</deployment>
\ No newline at end of file
Added:
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml
===================================================================
--- remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml
(rev 0)
+++
remoting3/trunk/mc-deployers/src/main/resources/META-INF/remoting-deployer-beans.xml 2008-03-26
23:03:23 UTC (rev 3786)
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+ JBoss Remoting Deployer
+-->
+
+<deployment xmlns="urn:jboss:bean-deployer:2.0">
+ <bean name="RemotingMetaDataParser"
class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
+ <constructor>
+
<parameter>org.jboss.cx.remoting.metadata.RemotingMetaData</parameter>
+ </constructor>
+ <property name="name">jboss-remoting.xml</property>
+ <property name="registerWithJBossXB">true</property>
+ <!-- TODO - build management info from annotations -->
+ </bean>
+</deployment>
\ No newline at end of file
Show replies by date