geronimo-scm mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ga...@apache.org
Subject svn commit: r579469 - in /geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests: sec-ejb/src/main/resources/META-INF/openejb-jar.xml sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java sec-war/src/main/webapp/TestJsp.jsp
Date Wed, 26 Sep 2007 04:37:24 GMT
Author: gawor
Date: Tue Sep 25 21:37:21 2007
New Revision: 579469

URL: http://svn.apache.org/viewvc?rev=579469&view=rev
Log:
changing the order of gbeans fixes the test

Modified:
    geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-ejb/src/main/resources/META-INF/openejb-jar.xml
    geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
    geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/webapp/TestJsp.jsp

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-ejb/src/main/resources/META-INF/openejb-jar.xml
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-ejb/src/main/resources/META-INF/openejb-jar.xml?rev=579469&r1=579468&r2=579469&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-ejb/src/main/resources/META-INF/openejb-jar.xml
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-ejb/src/main/resources/META-INF/openejb-jar.xml
Tue Sep 25 21:37:21 2007
@@ -53,6 +53,22 @@
             </role>
         </role-mappings>
     </security>
+    <gbean name="test-realm"
+           class="org.apache.geronimo.security.realm.GenericSecurityRealm">
+        <attribute name="realmName">test-realm</attribute>
+        <xml-reference name="LoginModuleConfiguration">
+            <lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-${geronimoSchemaVersion}">
+                <lc:login-module control-flag="REQUIRED" wrap-principals="false">
+                    <lc:login-domain-name>test-realm</lc:login-domain-name>
+                    <lc:login-module-class>org.apache.geronimo.itest.TestLoginModule</lc:login-module-class>
+                    <lc:option name="users">foo,bar</lc:option>
+                </lc:login-module>
+            </lc:login-config>
+        </xml-reference>
+        <reference name="ServerInfo">
+            <name>ServerInfo</name>
+        </reference>
+    </gbean>
     <gbean name="TestCredentialStore" class="org.apache.geronimo.security.credentialstore.SimpleCredentialStoreImpl">
         <xml-attribute name="credentialStore">
             <credential-store xmlns="http://geronimo.apache.org/xml/ns/credentialstore-1.0">
@@ -82,22 +98,6 @@
                 </realm>
             </credential-store>
         </xml-attribute>
-    </gbean>
-    <gbean name="test-realm"
-           class="org.apache.geronimo.security.realm.GenericSecurityRealm">
-        <attribute name="realmName">test-realm</attribute>
-        <xml-reference name="LoginModuleConfiguration">
-            <lc:login-config xmlns:lc="http://geronimo.apache.org/xml/ns/loginconfig-${geronimoSchemaVersion}">
-                <lc:login-module control-flag="REQUIRED" wrap-principals="false">
-                    <lc:login-domain-name>test-realm</lc:login-domain-name>
-                    <lc:login-module-class>org.apache.geronimo.itest.TestLoginModule</lc:login-module-class>
-                    <lc:option name="users">foo,bar</lc:option>
-                </lc:login-module>
-            </lc:login-config>
-        </xml-reference>
-        <reference name="ServerInfo">
-            <name>ServerInfo</name>
-        </reference>
     </gbean>
 </openejb-jar>
 

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java?rev=579469&r1=579468&r2=579469&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/java/org/apache/geronimo/itest/TestServlet.java
Tue Sep 25 21:37:21 2007
@@ -17,6 +17,7 @@
 package org.apache.geronimo.itest;
 
 import java.io.IOException;
+import java.io.PrintWriter;
 import java.rmi.AccessException;
 import java.rmi.RemoteException;
 
@@ -40,7 +41,7 @@
     }
 
     protected void service(HttpServletRequest httpServletRequest, HttpServletResponse httpServletResponse)
throws ServletException, IOException {
-        ServletOutputStream out = httpServletResponse.getOutputStream();
+        PrintWriter out = httpServletResponse.getWriter();
         out.println("TestServlet principal: " + httpServletRequest.getUserPrincipal().getName());
         try {
             InitialContext ctx = new InitialContext();
@@ -65,7 +66,7 @@
         } catch (CreateException e) {
             e.printStackTrace();
         }
-        httpServletResponse.flushBuffer();
+        out.flush();
     }
 
 

Modified: geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/webapp/TestJsp.jsp
URL: http://svn.apache.org/viewvc/geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/webapp/TestJsp.jsp?rev=579469&r1=579468&r2=579469&view=diff
==============================================================================
--- geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/webapp/TestJsp.jsp
(original)
+++ geronimo/server/trunk/testsuite/enterprise-testsuite/sec-tests/sec-war/src/main/webapp/TestJsp.jsp
Tue Sep 25 21:37:21 2007
@@ -18,12 +18,13 @@
 <%@ page import="javax.naming.InitialContext" %>
 <%@ page import="org.apache.geronimo.itest.TestSessionHome" %>
 <%@ page import="javax.naming.NamingException" %>
+<%@ page import="java.io.PrintWriter" %>
 <%@ page import="java.rmi.AccessException" %>
 <%@ page import="java.rmi.RemoteException" %>
 <%@ page import="javax.ejb.CreateException" %>
 <%@ page contentType="text/html;charset=UTF-8" language="java" %>
 <%
-    ServletOutputStream myout = response.getOutputStream();
+    PrintWriter myout = response.getWriter();
     myout.println("TestServlet principal: " + request.getUserPrincipal().getName());
     try {
         InitialContext ctx = new InitialContext();
@@ -48,5 +49,5 @@
     } catch (CreateException e) {
         e.printStackTrace();
     }
-    myout.flush();
+    out.flush();
 %>



Mime
View raw message