From jboss-remoting-commits at lists.jboss.org Sun May 10 02:41:55 2009 Content-Type: multipart/mixed; boundary="===============6519615005131154221==" MIME-Version: 1.0 From: jboss-remoting-commits at lists.jboss.org To: jboss-remoting-commits at lists.jboss.org Subject: [jboss-remoting-commits] JBoss Remoting SVN: r5178 - in remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servlet: nopreservelines and 1 other directory. Date: Sun, 10 May 2009 02:38:10 -0400 Message-ID: --===============6519615005131154221== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Author: ron.sigal(a)jboss.com Date: 2009-05-10 02:38:10 -0400 (Sun, 10 May 2009) New Revision: 5178 Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl= et/nopreservelines/ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl= et/nopreservelines/ServletNoLinePreservationTestClient.java remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl= et/nopreservelines/TestInvocationHandler.java remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl= et/nopreservelines/readme.txt remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/servl= et/nopreservelines/remoting-servlet-service.xml Log: JBREM-1079: New unit test. Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s= ervlet/nopreservelines/ServletNoLinePreservationTestClient.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/ServletNoLinePreservationTestClient.java = (rev 0) +++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/ServletNoLinePreservationTestClient.java 2009-05-10 06:= 38:10 UTC (rev 5178) @@ -0,0 +1,52 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, 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.test.remoting.transport.servlet.nopreservelines; + +import org.jboss.remoting.InvokerLocator; +import org.jboss.test.remoting.transport.http.lines.HttpLinePreservationTe= stCase; + + +/** + * Unit tests for JBREM-809. + * = + * @author Ron Sigal + * @version $Revision: 1.1 $ + *

+ * Copyright Feb 8, 2008 + *

+ */ +public class ServletNoLinePreservationTestClient extends HttpLinePreservat= ionTestCase +{ + protected String getTransport() + { + return "servlet"; + } + = + protected void setupServer(boolean addConfig, String preserveLines) thr= ows Exception + { + locatorURI =3D "servlet://localhost:8080/servlet-invoker/ServerInvok= erServlet"; + serverLocator =3D new InvokerLocator(locatorURI); + } + + public void testLinePreservationClientConfig() {} + public void testLinePreservationClientMetadata() {} +} \ No newline at end of file Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s= ervlet/nopreservelines/TestInvocationHandler.java =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/TestInvocationHandler.java (rev= 0) +++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/TestInvocationHandler.java 2009-05-10 06:38:10 UTC (rev= 5178) @@ -0,0 +1,51 @@ +/* +* JBoss, Home of Professional Open Source +* Copyright 2005, 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.test.remoting.transport.servlet.nopreservelines; + +import javax.management.MBeanServer; + +import org.jboss.remoting.InvocationRequest; +import org.jboss.remoting.ServerInvocationHandler; +import org.jboss.remoting.ServerInvoker; +import org.jboss.remoting.callback.InvokerCallbackHandler; + +/** + * For JBREM-809. + * = + * @author Ron Sigal + * @version $Revision: 1.1 $ + *

+ * Copyright Feb 8, 2008 + *

+ */ +public class TestInvocationHandler implements ServerInvocationHandler +{ + public void addListener(InvokerCallbackHandler callbackHandler) {} + public Object invoke(final InvocationRequest invocation) throws Throwab= le + { + return invocation.getParameter(); + } + public void removeListener(InvokerCallbackHandler callbackHandler) {} + public void setMBeanServer(MBeanServer server) {} + public void setInvoker(ServerInvoker invoker) {} +} \ No newline at end of file Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s= ervlet/nopreservelines/readme.txt =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/readme.txt (rev 0) +++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/readme.txt 2009-05-10 06:38:10 UTC (rev 5178) @@ -0,0 +1,40 @@ +The servlet (and sslservlet) transport tests require a web container. Cur= rently, these tests have to be run +manually (JBREM-139 has been created to automate this). Until then, here = are the instructions for running +the tests manually. + +******************************************************* +***** JBREM-139 is done. ***** +***** See tests.functional.servlet in build.xml. ***** +******************************************************* + +servlet + +1. Get JBossAS and copy remoting's servlet-invoker.war (from distro or bui= ld) to the deploy directory. +2. Copy the WEB-INF/web.xml under this directory into the that of the serv= let-invoker.war/WEB-INF directory. +3. Copy remoting-servlet-invoker-service.xml to deploy directory. +4. Copy jboss-remoting-tests.jar to server lib directory +5. Start web container (JBossAS). +6. Run ServletLinePreservationTestClient. + + +sslservlet + +1. Steps 1-4 above, except use the WEB-INF/web.xml and remoting-servlet-in= voker-service.xml that is under the +servlet/ssl directory. +2. Copy the servlet/ssl/.keystore file to the server conf directory +3. Edit jboss-web.deployer/server.xml to enable ssl connector. It should = look like following: + = + = + = + +4. Start web container (JBossAS). +5. Run SSLServletInvokerTestClient or SSLServletClientAddressTestClient. + + + Added: remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/s= ervlet/nopreservelines/remoting-servlet-service.xml =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/remoting-servlet-service.xml (r= ev 0) +++ remoting2/branches/2.2/src/tests/org/jboss/test/remoting/transport/serv= let/nopreservelines/remoting-servlet-service.xml 2009-05-10 06:38:10 UTC (r= ev 5178) @@ -0,0 +1,22 @@ + + + + + + + + + localhost + 8080 + false + servlet-invoker/ServerInvokerServl= et + + + org.jboss.test.remoting.transpo= rt.servlet.nopreservelines.TestInvocationHandler + + + + + --===============6519615005131154221==--