JBoss Remoting SVN: r5783 - remoting-mc-int/trunk/metadata/src/main/resources/META-INF.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-02 01:04:36 -0500 (Tue, 02 Mar 2010)
New Revision: 5783
Added:
remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_1.xsd
Removed:
remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd
remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml
Log:
Schema
Deleted: remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd 2010-03-01 22:43:28 UTC (rev 5782)
+++ remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd 2010-03-02 06:04:36 UTC (rev 5783)
@@ -1,80 +0,0 @@
-<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
- xmlns="urn:jboss:remoting:3.0"
- targetNamespace="urn:jboss:remoting:3.0"
- elementFormDefault="qualified"
- attributeFormDefault="unqualified"
- version="1.0"
- >
-
- <xs:complexType name="remoting">
- <xs:sequence minOccurs="0" maxOccurs="unbounded">
- <xs:choice>
- <xs:element name="local-service" type="local-service"/>
- <xs:element name="remote-service" type="remote-service"/>
- <xs:element name="client" type="client"/>
- <xs:element name="client-source" type="client-source"/>
- <xs:element name="service-listener" type="service-listener"/>
- </xs:choice>
- </xs:sequence>
- <xs:attribute name="endpoint" type="xs:string" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="local-service">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="request-listener-class" type="xs:string" use="optional"/>
- <xs:attribute name="request-listener-bean" type="xs:string" use="optional"/>
- <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
- <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
- <xs:attribute name="service-type" type="xs:string" use="required"/>
- <xs:attribute name="group-name" type="xs:string" use="optional"/>
- <xs:attribute name="metric" type="xs:integer" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="remote-service">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="service-type" type="xs:string" use="required"/>
- <xs:attribute name="group-name" type="xs:string" use="required"/>
- <xs:attribute name="endpoint-name" type="xs:string" use="required"/>
- <xs:attribute name="request-handler-source-bean" type="xs:string" use="required"/>
- <xs:attribute name="metric" type="xs:integer" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="client">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="service-bean" type="xs:string" use="required"/>
- <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
- <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="client-source">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="service-bean" type="xs:string" use="required"/>
- <xs:attribute name="request-class-name" type="xs:string" use="optional"/>
- <xs:attribute name="reply-class-name" type="xs:string" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="service-listener">
- <xs:attribute name="name" type="xs:string" use="required"/>
- <xs:attribute name="listener-bean" type="xs:string" use="required"/>
- <xs:attribute name="only-new" type="xs:boolean" use="optional"/>
- </xs:complexType>
-
- <xs:complexType name="marshalling-config">
- <xs:element name="class-externalizer-factory" type="bean-ref"/>
- <xs:choice minOccurs="0" maxOccurs="1">
- <xs:element name="class-table" type="bean-ref"/>
- <xs:element name="chaining-class-table" type="chaining-class-table"/>
- </xs:choice>
- <xs:choice minOccurs="0" maxOccurs="1">
- <xs:element name="object-table" type="bean-ref"/>
- <xs:element name="chaining-object-table" type="chaining-object-table"/>
- </xs:choice>
- <xs:choice minOccurs="0" maxOccurs="1">
- <xs:element name="stream-header" type="bean-ref"/>
- <!-- todo - literally -->
- </xs:choice>
-
- </xs:complexType>
-
- <xs:element name="remoting" type="remoting"/>
-</xs:schema>
Copied: remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_1.xsd (from rev 5051, remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_0.xsd)
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_1.xsd (rev 0)
+++ remoting-mc-int/trunk/metadata/src/main/resources/META-INF/jboss-remoting_3_1.xsd 2010-03-02 06:04:36 UTC (rev 5783)
@@ -0,0 +1,112 @@
+<!--
+ ~ JBoss, Home of Professional Open Source
+ ~ Copyright 2009, JBoss Inc., and individual contributors as indicated
+ ~ by the @authors tag. See the copyright.txt in the distribution for a
+ ~ full listing of individual contributors.
+ ~
+ ~ This is free software; you can redistribute it and/or modify it
+ ~ under the terms of the GNU Lesser General Public License as
+ ~ published by the Free Software Foundation; either version 2.1 of
+ ~ the License, or (at your option) any later version.
+ ~
+ ~ This software is distributed in the hope that it will be useful,
+ ~ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ ~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ ~ Lesser General Public License for more details.
+ ~
+ ~ You should have received a copy of the GNU Lesser General Public
+ ~ License along with this software; if not, write to the Free
+ ~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ ~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ -->
+
+<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns="urn:jboss:remoting:3.1"
+ xmlns:xnio="urn:jboss:xnio:2.1"
+ targetNamespace="urn:jboss:remoting:3.1"
+ elementFormDefault="qualified"
+ attributeFormDefault="unqualified"
+ version="1.0"
+ >
+
+ <xs:complexType name="remoting">
+ <xs:choice minOccurs="0" maxOccurs="unbounded">
+ <xs:element name="service" type="service"/>
+ <xs:element name="local-client" type="local-client"/>
+ <xs:element name="server" type="server"/>
+ <xs:element name="connection" type="connection"/>
+ <xs:element name="endpoint" type="endpoint"/>
+ <xs:element name="protocol-service" type="protocol-service"/>
+ </xs:choice>
+ <xs:attribute name="endpoint" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="server">
+ <xs:all>
+ <xs:element name="options" type="xnio:optionsType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name="protocol" type="xs:string" default="remote" use="optional"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="service">
+ <xs:all>
+ <xs:element name="client-listener" type="ref"/>
+ <xs:element name="request-class" type="ref"/>
+ <xs:element name="reply-class" type="ref"/>
+ <xs:element name="options" type="xnio:optionsType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="group-name" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="connection">
+ <xs:all>
+ <xs:element name="destination" type="ref"/>
+ <xs:element name="authentication" type="client-authentication" minOccurs="0"/>
+ <xs:element name="options" type="xnio:optionsType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="client-authentication">
+ <xs:choice>
+ <xs:element name="simple" type="user-entry"/>
+ <xs:element name="callback-handler" type="ref"/>
+ </xs:choice>
+ </xs:complexType>
+
+ <xs:complexType name="user-entry">
+ <xs:attribute name="user-name" type="xs:string" use="required"/>
+ <xs:attribute name="realm-name" type="xs:string" use="optional"/>
+ <xs:attribute name="password" type="xs:string" use="optional"/>
+ </xs:complexType>
+
+ <xs:complexType name="local-client">
+ <xs:all>
+ <xs:element name="request-listener" type="ref"/>
+ <xs:element name="request-class" type="ref"/>
+ <xs:element name="reply-class" type="ref"/>
+ </xs:all>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="endpoint">
+ <xs:all>
+ <xs:element name="executor" type="ref"/>
+ <xs:element name="options" type="xnio:optionsType" minOccurs="0"/>
+ </xs:all>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="ref">
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ </xs:complexType>
+
+ <xs:complexType name="protocol-service">
+ <xs:attribute name="type" type="xs:string" use="required"/>
+ <xs:attribute name="name" type="xs:string" use="required"/>
+ <xs:attribute name="register-as" type="xs:string" use="required"/>
+ </xs:complexType>
+
+</xs:schema>
Deleted: remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml
===================================================================
--- remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml 2010-03-01 22:43:28 UTC (rev 5782)
+++ remoting-mc-int/trunk/metadata/src/main/resources/META-INF/remoting-deployer-beans.xml 2010-03-02 06:04:36 UTC (rev 5783)
@@ -1,50 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<!--
- JBoss Remoting Deployer
--->
-
-<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <bean name="RemotingSchemaResolverDeployer" class="org.jboss.deployers.vfs.spi.deployer.SchemaResolverDeployer">
- <constructor>
- <parameter>org.jboss.remoting3.metadata.RemotingMetaData</parameter>
- </constructor>
- <property name="name">jboss-remoting.xml</property>
- <property name="registerWithJBossXB">true</property>
- <!-- TODO - build management info from annotations -->
- </bean>
-
- <bean name="RemotingBeanMetaDataFactoryDeployer" class="org.jboss.deployers.vfs.deployer.kernel.BeanMetaDataFactoryDeployer">
- <constructor>
- <parameter>org.jboss.remoting3.metadata.RemotingMetaData</parameter>
- </constructor>
- </bean>
-
- <classloading xmlns="urn:jboss:classloading:1.0">
- <requirements>
- <module name="jboss-remoting-api"/>
- </requirements>
- </classloading>
-
- <bean name="Endpoint" class="org.jboss.remoting3.EndpointImpl">
-
- </bean>
-
- <bean name="MultiplexConnectionProvider" class="org.jboss.remoting3.multiplex.MultiplexConnectionProvider">
-
- </bean>
-
- <bean name="MultiplexConnectionProviderEndpointConnectionAcceptor" class="org.jboss.remoting3.spi.EndpointConnectionAcceptor">
- <constructor factoryMethod="addConnectionProvider">
- <factory bean="Endpoint"/>
- <parameter class="java.lang.String">multiplex</parameter>
- <parameter class="org.jboss.remoting3.spi.ConnectionProvider"><inject bean="MultiplexConnectionProvider"/></parameter>
- </constructor>
- </bean>
-
- <bean name="MultiplexHandlerFactory" class="org.jboss.xnio.IoHandlerFactory">
- <constructor factoryMethod="createHandlerFactory">
- <factory bean="MultiplexConnectionProvider"/>
- <parameter class="org.jboss.remoting3.spi.EndpointConnectionAcceptor"><inject bean="MultiplexConnectionProviderEndpointConnectionAcceptor"/></parameter>
- </constructor>
- </bean>
-</deployment>
\ No newline at end of file
14 years, 8 months
JBoss Remoting SVN: r5782 - in remoting3/trunk: jboss-remoting and 2 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 17:43:28 -0500 (Mon, 01 Mar 2010)
New Revision: 5782
Modified:
remoting3/trunk/jboss-remoting/pom.xml
remoting3/trunk/pom.xml
remoting3/trunk/samples/pom.xml
remoting3/trunk/taglet/pom.xml
Log:
Next is 3.1.0.Beta2
Modified: remoting3/trunk/jboss-remoting/pom.xml
===================================================================
--- remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 20:15:09 UTC (rev 5781)
+++ remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 22:43:28 UTC (rev 5782)
@@ -38,7 +38,7 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
<packaging>jar</packaging>
- <version>3.1.0.Beta1</version>
+ <version>3.1.0.Beta2-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.jboss.xnio</groupId>
Modified: remoting3/trunk/pom.xml
===================================================================
--- remoting3/trunk/pom.xml 2010-03-01 20:15:09 UTC (rev 5781)
+++ remoting3/trunk/pom.xml 2010-03-01 22:43:28 UTC (rev 5782)
@@ -36,7 +36,7 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting-all</artifactId>
<packaging>pom</packaging>
- <version>3.1.0.Beta1</version>
+ <version>3.1.0.Beta2-SNAPSHOT</version>
<modules>
<module>taglet</module>
<module>jboss-remoting</module>
Modified: remoting3/trunk/samples/pom.xml
===================================================================
--- remoting3/trunk/samples/pom.xml 2010-03-01 20:15:09 UTC (rev 5781)
+++ remoting3/trunk/samples/pom.xml 2010-03-01 22:43:28 UTC (rev 5782)
@@ -36,12 +36,12 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting-samples</artifactId>
<packaging>jar</packaging>
- <version>3.1.0.Beta1</version>
+ <version>3.1.0.Beta2-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>3.1.0.Beta1</version>
+ <version>3.1.0.Beta2-SNAPSHOT</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: remoting3/trunk/taglet/pom.xml
===================================================================
--- remoting3/trunk/taglet/pom.xml 2010-03-01 20:15:09 UTC (rev 5781)
+++ remoting3/trunk/taglet/pom.xml 2010-03-01 22:43:28 UTC (rev 5782)
@@ -35,7 +35,7 @@
<name>JBoss Remoting Taglet</name>
<description>JBoss Remoting Documentation Taglet</description>
<packaging>jar</packaging>
- <version>3.1.0.Beta1</version>
+ <version>3.1.0.Beta2-SNAPSHOT</version>
<dependencies>
<dependency>
14 years, 8 months
JBoss Remoting SVN: r5781 - remoting3/tags.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 15:15:09 -0500 (Mon, 01 Mar 2010)
New Revision: 5781
Added:
remoting3/tags/3.1.0.Beta1/
Log:
Tag 3.1.0.Beta1
Copied: remoting3/tags/3.1.0.Beta1 (from rev 5780, remoting3/trunk)
14 years, 8 months
JBoss Remoting SVN: r5780 - in remoting3/trunk: samples and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 15:14:28 -0500 (Mon, 01 Mar 2010)
New Revision: 5780
Modified:
remoting3/trunk/pom.xml
remoting3/trunk/samples/pom.xml
remoting3/trunk/taglet/pom.xml
Log:
Fix deploy config
Modified: remoting3/trunk/pom.xml
===================================================================
--- remoting3/trunk/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
+++ remoting3/trunk/pom.xml 2010-03-01 20:14:28 UTC (rev 5780)
@@ -54,4 +54,12 @@
</plugin>
</plugins>
</build>
+
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Maven2 Repository</name>
+ <url>http://repository.jboss.org/repos/maven2</url>
+ </repository>
+ </distributionManagement>
</project>
Modified: remoting3/trunk/samples/pom.xml
===================================================================
--- remoting3/trunk/samples/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
+++ remoting3/trunk/samples/pom.xml 2010-03-01 20:14:28 UTC (rev 5780)
@@ -75,7 +75,7 @@
<repository>
<id>repository.jboss.org</id>
<name>JBoss Maven2 Repository</name>
- <url>${repository.url}</url>
+ <url>http://repository.jboss.org/repos/maven2</url>
</repository>
</distributionManagement>
</project>
Modified: remoting3/trunk/taglet/pom.xml
===================================================================
--- remoting3/trunk/taglet/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
+++ remoting3/trunk/taglet/pom.xml 2010-03-01 20:14:28 UTC (rev 5780)
@@ -66,4 +66,11 @@
</plugin>
</plugins>
</build>
+ <distributionManagement>
+ <repository>
+ <id>repository.jboss.org</id>
+ <name>JBoss Maven2 Repository</name>
+ <url>http://repository.jboss.org/repos/maven2</url>
+ </repository>
+ </distributionManagement>
</project>
\ No newline at end of file
14 years, 8 months
JBoss Remoting SVN: r5779 - in remoting3/trunk: jboss-remoting and 2 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 15:01:17 -0500 (Mon, 01 Mar 2010)
New Revision: 5779
Modified:
remoting3/trunk/jboss-remoting/pom.xml
remoting3/trunk/pom.xml
remoting3/trunk/samples/pom.xml
remoting3/trunk/taglet/pom.xml
Log:
Prep 3.1.0.Beta1
Modified: remoting3/trunk/jboss-remoting/pom.xml
===================================================================
--- remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 19:54:52 UTC (rev 5778)
+++ remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
@@ -38,7 +38,7 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
<packaging>jar</packaging>
- <version>3.1.0.CR1</version>
+ <version>3.1.0.Beta1</version>
<dependencies>
<dependency>
<groupId>org.jboss.xnio</groupId>
Modified: remoting3/trunk/pom.xml
===================================================================
--- remoting3/trunk/pom.xml 2010-03-01 19:54:52 UTC (rev 5778)
+++ remoting3/trunk/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
@@ -36,10 +36,10 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting-all</artifactId>
<packaging>pom</packaging>
- <version>3.1.0.CR1</version>
+ <version>3.1.0.Beta1</version>
<modules>
+ <module>taglet</module>
<module>jboss-remoting</module>
- <module>taglet</module>
<module>samples</module>
</modules>
Modified: remoting3/trunk/samples/pom.xml
===================================================================
--- remoting3/trunk/samples/pom.xml 2010-03-01 19:54:52 UTC (rev 5778)
+++ remoting3/trunk/samples/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
@@ -36,12 +36,12 @@
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting-samples</artifactId>
<packaging>jar</packaging>
- <version>3.1.0.CR1</version>
+ <version>3.1.0.Beta1</version>
<dependencies>
<dependency>
<groupId>org.jboss.remoting</groupId>
<artifactId>jboss-remoting</artifactId>
- <version>3.1.0.CR1</version>
+ <version>3.1.0.Beta1</version>
<scope>compile</scope>
</dependency>
<dependency>
Modified: remoting3/trunk/taglet/pom.xml
===================================================================
--- remoting3/trunk/taglet/pom.xml 2010-03-01 19:54:52 UTC (rev 5778)
+++ remoting3/trunk/taglet/pom.xml 2010-03-01 20:01:17 UTC (rev 5779)
@@ -35,7 +35,7 @@
<name>JBoss Remoting Taglet</name>
<description>JBoss Remoting Documentation Taglet</description>
<packaging>jar</packaging>
- <version>3.1.0.CR1</version>
+ <version>3.1.0.Beta1</version>
<dependencies>
<dependency>
@@ -50,6 +50,13 @@
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-deploy-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.0.2</version>
<configuration>
14 years, 8 months
JBoss Remoting SVN: r5778 - remoting3/trunk/jboss-remoting.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 14:54:52 -0500 (Mon, 01 Mar 2010)
New Revision: 5778
Modified:
remoting3/trunk/jboss-remoting/pom.xml
Log:
Remove XNIO snapshot version
Modified: remoting3/trunk/jboss-remoting/pom.xml
===================================================================
--- remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 18:50:09 UTC (rev 5777)
+++ remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 19:54:52 UTC (rev 5778)
@@ -31,7 +31,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
- <xnio.version>2.1.0.CR2-SNAPSHOT</xnio.version>
+ <xnio.version>2.1.0.CR1</xnio.version>
<jbmar.version>1.3.0.CR1</jbmar.version>
</properties>
14 years, 8 months
JBoss Remoting SVN: r5777 - remoting3/trunk/jboss-remoting.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-03-01 13:50:09 -0500 (Mon, 01 Mar 2010)
New Revision: 5777
Modified:
remoting3/trunk/jboss-remoting/pom.xml
Log:
Make the remoting JAR runnable (display version), depend on stable jboss-marshalling
Modified: remoting3/trunk/jboss-remoting/pom.xml
===================================================================
--- remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 01:02:47 UTC (rev 5776)
+++ remoting3/trunk/jboss-remoting/pom.xml 2010-03-01 18:50:09 UTC (rev 5777)
@@ -32,7 +32,7 @@
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<xnio.version>2.1.0.CR2-SNAPSHOT</xnio.version>
- <jbmar.version>1.3.0.CR1-SNAPSHOT</jbmar.version>
+ <jbmar.version>1.3.0.CR1</jbmar.version>
</properties>
<groupId>org.jboss.remoting</groupId>
@@ -141,6 +141,16 @@
</configuration>
</plugin>
<plugin>
+ <artifactId>maven-jar-plugin</artifactId>
+ <configuration>
+ <archive>
+ <manifest>
+ <mainClass>org.jboss.remoting3.Version</mainClass>
+ </manifest>
+ </archive>
+ </configuration>
+ </plugin>
+ <plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.6.1</version>
14 years, 8 months
JBoss Remoting SVN: r5776 - in remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3: remote and 1 other directories.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-02-28 20:02:47 -0500 (Sun, 28 Feb 2010)
New Revision: 5776
Added:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryExternalizerFactory.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryObjectTable.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ReceivedRequestHandlerConnector.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/UnsentRequestHandlerConnector.java
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ClientAuthenticationHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyTask.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundRequestTask.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundReplyHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundRequestHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerAuthenticationHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerInitialAuthenticationHandler.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerOpenListener.java
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java
Log:
Make ClientConnector work across remote connections; begin to specify externalizers and tables
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/EndpointImpl.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -723,8 +723,8 @@
return getMapFor(serviceType).get(name);
}
- public String getEndpointName() {
- return getName();
+ public Endpoint getEndpoint() {
+ return EndpointImpl.this;
}
}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ClientAuthenticationHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ClientAuthenticationHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ClientAuthenticationHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -26,7 +26,6 @@
import java.nio.ByteBuffer;
import org.jboss.marshalling.MarshallerFactory;
import org.jboss.marshalling.Marshalling;
-import org.jboss.marshalling.MarshallingConfiguration;
import org.jboss.remoting3.CloseHandler;
import org.jboss.remoting3.spi.ConnectionHandler;
import org.jboss.remoting3.spi.ConnectionHandlerContext;
@@ -127,8 +126,7 @@
public ConnectionHandler createInstance(final ConnectionHandlerContext connectionContext) {
// this happens immediately.
final MarshallerFactory marshallerFactory = Marshalling.getMarshallerFactory("river");
- final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
- final RemoteConnectionHandler connectionHandler = new RemoteConnectionHandler(connectionContext, remoteConnection, marshallerFactory, marshallingConfiguration);
+ final RemoteConnectionHandler connectionHandler = new RemoteConnectionHandler(connectionContext, remoteConnection, marshallerFactory);
remoteConnection.addCloseHandler(new CloseHandler<Object>() {
public void handleClose(final Object closed) {
IoUtils.safeClose(connectionHandler);
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyTask.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyTask.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyTask.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -52,8 +52,13 @@
try {
RemoteConnectionHandler.log.trace("Unmarshalling inbound reply");
unmarshaller.start(outboundRequest.getByteInput());
- reply = unmarshaller.readObject();
- unmarshaller.close();
+ final RemoteConnectionHandler old = RemoteConnectionHandler.setCurrent(connectionHandler);
+ try {
+ reply = unmarshaller.readObject();
+ unmarshaller.close();
+ } finally {
+ RemoteConnectionHandler.setCurrent(old);
+ }
RemoteConnectionHandler.log.trace("Unmarshalled inbound reply %s", reply);
} finally {
IoUtils.safeClose(unmarshaller);
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundRequestTask.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundRequestTask.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundRequestTask.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -55,8 +55,13 @@
try {
RemoteConnectionHandler.log.trace("Unmarshalling inbound request");
unmarshaller.start(inboundRequest.getByteInput());
- request = unmarshaller.readObject();
- unmarshaller.close();
+ final RemoteConnectionHandler old = RemoteConnectionHandler.setCurrent(remoteConnectionHandler);
+ try {
+ request = unmarshaller.readObject();
+ unmarshaller.close();
+ } finally {
+ RemoteConnectionHandler.setCurrent(old);
+ }
RemoteConnectionHandler.log.trace("Unmarshalled inbound request %s", request);
} finally {
IoUtils.safeClose(unmarshaller);
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundReplyHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundReplyHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundReplyHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -46,8 +46,13 @@
final RemoteConnectionHandler connectionHandler = inboundRequest.getRemoteConnectionHandler();
final Marshaller marshaller = connectionHandler.getMarshallerFactory().createMarshaller(connectionHandler.getMarshallingConfiguration());
marshaller.start(new NioByteOutput(new OutboundReplyBufferWriter(inboundRequest, rid, false)));
- marshaller.writeObject(reply);
- marshaller.finish();
+ final RemoteConnectionHandler old = RemoteConnectionHandler.setCurrent(connectionHandler);
+ try {
+ marshaller.writeObject(reply);
+ marshaller.finish();
+ } finally {
+ RemoteConnectionHandler.setCurrent(old);
+ }
}
}
@@ -58,8 +63,13 @@
try {
final Marshaller marshaller = connectionHandler.getMarshallerFactory().createMarshaller(connectionHandler.getMarshallingConfiguration());
marshaller.start(new NioByteOutput(new OutboundReplyBufferWriter(inboundRequest, rid, true)));
- marshaller.writeObject(exception);
- marshaller.finish();
+ final RemoteConnectionHandler old = RemoteConnectionHandler.setCurrent(connectionHandler);
+ try {
+ marshaller.writeObject(exception);
+ marshaller.finish();
+ } finally {
+ RemoteConnectionHandler.setCurrent(old);
+ }
ok = true;
} finally {
if (! ok) {
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundRequestHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundRequestHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/OutboundRequestHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -57,11 +57,16 @@
}
final NioByteOutput byteOutput = new NioByteOutput(new OutboundRequestBufferWriter(outboundRequest, rid));
try {
- RemoteConnectionHandler.log.trace("Starting sending request %s", request);
+ RemoteConnectionHandler.log.trace("Starting sending request %s for %s", request, Integer.valueOf(rid));
final Marshaller marshaller = connectionHandler.getMarshallerFactory().createMarshaller(connectionHandler.getMarshallingConfiguration());
marshaller.start(byteOutput);
- marshaller.writeObject(request);
- marshaller.finish();
+ RemoteConnectionHandler old = RemoteConnectionHandler.setCurrent(connectionHandler);
+ try {
+ marshaller.writeObject(request);
+ marshaller.finish();
+ } finally {
+ RemoteConnectionHandler.setCurrent(old);
+ }
RemoteConnectionHandler.log.trace("Finished sending request %s", request);
} catch (IOException e) {
RemoteConnectionHandler.log.trace(e, "Got exception while marshalling request %s", request);
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryExternalizerFactory.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryExternalizerFactory.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryExternalizerFactory.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -0,0 +1,61 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.remote;
+
+import java.io.IOException;
+import java.io.ObjectInput;
+import java.io.ObjectOutput;
+import org.jboss.marshalling.ClassExternalizerFactory;
+import org.jboss.marshalling.Creator;
+import org.jboss.marshalling.Externalizer;
+
+final class PrimaryExternalizerFactory implements ClassExternalizerFactory {
+
+ static final ClassExternalizerFactory INSTANCE = new PrimaryExternalizerFactory();
+
+ public Externalizer getExternalizer(final Class<?> type) {
+ if (type == UnsentRequestHandlerConnector.class) {
+ return new RequestHandlerConnectorExternalizer();
+ }
+ return null;
+ }
+
+ static class RequestHandlerConnectorExternalizer implements Externalizer {
+ static final RequestHandlerConnectorExternalizer INSTANCE = new RequestHandlerConnectorExternalizer();
+
+ private static final long serialVersionUID = 8137262079765758375L;
+
+ public void writeExternal(final Object subject, final ObjectOutput output) throws IOException {
+ final UnsentRequestHandlerConnector connector = (UnsentRequestHandlerConnector) subject;
+ output.writeInt(connector.getClientId());
+ }
+
+ public Object createExternal(final Class<?> subjectType, final ObjectInput input, final Creator defaultCreator) throws IOException, ClassNotFoundException {
+ return new ReceivedRequestHandlerConnector(RemoteConnectionHandler.getCurrent(), input.readInt());
+ }
+
+ public void readExternal(final Object subject, final ObjectInput input) throws IOException, ClassNotFoundException {
+ // n/a
+ }
+ }
+}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryObjectTable.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryObjectTable.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/PrimaryObjectTable.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -0,0 +1,72 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.remote;
+
+import java.io.IOException;
+import java.io.StreamCorruptedException;
+import org.jboss.marshalling.Marshaller;
+import org.jboss.marshalling.ObjectTable;
+import org.jboss.marshalling.Unmarshaller;
+import org.jboss.remoting3.Endpoint;
+
+final class PrimaryObjectTable implements ObjectTable {
+
+ private final Endpoint endpoint;
+
+ PrimaryObjectTable(final Endpoint endpoint) {
+ this.endpoint = endpoint;
+ }
+
+ private static final Writer ZERO_WRITER = new ByteWriter(0);
+ private static final Writer ONE_WRITER = new ByteWriter(1);
+
+ private static final class ByteWriter implements Writer {
+ private final byte b;
+
+ private ByteWriter(final int b) {
+ this.b = (byte) b;
+ }
+
+ public void writeObject(final Marshaller marshaller, final Object object) throws IOException {
+ marshaller.writeByte(b);
+ }
+ }
+
+ public Writer getObjectWriter(final Object object) throws IOException {
+ if (object == endpoint) {
+ return ZERO_WRITER;
+ } else if (object == PrimaryExternalizerFactory.RequestHandlerConnectorExternalizer.INSTANCE) {
+ return ONE_WRITER;
+ }
+ return null;
+ }
+
+ public Object readObject(final Unmarshaller unmarshaller) throws IOException, ClassNotFoundException {
+ final int id = unmarshaller.readUnsignedByte();
+ switch (id) {
+ case 0: return endpoint;
+ case 1: return PrimaryExternalizerFactory.RequestHandlerConnectorExternalizer.INSTANCE;
+ default: throw new StreamCorruptedException("Unknown object table ID byte " + id);
+ }
+ }
+}
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ReceivedRequestHandlerConnector.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ReceivedRequestHandlerConnector.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ReceivedRequestHandlerConnector.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -0,0 +1,55 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.remote;
+
+import org.jboss.marshalling.util.IntKeyMap;
+import org.jboss.remoting3.spi.RequestHandler;
+import org.jboss.remoting3.spi.RequestHandlerConnector;
+import org.jboss.xnio.Cancellable;
+import org.jboss.xnio.IoUtils;
+import org.jboss.xnio.Result;
+
+final class ReceivedRequestHandlerConnector implements RequestHandlerConnector {
+ private final RemoteConnectionHandler connectionHandler;
+ private final int clientId;
+
+ ReceivedRequestHandlerConnector(final RemoteConnectionHandler connectionHandler, final int clientId) {
+ this.connectionHandler = connectionHandler;
+ this.clientId = clientId;
+ }
+
+ public Cancellable createRequestHandler(final Result<RequestHandler> result) throws SecurityException {
+ final OutboundClient client = new OutboundClient(connectionHandler, clientId, result, "anonymous", "anonymous");
+ final IntKeyMap<OutboundClient> outboundClients = connectionHandler.getOutboundClients();
+ synchronized (outboundClients) {
+ outboundClients.put(clientId, client);
+ }
+ final OutboundRequestHandler requestHandler = new OutboundRequestHandler(client);
+ synchronized (client) {
+ client.setState(OutboundClient.State.ESTABLISHED);
+ client.setResult(requestHandler);
+ }
+ result.setResult(requestHandler);
+ return IoUtils.nullCancellable();
+ }
+}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteConnectionHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -27,6 +27,7 @@
import java.util.Random;
import java.util.concurrent.atomic.AtomicBoolean;
import org.jboss.marshalling.MarshallerFactory;
+import org.jboss.marshalling.Marshalling;
import org.jboss.marshalling.MarshallingConfiguration;
import org.jboss.marshalling.util.IntKeyMap;
import org.jboss.remoting3.IndeterminateOutcomeException;
@@ -66,19 +67,25 @@
private final AtomicBoolean closed = new AtomicBoolean();
- public RemoteConnectionHandler(final ConnectionHandlerContext connectionContext, final RemoteConnection remoteConnection, final MarshallerFactory marshallerFactory, final MarshallingConfiguration marshallingConfiguration) {
+ public RemoteConnectionHandler(final ConnectionHandlerContext connectionContext, final RemoteConnection remoteConnection, final MarshallerFactory marshallerFactory) {
super(connectionContext.getConnectionProviderContext().getExecutor());
this.connectionContext = connectionContext;
this.remoteConnection = remoteConnection;
this.marshallerFactory = marshallerFactory;
- this.marshallingConfiguration = marshallingConfiguration;
+ final MarshallingConfiguration config = new MarshallingConfiguration();
+ config.setClassExternalizerFactory(PrimaryExternalizerFactory.INSTANCE);
+ config.setObjectTable(new PrimaryObjectTable(connectionContext.getConnectionProviderContext().getEndpoint()));
+ config.setStreamHeader(Marshalling.nullStreamHeader());
+ // fixed for now (v0)
+ config.setVersion(2);
+ this.marshallingConfiguration = config;
}
public Cancellable open(final String serviceType, final String groupName, final Result<RequestHandler> result) {
final OutboundClient outboundClient;
int id;
synchronized (outboundClients) {
- while (outboundClients.containsKey(id = random.nextInt()));
+ while (outboundClients.containsKey(id = random.nextInt() | 1));
outboundClient = new OutboundClient(this, id, result, serviceType, groupName);
outboundClients.put(id, outboundClient);
}
@@ -105,7 +112,13 @@
}
public RequestHandlerConnector createConnector(final RequestHandler localHandler) {
- throw new UnsupportedOperationException();
+ final InboundClient inboundClient = new InboundClient(this, localHandler);
+ int id;
+ synchronized (inboundClients) {
+ while (inboundClients.containsKey(id = random.nextInt() & ~1));
+ inboundClients.put(id, inboundClient);
+ }
+ return new UnsentRequestHandlerConnector(id, this);
}
protected void closeAction() throws IOException {
@@ -183,4 +196,19 @@
RemoteConnection getRemoteConnection() {
return remoteConnection;
}
+
+ private static final ThreadLocal<RemoteConnectionHandler> current = new ThreadLocal<RemoteConnectionHandler>();
+
+ static RemoteConnectionHandler getCurrent() {
+ return current.get();
+ }
+
+ static RemoteConnectionHandler setCurrent(RemoteConnectionHandler newCurrent) {
+ final ThreadLocal<RemoteConnectionHandler> current = RemoteConnectionHandler.current;
+ try {
+ return current.get();
+ } finally {
+ current.set(newCurrent);
+ }
+ }
}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/RemoteMessageHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -196,17 +196,17 @@
}
case RemoteProtocol.REQUEST_ACK_CHUNK: {
final int rid = buffer.getInt();
- final InboundRequest inboundRequest;
- final IntKeyMap<InboundRequest> inboundRequests = connectionHandler.getInboundRequests();
- synchronized (inboundRequests) {
- inboundRequest = inboundRequests.get(rid);
+ final OutboundRequest outboundRequest;
+ final IntKeyMap<OutboundRequest> outboundRequests = connectionHandler.getOutboundRequests();
+ synchronized (outboundRequests) {
+ outboundRequest = outboundRequests.get(rid);
}
- if (inboundRequest == null) {
+ if (outboundRequest == null) {
RemoteConnectionHandler.log.trace("Received request-ack-chunk for unknown request ID %d", Integer.valueOf(rid));
return;
}
- synchronized (inboundRequest) {
- inboundRequest.ack();
+ synchronized (outboundRequest) {
+ outboundRequest.ack();
}
return;
}
@@ -239,17 +239,17 @@
}
case RemoteProtocol.REPLY_ACK_CHUNK: {
final int rid = buffer.getInt();
- final OutboundRequest outboundRequest;
- final IntKeyMap<OutboundRequest> outboundRequests = connectionHandler.getOutboundRequests();
- synchronized (outboundRequests) {
- outboundRequest = outboundRequests.get(rid);
+ final InboundRequest inboundRequest;
+ final IntKeyMap<InboundRequest> inboundRequests = connectionHandler.getInboundRequests();
+ synchronized (inboundRequests) {
+ inboundRequest = inboundRequests.get(rid);
}
- if (outboundRequest == null) {
+ if (inboundRequest == null) {
RemoteConnectionHandler.log.trace("Received reply-ack-chunk for unknown request ID %d", Integer.valueOf(rid));
return;
}
- synchronized (outboundRequest) {
- outboundRequest.ack();
+ synchronized (inboundRequest) {
+ inboundRequest.ack();
}
return;
}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerAuthenticationHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerAuthenticationHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerAuthenticationHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -71,8 +71,7 @@
connectionProviderContext.accept(new ConnectionHandlerFactory() {
public ConnectionHandler createInstance(final ConnectionHandlerContext connectionContext) {
final MarshallerFactory marshallerFactory = Marshalling.getMarshallerFactory("river");
- final MarshallingConfiguration marshallingConfiguration = new MarshallingConfiguration();
- final RemoteConnectionHandler connectionHandler = new RemoteConnectionHandler(connectionContext, remoteConnection, marshallerFactory, marshallingConfiguration);
+ final RemoteConnectionHandler connectionHandler = new RemoteConnectionHandler(connectionContext, remoteConnection, marshallerFactory);
remoteConnection.addCloseHandler(new CloseHandler<Object>() {
public void handleClose(final Object closed) {
IoUtils.safeClose(connectionHandler);
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerInitialAuthenticationHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerInitialAuthenticationHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerInitialAuthenticationHandler.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -26,7 +26,6 @@
import java.nio.ByteBuffer;
import java.util.Map;
import java.util.Set;
-import org.jboss.remoting3.RemotingOptions;
import org.jboss.remoting3.security.ServerAuthenticationProvider;
import org.jboss.remoting3.spi.ConnectionProviderContext;
import org.jboss.xnio.Buffers;
@@ -59,7 +58,7 @@
final String name = Buffers.getModifiedUtf8(buffer);
if (allowedMechs.contains(name)) {
RemoteConnectionHandler.log.trace("Selected SASL mechanism %s", name);
- final String realm = connectionProviderContext.getEndpointName();
+ final String realm = connectionProviderContext.getEndpoint().getName();
final SaslServer server = Sasl.createSaslServer(name, "remote", realm, saslPropertyMap, authenticationProvider.getCallbackHandler());
remoteConnection.setMessageHandler(new ServerAuthenticationHandler(remoteConnection, server, connectionProviderContext));
RemoteConnectionHandler.log.trace("Sending initial challenge");
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerOpenListener.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerOpenListener.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/ServerOpenListener.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -88,7 +88,7 @@
GreetingUtils.writeString(buffer, RemoteProtocol.GREETING_SASL_MECH, name);
RemoteConnectionHandler.log.trace("Offering SASL mechanism %s", name);
}
- GreetingUtils.writeString(buffer, RemoteProtocol.GREETING_ENDPOINT_NAME, connectionProviderContext.getEndpointName());
+ GreetingUtils.writeString(buffer, RemoteProtocol.GREETING_ENDPOINT_NAME, connectionProviderContext.getEndpoint().getName());
// that's it!
buffer.flip();
buffer.putInt(0, buffer.remaining() - 4);
Added: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/UnsentRequestHandlerConnector.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/UnsentRequestHandlerConnector.java (rev 0)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/UnsentRequestHandlerConnector.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -0,0 +1,71 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2010, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+
+package org.jboss.remoting3.remote;
+
+import java.util.concurrent.atomic.AtomicIntegerFieldUpdater;
+import org.jboss.marshalling.util.IntKeyMap;
+import org.jboss.remoting3.spi.RequestHandler;
+import org.jboss.remoting3.spi.RequestHandlerConnector;
+import org.jboss.xnio.Cancellable;
+import org.jboss.xnio.Result;
+
+final class UnsentRequestHandlerConnector implements RequestHandlerConnector {
+
+ private static final AtomicIntegerFieldUpdater<UnsentRequestHandlerConnector> sentUpdater = AtomicIntegerFieldUpdater.newUpdater(UnsentRequestHandlerConnector.class, "sent");
+
+ private final int clientId;
+ private final RemoteConnectionHandler remoteConnectionHandler;
+ private volatile int sent = 0;
+
+ UnsentRequestHandlerConnector(final int clientId, final RemoteConnectionHandler remoteConnectionHandler) {
+ this.clientId = clientId;
+ this.remoteConnectionHandler = remoteConnectionHandler;
+ }
+
+ public Cancellable createRequestHandler(final Result<RequestHandler> result) throws SecurityException {
+ throw new SecurityException("Request handler not sent");
+ }
+
+ void send() {
+ sent = 1;
+ }
+
+ boolean isSent() {
+ return sent != 0;
+ }
+
+ int getClientId() {
+ return clientId;
+ }
+
+ protected void finalize() throws Throwable {
+ if (sentUpdater.compareAndSet(this, 0, 1)) {
+ // was not sent...
+ final IntKeyMap<InboundClient> inboundClients = remoteConnectionHandler.getInboundClients();
+ synchronized (inboundClients) {
+ inboundClients.remove(clientId);
+ }
+ }
+ super.finalize();
+ }
+}
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java 2010-03-01 00:55:18 UTC (rev 5775)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/spi/ConnectionProviderContext.java 2010-03-01 01:02:47 UTC (rev 5776)
@@ -24,6 +24,7 @@
import java.util.Map;
import java.util.concurrent.Executor;
+import org.jboss.remoting3.Endpoint;
/**
* A context for a connection provider. This provides additional endpoint methods to connection providers which are not
@@ -68,9 +69,9 @@
<T> T getProtocolServiceProvider(ProtocolServiceType<T> serviceType, String name);
/**
- * Get the endpoint's name.
+ * Get the endpoint.
*
- * @return the endpoint name
+ * @return the endpoint
*/
- String getEndpointName();
+ Endpoint getEndpoint();
}
14 years, 8 months
JBoss Remoting SVN: r5775 - remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote.
by jboss-remoting-commits@lists.jboss.org
Author: david.lloyd(a)jboss.com
Date: 2010-02-28 19:55:18 -0500 (Sun, 28 Feb 2010)
New Revision: 5775
Modified:
remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyInputHandler.java
Log:
Fix ack of wrong type
Modified: remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyInputHandler.java
===================================================================
--- remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyInputHandler.java 2010-02-28 22:59:17 UTC (rev 5774)
+++ remoting3/trunk/jboss-remoting/src/main/java/org/jboss/remoting3/remote/InboundReplyInputHandler.java 2010-03-01 00:55:18 UTC (rev 5775)
@@ -40,7 +40,7 @@
final ByteBuffer buffer = connectionHandler.getBufferPool().allocate();
try {
buffer.putInt(RemoteConnectionHandler.LENGTH_PLACEHOLDER);
- buffer.put(RemoteProtocol.REQUEST_ACK_CHUNK);
+ buffer.put(RemoteProtocol.REPLY_ACK_CHUNK);
buffer.putInt(rid);
buffer.flip();
final RemoteConnection connection = connectionHandler.getRemoteConnection();
14 years, 8 months