I have my app running using the 1st deployment, but not the 2nd deployment. It seems the websocket is not supported in the 2nd deployment. Please confirm or I did something wrong?
1. Embedding Membrane Service Proxy into Java Applications
2. Membrane Service Proxy Web Application Deployment
http://www.membrane-soa.org/service-proxy-doc/4.0/router-war.htm
Here is my proxy setting:
<serviceProxy port="8080" >
<interceptor refid="MyInterceptor" />
<rewriter>
<!--map from="/myapp(/.*)" to="$1"/-->
<map from="/myapp/\w*(/.*)" to="$1" />
</rewriter>
<webSocket />
<target host="192.168.1.3" port="9000"/>
</serviceProxy>
When the code tries to forward websocket request, I got the cast exception error.
In the debugger, I see the getHandler() returns com.predic8.membrane.servlet.embedded.HttpServletHandler and it tries to cast it to com.predic8.membrane.core.transport.http.HttpServletHandler, which is not compatible (cast exception).
public class HttpClient {
public static void setupConnectionForwarding(Exchange exc, final Connection con, final String protocol, StreamPump.StreamPumpStats streamPumpStats) throws SocketException {
final HttpServerHandler hsr = (HttpServerHandler)exc.getHandler();
String source = hsr.getSourceSocket().getRemoteSocketAddress().toString();
String dest = con.toString();
Any idea how to resolve this? I really want the 2nd deployment scenario, because I have another app deployed in the same J2EE container that works with this app.
Thanks,
Denny