Skip to content

Commit

Permalink
ISPN-5085 Switch Resteasy backend to Netty
Browse files Browse the repository at this point in the history
* Undertow web no longer used for serving REST requests, instead
use Netty based Resteasy backend.
* Removed all references to undertow, including dependencies and
subsystem configuration.
* Adjusted testsuite REST server tests so that they don't rely
on content length reading and instead they use streaming capabilities
to read as much as needed.
* Upgraded to Resteasy 3.0.11 version to get around an issue with
empty responses.
* Created new server parser for version 7.2 to include new REST
server socket-binding configuration, and rename virtual-server into
virtual-host (but unused yet).
  • Loading branch information
galderz authored and tristantarrant committed Apr 16, 2015
1 parent df6d296 commit e81d358
Show file tree
Hide file tree
Showing 65 changed files with 1,507 additions and 474 deletions.
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -409,7 +409,7 @@ The REST connector differs from the above connectors because it piggybacks on th
[source,xml] [source,xml]
---- ----
<rest-connector virtual-server="default-host" cache-container="local" security-domain="other" auth-method="BASIC"/> <rest-connector socket-binding="rest" cache-container="local" security-domain="other" auth-method="BASIC"/>
---- ----


Expand Down
7 changes: 6 additions & 1 deletion parent/pom.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<version.org.jboss.naming>5.0.6.CR1</version.org.jboss.naming> <version.org.jboss.naming>5.0.6.CR1</version.org.jboss.naming>
<version.org.picketbox>4.0.20.Final</version.org.picketbox> <version.org.picketbox>4.0.20.Final</version.org.picketbox>
<version.postgresql.driver>9.3-1101-jdbc41</version.postgresql.driver> <version.postgresql.driver>9.3-1101-jdbc41</version.postgresql.driver>
<version.resteasy>3.0.7.Final</version.resteasy> <version.resteasy>3.0.11.Final</version.resteasy>
<version.shrinkwrapResolver>2.1.0</version.shrinkwrapResolver> <version.shrinkwrapResolver>2.1.0</version.shrinkwrapResolver>
<version.slf4j>1.7.5</version.slf4j> <version.slf4j>1.7.5</version.slf4j>
<version.snappy>1.0.5</version.snappy> <version.snappy>1.0.5</version.snappy>
Expand Down Expand Up @@ -615,6 +615,11 @@
<artifactId>resteasy-jaxrs</artifactId> <artifactId>resteasy-jaxrs</artifactId>
<version>${version.resteasy}</version> <version>${version.resteasy}</version>
</dependency> </dependency>
<dependency>
<groupId>org.jboss.resteasy</groupId>
<artifactId>resteasy-netty4</artifactId>
<version>${version.resteasy}</version>
</dependency>
<dependency> <dependency>
<groupId>org.jboss.solder</groupId> <groupId>org.jboss.solder</groupId>
<artifactId>solder-impl</artifactId> <artifactId>solder-impl</artifactId>
Expand Down
9 changes: 9 additions & 0 deletions server/integration/build/build.xml
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -260,6 +260,15 @@
<module-def name="org.hibernate.hql.lucene"> <module-def name="org.hibernate.hql.lucene">
<maven-resource group="org.hibernate.hql" artifact="hibernate-hql-lucene" /> <maven-resource group="org.hibernate.hql" artifact="hibernate-hql-lucene" />
</module-def> </module-def>

<module-def name="org.jboss.resteasy.resteasy-jaxrs">
<maven-resource group="org.jboss.resteasy" artifact="resteasy-jaxrs" />
</module-def>

<module-def name="org.jboss.resteasy.resteasy-netty4">
<maven-resource group="org.jboss.resteasy" artifact="resteasy-netty4" />
</module-def>

</target> </target>


<target name="trim-modules"> <target name="trim-modules">
Expand Down
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="domain">configuration/subsystems/security.xml</subsystem> <subsystem supplement="domain">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -39,6 +39,5 @@
<subsystem>configuration/subsystems/security.xml</subsystem> <subsystem>configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem>configuration/subsystems/security.xml</subsystem> <subsystem>configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -15,6 +15,5 @@
<subsystem>configuration/subsystems/security.xml</subsystem> <subsystem>configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -12,6 +12,5 @@
<subsystem>configuration/subsystems/remoting.xml</subsystem> <subsystem>configuration/subsystems/remoting.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -17,6 +17,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- See src/resources/configuration/ReadMe.txt for how the configuration assembly works --> <!-- See src/resources/configuration/ReadMe.txt for how the configuration assembly works -->
<config default-supplement="default"> <config default-supplement="default">
<extension-module>org.infinispan.server.endpoint</extension-module> <extension-module>org.infinispan.server.endpoint</extension-module>
<subsystem xmlns="urn:infinispan:server:endpoint:7.0"> <subsystem xmlns="urn:infinispan:server:endpoint:7.2">
<?CONNECTORS?> <?CONNECTORS?>
</subsystem> </subsystem>
<supplement name="hotrod-rolling-upgrade"> <supplement name="hotrod-rolling-upgrade">
Expand All @@ -16,13 +16,13 @@
<supplement name="rest-auth"> <supplement name="rest-auth">
<replacement placeholder="@@default-cache-container@@" attributeValue="local" /> <replacement placeholder="@@default-cache-container@@" attributeValue="local" />
<replacement placeholder="CONNECTORS"> <replacement placeholder="CONNECTORS">
<rest-connector virtual-server="default-host" cache-container="local" security-domain="other" auth-method="BASIC" /> <rest-connector socket-binding="rest" cache-container="local" security-domain="other" auth-method="BASIC" />
</replacement> </replacement>
</supplement> </supplement>
<supplement name="rest-rolling-upgrade"> <supplement name="rest-rolling-upgrade">
<replacement placeholder="@@default-cache-container@@" attributeValue="local"/> <replacement placeholder="@@default-cache-container@@" attributeValue="local"/>
<replacement placeholder="CONNECTORS"> <replacement placeholder="CONNECTORS">
<rest-connector virtual-server="default-host" cache-container="local"/> <rest-connector socket-binding="rest" cache-container="local"/>
<hotrod-connector socket-binding="hotrod" cache-container="local"> <hotrod-connector socket-binding="hotrod" cache-container="local">
<topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" /> <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" />
</hotrod-connector> </hotrod-connector>
Expand Down Expand Up @@ -55,7 +55,7 @@
<topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" /> <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" />
</hotrod-connector> </hotrod-connector>
<memcached-connector socket-binding="memcached" cache-container="local" cache="default" /> <memcached-connector socket-binding="memcached" cache-container="local" cache="default" />
<rest-connector virtual-server="default-host" cache-container="local" /> <rest-connector socket-binding="rest" cache-container="local" />
</replacement> </replacement>
</supplement> </supplement>
<supplement name="auth"> <supplement name="auth">
Expand All @@ -72,4 +72,5 @@
<socket-binding name="hotrod" port="11222" /> <socket-binding name="hotrod" port="11222" />
<socket-binding name="hotrod-internal" port="11223" /> <socket-binding name="hotrod-internal" port="11223" />
<socket-binding name="memcached" port="11211" /> <socket-binding name="memcached" port="11211" />
<socket-binding name="rest" port="8080" />
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -18,6 +18,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -16,6 +16,5 @@
<subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem> <subsystem supplement="standalone">configuration/subsystems/security.xml</subsystem>
<subsystem>configuration/subsystems/threads.xml</subsystem> <subsystem>configuration/subsystems/threads.xml</subsystem>
<subsystem>configuration/subsystems/transactions.xml</subsystem> <subsystem>configuration/subsystems/transactions.xml</subsystem>
<subsystem>configuration/subsystems/undertow.xml</subsystem>
</subsystems> </subsystems>
</config> </config>
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<!-- See src/resources/configuration/ReadMe.txt for how the configuration assembly works --> <!-- See src/resources/configuration/ReadMe.txt for how the configuration assembly works -->
<config default-supplement="default"> <config default-supplement="default">
<extension-module>org.infinispan.server.endpoint</extension-module> <extension-module>org.infinispan.server.endpoint</extension-module>
<subsystem xmlns="urn:infinispan:server:endpoint:7.0"> <subsystem xmlns="urn:infinispan:server:endpoint:7.2">
<?CONNECTORS?> <?CONNECTORS?>
</subsystem> </subsystem>
<supplement name="default"> <supplement name="default">
Expand All @@ -12,7 +12,7 @@
<topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" /> <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" />
</hotrod-connector> </hotrod-connector>
<memcached-connector socket-binding="memcached" cache-container="local" /> <memcached-connector socket-binding="memcached" cache-container="local" />
<rest-connector virtual-server="default-host" cache-container="local" security-domain="other" auth-method="BASIC" /> <rest-connector socket-binding="rest" cache-container="local" security-domain="other" auth-method="BASIC" />
<websocket-connector socket-binding="websocket" cache-container="local" /> <websocket-connector socket-binding="websocket" cache-container="local" />
</replacement> </replacement>
</supplement> </supplement>
Expand All @@ -23,11 +23,12 @@
<topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" /> <topology-state-transfer lazy-retrieval="false" lock-timeout="1000" replication-timeout="5000" />
</hotrod-connector> </hotrod-connector>
<memcached-connector socket-binding="memcached" cache-container="clustered" /> <memcached-connector socket-binding="memcached" cache-container="clustered" />
<rest-connector virtual-server="default-host" cache-container="clustered" security-domain="other" auth-method="BASIC" /> <rest-connector socket-binding="rest" cache-container="clustered" security-domain="other" auth-method="BASIC" />
<websocket-connector socket-binding="websocket" cache-container="clustered" /> <websocket-connector socket-binding="websocket" cache-container="clustered" />
</replacement> </replacement>
</supplement> </supplement>
<socket-binding name="hotrod" port="11222" /> <socket-binding name="hotrod" port="11222" />
<socket-binding name="memcached" port="11211" /> <socket-binding name="memcached" port="11211" />
<socket-binding name="websocket" port="8181" /> <socket-binding name="websocket" port="8181" />
<socket-binding name="rest" port="8080" />
</config> </config>
Loading

0 comments on commit e81d358

Please sign in to comment.