JBossWS SVN: r10496 - stack/metro/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 11:32:43 -0400 (Wed, 05 Aug 2009)
New Revision: 10496
Modified:
stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2630] Excluding test
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:31:07 UTC (rev 10495)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:32:43 UTC (rev 10496)
@@ -48,3 +48,6 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:31:07 UTC (rev 10495)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:32:43 UTC (rev 10496)
@@ -45,3 +45,6 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:31:07 UTC (rev 10495)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:32:43 UTC (rev 10496)
@@ -45,3 +45,6 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:31:07 UTC (rev 10495)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:32:43 UTC (rev 10496)
@@ -45,3 +45,6 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:31:07 UTC (rev 10495)
+++ stack/metro/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:32:43 UTC (rev 10496)
@@ -45,3 +45,6 @@
# [JBWS-2462] Address rewrite test fails in Metro integration
org/jboss/test/ws/jaxws/jbws2150/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
14 years, 9 months
JBossWS SVN: r10495 - stack/cxf/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 11:31:07 -0400 (Wed, 05 Aug 2009)
New Revision: 10495
Modified:
stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2630] Excluding test
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:28:07 UTC (rev 10494)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:31:07 UTC (rev 10495)
@@ -44,3 +44,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:28:07 UTC (rev 10494)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:31:07 UTC (rev 10495)
@@ -44,3 +44,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:28:07 UTC (rev 10494)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:31:07 UTC (rev 10495)
@@ -44,3 +44,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:28:07 UTC (rev 10494)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:31:07 UTC (rev 10495)
@@ -50,3 +50,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
Modified: stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:28:07 UTC (rev 10494)
+++ stack/cxf/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:31:07 UTC (rev 10495)
@@ -44,3 +44,6 @@
# [JBWS-2397] Fix jbws1797 testcase
org/jboss/test/ws/jaxws/jbws1797/**
+
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
14 years, 9 months
JBossWS SVN: r10494 - stack/native/trunk/modules/testsuite.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 11:28:07 -0400 (Wed, 05 Aug 2009)
New Revision: 10494
Modified:
stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss520.txt
stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
Log:
[JBWS-2630] Excluding test
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:27:46 UTC (rev 10493)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss500.txt 2009-08-05 15:28:07 UTC (rev 10494)
@@ -10,6 +10,9 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
+
# [JBWS-2634] Implement support for @EJB annotations in WS components (fixed in AS 501 and above)
org/jboss/test/ws/jaxws/jbws2634/**
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:27:46 UTC (rev 10493)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss501.txt 2009-08-05 15:28:07 UTC (rev 10494)
@@ -7,5 +7,8 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
+
# [JBWS-2674] Implement javax.xml.ws.Endpoint
org/jboss/test/ws/jaxws/endpoint/*TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:27:46 UTC (rev 10493)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss510.txt 2009-08-05 15:28:07 UTC (rev 10494)
@@ -7,5 +7,8 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
+
# [JBWS-2674] Implement javax.xml.ws.Endpoint
-org/jboss/test/ws/jaxws/endpoint/*TestCase.*
\ No newline at end of file
+org/jboss/test/ws/jaxws/endpoint/*TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss520.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:27:46 UTC (rev 10493)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss520.txt 2009-08-05 15:28:07 UTC (rev 10494)
@@ -7,5 +7,8 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
+
# [JBWS-2674] Implement javax.xml.ws.Endpoint
org/jboss/test/ws/jaxws/endpoint/*TestCase.*
Modified: stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt
===================================================================
--- stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:27:46 UTC (rev 10493)
+++ stack/native/trunk/modules/testsuite/test-excludes-jboss600.txt 2009-08-05 15:28:07 UTC (rev 10494)
@@ -7,5 +7,8 @@
# [JBWS-2217] Fix BPEL jaxrpc samples
org/jboss/test/ws/jaxrpc/samples/wsbpel/hello/*TestCase.*
+# [JBWS-2630] Wrong context when deploying endpoint in war embedded in a jar
+org/jboss/test/ws/jaxws/jbws2630/**
+
# [JBWS-2674] Implement javax.xml.ws.Endpoint
org/jboss/test/ws/jaxws/endpoint/*TestCase.*
14 years, 9 months
JBossWS SVN: r10493 - in framework/trunk/testsuite/test: java/org/jboss/test/ws/jaxws and 4 other directories.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 11:27:46 -0400 (Wed, 05 Aug 2009)
New Revision: 10493
Added:
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
framework/trunk/testsuite/test/resources/jaxws/jbws2630/
framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/
framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
Modified:
framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
Log:
[JBWS-2630] Adding testcase
Modified: framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml
===================================================================
--- framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-08-05 13:19:18 UTC (rev 10492)
+++ framework/trunk/testsuite/test/ant-import/build-jars-jaxws.xml 2009-08-05 15:27:46 UTC (rev 10493)
@@ -760,6 +760,18 @@
<include name="*.xml"/>
</webinf>
</war>
+
+ <!-- jaxws-jbws2630 -->
+ <war warfile="${tests.output.dir}/test-libs/jaxws-jbws2630-service.war" webxml="${tests.output.dir}/test-resources/jaxws/jbws2630/WEB-INF/web.xml">
+ <classes dir="${tests.output.dir}/test-classes">
+ <include name="org/jboss/test/ws/jaxws/jbws2630/Endpoint*.class"/>
+ </classes>
+ </war>
+ <jar destfile="${tests.output.dir}/test-libs/jaxws-jbws2630.jar">
+ <fileset dir="${tests.output.dir}/test-libs">
+ <include name="jaxws-jbws2630-service.war"/>
+ </fileset>
+ </jar>
<!-- jaxws-jbws2634 -->
<jar jarfile="${tests.output.dir}/test-libs/jaxws-jbws2634.jar">
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java 2009-08-05 15:27:46 UTC (rev 10493)
@@ -0,0 +1,43 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ws.jaxws.jbws2630;
+
+import java.rmi.Remote;
+
+import javax.jws.WebMethod;
+import javax.jws.WebService;
+import javax.jws.soap.SOAPBinding;
+
+/**
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Aug-2009
+ */
+@WebService(targetNamespace = "http://org.jboss/test/ws/jbws2630")
+@SOAPBinding(style = SOAPBinding.Style.RPC)
+public interface Endpoint extends Remote
+{
+
+ @WebMethod
+ public String echo(String s);
+
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/Endpoint.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java 2009-08-05 15:27:46 UTC (rev 10493)
@@ -0,0 +1,38 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ws.jaxws.jbws2630;
+
+import javax.jws.WebService;
+
+/**
+*
+* @author alessio.soldano(a)jboss.com
+* @since 05-Aug-2009
+*/
+@WebService(serviceName = "EndpointService", targetNamespace = "http://org.jboss/test/ws/jbws2630", endpointInterface = "org.jboss.test.ws.jaxws.jbws2630.Endpoint")
+public class EndpointImpl implements Endpoint
+{
+ public String echo(String s)
+ {
+ return s;
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/EndpointImpl.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
===================================================================
--- framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java (rev 0)
+++ framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java 2009-08-05 15:27:46 UTC (rev 10493)
@@ -0,0 +1,80 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.ws.jaxws.jbws2630;
+
+import java.io.BufferedReader;
+import java.io.InputStreamReader;
+import java.net.URL;
+
+import javax.management.MBeanServerConnection;
+import javax.management.ObjectName;
+import javax.xml.namespace.QName;
+import javax.xml.ws.Service;
+
+import junit.framework.Test;
+
+import org.jboss.wsf.test.JBossWSTest;
+import org.jboss.wsf.test.JBossWSTestSetup;
+
+/**
+ * [JBWS-2630]
+ *
+ * Tests a valid endpoint address is shown in context servlet when
+ * deploying a jar file containing a war file with the endpoint.
+ *
+ * @author alessio.soldano(a)jboss.com
+ * @since 05-Aug-2009
+ */
+public class JBWS2630TestCase extends JBossWSTest
+{
+ private String endpointAddress = "http://" + this.getServerHost() + ":8080/jaxws-jbws2630-jaxws-jbws2630-service/Endpoint";
+
+ public static Test suite()
+ {
+ return new JBossWSTestSetup(JBWS2630TestCase.class, "jaxws-jbws2630.jar");
+ }
+
+ public void testJMXConsole() throws Exception
+ {
+ MBeanServerConnection server = getServer();
+ ObjectName oname = new ObjectName("jboss.ws:context=jaxws-jbws2630-jaxws-jbws2630-service,endpoint=Endpoint");
+ String address = (String)server.getAttribute(oname, "Address");
+ assertEquals(new URL(endpointAddress).getPath(), new URL(address).getPath());
+ }
+
+ public void testWSDL() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ BufferedReader br = new BufferedReader(new InputStreamReader(url.openStream()));
+ assertTrue(br.readLine().contains("definition"));
+ }
+
+ public void testEndpoint() throws Exception
+ {
+ URL url = new URL(endpointAddress + "?wsdl");
+ QName serviceName = new QName("http://org.jboss/test/ws/jbws2630", "EndpointService");
+ Service service = Service.create(url, serviceName);
+ Endpoint port = service.getPort(Endpoint.class);
+ String s = "Hi";
+ assertEquals(s, port.echo(s));
+ }
+}
Property changes on: framework/trunk/testsuite/test/java/org/jboss/test/ws/jaxws/jbws2630/JBWS2630TestCase.java
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
Added: framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
===================================================================
--- framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml (rev 0)
+++ framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml 2009-08-05 15:27:46 UTC (rev 10493)
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+
+<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
+
+ <servlet>
+ <servlet-name>Endpoint</servlet-name>
+ <servlet-class>org.jboss.test.ws.jaxws.jbws2630.EndpointImpl</servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>Endpoint</servlet-name>
+ <url-pattern>/Endpoint</url-pattern>
+ </servlet-mapping>
+
+</web-app>
\ No newline at end of file
Property changes on: framework/trunk/testsuite/test/resources/jaxws/jbws2630/WEB-INF/web.xml
___________________________________________________________________
Name: svn:keywords
+ Id Revision
Name: svn:eol-style
+ LF
14 years, 9 months
JBossWS SVN: r10492 - in container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration: tomcat and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-05 09:19:18 -0400 (Wed, 05 Aug 2009)
New Revision: 10492
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
Log:
[JBWS-2332] refactoring
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 11:05:50 UTC (rev 10491)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 13:19:18 UTC (rev 10492)
@@ -264,7 +264,7 @@
return dep;
}
-
+
/**
* Creates new archive deployment.
*
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05 11:05:50 UTC (rev 10491)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05 13:19:18 UTC (rev 10492)
@@ -21,10 +21,7 @@
*/
package org.jboss.webservices.integration.tomcat;
-import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
import org.jboss.wsf.common.integration.WSHelper;
-import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
@@ -72,84 +69,62 @@
return securityDomain;
}
- public final String getAuthMethod(final Endpoint endpoint)
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return authentication method or null if not specified
+ */
+ public String getAuthMethod(final Endpoint endpoint)
{
- final Deployment dep = endpoint.getService().getDeployment();
- String ejbName = endpoint.getShortName();
- String beanAuthMethod = null;
+ final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+ final boolean hasEjbSecurityMD = ejbSecurityMD != null;
- WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- }
+ return hasEjbSecurityMD ? ejbSecurityMD.getAuthMethod() : null;
+ }
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- beanAuthMethod = smd.getAuthMethod();
- }
- }
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return whether WSDL access have to be secured
+ */
+ public boolean isSecureWsdlAccess(final Endpoint endpoint)
+ {
+ final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+ final boolean hasEjbSecurityMD = ejbSecurityMD != null;
- return beanAuthMethod;
+ return hasEjbSecurityMD ? ejbSecurityMD.getSecureWSDLAccess() : false;
}
- public final boolean isSecureWsdlAccess(final Endpoint endpoint)
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return transport guarantee or null if not specified
+ */
+ public String getTransportGuarantee(final Endpoint endpoint)
{
- final Deployment dep = endpoint.getService().getDeployment();
- String ejbName = endpoint.getShortName();
- boolean secureWSDLAccess = false;
+ final EJBSecurityMetaData ejbSecurityMD = this.getEjbSecurityMetaData(endpoint);
+ final boolean hasEjbSecurityMD = ejbSecurityMD != null;
- WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
- }
-
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- secureWSDLAccess = smd.getSecureWSDLAccess();
- }
- }
-
- return secureWSDLAccess;
+ return hasEjbSecurityMD ? ejbSecurityMD.getTransportGuarantee() : null;
}
- public final String getTransportGuarantee(final Endpoint endpoint)
+ /**
+ * Gets EJB security meta data if associated with EJB endpoint.
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return EJB security meta data or null
+ */
+ private EJBSecurityMetaData getEjbSecurityMetaData(final Endpoint endpoint)
{
+ final String ejbName = endpoint.getShortName();
final Deployment dep = endpoint.getService().getDeployment();
- String ejbName = endpoint.getShortName();
- String transportGuarantee = null;
+ final EJBArchiveMetaData ejbArchiveMD = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
+ final EJBMetaData ejbMD = ejbArchiveMD != null ? ejbArchiveMD.getBeanByEjbName(ejbName) : null;
- WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- }
-
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- transportGuarantee = smd.getTransportGuarantee();
- }
- }
-
- return transportGuarantee;
+ return ejbMD != null ? ejbMD.getSecurityMetaData() : null;
}
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05 11:05:50 UTC (rev 10491)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05 13:19:18 UTC (rev 10492)
@@ -43,17 +43,35 @@
String getSecurityDomain(Deployment dep);
/**
- * Obtaining security roles from EJB deployment.
+ * Obtains security roles from EJB deployment.
*
* @param dep webservice deployment
* @return security roles associated with EJB deployment
*/
SecurityRolesMetaData getSecurityRoles(Deployment dep);
+ /**
+ * Whether WSDL access have to be secured.
+ *
+ * @param endpoint webservice EJB endpoint
+ * @return authentication method or null if not specified
+ */
boolean isSecureWsdlAccess(Endpoint endpoint);
+ /**
+ * Gets EJB authentication method.
+ *
+ * @param endpoint webservice EJB endpoint
+ * @return authentication method or null if not specified
+ */
String getAuthMethod(Endpoint endpoint);
+ /**
+ * Gets EJB transport guarantee.
+ *
+ * @param endpoint webservice EJB endpoint
+ * @return transport guarantee or null if not specified
+ */
String getTransportGuarantee(Endpoint endpoint);
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 11:05:50 UTC (rev 10491)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 13:19:18 UTC (rev 10492)
@@ -29,7 +29,9 @@
import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.annotation.WebContext;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
@@ -107,6 +109,60 @@
}
/**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getAuthMethod(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return authentication method or null if not specified
+ */
+ public String getAuthMethod(final Endpoint endpoint)
+ {
+ final WebContext webContext = this.getWebContextAnnotation(endpoint);
+ final boolean hasAuthMethod = (webContext != null) && (webContext.authMethod().length() > 0);
+
+ return hasAuthMethod ? webContext.authMethod() : super.getAuthMethod(endpoint);
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#isSecureWsdlAccess(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return whether WSDL access have to be secured
+ */
+ public boolean isSecureWsdlAccess(final Endpoint endpoint)
+ {
+ final WebContext webContext = this.getWebContextAnnotation(endpoint);
+ final boolean hasSecureWsdlAccess = (webContext != null) && (webContext.secureWSDLAccess());
+
+ return hasSecureWsdlAccess ? true : super.isSecureWsdlAccess(endpoint);
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#getTransportGuarantee(Endpoint)
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return transport guarantee or null if not specified
+ */
+ public String getTransportGuarantee(final Endpoint endpoint)
+ {
+ final WebContext webContext = this.getWebContextAnnotation(endpoint);
+ final boolean hasTransportGuarantee = (webContext != null) && (webContext.transportGuarantee().length() > 0);
+
+ return hasTransportGuarantee ? webContext.transportGuarantee() : super.getTransportGuarantee(endpoint);
+ }
+
+ /**
+ * Gets <b>WebContext</b> if associated with EJB endpoint.
+ *
+ * @param endpoint EJB webservice endpoint
+ * @return web context associated with EJB or null
+ */
+ @SuppressWarnings( { "unchecked" })
+ private WebContext getWebContextAnnotation(final Endpoint endpoint)
+ {
+ return (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+ }
+
+ /**
* Returns security domain value. This method checks domain is the same for every EJB 3 endpoint.
*
* @param oldSecurityDomain our security domain
14 years, 9 months
JBossWS SVN: r10491 - in container/jboss50/branches/ropalka-jboss510: eclipse and 2 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-05 07:05:50 -0400 (Wed, 05 Aug 2009)
New Revision: 10491
Modified:
container/jboss50/branches/ropalka-jboss510/.project
container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
Log:
[JBWS-2332] fixing check style configuration
Modified: container/jboss50/branches/ropalka-jboss510/.project
===================================================================
--- container/jboss50/branches/ropalka-jboss510/.project 2009-08-05 10:10:36 UTC (rev 10490)
+++ container/jboss50/branches/ropalka-jboss510/.project 2009-08-05 11:05:50 UTC (rev 10491)
@@ -15,15 +15,9 @@
<arguments>
</arguments>
</buildCommand>
- <buildCommand>
- <name>net.sf.eclipsecs.core.CheckstyleBuilder</name>
- <arguments>
- </arguments>
- </buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.maven.ide.eclipse.maven2Nature</nature>
- <nature>net.sf.eclipsecs.core.CheckstyleNature</nature>
</natures>
</projectDescription>
Modified: container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml 2009-08-05 10:10:36 UTC (rev 10490)
+++ container/jboss50/branches/ropalka-jboss510/eclipse/JBossWSCheckStyle.xml 2009-08-05 11:05:50 UTC (rev 10491)
@@ -17,11 +17,8 @@
<property name="max" value="60"/>
<property name="tokens" value="INSTANCE_INIT,STATIC_INIT,METHOD_DEF,CTOR_DEF"/>
</module>
- <module name="FileLength">
- <property name="max" value="1000"/>
- </module>
<module name="LineLength">
- <property name="max" value="120"/>
+ <property name="max" value="168"/>
<property name="tabWidth" value="3"/>
</module>
<module name="MethodLength"/>
@@ -106,24 +103,22 @@
<module name="NoWhitespaceBefore"/>
<module name="OperatorWrap">
<property name="option" value="eol"/>
- <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_INSTANCEOF,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN"/>
</module>
<module name="MethodParamPad">
<property name="allowLineBreaks" value="true"/>
</module>
- <module name="ParenPad">
- <property name="option" value="space"/>
- </module>
<module name="TabCharacter"/>
<module name="TypecastParenPad">
- <property name="option" value="space"/>
<property name="tokens" value="RPAREN,TYPECAST"/>
</module>
<module name="WhitespaceAround">
- <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,COLON,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,QUESTION,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND,WILDCARD_TYPE"/>
+ <property name="tokens" value="ASSIGN,BAND,BAND_ASSIGN,BOR,BOR_ASSIGN,BSR,BSR_ASSIGN,BXOR,BXOR_ASSIGN,DIV,DIV_ASSIGN,EQUAL,GE,GT,LAND,LE,LITERAL_ASSERT,LITERAL_CATCH,LITERAL_DO,LITERAL_ELSE,LITERAL_FINALLY,LITERAL_FOR,LITERAL_IF,LITERAL_RETURN,LITERAL_SYNCHRONIZED,LITERAL_TRY,LITERAL_WHILE,LOR,LT,MINUS,MINUS_ASSIGN,MOD,MOD_ASSIGN,NOT_EQUAL,PLUS,PLUS_ASSIGN,SL,SLIST,SL_ASSIGN,SR,SR_ASSIGN,STAR,STAR_ASSIGN,LITERAL_ASSERT,TYPE_EXTENSION_AND"/>
</module>
<module name="NeedBraces"/>
- <module name="WhitespaceAfter"/>
+ <module name="WhitespaceAfter">
+ <property name="tokens" value="COMMA,SEMI"/>
+ </module>
<module name="BooleanExpressionComplexity"/>
<module name="ClassDataAbstractionCoupling"/>
<module name="ClassFanOutComplexity"/>
@@ -148,21 +143,6 @@
<module name="JavadocVariable"/>
<module name="WriteTag"/>
<module name="SuperFinalize"/>
- <module name="GenericIllegalRegexp">
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="System.out regexp"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.customMessage" value="Use logging instead"/>
- <property name="format" value="System\.out"/>
- </module>
- <module name="GenericIllegalRegexp">
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="System.err regexp"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.customMessage" value="Use logging instead"/>
- <property name="format" value="System\.err"/>
- </module>
- <module name="GenericIllegalRegexp">
- <metadata name="com.atlassw.tools.eclipse.checkstyle.comment" value="printStackTrace regexp"/>
- <metadata name="com.atlassw.tools.eclipse.checkstyle.customMessage" value="Use logging instead"/>
- <property name="format" value="\.printStackTrace"/>
- </module>
</module>
<module name="NewlineAtEndOfFile"/>
</module>
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 11:05:50 UTC (rev 10491)
@@ -226,7 +226,7 @@
*/
private ArchiveDeployment newDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = (ArchiveDeployment)this.deploymentModelFactory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
+ final ArchiveDeployment dep = this.newDeployment(unit.getSimpleName(), unit.getClassLoader());
if (unit instanceof VFSDeploymentUnit)
{
@@ -250,8 +250,10 @@
if (unit.getParent() != null)
{
- final DeploymentUnit parentUnit = unit.getParent();
- final ArchiveDeployment parentDep = (ArchiveDeployment)this.deploymentModelFactory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
+ final String parentDeploymentName = unit.getParent().getSimpleName();
+ final ClassLoader parentClassLoader = unit.getParent().getClassLoader();
+
+ final ArchiveDeployment parentDep = this.newDeployment(parentDeploymentName, parentClassLoader);
dep.setParent(parentDep);
}
@@ -262,6 +264,18 @@
return dep;
}
+
+ /**
+ * Creates new archive deployment.
+ *
+ * @param name deployment name
+ * @param loader deployment loader
+ * @return new archive deployment
+ */
+ private ArchiveDeployment newDeployment(final String name, final ClassLoader loader)
+ {
+ return (ArchiveDeployment)this.deploymentModelFactory.newDeployment(name, loader);
+ }
/**
* Creates new Web Service endpoint.
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05 11:05:50 UTC (rev 10491)
@@ -85,6 +85,7 @@
{
final WebServiceDeploymentAdapter wsDeploymentAdapter = new WebServiceDeploymentAdapter();
final Iterator<JBossEnterpriseBeanMetaData> ejbIterator = mergedMD.getEnterpriseBeans().iterator();
+ final List<WebServiceDeclaration> endpoints = wsDeploymentAdapter.getServiceEndpoints();
while (ejbIterator.hasNext())
{
@@ -93,7 +94,7 @@
if (ejbMD.getEjbClass() != null)
{
- wsDeploymentAdapter.getServiceEndpoints().add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
+ endpoints.add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
}
else
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 10:10:36 UTC (rev 10490)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 11:05:50 UTC (rev 10491)
@@ -144,8 +144,11 @@
if (domainsDiffer)
{
- throw new IllegalStateException("Multiple security domains not supported. " + "First domain: '" + oldSecurityDomain + "' " + "second domain: '"
- + newSecurityDomain + "'");
+ final String errorMessage = "Multiple security domains not supported. ";
+ final String firstDomain = "First domain: '" + oldSecurityDomain + "' ";
+ final String secondDomain = "second domain: '" + newSecurityDomain + "'";
+
+ throw new IllegalStateException(errorMessage + firstDomain + secondDomain);
}
}
14 years, 9 months
JBossWS SVN: r10490 - in container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration: deployers and 6 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-05 06:10:36 -0400 (Wed, 05 Aug 2009)
New Revision: 10490
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
Log:
[JBWS-2332] ensuring code style
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/config/ServerConfigImpl.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -70,7 +70,7 @@
File location = null;
try
{
- location = (File) getMbeanServer().getAttribute(on, attributeName);
+ location = (File)getMbeanServer().getAttribute(on, attributeName);
}
catch (final JMException e)
{
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -35,19 +35,19 @@
*/
public final class WSAspectizedDeployersFactory
{
-
+
/** Real deployers registry. */
private final DeployersImpl delegee;
-
+
/** Our deployers regitry. */
- private final Map< DeploymentAspect, Deployer > deployersRegistry = new HashMap< DeploymentAspect, Deployer >();
-
+ private final Map<DeploymentAspect, Deployer> deployersRegistry = new HashMap<DeploymentAspect, Deployer>();
+
/**
* Constructor.
*
* @param realDeployers real deployers registry
*/
- public WSAspectizedDeployersFactory( final DeployersImpl realDeployers )
+ public WSAspectizedDeployersFactory(final DeployersImpl realDeployers)
{
this.delegee = realDeployers;
}
@@ -57,25 +57,25 @@
*
* @param aspect to create real WS aspectized deployer for
*/
- public void addDeployer( final DeploymentAspect aspect )
+ public void addDeployer(final DeploymentAspect aspect)
{
- final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer( aspect );
-
- this.delegee.addDeployer( wsAspectizedDeployer );
- this.deployersRegistry.put( aspect, wsAspectizedDeployer );
+ final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer(aspect);
+
+ this.delegee.addDeployer(wsAspectizedDeployer);
+ this.deployersRegistry.put(aspect, wsAspectizedDeployer);
}
-
+
/**
* MC uncallback method. It will be called each time DeploymentAspect bean will be removed.
*
* @param aspect to remove real WS aspectized deployer for
*/
- public void removeDeployer( final DeploymentAspect aspect )
+ public void removeDeployer(final DeploymentAspect aspect)
{
- final Deployer wsAspectizedDeployer = this.deployersRegistry.get( aspect );
+ final Deployer wsAspectizedDeployer = this.deployersRegistry.get(aspect);
- this.deployersRegistry.remove( aspect );
- this.delegee.removeDeployer( wsAspectizedDeployer );
+ this.deployersRegistry.remove(aspect);
+ this.delegee.removeDeployer(wsAspectizedDeployer);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -52,40 +52,40 @@
*
* @param aspect deployment aspect
*/
- public WSDeploymentAspectDeployer( final DeploymentAspect aspect )
+ public WSDeploymentAspectDeployer(final DeploymentAspect aspect)
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( Deployment.class );
- if ( aspect.isLast() )
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(Deployment.class);
+ if (aspect.isLast())
{
- this.addInput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
}
-
+
// propagate DA requirements and map them to deployer inputs
- final Set< String > inputs = aspect.getRequiresAsSet();
- for ( String input : inputs )
+ final Set<String> inputs = aspect.getRequiresAsSet();
+ for (String input : inputs)
{
- this.addInput( WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input );
+ this.addInput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + input);
}
-
+
// outputs
- this.addOutput( JBossWebMetaData.class );
- if ( !aspect.isLast() )
+ this.addOutput(JBossWebMetaData.class);
+ if (!aspect.isLast())
{
- this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_METADATA );
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_METADATA);
}
// propagate DA provides and map them to deployer outputs
- final Set< String > outputs = aspect.getProvidesAsSet();
- for ( String output : outputs )
+ final Set<String> outputs = aspect.getProvidesAsSet();
+ for (String output : outputs)
{
- this.addOutput( WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output );
+ this.addOutput(WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + output);
}
- this.setRelativeOrder( aspect.getRelativeOrder() );
+ this.setRelativeOrder(aspect.getRelativeOrder());
this.aspect = aspect;
}
@@ -97,13 +97,13 @@
* @throws DeploymentException on deployment failure
*/
@Override
- public void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ public void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( ASHelper.isWebServiceDeployment( unit ) )
+ if (ASHelper.isWebServiceDeployment(unit))
{
- log.debug( this.aspect.getClass() + " deploy: " + unit.getName() );
- final Deployment dep = ASHelper.getRequiredAttachment( unit, Deployment.class );
- this.aspect.start( dep );
+ log.debug(this.aspect.getClass() + " deploy: " + unit.getName());
+ final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+ this.aspect.start(dep);
}
}
@@ -114,16 +114,16 @@
* @param unit deployment unit
*/
@Override
- public void internalUndeploy( final DeploymentUnit unit )
+ public void internalUndeploy(final DeploymentUnit unit)
{
- if ( ASHelper.isWebServiceDeployment( unit ) )
+ if (ASHelper.isWebServiceDeployment(unit))
{
- log.debug( this.aspect.getClass() + " undeploy: " + unit.getName() );
- final Deployment dep = ASHelper.getRequiredAttachment( unit, Deployment.class );
- this.aspect.stop( dep );
+ log.debug(this.aspect.getClass() + " undeploy: " + unit.getName());
+ final Deployment dep = ASHelper.getRequiredAttachment(unit, Deployment.class);
+ this.aspect.stop(dep);
}
}
-
+
/**
* Displays also WS deployment aspect being wrapped.
*
@@ -133,7 +133,7 @@
public String toString()
{
final StringBuilder sb = new StringBuilder();
- sb.append( super.toString() ).append( '(' ).append( this.aspect ).append( ')' );
+ sb.append(super.toString()).append('(').append(this.aspect).append(')');
return sb.toString();
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -62,7 +62,7 @@
*/
public final class WSDeploymentDeployer extends AbstractRealDeployer
{
-
+
/** WSDL and XSD files filter. */
private static final WSVirtualFileFilter WS_FILE_FILTER = new WSVirtualFileFilter();
/** Deployment model factory. */
@@ -74,18 +74,18 @@
public WSDeploymentDeployer()
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( DeploymentType.class );
-
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(DeploymentType.class);
+
// outputs
- this.addOutput( JBossWebMetaData.class );
- this.addOutput( Deployment.class );
+ this.addOutput(JBossWebMetaData.class);
+ this.addOutput(Deployment.class);
// deployment factory
final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
- this.deploymentModelFactory = spiProvider.getSPI( DeploymentModelFactory.class );
+ this.deploymentModelFactory = spiProvider.getSPI(DeploymentModelFactory.class);
}
/**
@@ -95,23 +95,23 @@
* @throws DeploymentException if error occurs
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( ASHelper.isJaxwsJseDeployment( unit ) )
+ if (ASHelper.isJaxwsJseDeployment(unit))
{
- this.newJaxwsJseDeployment( unit );
+ this.newJaxwsJseDeployment(unit);
}
- else if ( ASHelper.isJaxwsEjbDeployment( unit ) )
+ else if (ASHelper.isJaxwsEjbDeployment(unit))
{
- this.newJaxwsEjbDeployment( unit );
+ this.newJaxwsEjbDeployment(unit);
}
- else if ( ASHelper.isJaxrpcJseDeployment( unit ) )
+ else if (ASHelper.isJaxrpcJseDeployment(unit))
{
- this.newJaxrpcJseDeployment( unit );
+ this.newJaxrpcJseDeployment(unit);
}
- else if ( ASHelper.isJaxrpcEjbDeployment( unit ) )
+ else if (ASHelper.isJaxrpcEjbDeployment(unit))
{
- this.newJaxrpcEjbDeployment( unit );
+ this.newJaxrpcEjbDeployment(unit);
}
}
@@ -120,102 +120,102 @@
*
* @param unit deployment unit
*/
- private void newJaxrpcEjbDeployment( final DeploymentUnit unit )
+ private void newJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- final JBossMetaData jbmd = this.getAndPropagateAttachment( JBossMetaData.class, unit, dep );
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment( WebservicesMetaData.class, unit, dep );
- this.getAndPropagateAttachment( WebServiceDeployment.class, unit, dep );
-
- for ( WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions() )
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ final JBossMetaData jbmd = this.getAndPropagateAttachment(JBossMetaData.class, unit, dep);
+ final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
+
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
- for ( PortComponentMetaData pcmd : wsd.getPortComponents() )
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
final String ejbName = pcmd.getEjbLink();
- final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean( ejbName );
+ final JBossEnterpriseBeanMetaData beanMetaData = jbmd.getEnterpriseBean(ejbName);
final String ejbClass = beanMetaData.getEjbClass();
- this.createEndpoint( ejbClass, ejbName, dep );
+ this.createEndpoint(ejbClass, ejbName, dep);
}
}
-
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXWS EJB3 deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxwsEjbDeployment( final DeploymentUnit unit )
+ private void newJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- this.getAndPropagateAttachment( WebServiceDeployment.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ this.getAndPropagateAttachment(WebServiceDeployment.class, unit, dep);
- final Iterator< WebServiceDeclaration > ejbIterator = ASHelper.getJaxwsEjbs( unit ).iterator();
- while ( ejbIterator.hasNext() )
+ final Iterator<WebServiceDeclaration> ejbIterator = ASHelper.getJaxwsEjbs(unit).iterator();
+ while (ejbIterator.hasNext())
{
final WebServiceDeclaration container = ejbIterator.next();
final String ejbName = container.getComponentName();
final String ejbClass = container.getComponentClassName();
- final Endpoint ep = this.createEndpoint( ejbClass, ejbName, dep );
- ep.setProperty( InvocationHandlerEJB3.CONTAINER_NAME, container.getContainerName() );
+ final Endpoint ep = this.createEndpoint(ejbClass, ejbName, dep);
+ ep.setProperty(InvocationHandlerEJB3.CONTAINER_NAME, container.getContainerName());
}
-
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXRPC JSE deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxrpcJseDeployment( final DeploymentUnit unit )
+ private void newJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- final JBossWebMetaData webMetaData = this.getAndPropagateAttachment( JBossWebMetaData.class, unit, dep );
- final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment( WebservicesMetaData.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ final JBossWebMetaData webMetaData = this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
+ final WebservicesMetaData wsMetaData = this.getAndPropagateAttachment(WebservicesMetaData.class, unit, dep);
- for ( WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions() )
+ for (WebserviceDescriptionMetaData wsd : wsMetaData.getWebserviceDescriptions())
{
- for ( PortComponentMetaData pcmd : wsd.getPortComponents() )
+ for (PortComponentMetaData pcmd : wsd.getPortComponents())
{
final String servletName = pcmd.getServletLink();
- final ServletMetaData servletMD = ASHelper.getServletForName( webMetaData, servletName );
- final String servletClass = ASHelper.getEndpointName( servletMD );
+ final ServletMetaData servletMD = ASHelper.getServletForName(webMetaData, servletName);
+ final String servletClass = ASHelper.getEndpointName(servletMD);
- this.createEndpoint( servletClass, servletName, dep );
+ this.createEndpoint(servletClass, servletName, dep);
}
}
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
-
+
/**
* Creates new JAXWS JSE deployment and registers it with deployment unit.
*
* @param unit deployment unit
*/
- private void newJaxwsJseDeployment( final DeploymentUnit unit )
+ private void newJaxwsJseDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = this.newDeployment( unit );
- this.getAndPropagateAttachment( JBossWebMetaData.class, unit, dep );
+ final ArchiveDeployment dep = this.newDeployment(unit);
+ this.getAndPropagateAttachment(JBossWebMetaData.class, unit, dep);
- final List< ServletMetaData > servlets = ASHelper.getJaxwsServlets( unit );
- for ( ServletMetaData servlet : servlets )
+ final List<ServletMetaData> servlets = ASHelper.getJaxwsServlets(unit);
+ for (ServletMetaData servlet : servlets)
{
final String servletName = servlet.getName();
- final String servletClass = ASHelper.getEndpointName( servlet );
+ final String servletClass = ASHelper.getEndpointName(servlet);
- this.createEndpoint( servletClass, servletName, dep );
+ this.createEndpoint(servletClass, servletName, dep);
}
- dep.addAttachment( DeploymentUnit.class, unit );
- unit.addAttachment( Deployment.class, dep );
+ dep.addAttachment(DeploymentUnit.class, unit);
+ unit.addAttachment(Deployment.class, dep);
}
/**
@@ -224,43 +224,41 @@
* @param unit deployment unit
* @return archive deployment
*/
- private ArchiveDeployment newDeployment( final DeploymentUnit unit )
+ private ArchiveDeployment newDeployment(final DeploymentUnit unit)
{
- final ArchiveDeployment dep = ( ArchiveDeployment ) this.deploymentModelFactory.
- newDeployment( unit.getSimpleName(), unit.getClassLoader() );
+ final ArchiveDeployment dep = (ArchiveDeployment)this.deploymentModelFactory.newDeployment(unit.getSimpleName(), unit.getClassLoader());
- if ( unit instanceof VFSDeploymentUnit )
+ if (unit instanceof VFSDeploymentUnit)
{
- final VFSDeploymentUnit vfsUnit = ( VFSDeploymentUnit ) unit;
- final List< VirtualFile > virtualFiles = vfsUnit.getMetaDataFiles( WSDeploymentDeployer.WS_FILE_FILTER );
- final Set< UnifiedVirtualFile > uVirtualFiles = new HashSet< UnifiedVirtualFile >();
- for ( VirtualFile vf : virtualFiles )
+ final VFSDeploymentUnit vfsUnit = (VFSDeploymentUnit)unit;
+ final List<VirtualFile> virtualFiles = vfsUnit.getMetaDataFiles(WSDeploymentDeployer.WS_FILE_FILTER);
+ final Set<UnifiedVirtualFile> uVirtualFiles = new HashSet<UnifiedVirtualFile>();
+ for (VirtualFile vf : virtualFiles)
{
// Adding the roots of the virtual files.
try
{
- uVirtualFiles.add( new VirtualFileAdaptor( vf.getVFS().getRoot() ) );
+ uVirtualFiles.add(new VirtualFileAdaptor(vf.getVFS().getRoot()));
}
- catch ( IOException ioe )
+ catch (IOException ioe)
{
- throw new WSFDeploymentException( ioe );
+ throw new WSFDeploymentException(ioe);
}
}
- dep.setMetadataFiles( new LinkedList<UnifiedVirtualFile>( uVirtualFiles ) );
+ dep.setMetadataFiles(new LinkedList<UnifiedVirtualFile>(uVirtualFiles));
}
- if ( unit.getParent() != null )
+ if (unit.getParent() != null)
{
final DeploymentUnit parentUnit = unit.getParent();
- final ArchiveDeployment parentDep = ( ArchiveDeployment ) this.deploymentModelFactory.
- newDeployment( parentUnit.getSimpleName(), parentUnit.getClassLoader() );
- dep.setParent( parentDep );
+ final ArchiveDeployment parentDep = (ArchiveDeployment)this.deploymentModelFactory.newDeployment(parentUnit.getSimpleName(), parentUnit.getClassLoader());
+ dep.setParent(parentDep);
}
- dep.setRootFile( new VirtualFileAdaptor( ( ( VFSDeploymentUnit ) unit ).getRoot() ) );
- dep.setRuntimeClassLoader( unit.getClassLoader() );
- final DeploymentType deploymentType = ASHelper.getRequiredAttachment( unit, DeploymentType.class );
- dep.setType( deploymentType );
+ dep.setRootFile(new VirtualFileAdaptor(((VFSDeploymentUnit)unit).getRoot()));
+ dep.setRuntimeClassLoader(unit.getClassLoader());
+ final DeploymentType deploymentType = ASHelper.getRequiredAttachment(unit, DeploymentType.class);
+ dep.setType(deploymentType);
return dep;
}
@@ -273,25 +271,25 @@
* @param dep deployment
* @return WS endpoint
*/
- private Endpoint createEndpoint( final String endpointClass, final String endpointName, final Deployment dep )
+ private Endpoint createEndpoint(final String endpointClass, final String endpointName, final Deployment dep)
{
- if ( endpointName == null )
+ if (endpointName == null)
{
- throw new NullPointerException( "Null endpoint name" );
+ throw new NullPointerException("Null endpoint name");
}
- if ( endpointClass == null )
+ if (endpointClass == null)
{
- throw new NullPointerException( "Null endpoint class" );
+ throw new NullPointerException("Null endpoint class");
}
-
- final Endpoint endpoint = this.deploymentModelFactory.newEndpoint( endpointClass );
- endpoint.setShortName( endpointName );
- dep.getService().addEndpoint( endpoint );
-
+
+ final Endpoint endpoint = this.deploymentModelFactory.newEndpoint(endpointClass);
+ endpoint.setShortName(endpointName);
+ dep.getService().addEndpoint(endpoint);
+
return endpoint;
}
-
+
/**
* Gets specified attachment from deployment unit.
* Checks it's not null and then propagates it to <b>dep</b>
@@ -303,20 +301,17 @@
* @param dep deployment
* @return attachment value if found in unit
*/
- private <A> A getAndPropagateAttachment
- (
- final Class< A > attachment, final DeploymentUnit unit, final Deployment dep
- )
+ private <A> A getAndPropagateAttachment(final Class<A> attachment, final DeploymentUnit unit, final Deployment dep)
{
- final A attachmentValue = ASHelper.getOptionalAttachment( unit, attachment );
-
- if ( attachmentValue != null )
+ final A attachmentValue = ASHelper.getOptionalAttachment(unit, attachment);
+
+ if (attachmentValue != null)
{
- dep.addAttachment( attachment , attachmentValue );
+ dep.addAttachment(attachment, attachmentValue);
return attachmentValue;
}
- throw new IllegalStateException( "Deployment unit does not contain " + attachment );
+ throw new IllegalStateException("Deployment unit does not contain " + attachment);
}
-
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDescriptorDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -31,7 +31,7 @@
*
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
*/
-public final class WSDescriptorDeployer extends ObjectModelFactoryDeployer< WebservicesMetaData >
+public final class WSDescriptorDeployer extends ObjectModelFactoryDeployer<WebservicesMetaData>
{
/**
@@ -39,7 +39,7 @@
*/
public WSDescriptorDeployer()
{
- super( WebservicesMetaData.class );
+ super(WebservicesMetaData.class);
}
/**
@@ -49,9 +49,9 @@
* @return object model factory
*/
@Override
- protected ObjectModelFactory getObjectModelFactory( final WebservicesMetaData root )
+ protected ObjectModelFactory getObjectModelFactory(final WebservicesMetaData root)
{
- return new WebservicesFactory( null );
+ return new WebservicesFactory(null);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSEJBAdapterDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -58,15 +58,15 @@
public WSEJBAdapterDeployer()
{
super();
-
+
// inputs
- this.addInput( MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME );
- this.addInput( EjbDeployment.class );
- this.addInput( Ejb3Deployment.class );
- this.addInput( WebservicesMetaData.class );
+ this.addInput(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ this.addInput(EjbDeployment.class);
+ this.addInput(Ejb3Deployment.class);
+ this.addInput(WebservicesMetaData.class);
// outputs
- this.addOutput( WebServiceDeployment.class );
+ this.addOutput(WebServiceDeployment.class);
}
/**
@@ -76,36 +76,32 @@
* @throws DeploymentException exception
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- final JBossMetaData mergedMD = ( JBossMetaData ) unit.getAttachment(
- MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME
- );
- final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment( unit, Ejb3Deployment.class );
+ final JBossMetaData mergedMD = (JBossMetaData)unit.getAttachment(MergedJBossMetaDataDeployer.EJB_MERGED_ATTACHMENT_NAME);
+ final Ejb3Deployment ejb3Deployment = ASHelper.getOptionalAttachment(unit, Ejb3Deployment.class);
- if ( mergedMD != null )
+ if (mergedMD != null)
{
- final WebServiceDeploymentAdapter wsDeploymentAdapter = new WebServiceDeploymentAdapter();
- final Iterator< JBossEnterpriseBeanMetaData > ejbIterator = mergedMD.getEnterpriseBeans().iterator();
+ final WebServiceDeploymentAdapter wsDeploymentAdapter = new WebServiceDeploymentAdapter();
+ final Iterator<JBossEnterpriseBeanMetaData> ejbIterator = mergedMD.getEnterpriseBeans().iterator();
- while ( ejbIterator.hasNext() )
+ while (ejbIterator.hasNext())
{
final JBossEnterpriseBeanMetaData ejbMD = ejbIterator.next();
- final EJBContainer ejbContainer = this.getContainer( ejb3Deployment, ejbMD );
-
- if ( ejbMD.getEjbClass() != null )
+ final EJBContainer ejbContainer = this.getContainer(ejb3Deployment, ejbMD);
+
+ if (ejbMD.getEjbClass() != null)
{
- wsDeploymentAdapter.getServiceEndpoints().add(
- new WebServiceDeclarationAdapter( ejbMD, ejbContainer, unit.getClassLoader() )
- );
+ wsDeploymentAdapter.getServiceEndpoints().add(new WebServiceDeclarationAdapter(ejbMD, ejbContainer, unit.getClassLoader()));
}
else
{
- log.warn( "Ingoring ejb deployment with null classname: " + ejbMD );
+ log.warn("Ingoring ejb deployment with null classname: " + ejbMD);
}
}
- unit.addAttachment( WebServiceDeployment.class, wsDeploymentAdapter );
+ unit.addAttachment(WebServiceDeployment.class, wsDeploymentAdapter);
}
}
@@ -117,22 +113,21 @@
* @return EJB container or null if not EJB3 stateless bean
* @throws DeploymentException if some error occurs
*/
- private EJBContainer getContainer( final Ejb3Deployment ejb3Deployment, final JBossEnterpriseBeanMetaData ejbMD )
- throws DeploymentException
+ private EJBContainer getContainer(final Ejb3Deployment ejb3Deployment, final JBossEnterpriseBeanMetaData ejbMD) throws DeploymentException
{
- if ( ( ejb3Deployment != null ) && ( !ejbMD.isEntity() ) )
+ if ((ejb3Deployment != null) && (!ejbMD.isEntity()))
{
try
{
- final ObjectName objName = new ObjectName( ejbMD.determineContainerName() );
- return ( EJBContainer ) ejb3Deployment.getContainer( objName );
+ final ObjectName objName = new ObjectName(ejbMD.determineContainerName());
+ return (EJBContainer)ejb3Deployment.getContainer(objName);
}
- catch ( MalformedObjectNameException e )
+ catch (MalformedObjectNameException e)
{
- throw new DeploymentException( e );
+ throw new DeploymentException(e);
}
}
-
+
return null;
}
@@ -148,7 +143,7 @@
/** EJB container. */
private final EJBContainer ejbContainer;
/** Class loader. */
- private final ClassLoader loader;
+ private final ClassLoader loader;
/**
* Constructor.
@@ -157,20 +152,15 @@
* @param ejbContainer EJB container
* @param loader class loader
*/
- private WebServiceDeclarationAdapter
- (
- final JBossEnterpriseBeanMetaData ejbMetaData,
- final EJBContainer ejbContainer,
- final ClassLoader loader
- )
+ private WebServiceDeclarationAdapter(final JBossEnterpriseBeanMetaData ejbMetaData, final EJBContainer ejbContainer, final ClassLoader loader)
{
super();
-
+
this.ejbMetaData = ejbMetaData;
this.ejbContainer = ejbContainer;
this.loader = loader;
}
-
+
/**
* Returns EJB container name.
*
@@ -218,18 +208,18 @@
* @param <T> annotation class type
* @return requested annotation or null if not found
*/
- public < T extends Annotation > T getAnnotation( final Class<T> annotationType )
+ public <T extends Annotation> T getAnnotation(final Class<T> annotationType)
{
- final boolean haveEjbContainer = this.ejbContainer != null;
+ final boolean haveEjbContainer = this.ejbContainer != null;
- if ( haveEjbContainer )
+ if (haveEjbContainer)
{
- return this.ejbContainer.getAnnotation( annotationType );
+ return this.ejbContainer.getAnnotation(annotationType);
}
else
{
- final Class< ? > bean = this.getComponentClass();
- return ( T ) bean.getAnnotation( annotationType );
+ final Class<?> bean = this.getComponentClass();
+ return (T)bean.getAnnotation(annotationType);
}
}
@@ -238,16 +228,15 @@
*
* @return ejb class instance
*/
- private Class< ? > getComponentClass()
+ private Class<?> getComponentClass()
{
try
{
- return this.loader.loadClass( this.getComponentClassName() );
+ return this.loader.loadClass(this.getComponentClassName());
}
- catch ( ClassNotFoundException cnfe )
+ catch (ClassNotFoundException cnfe)
{
- throw new RuntimeException( "Failed to load component class: " +
- this.getComponentClassName() + " from loader: " + this.loader );
+ throw new RuntimeException("Failed to load component class: " + this.getComponentClassName() + " from loader: " + this.loader);
}
}
@@ -259,9 +248,9 @@
*/
private static final class WebServiceDeploymentAdapter implements WebServiceDeployment
{
-
+
/** List of endpoints. */
- private final List< WebServiceDeclaration > endpoints = new ArrayList< WebServiceDeclaration >();
+ private final List<WebServiceDeclaration> endpoints = new ArrayList<WebServiceDeclaration>();
/**
* Constructor.
@@ -270,15 +259,15 @@
{
super();
}
-
+
/**
* Returns endpoints list.
*
* @return endpoints list
*/
- public List< WebServiceDeclaration > getServiceEndpoints()
+ public List<WebServiceDeclaration> getServiceEndpoints()
{
- return this.endpoints;
+ return this.endpoints;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSTypeDeployer.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -45,15 +45,15 @@
public WSTypeDeployer()
{
super();
-
+
// inputs
- this.addInput( JBossWebMetaData.class );
- this.addInput( WebservicesMetaData.class );
- this.addInput( WebServiceDeployment.class );
-
+ this.addInput(JBossWebMetaData.class);
+ this.addInput(WebservicesMetaData.class);
+ this.addInput(WebServiceDeployment.class);
+
// outputs
- this.addOutput( DeploymentType.class );
- this.addOutput( JBossWebMetaData.class );
+ this.addOutput(DeploymentType.class);
+ this.addOutput(JBossWebMetaData.class);
}
/**
@@ -63,72 +63,72 @@
* @throws DeploymentException on failure
*/
@Override
- protected void internalDeploy( final DeploymentUnit unit ) throws DeploymentException
+ protected void internalDeploy(final DeploymentUnit unit) throws DeploymentException
{
- if ( this.isJaxwsJseDeployment( unit ) )
+ if (this.isJaxwsJseDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXWS_JSE );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_JSE);
}
- else if ( this.isJaxwsEjbDeployment( unit ) )
+ else if (this.isJaxwsEjbDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXWS_EJB3 );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXWS_EJB3);
}
- else if ( this.isJaxrpcJseDeployment( unit ) )
+ else if (this.isJaxrpcJseDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXRPC_JSE );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_JSE);
}
- else if ( this.isJaxrpcEjbDeployment( unit ) )
+ else if (this.isJaxrpcEjbDeployment(unit))
{
- unit.addAttachment( DeploymentType.class, DeploymentType.JAXRPC_EJB21 );
+ unit.addAttachment(DeploymentType.class, DeploymentType.JAXRPC_EJB21);
}
}
-
+
/**
* Returns true if JAXRPC EJB deployment is detected.
*
* @param unit deployment unit
* @return true if JAXRPC EJB, false otherwise
*/
- private boolean isJaxrpcEjbDeployment( final DeploymentUnit unit )
+ private boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final boolean hasWebservicesMD = ASHelper.hasAttachment( unit, WebservicesMetaData.class );
- final boolean hasJBossMD = unit.getAllMetaData( JBossMetaData.class ).size() > 0;
-
+ final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, WebservicesMetaData.class);
+ final boolean hasJBossMD = unit.getAllMetaData(JBossMetaData.class).size() > 0;
+
return hasWebservicesMD && hasJBossMD;
}
-
+
/**
* Returns true if JAXRPC JSE deployment is detected.
*
* @param unit deployment unit
* @return true if JAXRPC JSE, false otherwise
*/
- private boolean isJaxrpcJseDeployment( final DeploymentUnit unit )
+ private boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final boolean hasWebservicesMD = ASHelper.hasAttachment( unit, WebservicesMetaData.class );
- final boolean hasJBossWebMD = ASHelper.hasAttachment( unit, JBossWebMetaData.class );
+ final boolean hasWebservicesMD = ASHelper.hasAttachment(unit, WebservicesMetaData.class);
+ final boolean hasJBossWebMD = ASHelper.hasAttachment(unit, JBossWebMetaData.class);
- if ( hasWebservicesMD && hasJBossWebMD )
+ if (hasWebservicesMD && hasJBossWebMD)
{
- return ASHelper.getJaxrpcServlets( unit ).size() > 0;
+ return ASHelper.getJaxrpcServlets(unit).size() > 0;
}
return false;
}
-
+
/**
* Returns true if JAXWS EJB deployment is detected.
*
* @param unit deployment unit
* @return true if JAXWS EJB, false otherwise
*/
- private boolean isJaxwsEjbDeployment( final DeploymentUnit unit )
+ private boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final boolean hasWSDeployment = ASHelper.hasAttachment( unit, WebServiceDeployment.class );
+ final boolean hasWSDeployment = ASHelper.hasAttachment(unit, WebServiceDeployment.class);
- if ( hasWSDeployment )
+ if (hasWSDeployment)
{
- return ASHelper.getJaxwsEjbs( unit ).size() > 0;
+ return ASHelper.getJaxwsEjbs(unit).size() > 0;
}
return false;
@@ -140,13 +140,13 @@
* @param unit deployment unit
* @return true if JAXWS JSE, false otherwise
*/
- private boolean isJaxwsJseDeployment( final DeploymentUnit unit )
+ private boolean isJaxwsJseDeployment(final DeploymentUnit unit)
{
- final boolean hasJBossWebMD = ASHelper.hasAttachment( unit, JBossWebMetaData.class );
+ final boolean hasJBossWebMD = ASHelper.hasAttachment(unit, JBossWebMetaData.class);
- if ( hasJBossWebMD )
+ if (hasJBossWebMD)
{
- return ASHelper.getJaxwsServlets( unit ).size() > 0;
+ return ASHelper.getJaxwsServlets(unit).size() > 0;
}
return false;
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSVirtualFileFilter.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -33,7 +33,7 @@
*/
public final class WSVirtualFileFilter implements VirtualFileFilterWithAttributes
{
-
+
/** The tree walking attributes. */
private VisitorAttributes attributes;
@@ -42,7 +42,7 @@
*/
public WSVirtualFileFilter()
{
- this( VisitorAttributes.RECURSE_LEAVES_ONLY );
+ this(VisitorAttributes.RECURSE_LEAVES_ONLY);
}
/**
@@ -50,7 +50,7 @@
*
* @param attributes visit attributes
*/
- public WSVirtualFileFilter( final VisitorAttributes attributes )
+ public WSVirtualFileFilter(final VisitorAttributes attributes)
{
this.attributes = attributes;
}
@@ -71,18 +71,18 @@
* @param file to analyze
* @return true if expected file extension, false otherwise
*/
- public boolean accepts( final VirtualFile file )
+ public boolean accepts(final VirtualFile file)
{
- if ( file == null )
+ if (file == null)
{
return false;
}
final String fileName = file.getName().toLowerCase();
- final boolean hasWsdlSuffix = fileName.endsWith( ".wsdl" );
- final boolean hasXsdSuffix = fileName.endsWith( ".xsd" );
- final boolean hasXmlSuffix = fileName.endsWith( ".xml" );
-
+ final boolean hasWsdlSuffix = fileName.endsWith(".wsdl");
+ final boolean hasXsdSuffix = fileName.endsWith(".xsd");
+ final boolean hasXmlSuffix = fileName.endsWith(".xml");
+
return hasWsdlSuffix || hasXsdSuffix || hasXmlSuffix;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/EJBBeanReferenceResolver.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -88,7 +88,7 @@
protected String resolveMethod(final Method method)
{
final EJB ejbAnnotation = method.getAnnotation(EJB.class);
- final Class<?> type = method.getParameterTypes()[0];
+ final Class<?> type = method.getParameterTypes()[0];
final EjbReference reference = getEjbReference(ejbAnnotation, type);
return this.delegate.resolveEjb(unit, reference);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/injection/InjectionMetaDataDeploymentAspect.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -65,7 +65,7 @@
public final class InjectionMetaDataDeploymentAspect extends DeploymentAspect
{
- private static final ReferenceResolver RESOURCE_REFERENCE_RESOLVER = new ResourceReferenceResolver();
+ private static final ReferenceResolver RESOURCE_REFERENCE_RESOLVER = new ResourceReferenceResolver();
private static final String EJB3_JNDI_PREFIX = "java:env/";
private EjbReferenceResolver ejbReferenceResolver;
@@ -74,16 +74,16 @@
{
super.start(dep);
- DeploymentUnit unit = WSHelper.getRequiredAttachment( dep, DeploymentUnit.class );
- JBossWebMetaData webMD = WSHelper.getRequiredAttachment( dep, JBossWebMetaData.class );
+ DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+ JBossWebMetaData webMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
List<InjectionMetaData> injectionMD = new LinkedList<InjectionMetaData>();
Map<Class<? extends Annotation>, ReferenceResolver> resolvers = createResolvers(unit);
try
{
-
- if ( WSHelper.isJaxwsJseDeployment( dep ) )
+
+ if (WSHelper.isJaxwsJseDeployment(dep))
{
injectionMD.addAll(buildInjectionMetaData(webMD.getEnvironmentEntries()));
for (Endpoint endpoint : dep.getService().getEndpoints())
@@ -92,10 +92,10 @@
endpoint.addAttachment(InjectionsMetaData.class, injectionsMD);
}
}
- else if ( WSHelper.isJaxwsEjbDeployment( dep ) )
+ else if (WSHelper.isJaxwsEjbDeployment(dep))
{
- WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment( unit, WebServiceDeployment.class );
- JBossMetaData jbossMD = ASHelper.getRequiredAttachment( unit, JBossMetaData.class );
+ WebServiceDeployment webServiceDeployment = ASHelper.getRequiredAttachment(unit, WebServiceDeployment.class);
+ JBossMetaData jbossMD = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
JBossEnterpriseBeansMetaData jebMDs = jbossMD.getEnterpriseBeans();
Iterator<WebServiceDeclaration> it = webServiceDeployment.getServiceEndpoints().iterator();
@@ -106,7 +106,7 @@
{
final Context ctx = (Context)container.getContext().lookup(EJB3_JNDI_PREFIX);
String ejbName = container.getComponentName();
- EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
+ EnvironmentEntriesMetaData ejbEnvEntries = jebMDs.get(ejbName).getEnvironmentEntries();
injectionMD.addAll(buildInjectionMetaData(ejbEnvEntries));
Endpoint endpoint = dep.getService().getEndpointByName(ejbName);
InjectionsMetaData injectionsMD = new InjectionsMetaData(injectionMD, resolvers, ctx);
@@ -174,7 +174,7 @@
Set<ResourceInjectionTargetMetaData> injectionTargets = eeMD.getInjectionTargets();
if ((injectionTargets != null) && (injectionTargets.size() > 0))
{
- for (Iterator<ResourceInjectionTargetMetaData> j = injectionTargets.iterator(); j.hasNext(); )
+ for (Iterator<ResourceInjectionTargetMetaData> j = injectionTargets.iterator(); j.hasNext();)
{
ResourceInjectionTargetMetaData ritMD = j.next();
targetClass = ritMD.getInjectionTargetClass();
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB21.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -83,7 +83,7 @@
{
String ejbName = ep.getShortName();
Deployment dep = ep.getService().getDeployment();
- EJBArchiveMetaData apMetaData = WSHelper.getRequiredAttachment( dep, EJBArchiveMetaData.class );
+ EJBArchiveMetaData apMetaData = WSHelper.getRequiredAttachment(dep, EJBArchiveMetaData.class);
EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " + ejbName);
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -47,7 +47,6 @@
private KernelController houston;
private ServiceEndpointContainer serviceEndpointContainer;
-
InvocationHandlerEJB3()
{
houston = KernelLocator.getKernel().getController();
@@ -61,20 +60,20 @@
public void init(Endpoint ep)
{
containerName = (String)ep.getProperty(InvocationHandlerEJB3.CONTAINER_NAME);
- assert containerName!=null : "Target container name not set";
+ assert containerName != null : "Target container name not set";
}
private ServiceEndpointContainer lazyInitializeInvocationTarget()
{
- if(null==this.serviceEndpointContainer)
+ if (null == this.serviceEndpointContainer)
{
ControllerContext context = houston.getInstalledContext(containerName);
if (context == null)
throw new WebServiceException("Cannot find service endpoint target: " + containerName);
assert (context.getTarget() instanceof ServiceEndpointContainer) : "Invocation target mismatch";
- this.serviceEndpointContainer = (ServiceEndpointContainer) context.getTarget();
+ this.serviceEndpointContainer = (ServiceEndpointContainer)context.getTarget();
}
return this.serviceEndpointContainer;
@@ -85,12 +84,12 @@
try
{
ServiceEndpointContainer invocationTarget = lazyInitializeInvocationTarget();
-
+
Class beanClass = invocationTarget.getServiceImplementationClass();
Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
Object[] args = wsInv.getArgs();
InvocationContextCallback invProps = new EJB3InvocationContextCallback(wsInv);
-
+
Object retObj = invocationTarget.invokeEndpoint(method, args, invProps);
wsInv.setReturnValue(retObj);
@@ -112,7 +111,7 @@
public <T> T get(Class<T> propertyType)
{
- return wsInv.getInvocationContext().getAttachment(propertyType);
+ return wsInv.getInvocationContext().getAttachment(propertyType);
}
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerFactoryImpl.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -35,7 +35,7 @@
{
InvocationHandler handler = null;
- switch(type)
+ switch (type)
{
case JAXRPC_JSE:
handler = new InvocationHandlerJAXRPC();
@@ -57,8 +57,8 @@
break;
}
- if(null == handler)
- throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " +type);
+ if (null == handler)
+ throw new IllegalArgumentException("Unable to resolve spi.invocation.InvocationHandler for type " + type);
return handler;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/invocation/SecurityAdaptorImpl.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -48,7 +48,7 @@
{
return SecurityAssociation.getPrincipal();
}
-
+
public void setPrincipal(Principal pricipal)
{
SecurityAssociation.setPrincipal(pricipal);
@@ -94,5 +94,4 @@
});
}
-
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/ContainerMetaDataDeploymentAspect.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -37,7 +37,7 @@
*/
public final class ContainerMetaDataDeploymentAspect extends DeploymentAspect
{
-
+
/** JSE meta data builder. */
private MetaDataBuilderJSE metaDataBuilderJSE = new MetaDataBuilderJSE();
@@ -54,32 +54,32 @@
{
super();
}
-
+
/**
* Build container independent meta data.
*
* @param dep webservice deployment
*/
@Override
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final DeploymentUnit unit = WSHelper.getRequiredAttachment( dep, DeploymentUnit.class );
-
- if ( ASHelper.isJseDeployment( unit ) )
+ final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+
+ if (ASHelper.isJseDeployment(unit))
{
- final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create( dep, unit );
- dep.addAttachment( JSEArchiveMetaData.class, jseMetaData );
+ final JSEArchiveMetaData jseMetaData = this.metaDataBuilderJSE.create(dep, unit);
+ dep.addAttachment(JSEArchiveMetaData.class, jseMetaData);
}
- else if ( ASHelper.isJaxwsEjbDeployment( unit ) )
+ else if (ASHelper.isJaxwsEjbDeployment(unit))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create( dep, unit );
- dep.addAttachment( EJBArchiveMetaData.class, ejbMetaData );
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB3.create(dep, unit);
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
- else if ( ASHelper.isJaxrpcEjbDeployment( unit ) )
+ else if (ASHelper.isJaxrpcEjbDeployment(unit))
{
- final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create( dep, unit );
- dep.addAttachment( EJBArchiveMetaData.class, ejbMetaData );
+ final EJBArchiveMetaData ejbMetaData = this.metaDataBuilderEJB21.create(dep, unit);
+ dep.addAttachment(EJBArchiveMetaData.class, ejbMetaData);
}
}
-
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB21.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -58,14 +58,14 @@
EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
{
- JBossMetaData jbossMetaData = ASHelper.getRequiredAttachment( unit, JBossMetaData.class );
+ JBossMetaData jbossMetaData = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
dep.addAttachment(JBossMetaData.class, jbossMetaData);
-
+
EJBArchiveMetaData ejbMetaData = new EJBArchiveMetaData();
buildEnterpriseBeansMetaData(ejbMetaData, jbossMetaData);
buildWebservicesMetaData(ejbMetaData, jbossMetaData);
ejbMetaData.setSecurityDomain(jbossMetaData.getSecurityDomain());
-
+
return ejbMetaData;
}
@@ -89,7 +89,7 @@
{
String contextRoot = webservices.getContextRoot();
ejbMetaData.setWebServiceContextRoot(contextRoot);
-
+
ejbMetaData.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
WebserviceDescriptionsMetaData wsDescriptions = webservices.getWebserviceDescriptions();
@@ -110,8 +110,7 @@
private PublishLocationAdapter getPublishLocationAdpater(final WebservicesMetaData wsMetaData)
{
- return new PublishLocationAdapter()
- {
+ return new PublishLocationAdapter() {
public String getWsdlPublishLocationByName(String name)
{
String wsdlPublishLocation = null;
@@ -133,7 +132,7 @@
{
targetBean = new SLSBMetaData();
JBossSessionBeanMetaData jbossSessionBean = (JBossSessionBeanMetaData)jbossBeansMetaData;
-
+
targetBean.setEjbName(jbossSessionBean.getEjbName());
targetBean.setEjbClass(jbossSessionBean.getEjbClass());
targetBean.setServiceEndpointInterface(jbossSessionBean.getServiceEndpoint());
@@ -141,7 +140,7 @@
targetBean.setLocalHome(jbossSessionBean.getLocalHome());
targetBean.setJndiName(jbossSessionBean.determineJndiName());
targetBean.setLocalJndiName(jbossBeansMetaData.determineLocalJndiName());
-
+
PortComponent pcmd = jbossSessionBean.getPortComponent();
if (pcmd != null)
{
@@ -158,7 +157,7 @@
{
targetBean = new MDBMetaData();
JBossMessageDrivenBeanMetaData jbossMessageBean = (JBossMessageDrivenBeanMetaData)jbossBeansMetaData;
-
+
targetBean.setEjbName(jbossMessageBean.getEjbName());
targetBean.setEjbClass(jbossMessageBean.getEjbClass());
targetBean.setLocalJndiName(jbossBeansMetaData.getLocalJndiName());
@@ -167,7 +166,7 @@
if (targetBean != null)
ejbBeans.add(targetBean);
-
+
return targetBean;
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderEJB3.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -53,13 +53,13 @@
private static Logger log = Logger.getLogger(MetaDataBuilderEJB3.class);
EJBArchiveMetaData create(Deployment dep, DeploymentUnit unit)
- {
+ {
EJBArchiveMetaData umd = new EJBArchiveMetaData();
- WebServiceDeployment webServiceDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
+ WebServiceDeployment webServiceDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
buildEnterpriseBeansMetaData(umd, webServiceDeployment);
- JBossMetaData jbMetaData = ASHelper.getRequiredAttachment( unit, JBossMetaData.class );
+ JBossMetaData jbMetaData = ASHelper.getRequiredAttachment(unit, JBossMetaData.class);
buildWebservicesMetaData(umd, jbMetaData);
return umd;
@@ -104,7 +104,7 @@
EJBMetaData ejbMetaData = null;
- if(mdbMetaData!=null)
+ if (mdbMetaData != null)
{
ejbMetaData = new MDBMetaData();
@@ -113,7 +113,7 @@
{
String destination = getActivationProperty("destination", props);
if (destination != null)
- {
+ {
((MDBMetaData)ejbMetaData).setDestinationJndiName(destination);
}
}
@@ -138,20 +138,20 @@
smd.setSecureWSDLAccess(pcMetaData.secureWSDLAccess());
ejbMetaData.setSecurityMetaData(smd);
}
-
+
ejbMetaDataList.add(ejbMetaData);
}
}
-
+
jarMetaData.setEnterpriseBeans(ejbMetaDataList);
}
private String getActivationProperty(String name, ActivationConfigProperty[] props)
{
String result = null;
- for(ActivationConfigProperty p : props)
+ for (ActivationConfigProperty p : props)
{
- if(p.propertyName().equals(name))
+ if (p.propertyName().equals(name))
{
result = p.propertyValue();
break;
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/metadata/MetaDataBuilderJSE.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -58,30 +58,30 @@
{
private static Logger log = Logger.getLogger(MetaDataBuilderJSE.class);
-
+
JSEArchiveMetaData create(Deployment dep, DeploymentUnit unit)
{
String contextRoot = null;
-
- JBossWebMetaData jbossWebMetaData = ASHelper.getRequiredAttachment( unit, JBossWebMetaData.class );
+ JBossWebMetaData jbossWebMetaData = ASHelper.getRequiredAttachment(unit, JBossWebMetaData.class);
+
if (unit.getParent() != null)
{
- JBossAppMetaData appmd = ASHelper.getOptionalAttachment( unit.getParent(), JBossAppMetaData.class );
+ JBossAppMetaData appmd = ASHelper.getOptionalAttachment(unit.getParent(), JBossAppMetaData.class);
if (appmd != null)
{
ModuleMetaData module = appmd.getModule(dep.getSimpleName());
if (module != null)
{
- WebModuleMetaData web = (WebModuleMetaData) module.getValue();
+ WebModuleMetaData web = (WebModuleMetaData)module.getValue();
contextRoot = web.getContextRoot();
}
}
}
-
+
if (contextRoot == null)
contextRoot = jbossWebMetaData.getContextRoot();
-
+
JSEArchiveMetaData umd = new JSEArchiveMetaData();
umd.setContextRoot(contextRoot);
umd.setServletMappings(getServletMappings(jbossWebMetaData));
@@ -91,7 +91,7 @@
umd.setSecurityMetaData(getSecurityMetaData(jbossWebMetaData.getSecurityContraints()));
setConfigNameAndFile(umd, jbossWebMetaData);
-
+
return umd;
}
@@ -99,7 +99,7 @@
{
String configName = null;
String configFile = null;
-
+
WebserviceDescriptionsMetaData wsDescriptions = jbossWebMetaData.getWebserviceDescriptions();
if (wsDescriptions != null && wsDescriptions.size() > 1)
log.warn("Multiple <webservice-description> elements not supported");
@@ -122,15 +122,14 @@
configFile = ctxParam.getParamValue();
}
}
-
+
umd.setConfigName(configName);
umd.setConfigFile(configFile);
}
private PublishLocationAdapter getPublishLocationAdpater(final JBossWebMetaData wmd)
{
- return new PublishLocationAdapter()
- {
+ return new PublishLocationAdapter() {
public String getWsdlPublishLocationByName(String name)
{
WebserviceDescriptionsMetaData wsdmd = wmd.getWebserviceDescriptions();
@@ -175,7 +174,7 @@
List<ServletMappingMetaData> smappings = wmd.getServletMappings();
if (smappings != null)
{
- for(ServletMappingMetaData mapping : smappings)
+ for (ServletMappingMetaData mapping : smappings)
{
// FIXME - Add support for multiple mappings
mappings.put(mapping.getServletName(), mapping.getUrlPatterns().get(0));
@@ -195,7 +194,7 @@
// Skip JSPs
if (servlet.getServletClass() == null || servlet.getServletClass().length() == 0)
continue;
-
+
mappings.put(servlet.getName(), servlet.getServletClass());
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/security/JACCPermissionsDeploymentAspect.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -49,7 +49,7 @@
{
super();
}
-
+
/**
* JBAS-5935: The dynamic web application generated by the JBossWS
* does not go through the war security deployer. Hence the JACC
@@ -58,23 +58,21 @@
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep, JBossWebMetaData.class );
-
+ final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
+
try
{
- final PolicyConfigurationFactory policyConfigurationFactory =
- PolicyConfigurationFactory.getPolicyConfigurationFactory();
- final PolicyConfiguration policyConfiguration =
- policyConfigurationFactory.getPolicyConfiguration( dep.getSimpleName(), false );
+ final PolicyConfigurationFactory policyConfigurationFactory = PolicyConfigurationFactory.getPolicyConfigurationFactory();
+ final PolicyConfiguration policyConfiguration = policyConfigurationFactory.getPolicyConfiguration(dep.getSimpleName(), false);
- WebPermissionMapping.createPermissions( jbossWebMD, policyConfiguration );
+ WebPermissionMapping.createPermissions(jbossWebMD, policyConfiguration);
policyConfiguration.commit();
}
- catch ( Exception e )
+ catch (Exception e)
{
- throw new RuntimeException( "Exception generating JACC perms: ", e );
+ throw new RuntimeException("Exception generating JACC perms: ", e);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -57,13 +57,13 @@
* @param securityDomain security domain to be prefixed
* @return security domain prefixed with jaas JNDI prefix
*/
- protected String appendJaasPrefix( final String securityDomain )
+ protected String appendJaasPrefix(final String securityDomain)
{
- if ( securityDomain != null )
+ if (securityDomain != null)
{
- final boolean hasJaasPrefix = securityDomain.startsWith( AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX );
+ final boolean hasJaasPrefix = securityDomain.startsWith(AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX);
- if ( !hasJaasPrefix )
+ if (!hasJaasPrefix)
{
return AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX + securityDomain;
}
@@ -72,13 +72,12 @@
return securityDomain;
}
-
- public final String getAuthMethod( final Endpoint endpoint )
+ public final String getAuthMethod(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
String beanAuthMethod = null;
-
+
WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -86,7 +85,7 @@
beanAuthMethod = anWebContext.authMethod();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -96,16 +95,16 @@
beanAuthMethod = smd.getAuthMethod();
}
}
-
+
return beanAuthMethod;
}
- public final boolean isSecureWsdlAccess( final Endpoint endpoint )
+ public final boolean isSecureWsdlAccess(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
boolean secureWSDLAccess = false;
-
+
WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -113,7 +112,7 @@
secureWSDLAccess = anWebContext.secureWSDLAccess();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -123,16 +122,16 @@
secureWSDLAccess = smd.getSecureWSDLAccess();
}
}
-
+
return secureWSDLAccess;
}
-
- public final String getTransportGuarantee( final Endpoint endpoint )
+
+ public final String getTransportGuarantee(final Endpoint endpoint)
{
final Deployment dep = endpoint.getService().getDeployment();
String ejbName = endpoint.getShortName();
String transportGuarantee = null;
-
+
WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
if (anWebContext != null)
{
@@ -140,7 +139,7 @@
transportGuarantee = anWebContext.transportGuarantee();
}
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment(dep, EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
{
EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
@@ -150,7 +149,7 @@
transportGuarantee = smd.getTransportGuarantee();
}
}
-
+
return transportGuarantee;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -40,7 +40,7 @@
* @param dep webservice deployment
* @return security domain associated with EJB deployment
*/
- String getSecurityDomain( Deployment dep );
+ String getSecurityDomain(Deployment dep);
/**
* Obtaining security roles from EJB deployment.
@@ -48,12 +48,12 @@
* @param dep webservice deployment
* @return security roles associated with EJB deployment
*/
- SecurityRolesMetaData getSecurityRoles( Deployment dep );
+ SecurityRolesMetaData getSecurityRoles(Deployment dep);
- boolean isSecureWsdlAccess( Endpoint endpoint );
+ boolean isSecureWsdlAccess(Endpoint endpoint);
- String getAuthMethod( Endpoint endpoint );
-
- String getTransportGuarantee( Endpoint endpoint );
+ String getAuthMethod(Endpoint endpoint);
+ String getTransportGuarantee(Endpoint endpoint);
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -51,11 +51,11 @@
* @param dep webservice deployment
* @return security domain associated with EJB 21 deployment
*/
- public String getSecurityDomain( final Deployment dep )
+ public String getSecurityDomain(final Deployment dep)
{
- final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment( dep, EJBArchiveMetaData.class );
+ final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment(dep, EJBArchiveMetaData.class);
- return super.appendJaasPrefix( ejbMetaData.getSecurityDomain() );
+ return super.appendJaasPrefix(ejbMetaData.getSecurityDomain());
}
/**
@@ -64,12 +64,12 @@
* @param dep webservice deployment
* @return security roles associated with EJB 21 deployment
*/
- public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
{
- final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep, JBossMetaData.class );
+ final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossMetaData.class);
final IAssemblyDescriptorMetaData assemblyDescriptorMD = jbossWebMD.getAssemblyDescriptor();
- return ( assemblyDescriptorMD != null ) ? assemblyDescriptorMD.getSecurityRoles() : null;
+ return (assemblyDescriptorMD != null) ? assemblyDescriptorMD.getSecurityRoles() : null;
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -56,21 +56,21 @@
* @param dep webservice deployment
* @return security domain associated with EJB 3 deployment
*/
- public String getSecurityDomain( final Deployment dep )
+ public String getSecurityDomain(final Deployment dep)
{
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
String securityDomain = null;
- final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+ final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
- while ( ejbContainers.hasNext() )
+ while (ejbContainers.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation( SecurityDomain.class );
+ final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation(SecurityDomain.class);
- securityDomain = this.getDomain( securityDomain, nextSecurityDomain );
+ securityDomain = this.getDomain(securityDomain, nextSecurityDomain);
}
- return super.appendJaasPrefix( securityDomain );
+ return super.appendJaasPrefix(securityDomain);
}
/**
@@ -79,26 +79,26 @@
* @param dep webservice deployment
* @return security roles associated with EJB 21 deployment
*/
- public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ public SecurityRolesMetaData getSecurityRoles(final Deployment dep)
{
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment(dep, WebServiceDeployment.class);
final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
- final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+ final Iterator<WebServiceDeclaration> ejbContainers = wsDeployment.getServiceEndpoints().iterator();
- while ( ejbContainers.hasNext() )
+ while (ejbContainers.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final RolesAllowed allowedRoles = ejbContainer.getAnnotation( RolesAllowed.class );
+ final RolesAllowed allowedRoles = ejbContainer.getAnnotation(RolesAllowed.class);
final boolean hasAllowedRoles = allowedRoles != null;
- if ( hasAllowedRoles )
+ if (hasAllowedRoles)
{
- for ( final String roleName : allowedRoles.value() )
+ for (final String roleName : allowedRoles.value())
{
final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
- securityRoleMD.setRoleName( roleName );
- securityRolesMD.add( securityRoleMD );
+ securityRoleMD.setRoleName(roleName);
+ securityRolesMD.add(securityRoleMD);
}
}
}
@@ -114,19 +114,19 @@
* @return security domain value
* @throws IllegalStateException if domains have different values
*/
- private String getDomain( final String oldSecurityDomain, final SecurityDomain nextSecurityDomain )
+ private String getDomain(final String oldSecurityDomain, final SecurityDomain nextSecurityDomain)
{
- if ( nextSecurityDomain == null )
+ if (nextSecurityDomain == null)
{
return oldSecurityDomain;
}
- if ( oldSecurityDomain == null )
+ if (oldSecurityDomain == null)
{
return nextSecurityDomain.value();
}
- this.ensureSameDomains( oldSecurityDomain, nextSecurityDomain.value() );
+ this.ensureSameDomains(oldSecurityDomain, nextSecurityDomain.value());
return oldSecurityDomain;
}
@@ -138,18 +138,14 @@
* @param newSecurityDomain next security domain
* @throws IllegalStateException if domains have different values
*/
- private void ensureSameDomains( final String oldSecurityDomain, final String newSecurityDomain )
+ private void ensureSameDomains(final String oldSecurityDomain, final String newSecurityDomain)
{
- final boolean domainsDiffer = !oldSecurityDomain.equals( newSecurityDomain );
+ final boolean domainsDiffer = !oldSecurityDomain.equals(newSecurityDomain);
- if ( domainsDiffer )
+ if (domainsDiffer)
{
- throw new IllegalStateException
- (
- "Multiple security domains not supported. " +
- "First domain: '" + oldSecurityDomain + "' " +
- "second domain: '" + newSecurityDomain + "'"
- );
+ throw new IllegalStateException("Multiple security domains not supported. " + "First domain: '" + oldSecurityDomain + "' " + "second domain: '"
+ + newSecurityDomain + "'");
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -55,7 +55,7 @@
*/
public final class WebMetaDataCreatingDeploymentAspect extends DeploymentAspect
{
-
+
/** EJB 21 security meta data builder. */
private SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new SecurityMetaDataAccessorEJB21();
@@ -69,23 +69,23 @@
{
super();
}
-
+
/**
* Creates web meta data for EJB deployments.
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- final boolean isEjbDeployment = WSHelper.isEjbDeployment( dep );
-
- if ( isEjbDeployment )
+ final boolean isEjbDeployment = WSHelper.isEjbDeployment(dep);
+
+ if (isEjbDeployment)
{
- final DeploymentUnit unit = WSHelper.getRequiredAttachment( dep, DeploymentUnit.class );
- final JBossWebMetaData jbossWebMD = this.createWebMetaData( dep );
+ final DeploymentUnit unit = WSHelper.getRequiredAttachment(dep, DeploymentUnit.class);
+ final JBossWebMetaData jbossWebMD = this.createWebMetaData(dep);
- dep.addAttachment( JBossWebMetaData.class, jbossWebMD );
- unit.addAttachment( JBossWebMetaData.class, jbossWebMD );
+ dep.addAttachment(JBossWebMetaData.class, jbossWebMD);
+ unit.addAttachment(JBossWebMetaData.class, jbossWebMD);
}
}
@@ -95,20 +95,20 @@
* @param dep webservice deployment
* @return web meta data for EJB deployment
*/
- private JBossWebMetaData createWebMetaData( final Deployment dep )
+ private JBossWebMetaData createWebMetaData(final Deployment dep)
{
final JBossWebMetaData jbossWebMD = new JBossWebMetaData();
- this.createWebAppDescriptor( dep, jbossWebMD );
- this.createJBossWebAppDescriptor( dep, jbossWebMD );
-
+ this.createWebAppDescriptor(dep, jbossWebMD);
+ this.createJBossWebAppDescriptor(dep, jbossWebMD);
+
return jbossWebMD;
}
- private void createWebAppDescriptor( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ private void createWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- this.createServlets( dep, jbossWebMD );
- this.createServletMappings( dep, jbossWebMD );
+ this.createServlets(dep, jbossWebMD);
+ this.createServletMappings(dep, jbossWebMD);
String authMethod = null;
@@ -117,10 +117,10 @@
{
String ejbName = ep.getShortName();
- final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor( dep );
- Boolean secureWSDLAccess = ejbMDAccessor.isSecureWsdlAccess( ep );
- String transportGuarantee = ejbMDAccessor.getTransportGuarantee( ep );
- String beanAuthMethod = ejbMDAccessor.getAuthMethod( ep );
+ final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor(dep);
+ Boolean secureWSDLAccess = ejbMDAccessor.isSecureWsdlAccess(ep);
+ String transportGuarantee = ejbMDAccessor.getTransportGuarantee(ep);
+ String beanAuthMethod = ejbMDAccessor.getAuthMethod(ep);
if (beanAuthMethod != null || transportGuarantee != null)
{
@@ -146,7 +146,7 @@
}
SecurityConstraintMetaData securityConstraint = new SecurityConstraintMetaData();
securityContraints.add(securityConstraint);
-
+
WebResourceCollectionsMetaData resourceCollections = securityConstraint.getResourceCollections();
if (resourceCollections == null)
{
@@ -155,7 +155,7 @@
}
WebResourceCollectionMetaData resourceCollection = new WebResourceCollectionMetaData();
resourceCollections.add(resourceCollection);
-
+
resourceCollection.setWebResourceName(ejbName);
resourceCollection.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
ArrayList<String> httpMethods = new ArrayList<String>();
@@ -217,18 +217,18 @@
* @param dep webservice deployment
* @param jbossWebMD jboss web meta data
*/
- private void createJBossWebAppDescriptor( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ private void createJBossWebAppDescriptor(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
// Set security domain
- this.setSecurityDomain( jbossWebMD, dep );
+ this.setSecurityDomain(jbossWebMD, dep);
// Set context root
final String contextRoot = dep.getService().getContextRoot();
- jbossWebMD.setContextRoot( contextRoot );
+ jbossWebMD.setContextRoot(contextRoot);
// Set virtual hosts
final List<String> virtualHosts = dep.getService().getVirtualHosts();
- jbossWebMD.setVirtualHosts( virtualHosts );
+ jbossWebMD.setVirtualHosts(virtualHosts);
}
/**
@@ -237,13 +237,13 @@
* @param dep webservice EJB deployment
* @return security builder for EJB deployment
*/
- private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor( final Deployment dep )
+ private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor(final Deployment dep)
{
- final boolean isJaxws = WSHelper.isJaxwsDeployment( dep );
-
+ final boolean isJaxws = WSHelper.isJaxwsDeployment(dep);
+
return isJaxws ? this.ejb3SecurityAccessor : this.ejb21SecurityAccessor;
}
-
+
/**
* Creates servlets part of web.xml descriptor.
*
@@ -257,17 +257,17 @@
* @param dep webservice deployemnt
* @param jbossWebMD jboss web meta data
*/
- private void createServlets( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ private void createServlets(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final JBossServletsMetaData servlets = this.getServlets( jbossWebMD );
+ final JBossServletsMetaData servlets = this.getServlets(jbossWebMD);
- for ( final Endpoint endpoint : dep.getService().getEndpoints() )
+ for (final Endpoint endpoint : dep.getService().getEndpoints())
{
final JBossServletMetaData servlet = new JBossServletMetaData();
- servlet.setServletName( endpoint.getShortName() );
- servlet.setServletClass( endpoint.getTargetBeanName() );
+ servlet.setServletName(endpoint.getShortName());
+ servlet.setServletClass(endpoint.getTargetBeanName());
- servlets.add( servlet );
+ servlets.add(servlet);
}
}
@@ -284,17 +284,17 @@
* @param dep webservice deployemnt
* @param jbossWebMD jboss web meta data
*/
- private void createServletMappings( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ private void createServletMappings(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final List< ServletMappingMetaData > servletMappings = this.getServletMappings( jbossWebMD );
+ final List<ServletMappingMetaData> servletMappings = this.getServletMappings(jbossWebMD);
- for ( final Endpoint ep : dep.getService().getEndpoints() )
+ for (final Endpoint ep : dep.getService().getEndpoints())
{
final ServletMappingMetaData servletMapping = new ServletMappingMetaData();
- servletMapping.setServletName( ep.getShortName() );
- servletMapping.setUrlPatterns( Arrays.asList( new String[] { ep.getURLPattern() } ) ); // TODO:
+ servletMapping.setServletName(ep.getShortName());
+ servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() })); // TODO:
- servletMappings.add( servletMapping );
+ servletMappings.add(servletMapping);
}
}
@@ -306,13 +306,13 @@
* @param jbossWebMD jboss web meta data
* @return servlets meta data
*/
- private JBossServletsMetaData getServlets( final JBossWebMetaData jbossWebMD )
+ private JBossServletsMetaData getServlets(final JBossWebMetaData jbossWebMD)
{
JBossServletsMetaData servlets = jbossWebMD.getServlets();
- if ( servlets == null )
+ if (servlets == null)
{
servlets = new JBossServletsMetaData();
- jbossWebMD.setServlets( servlets );
+ jbossWebMD.setServlets(servlets);
}
return servlets;
@@ -326,13 +326,13 @@
* @param jbossWebMD jboss web meta data
* @return servlet mappings meta data
*/
- private List< ServletMappingMetaData > getServletMappings( final JBossWebMetaData jbossWebMD )
+ private List<ServletMappingMetaData> getServletMappings(final JBossWebMetaData jbossWebMD)
{
- List< ServletMappingMetaData > servletMappings = jbossWebMD.getServletMappings();
- if ( servletMappings == null )
+ List<ServletMappingMetaData> servletMappings = jbossWebMD.getServletMappings();
+ if (servletMappings == null)
{
- servletMappings = new ArrayList< ServletMappingMetaData >();
- jbossWebMD.setServletMappings( servletMappings );
+ servletMappings = new ArrayList<ServletMappingMetaData>();
+ jbossWebMD.setServletMappings(servletMappings);
}
return servletMappings;
@@ -344,13 +344,13 @@
* @param jbossWebMD jboss web meta data
* @param dep webservice deployment
*/
- public final void setSecurityDomain( final JBossWebMetaData jbossWebMD, final Deployment dep )
+ public final void setSecurityDomain(final JBossWebMetaData jbossWebMD, final Deployment dep)
{
- final String securityDomain = this.getEjbSecurityMetaDataAccessor( dep ).getSecurityDomain( dep ); // TODO: review (javadoc)
+ final String securityDomain = this.getEjbSecurityMetaDataAccessor(dep).getSecurityDomain(dep); // TODO: review (javadoc)
- if ( securityDomain != null )
+ if (securityDomain != null)
{
- jbossWebMD.setSecurityDomain( securityDomain );
+ jbossWebMD.setSecurityDomain(securityDomain);
}
}
@@ -360,13 +360,13 @@
* @param jbossWebMD jboss web meta data
* @param dep webservice deployment
*/
- public final void setSecurityRoles( final JBossWebMetaData jbossWebMD, final Deployment dep )
+ public final void setSecurityRoles(final JBossWebMetaData jbossWebMD, final Deployment dep)
{
- final SecurityRolesMetaData securityRolesMD = this.getEjbSecurityMetaDataAccessor( dep ).getSecurityRoles( dep ); // TODO: review (javadoc)
+ final SecurityRolesMetaData securityRolesMD = this.getEjbSecurityMetaDataAccessor(dep).getSecurityRoles(dep); // TODO: review (javadoc)
- if ( securityRolesMD != null )
+ if (securityRolesMD != null)
{
- jbossWebMD.setSecurityRoles( securityRolesMD );
+ jbossWebMD.setSecurityRoles(securityRolesMD);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -60,12 +60,12 @@
*
* @param dep webservice deployment
*/
- public void modify( final Deployment dep )
+ public void modify(final Deployment dep)
{
- final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep, JBossWebMetaData.class );
+ final JBossWebMetaData jbossWebMD = WSHelper.getRequiredAttachment(dep, JBossWebMetaData.class);
- this.propagateContextProps( dep, jbossWebMD );
- this.configureEndpoints( dep, jbossWebMD );
+ this.propagateContextProps(dep, jbossWebMD);
+ this.configureEndpoints(dep, jbossWebMD);
}
/**
@@ -74,20 +74,19 @@
* @param dep webservice deployment
* @param jbossWebMD web meta data
*/
- @SuppressWarnings( "unchecked" )
- private void propagateContextProps( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ @SuppressWarnings("unchecked")
+ private void propagateContextProps(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final Map< String, String > stackContextParams = ( Map< String, String > )
- dep.getProperty( WSConstants.STACK_CONTEXT_PARAMS );
+ final Map<String, String> stackContextParams = (Map<String, String>)dep.getProperty(WSConstants.STACK_CONTEXT_PARAMS);
- if ( stackContextParams != null )
+ if (stackContextParams != null)
{
- final List< ParamValueMetaData > contextParams = this.getContextParams( jbossWebMD );
+ final List<ParamValueMetaData> contextParams = this.getContextParams(jbossWebMD);
- for ( Map.Entry< String, String > entry : stackContextParams.entrySet() )
+ for (Map.Entry<String, String> entry : stackContextParams.entrySet())
{
- final ParamValueMetaData newParam = this.newParameter( entry.getKey(), entry.getValue() );
- contextParams.add( newParam );
+ final ParamValueMetaData newParam = this.newParameter(entry.getKey(), entry.getValue());
+ contextParams.add(newParam);
}
}
}
@@ -98,28 +97,27 @@
* @param dep webservice deployment
* @param jbossWebMD web meta data
*/
- private void configureEndpoints( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ private void configureEndpoints(final Deployment dep, final JBossWebMetaData jbossWebMD)
{
- final Iterator< JBossServletMetaData > servlets = jbossWebMD.getServlets().iterator();
+ final Iterator<JBossServletMetaData> servlets = jbossWebMD.getServlets().iterator();
- while ( servlets.hasNext() )
+ while (servlets.hasNext())
{
final ServletMetaData servletMD = servlets.next();
final ClassLoader loader = dep.getInitialClassLoader();
- final boolean isWebserviceEndpoint = ASHelper.getEndpointClass( servletMD, loader ) != null;
+ final boolean isWebserviceEndpoint = ASHelper.getEndpointClass(servletMD, loader) != null;
- if ( isWebserviceEndpoint )
+ if (isWebserviceEndpoint)
{
// set transport servlet
- servletMD.setServletClass( this.getTransportClassName( dep ) );
+ servletMD.setServletClass(this.getTransportClassName(dep));
// configure webservice endpoint
final String endpointClassName = servletMD.getServletClass();
- final List< ParamValueMetaData > initParams = this.getServletInitParams( servletMD );
- final ParamValueMetaData endpointParam = this.newParameter(
- Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName );
+ final List<ParamValueMetaData> initParams = this.getServletInitParams(servletMD);
+ final ParamValueMetaData endpointParam = this.newParameter(Endpoint.SEPID_DOMAIN_ENDPOINT, endpointClassName);
- initParams.add( endpointParam );
+ initParams.add(endpointParam);
}
}
}
@@ -131,13 +129,13 @@
* @return stack specific transport class name
* @throws IllegalStateException if transport class name is not found in deployment properties map
*/
- private String getTransportClassName( final Deployment dep )
+ private String getTransportClassName(final Deployment dep)
{
- final String transportClassName = ( String ) dep.getProperty( WSConstants.STACK_TRANSPORT_CLASS );
+ final String transportClassName = (String)dep.getProperty(WSConstants.STACK_TRANSPORT_CLASS);
- if ( transportClassName == null )
+ if (transportClassName == null)
{
- throw new IllegalStateException( "Cannot obtain deployment property: " + WSConstants.STACK_TRANSPORT_CLASS );
+ throw new IllegalStateException("Cannot obtain deployment property: " + WSConstants.STACK_TRANSPORT_CLASS);
}
return transportClassName;
@@ -150,11 +148,11 @@
* @param value the value
* @return new parameter
*/
- private ParamValueMetaData newParameter( final String key, final String value )
+ private ParamValueMetaData newParameter(final String key, final String value)
{
final ParamValueMetaData paramMD = new ParamValueMetaData();
- paramMD.setParamName( key );
- paramMD.setParamValue( value );
+ paramMD.setParamName(key);
+ paramMD.setParamValue(value);
return paramMD;
}
@@ -165,14 +163,14 @@
* @param servletMD servlet meta data
* @return servlet init params list
*/
- private List< ParamValueMetaData > getServletInitParams( final ServletMetaData servletMD )
+ private List<ParamValueMetaData> getServletInitParams(final ServletMetaData servletMD)
{
- List< ParamValueMetaData > initParams = servletMD.getInitParam();
+ List<ParamValueMetaData> initParams = servletMD.getInitParam();
- if ( initParams == null )
+ if (initParams == null)
{
- initParams = new ArrayList< ParamValueMetaData >();
- servletMD.setInitParam( initParams );
+ initParams = new ArrayList<ParamValueMetaData>();
+ servletMD.setInitParam(initParams);
}
return initParams;
@@ -184,14 +182,14 @@
* @param jbossWebMD web meta data
* @return context params list
*/
- private List< ParamValueMetaData > getContextParams( final JBossWebMetaData jbossWebMD )
+ private List<ParamValueMetaData> getContextParams(final JBossWebMetaData jbossWebMD)
{
- List< ParamValueMetaData > contextParams = jbossWebMD.getContextParams();
+ List<ParamValueMetaData> contextParams = jbossWebMD.getContextParams();
- if ( contextParams == null )
+ if (contextParams == null)
{
- contextParams = new ArrayList< ParamValueMetaData >();
- jbossWebMD.setContextParams( contextParams );
+ contextParams = new ArrayList<ParamValueMetaData>();
+ jbossWebMD.setContextParams(contextParams);
}
return contextParams;
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -49,9 +49,9 @@
*
* @param dep webservice deployment
*/
- public void start( final Deployment dep )
+ public void start(final Deployment dep)
{
- this.webMetaDataModifier.modify( dep );
+ this.webMetaDataModifier.modify(dep);
}
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-05 09:50:33 UTC (rev 10489)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/util/ASHelper.java 2009-08-05 10:10:36 UTC (rev 10490)
@@ -47,7 +47,7 @@
{
/** Logger. */
- private static final Logger LOG = Logger.getLogger( ASHelper.class );
+ private static final Logger LOG = Logger.getLogger(ASHelper.class);
/**
* Forbidden constructor.
@@ -63,9 +63,9 @@
* @param unit deployment unit
* @return true if JAXWS JSE, JAXRPC JSE, JAXWS EJB or JAXRPC EJB deployment, false otherwise.
*/
- public static boolean isWebServiceDeployment( final DeploymentUnit unit )
+ public static boolean isWebServiceDeployment(final DeploymentUnit unit)
{
- return ASHelper.getOptionalAttachment( unit, DeploymentType.class ) != null;
+ return ASHelper.getOptionalAttachment(unit, DeploymentType.class) != null;
}
/**
@@ -74,11 +74,11 @@
* @param unit deployment unit
* @return true if JAXRPC EJB deployment, false otherwise
*/
- public static boolean isJaxrpcEjbDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcEjbDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit, DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- return DeploymentType.JAXRPC_EJB21.equals( deploymentType );
+ return DeploymentType.JAXRPC_EJB21.equals(deploymentType);
}
/**
@@ -87,11 +87,11 @@
* @param unit deployment unit
* @return true if JAXRPC JSE deployment, false otherwise
*/
- public static boolean isJaxrpcJseDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcJseDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit, DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- return DeploymentType.JAXRPC_JSE.equals( deploymentType );
+ return DeploymentType.JAXRPC_JSE.equals(deploymentType);
}
/**
@@ -100,11 +100,11 @@
* @param unit deployment unit
* @return true if JAXWS EJB deployment, false otherwise
*/
- public static boolean isJaxwsEjbDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsEjbDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit, DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- return DeploymentType.JAXWS_EJB3.equals( deploymentType );
+ return DeploymentType.JAXWS_EJB3.equals(deploymentType);
}
/**
@@ -113,11 +113,11 @@
* @param unit deployment unit
* @return true if JAXWS JSE deployment, false otherwise
*/
- public static boolean isJaxwsJseDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsJseDeployment(final DeploymentUnit unit)
{
- final DeploymentType deploymentType = ASHelper.getOptionalAttachment( unit, DeploymentType.class );
+ final DeploymentType deploymentType = ASHelper.getOptionalAttachment(unit, DeploymentType.class);
- return DeploymentType.JAXWS_JSE.equals( deploymentType );
+ return DeploymentType.JAXWS_JSE.equals(deploymentType);
}
/**
@@ -126,10 +126,10 @@
* @param unit deployment unit
* @return true if either JAXWS JSE or JAXRPC JSE deployment, false otherwise.
*/
- public static boolean isJseDeployment( final DeploymentUnit unit )
+ public static boolean isJseDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment( unit );
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment( unit );
+ final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
+ final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
return isJaxwsJse || isJaxrpcJse;
}
@@ -140,10 +140,10 @@
* @param unit deployment unit
* @return true if either JAXWS EJB or JAXRPC EJB deployment, false otherwise
*/
- public static boolean isEjbDeployment( final DeploymentUnit unit )
+ public static boolean isEjbDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment( unit );
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment( unit );
+ final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+ final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
return isJaxwsEjb || isJaxrpcEjb;
}
@@ -154,10 +154,10 @@
* @param unit deployment unit
* @return true if either JAXWS EJB or JAXWS JSE deployment, false otherwise
*/
- public static boolean isJaxwsDeployment( final DeploymentUnit unit )
+ public static boolean isJaxwsDeployment(final DeploymentUnit unit)
{
- final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment( unit );
- final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment( unit );
+ final boolean isJaxwsEjb = ASHelper.isJaxwsEjbDeployment(unit);
+ final boolean isJaxwsJse = ASHelper.isJaxwsJseDeployment(unit);
return isJaxwsEjb || isJaxwsJse;
}
@@ -168,10 +168,10 @@
* @param unit deployment unit
* @return true if either JAXRPC EJB or JAXRPC JSE deployment, false otherwise
*/
- public static boolean isJaxrpcDeployment( final DeploymentUnit unit )
+ public static boolean isJaxrpcDeployment(final DeploymentUnit unit)
{
- final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment( unit );
- final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment( unit );
+ final boolean isJaxrpcEjb = ASHelper.isJaxrpcEjbDeployment(unit);
+ final boolean isJaxrpcJse = ASHelper.isJaxrpcJseDeployment(unit);
return isJaxrpcEjb || isJaxrpcJse;
}
@@ -182,9 +182,9 @@
* @param unit deployment unit
* @return list of JAXWS servlets meta data
*/
- public static List< ServletMetaData > getJaxwsServlets( final DeploymentUnit unit )
+ public static List<ServletMetaData> getJaxwsServlets(final DeploymentUnit unit)
{
- return ASHelper.getWebServiceServlets( unit, true );
+ return ASHelper.getWebServiceServlets(unit, true);
}
/**
@@ -193,9 +193,9 @@
* @param unit deployment unit
* @return list of JAXRPC servlets meta data
*/
- public static List< ServletMetaData > getJaxrpcServlets( final DeploymentUnit unit )
+ public static List<ServletMetaData> getJaxrpcServlets(final DeploymentUnit unit)
{
- return ASHelper.getWebServiceServlets( unit, false );
+ return ASHelper.getWebServiceServlets(unit, false);
}
/**
@@ -204,18 +204,18 @@
* @param unit deployment unit
* @return list of JAXWS EJBs meta data
*/
- public static List< WebServiceDeclaration > getJaxwsEjbs( final DeploymentUnit unit )
+ public static List<WebServiceDeclaration> getJaxwsEjbs(final DeploymentUnit unit)
{
- final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment( unit, WebServiceDeployment.class );
- final List< WebServiceDeclaration > endpoints = new ArrayList< WebServiceDeclaration >();
+ final WebServiceDeployment wsDeployment = ASHelper.getRequiredAttachment(unit, WebServiceDeployment.class);
+ final List<WebServiceDeclaration> endpoints = new ArrayList<WebServiceDeclaration>();
- final Iterator< WebServiceDeclaration > ejbIterator = wsDeployment.getServiceEndpoints().iterator();
- while ( ejbIterator.hasNext() )
+ final Iterator<WebServiceDeclaration> ejbIterator = wsDeployment.getServiceEndpoints().iterator();
+ while (ejbIterator.hasNext())
{
final WebServiceDeclaration ejbContainer = ejbIterator.next();
- if ( ASHelper.isWebServiceBean( ejbContainer ) )
+ if (ASHelper.isWebServiceBean(ejbContainer))
{
- endpoints.add( ejbContainer );
+ endpoints.add(ejbContainer);
}
}
@@ -228,10 +228,10 @@
* @param ejbContainerAdapter EJB container adapter
* @return true if EJB container is webservice endpoint, false otherwise
*/
- public static boolean isWebServiceBean( final WebServiceDeclaration ejbContainerAdapter )
+ public static boolean isWebServiceBean(final WebServiceDeclaration ejbContainerAdapter)
{
- final boolean isWebService = ejbContainerAdapter.getAnnotation( WebService.class ) != null;
- final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation( WebServiceProvider.class ) != null;
+ final boolean isWebService = ejbContainerAdapter.getAnnotation(WebService.class) != null;
+ final boolean isWebServiceProvider = ejbContainerAdapter.getAnnotation(WebServiceProvider.class) != null;
return isWebService || isWebServiceProvider;
}
@@ -242,7 +242,7 @@
* @param servletMD servlet meta data
* @return endpoint class name
*/
- public static String getEndpointName( final ServletMetaData servletMD )
+ public static String getEndpointName(final ServletMetaData servletMD)
{
final String endpointClass = servletMD.getServletClass();
@@ -256,17 +256,17 @@
* @param servletName servlet name
* @return servlet meta data
*/
- public static ServletMetaData getServletForName( final JBossWebMetaData jbossWebMD, final String servletName )
+ public static ServletMetaData getServletForName(final JBossWebMetaData jbossWebMD, final String servletName)
{
- for ( JBossServletMetaData servlet : jbossWebMD.getServlets() )
+ for (JBossServletMetaData servlet : jbossWebMD.getServlets())
{
- if ( servlet.getName().equals( servletName ) )
+ if (servlet.getName().equals(servletName))
{
return servlet;
}
}
- throw new IllegalStateException( "Cannot find servlet for link: " + servletName );
+ throw new IllegalStateException("Cannot find servlet for link: " + servletName);
}
/**
@@ -276,26 +276,26 @@
* @param loader class loader
* @return webservice endpoint class or null
*/
- public static Class< ? > getEndpointClass( final ServletMetaData servletMD, final ClassLoader loader )
+ public static Class<?> getEndpointClass(final ServletMetaData servletMD, final ClassLoader loader)
{
- final String endpointClassName = ASHelper.getEndpointName( servletMD );
- final boolean notJSP = endpointClassName != null && endpointClassName.length() > 0;
+ final String endpointClassName = ASHelper.getEndpointName(servletMD);
+ final boolean notJSP = endpointClassName != null && endpointClassName.length() > 0;
- if ( notJSP )
+ if (notJSP)
{
try
{
- final Class< ? > endpointClass = loader.loadClass( endpointClassName );
- final boolean notServlet = !Servlet.class.isAssignableFrom( endpointClass );
+ final Class<?> endpointClass = loader.loadClass(endpointClassName);
+ final boolean notServlet = !Servlet.class.isAssignableFrom(endpointClass);
- if ( notServlet )
+ if (notServlet)
{
return endpointClass;
}
}
- catch ( ClassNotFoundException cnfe )
+ catch (ClassNotFoundException cnfe)
{
- ASHelper.LOG.warn( "Cannot load servlet class: " + endpointClassName, cnfe );
+ ASHelper.LOG.warn("Cannot load servlet class: " + endpointClassName, cnfe);
}
}
@@ -311,18 +311,18 @@
* @return required attachment
* @throws IllegalStateException if attachment value is null
*/
- public static <A> A getRequiredAttachment( final DeploymentUnit unit, final Class< A > key )
+ public static <A> A getRequiredAttachment(final DeploymentUnit unit, final Class<A> key)
{
- final A value = unit.getAttachment( key );
- if ( value == null )
+ final A value = unit.getAttachment(key);
+ if (value == null)
{
- ASHelper.LOG.error( "Cannot find attachment in deployment unit: " + key );
+ ASHelper.LOG.error("Cannot find attachment in deployment unit: " + key);
throw new IllegalStateException();
}
-
+
return value;
}
-
+
/**
* Returns optional attachment value from deployment unit or null if not bound.
*
@@ -331,11 +331,11 @@
* @param key attachment key
* @return optional attachment value or null
*/
- public static <A> A getOptionalAttachment( final DeploymentUnit unit, final Class< A > key )
+ public static <A> A getOptionalAttachment(final DeploymentUnit unit, final Class<A> key)
{
- return unit.getAttachment( key );
+ return unit.getAttachment(key);
}
-
+
/**
* Returns true if deployment unit have attachment value associated with the <b>key</b>.
*
@@ -343,9 +343,9 @@
* @param key attachment key
* @return true if contains attachment, false otherwise
*/
- public static boolean hasAttachment( final DeploymentUnit unit, final Class< ? > key )
+ public static boolean hasAttachment(final DeploymentUnit unit, final Class<?> key)
{
- return ASHelper.getOptionalAttachment( unit, key ) != null;
+ return ASHelper.getOptionalAttachment(unit, key) != null;
}
/**
@@ -355,28 +355,28 @@
* @param jaxws if passed value is <b>true</b> JAXWS servlets list will be returned, otherwise JAXRPC servlets list
* @return either JAXRPC or JAXWS servlets list
*/
- private static List< ServletMetaData > getWebServiceServlets( final DeploymentUnit unit, final boolean jaxws )
+ private static List<ServletMetaData> getWebServiceServlets(final DeploymentUnit unit, final boolean jaxws)
{
- final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment( unit, JBossWebMetaData.class );
+ final JBossWebMetaData jbossWebMD = ASHelper.getRequiredAttachment(unit, JBossWebMetaData.class);
final ClassLoader loader = unit.getClassLoader();
- final List< ServletMetaData > endpoints = new ArrayList< ServletMetaData >();
+ final List<ServletMetaData> endpoints = new ArrayList<ServletMetaData>();
- for ( ServletMetaData servletMD : jbossWebMD.getServlets() )
+ for (ServletMetaData servletMD : jbossWebMD.getServlets())
{
- final Class< ? > endpointClass = ASHelper.getEndpointClass( servletMD, loader );
+ final Class<?> endpointClass = ASHelper.getEndpointClass(servletMD, loader);
- if ( endpointClass != null )
+ if (endpointClass != null)
{
// check webservice annotations
- final boolean isWebService = endpointClass.isAnnotationPresent( WebService.class );
- final boolean isWebServiceProvider = endpointClass.isAnnotationPresent( WebServiceProvider.class );
+ final boolean isWebService = endpointClass.isAnnotationPresent(WebService.class);
+ final boolean isWebServiceProvider = endpointClass.isAnnotationPresent(WebServiceProvider.class);
// detect webservice type
- final boolean isJaxwsEndpoint = jaxws && ( isWebService || isWebServiceProvider );
- final boolean isJaxrpcEndpoint = !jaxws && ( !isWebService && !isWebServiceProvider );
+ final boolean isJaxwsEndpoint = jaxws && (isWebService || isWebServiceProvider);
+ final boolean isJaxrpcEndpoint = !jaxws && (!isWebService && !isWebServiceProvider);
- if ( isJaxwsEndpoint || isJaxrpcEndpoint )
+ if (isJaxwsEndpoint || isJaxrpcEndpoint)
{
- endpoints.add( servletMD );
+ endpoints.add(servletMD);
}
}
}
14 years, 9 months
JBossWS SVN: r10489 - in container/jboss50/branches/ropalka-jboss510/src/main: java/org/jboss/webservices/integration/tomcat and 1 other directories.
by jbossws-commits@lists.jboss.org
Author: richard.opalka(a)jboss.com
Date: 2009-08-05 05:50:33 -0400 (Wed, 05 Aug 2009)
New Revision: 10489
Added:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
Removed:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeployersFactory.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilder.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB21.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB3.java
Modified:
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBWS-2332] refactoring
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSAspectizedDeployersFactory.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
+
+import java.util.HashMap;
+import java.util.Map;
+
+import org.jboss.deployers.plugins.deployers.DeployersImpl;
+import org.jboss.deployers.spi.deployer.Deployer;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * WSDeploymentAspectDeployer factory.
+ *
+ * @author <a href="ropalka(a)redhat.com">Richard Opalka</a>
+ */
+public final class WSAspectizedDeployersFactory
+{
+
+ /** Real deployers registry. */
+ private final DeployersImpl delegee;
+
+ /** Our deployers regitry. */
+ private final Map< DeploymentAspect, Deployer > deployersRegistry = new HashMap< DeploymentAspect, Deployer >();
+
+ /**
+ * Constructor.
+ *
+ * @param realDeployers real deployers registry
+ */
+ public WSAspectizedDeployersFactory( final DeployersImpl realDeployers )
+ {
+ this.delegee = realDeployers;
+ }
+
+ /**
+ * MC incallback method. It will be called each time DeploymentAspect bean will be installed.
+ *
+ * @param aspect to create real WS aspectized deployer for
+ */
+ public void addDeployer( final DeploymentAspect aspect )
+ {
+ final Deployer wsAspectizedDeployer = new WSDeploymentAspectDeployer( aspect );
+
+ this.delegee.addDeployer( wsAspectizedDeployer );
+ this.deployersRegistry.put( aspect, wsAspectizedDeployer );
+ }
+
+ /**
+ * MC uncallback method. It will be called each time DeploymentAspect bean will be removed.
+ *
+ * @param aspect to remove real WS aspectized deployer for
+ */
+ public void removeDeployer( final DeploymentAspect aspect )
+ {
+ final Deployer wsAspectizedDeployer = this.deployersRegistry.get( aspect );
+
+ this.deployersRegistry.remove( aspect );
+ this.delegee.removeDeployer( wsAspectizedDeployer );
+ }
+
+}
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeployersFactory.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeployersFactory.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeployersFactory.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.deployers;
-
-import org.jboss.deployers.plugins.deployers.DeployersImpl;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-
-/**
- * WSDeploymentAspectDeployer factory.
- *
- * @author <a href="ropalka(a)redhat.com">Richard Opalka</a>
- */
-public final class WSDeployersFactory
-{
-
- /** Real deployers registry. */
- private final DeployersImpl delegee;
-
- /**
- * Constructor.
- *
- * @param realDeployers real deployers registry
- */
- public WSDeployersFactory( final DeployersImpl realDeployers )
- {
- this.delegee = realDeployers;
- }
-
- /**
- * MC incallback method. It will be called each time DeploymentAspect bean will reach INSTALLED state.
- *
- * @param aspect to create real WS deployer for
- */
- public void newDeployer( final DeploymentAspect aspect )
- {
- this.delegee.addDeployer( new WSDeploymentAspectDeployer( aspect ) );
- }
-
-}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/deployers/WSDeploymentAspectDeployer.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -41,6 +41,7 @@
/** JBossWS specific inputs/outputs prefix. */
private static final String JBOSSWS_ATTACHMENT_PREFIX = "jbossws.";
+
/** JBossWS specific metadata. */
private static final String JBOSSWS_METADATA = WSDeploymentAspectDeployer.JBOSSWS_ATTACHMENT_PREFIX + "metadata";
/** Delegee. */
@@ -124,7 +125,7 @@
}
/**
- * Displays also WS deployment aspect being used.
+ * Displays also WS deployment aspect being wrapped.
*
* @return deployer instance id including wrapped deployment aspect id.
*/
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityBuilder.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityBuilder.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -1,118 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * Creates web app security meta data for EJB deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-abstract class AbstractSecurityBuilder implements SecurityBuilder
-{
-
- /** JAAS JNDI prefix. */
- private static final String JAAS_JNDI_PREFIX = "java:/jaas/";
-
- /**
- * Constructor.
- */
- protected AbstractSecurityBuilder()
- {
- super();
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.SecurityBuilder#addSecurityDomain(JBossWebMetaData, Deployment)
- *
- * @param jbossWebMD jboss web meta data
- * @param dep webservice deployment
- */
- public final void addSecurityDomain( final JBossWebMetaData jbossWebMD, final Deployment dep )
- {
- final String securityDomain = this.getSecurityDomain( dep );
- final String jassPrefixedSecurityDomain = this.appendJaasPrefix( securityDomain );
-
- if ( jassPrefixedSecurityDomain != null )
- {
- jbossWebMD.setSecurityDomain( jassPrefixedSecurityDomain );
- }
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.SecurityBuilder#addSecurityRoles(JBossWebMetaData, Deployment)
- *
- * @param jbossWebMD jboss web meta data
- * @param dep webservice deployment
- */
- public final void addSecurityRoles( final JBossWebMetaData jbossWebMD, final Deployment dep )
- {
- final SecurityRolesMetaData securityRolesMD = this.getSecurityRoles( dep );
-
- if ( securityRolesMD != null )
- {
- jbossWebMD.setSecurityRoles( securityRolesMD );
- }
- }
-
- /**
- * Template method for obtaining security domain from EJB deployment.
- *
- * @param dep webservice deployment
- * @return security domain associated with EJB deployment
- */
- protected abstract String getSecurityDomain( final Deployment dep );
-
- /**
- * Template method for obtaining security roles from EJB deployment.
- *
- * @param dep webservice deployment
- * @return security roles associated with EJB deployment
- */
- protected abstract SecurityRolesMetaData getSecurityRoles( final Deployment dep );
-
- /**
- * Appends 'java:/jaas/' prefix to security domain if it's not prefixed with it.
- *
- * @param securityDomain security domain to be prefixed
- * @return security domain prefixed with jaas JNDI prefix
- */
- private String appendJaasPrefix( final String securityDomain )
- {
- if ( securityDomain != null )
- {
- final boolean hasJaasPrefix = securityDomain.startsWith( AbstractSecurityBuilder.JAAS_JNDI_PREFIX );
-
- if ( !hasJaasPrefix )
- {
- return AbstractSecurityBuilder.JAAS_JNDI_PREFIX + securityDomain;
- }
- }
-
- return securityDomain;
- }
-
-}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/AbstractSecurityMetaDataAccessorEJB.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.metadata.web.jboss.JBossWebMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.annotation.WebContext;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+
+/**
+ * Creates web app security meta data for EJB deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+abstract class AbstractSecurityMetaDataAccessorEJB implements SecurityMetaDataAccessorEJB
+{
+
+ /** JAAS JNDI prefix. */
+ private static final String JAAS_JNDI_PREFIX = "java:/jaas/";
+
+ /**
+ * Constructor.
+ */
+ protected AbstractSecurityMetaDataAccessorEJB()
+ {
+ super();
+ }
+
+ /**
+ * Appends 'java:/jaas/' prefix to security domain if it's not prefixed with it.
+ *
+ * @param securityDomain security domain to be prefixed
+ * @return security domain prefixed with jaas JNDI prefix
+ */
+ protected String appendJaasPrefix( final String securityDomain )
+ {
+ if ( securityDomain != null )
+ {
+ final boolean hasJaasPrefix = securityDomain.startsWith( AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX );
+
+ if ( !hasJaasPrefix )
+ {
+ return AbstractSecurityMetaDataAccessorEJB.JAAS_JNDI_PREFIX + securityDomain;
+ }
+ }
+
+ return securityDomain;
+ }
+
+
+ public final String getAuthMethod( final Endpoint endpoint )
+ {
+ final Deployment dep = endpoint.getService().getDeployment();
+ String ejbName = endpoint.getShortName();
+ String beanAuthMethod = null;
+
+ WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+ if (anWebContext != null)
+ {
+ if (anWebContext.authMethod().length() > 0)
+ beanAuthMethod = anWebContext.authMethod();
+ }
+
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
+ {
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
+ {
+ beanAuthMethod = smd.getAuthMethod();
+ }
+ }
+
+ return beanAuthMethod;
+ }
+
+ public final boolean isSecureWsdlAccess( final Endpoint endpoint )
+ {
+ final Deployment dep = endpoint.getService().getDeployment();
+ String ejbName = endpoint.getShortName();
+ boolean secureWSDLAccess = false;
+
+ WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+ if (anWebContext != null)
+ {
+ if (anWebContext.secureWSDLAccess())
+ secureWSDLAccess = anWebContext.secureWSDLAccess();
+ }
+
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
+ {
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
+ {
+ secureWSDLAccess = smd.getSecureWSDLAccess();
+ }
+ }
+
+ return secureWSDLAccess;
+ }
+
+ public final String getTransportGuarantee( final Endpoint endpoint )
+ {
+ final Deployment dep = endpoint.getService().getDeployment();
+ String ejbName = endpoint.getShortName();
+ String transportGuarantee = null;
+
+ WebContext anWebContext = (WebContext)endpoint.getTargetBeanClass().getAnnotation(WebContext.class);
+ if (anWebContext != null)
+ {
+ if (anWebContext.transportGuarantee().length() > 0)
+ transportGuarantee = anWebContext.transportGuarantee();
+ }
+
+ EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
+ if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
+ {
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
+ {
+ transportGuarantee = smd.getTransportGuarantee();
+ }
+ }
+
+ return transportGuarantee;
+ }
+}
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilder.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilder.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilder.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -1,52 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import org.jboss.metadata.web.jboss.JBossWebMetaData;
-import org.jboss.wsf.spi.deployment.Deployment;
-
-/**
- * Creates web app security meta data for EJB deployments.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-interface SecurityBuilder
-{
-
- /**
- * Adds a security domain to jboss-web.xml.
- *
- * @param jbossWebMD jboss web meta data
- * @param dep webservice deployment
- */
- void addSecurityDomain( JBossWebMetaData jbossWebMD, Deployment dep );
-
- /**
- * Adds security roles to web.xml.
- *
- * @param jbossWebMD jboss web meta data
- * @param dep webservice deployment
- */
- void addSecurityRoles( JBossWebMetaData jbossWebMD, Deployment dep );
-
-}
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB21.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB21.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -1,75 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import org.jboss.metadata.common.ejb.IAssemblyDescriptorMetaData;
-import org.jboss.metadata.ejb.jboss.JBossMetaData;
-import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
-import org.jboss.wsf.common.integration.WSHelper;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
-
-/**
- * Creates web app security meta data for EJB 21 deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-public final class SecurityBuilderEJB21 extends AbstractSecurityBuilder
-{
-
- /**
- * Constructor.
- */
- public SecurityBuilderEJB21()
- {
- super();
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.AbstractSecurityBuilder#getSecurityDomain(Deployment)
- *
- * @param dep webservice deployment
- * @return security domain associated with EJB 21 deployment
- */
- protected String getSecurityDomain( final Deployment dep )
- {
- final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment( dep, EJBArchiveMetaData.class );
-
- return ejbMetaData.getSecurityDomain();
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.AbstractSecurityBuilder#getSecurityRoles(Deployment)
- *
- * @param dep webservice deployment
- * @return security roles associated with EJB 21 deployment
- */
- protected SecurityRolesMetaData getSecurityRoles( final Deployment dep )
- {
- final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep, JBossMetaData.class );
- final IAssemblyDescriptorMetaData assemblyDescriptorMD = jbossWebMD.getAssemblyDescriptor();
-
- return ( assemblyDescriptorMD != null ) ? assemblyDescriptorMD.getSecurityRoles() : null;
- }
-
-}
Deleted: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB3.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityBuilderEJB3.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
-
-import java.util.Iterator;
-
-import javax.annotation.security.RolesAllowed;
-
-import org.jboss.ejb3.annotation.SecurityDomain;
-import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
-import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
-import org.jboss.wsf.common.integration.WSHelper;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
-import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
-
-/**
- * Creates web app security meta data for EJB 3 deployment.
- *
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
- */
-public final class SecurityBuilderEJB3 extends AbstractSecurityBuilder
-{
-
- /**
- * Constructor.
- */
- public SecurityBuilderEJB3()
- {
- super();
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.AbstractSecurityBuilder#getSecurityDomain(Deployment)
- *
- * @param dep webservice deployment
- * @return security domain associated with EJB 3 deployment
- */
- protected String getSecurityDomain( final Deployment dep )
- {
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
- String securityDomain = null;
- final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
-
- while ( ejbContainers.hasNext() )
- {
- final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation( SecurityDomain.class );
-
- securityDomain = this.getDomain( securityDomain, nextSecurityDomain );
- }
-
- return securityDomain;
- }
-
- /**
- * @see org.jboss.webservices.integration.tomcat.AbstractSecurityBuilder#getSecurityRoles(Deployment)
- *
- * @param dep webservice deployment
- * @return security roles associated with EJB 21 deployment
- */
- protected SecurityRolesMetaData getSecurityRoles( final Deployment dep )
- {
- final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
- final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
- final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
-
- while ( ejbContainers.hasNext() )
- {
- final WebServiceDeclaration ejbContainer = ejbContainers.next();
- final RolesAllowed allowedRoles = ejbContainer.getAnnotation( RolesAllowed.class );
- final boolean hasAllowedRoles = allowedRoles != null;
-
- if ( hasAllowedRoles )
- {
- for ( final String roleName : allowedRoles.value() )
- {
- final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
-
- securityRoleMD.setRoleName( roleName );
- securityRolesMD.add( securityRoleMD );
- }
- }
- }
-
- return securityRolesMD;
- }
-
- /**
- * Returns security domain value. This method checks domain is the same for every EJB 3 endpoint.
- *
- * @param oldSecurityDomain our security domain
- * @param nextSecurityDomain next security domain
- * @return security domain value
- * @throws IllegalStateException if domains have different values
- */
- private String getDomain( final String oldSecurityDomain, final SecurityDomain nextSecurityDomain )
- {
- if ( nextSecurityDomain == null )
- {
- return oldSecurityDomain;
- }
-
- if ( oldSecurityDomain == null )
- {
- return nextSecurityDomain.value();
- }
-
- this.ensureSameDomains( oldSecurityDomain, nextSecurityDomain.value() );
-
- return oldSecurityDomain;
- }
-
- /**
- * This method ensures both passed domains contain the same value.
- *
- * @param oldSecurityDomain our security domain
- * @param newSecurityDomain next security domain
- * @throws IllegalStateException if domains have different values
- */
- private void ensureSameDomains( final String oldSecurityDomain, final String newSecurityDomain )
- {
- final boolean domainsDiffer = !oldSecurityDomain.equals( newSecurityDomain );
-
- if ( domainsDiffer )
- {
- throw new IllegalStateException
- (
- "Multiple security domains not supported. " +
- "First domain: '" + oldSecurityDomain + "' " +
- "second domain: '" + newSecurityDomain + "'"
- );
- }
- }
-
-}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -0,0 +1,59 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Endpoint;
+
+/**
+ * Creates web app security meta data for EJB deployments.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+interface SecurityMetaDataAccessorEJB
+{
+
+ /**
+ * Obtains security domain from EJB deployment.
+ *
+ * @param dep webservice deployment
+ * @return security domain associated with EJB deployment
+ */
+ String getSecurityDomain( Deployment dep );
+
+ /**
+ * Obtaining security roles from EJB deployment.
+ *
+ * @param dep webservice deployment
+ * @return security roles associated with EJB deployment
+ */
+ SecurityRolesMetaData getSecurityRoles( Deployment dep );
+
+ boolean isSecureWsdlAccess( Endpoint endpoint );
+
+ String getAuthMethod( Endpoint endpoint );
+
+ String getTransportGuarantee( Endpoint endpoint );
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB21.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -0,0 +1,75 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import org.jboss.metadata.common.ejb.IAssemblyDescriptorMetaData;
+import org.jboss.metadata.ejb.jboss.JBossMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+
+/**
+ * Creates web app security meta data for EJB 21 deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+final class SecurityMetaDataAccessorEJB21 extends AbstractSecurityMetaDataAccessorEJB
+{
+
+ /**
+ * Constructor.
+ */
+ public SecurityMetaDataAccessorEJB21()
+ {
+ super();
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
+ *
+ * @param dep webservice deployment
+ * @return security domain associated with EJB 21 deployment
+ */
+ public String getSecurityDomain( final Deployment dep )
+ {
+ final EJBArchiveMetaData ejbMetaData = WSHelper.getRequiredAttachment( dep, EJBArchiveMetaData.class );
+
+ return super.appendJaasPrefix( ejbMetaData.getSecurityDomain() );
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityRoles(Deployment)
+ *
+ * @param dep webservice deployment
+ * @return security roles associated with EJB 21 deployment
+ */
+ public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ {
+ final JBossMetaData jbossWebMD = WSHelper.getRequiredAttachment( dep, JBossMetaData.class );
+ final IAssemblyDescriptorMetaData assemblyDescriptorMD = jbossWebMD.getAssemblyDescriptor();
+
+ return ( assemblyDescriptorMD != null ) ? assemblyDescriptorMD.getSecurityRoles() : null;
+ }
+
+}
Added: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java (rev 0)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/SecurityMetaDataAccessorEJB3.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file 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.webservices.integration.tomcat;
+
+import java.util.Iterator;
+
+import javax.annotation.security.RolesAllowed;
+
+import org.jboss.ejb3.annotation.SecurityDomain;
+import org.jboss.metadata.javaee.spec.SecurityRoleMetaData;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
+import org.jboss.wsf.common.integration.WSHelper;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeclaration;
+import org.jboss.wsf.spi.deployment.integration.WebServiceDeployment;
+
+/**
+ * Creates web app security meta data for EJB 3 deployment.
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ */
+final class SecurityMetaDataAccessorEJB3 extends AbstractSecurityMetaDataAccessorEJB
+{
+
+ /**
+ * Constructor.
+ */
+ public SecurityMetaDataAccessorEJB3()
+ {
+ super();
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityDomain(Deployment)
+ *
+ * @param dep webservice deployment
+ * @return security domain associated with EJB 3 deployment
+ */
+ public String getSecurityDomain( final Deployment dep )
+ {
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
+ String securityDomain = null;
+ final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+
+ while ( ejbContainers.hasNext() )
+ {
+ final WebServiceDeclaration ejbContainer = ejbContainers.next();
+ final SecurityDomain nextSecurityDomain = ejbContainer.getAnnotation( SecurityDomain.class );
+
+ securityDomain = this.getDomain( securityDomain, nextSecurityDomain );
+ }
+
+ return super.appendJaasPrefix( securityDomain );
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.AbstractSecurityMetaDataAccessorEJB#getSecurityRoles(Deployment)
+ *
+ * @param dep webservice deployment
+ * @return security roles associated with EJB 21 deployment
+ */
+ public SecurityRolesMetaData getSecurityRoles( final Deployment dep )
+ {
+ final WebServiceDeployment wsDeployment = WSHelper.getRequiredAttachment( dep, WebServiceDeployment.class );
+ final SecurityRolesMetaData securityRolesMD = new SecurityRolesMetaData();
+ final Iterator< WebServiceDeclaration > ejbContainers = wsDeployment.getServiceEndpoints().iterator();
+
+ while ( ejbContainers.hasNext() )
+ {
+ final WebServiceDeclaration ejbContainer = ejbContainers.next();
+ final RolesAllowed allowedRoles = ejbContainer.getAnnotation( RolesAllowed.class );
+ final boolean hasAllowedRoles = allowedRoles != null;
+
+ if ( hasAllowedRoles )
+ {
+ for ( final String roleName : allowedRoles.value() )
+ {
+ final SecurityRoleMetaData securityRoleMD = new SecurityRoleMetaData();
+
+ securityRoleMD.setRoleName( roleName );
+ securityRolesMD.add( securityRoleMD );
+ }
+ }
+ }
+
+ return securityRolesMD;
+ }
+
+ /**
+ * Returns security domain value. This method checks domain is the same for every EJB 3 endpoint.
+ *
+ * @param oldSecurityDomain our security domain
+ * @param nextSecurityDomain next security domain
+ * @return security domain value
+ * @throws IllegalStateException if domains have different values
+ */
+ private String getDomain( final String oldSecurityDomain, final SecurityDomain nextSecurityDomain )
+ {
+ if ( nextSecurityDomain == null )
+ {
+ return oldSecurityDomain;
+ }
+
+ if ( oldSecurityDomain == null )
+ {
+ return nextSecurityDomain.value();
+ }
+
+ this.ensureSameDomains( oldSecurityDomain, nextSecurityDomain.value() );
+
+ return oldSecurityDomain;
+ }
+
+ /**
+ * This method ensures both passed domains contain the same value.
+ *
+ * @param oldSecurityDomain our security domain
+ * @param newSecurityDomain next security domain
+ * @throws IllegalStateException if domains have different values
+ */
+ private void ensureSameDomains( final String oldSecurityDomain, final String newSecurityDomain )
+ {
+ final boolean domainsDiffer = !oldSecurityDomain.equals( newSecurityDomain );
+
+ if ( domainsDiffer )
+ {
+ throw new IllegalStateException
+ (
+ "Multiple security domains not supported. " +
+ "First domain: '" + oldSecurityDomain + "' " +
+ "second domain: '" + newSecurityDomain + "'"
+ );
+ }
+ }
+
+}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataCreatingDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -26,6 +26,7 @@
import java.util.List;
import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.metadata.javaee.spec.SecurityRolesMetaData;
import org.jboss.metadata.web.jboss.JBossServletMetaData;
import org.jboss.metadata.web.jboss.JBossServletsMetaData;
import org.jboss.metadata.web.jboss.JBossWebMetaData;
@@ -55,11 +56,11 @@
public final class WebMetaDataCreatingDeploymentAspect extends DeploymentAspect
{
- /** EJB 21 security builder. */
- private SecurityBuilder securityBuilderEJB21;
+ /** EJB 21 security meta data builder. */
+ private SecurityMetaDataAccessorEJB ejb21SecurityAccessor = new SecurityMetaDataAccessorEJB21();
- /** EJB 3 security builder. */
- private SecurityBuilder securityBuilderEJB3;
+ /** EJB 3 security meta data builder. */
+ private SecurityMetaDataAccessorEJB ejb3SecurityAccessor = new SecurityMetaDataAccessorEJB3();
/**
* Constructor.
@@ -70,26 +71,6 @@
}
/**
- * Sets EJB 21 security builder. This method is called using MC injection.
- *
- * @param builder EJB 21 security builder
- */
- public void setSecurityBuilderEJB21( final SecurityBuilder builder )
- {
- this.securityBuilderEJB21 = builder;
- }
-
- /**
- * Sets EJB 3 security builder. This method is called using MC injection.
- *
- * @param builder EJB 3 security builder
- */
- public void setSecurityBuilderEJB3( final SecurityBuilder builder )
- {
- this.securityBuilderEJB3 = builder;
- }
-
- /**
* Creates web meta data for EJB deployments.
*
* @param dep webservice deployment
@@ -124,43 +105,11 @@
return jbossWebMD;
}
- private void createWebAppDescriptor( final Deployment dep, final JBossWebMetaData jbwmd )
+ private void createWebAppDescriptor( final Deployment dep, final JBossWebMetaData jbossWebMD )
{
- /*
- <servlet>
- <servlet-name>
- <servlet-class>
- </servlet>
- */
- JBossServletsMetaData servlets = jbwmd.getServlets();
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- JBossServletMetaData servlet = new JBossServletMetaData();
- servlet.setServletName(ep.getShortName());
- servlet.setServletClass(ep.getTargetBeanName());
- servlets.add(servlet);
- }
+ this.createServlets( dep, jbossWebMD );
+ this.createServletMappings( dep, jbossWebMD );
- /*
- <servlet-mapping>
- <servlet-name>
- <url-pattern>
- </servlet-mapping>
- */
- for (Endpoint ep : dep.getService().getEndpoints())
- {
- List<ServletMappingMetaData> servletMappings = jbwmd.getServletMappings();
- if (servletMappings == null)
- {
- servletMappings = new ArrayList<ServletMappingMetaData>();
- jbwmd.setServletMappings(servletMappings);
- }
- ServletMappingMetaData servletMapping = new ServletMappingMetaData();
- servletMapping.setServletName(ep.getShortName());
- servletMapping.setUrlPatterns(Arrays.asList(new String[] { ep.getURLPattern() }));
- servletMappings.add(servletMapping);
- }
-
String authMethod = null;
// Add web-app/security-constraint for each port component
@@ -168,34 +117,11 @@
{
String ejbName = ep.getShortName();
- Boolean secureWSDLAccess = null;
- String transportGuarantee = null;
- String beanAuthMethod = null;
+ final SecurityMetaDataAccessorEJB ejbMDAccessor = this.getEjbSecurityMetaDataAccessor( dep );
+ Boolean secureWSDLAccess = ejbMDAccessor.isSecureWsdlAccess( ep );
+ String transportGuarantee = ejbMDAccessor.getTransportGuarantee( ep );
+ String beanAuthMethod = ejbMDAccessor.getAuthMethod( ep );
- WebContext anWebContext = (WebContext)ep.getTargetBeanClass().getAnnotation(WebContext.class);
- if (anWebContext != null)
- {
- if (anWebContext.authMethod().length() > 0)
- beanAuthMethod = anWebContext.authMethod();
- if (anWebContext.transportGuarantee().length() > 0)
- transportGuarantee = anWebContext.transportGuarantee();
- if (anWebContext.secureWSDLAccess())
- secureWSDLAccess = anWebContext.secureWSDLAccess();
- }
-
- EJBArchiveMetaData appMetaData = WSHelper.getOptionalAttachment( dep, EJBArchiveMetaData.class );
- if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) != null)
- {
- EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- EJBSecurityMetaData smd = bmd.getSecurityMetaData();
- if (smd != null)
- {
- beanAuthMethod = smd.getAuthMethod();
- transportGuarantee = smd.getTransportGuarantee();
- secureWSDLAccess = smd.getSecureWSDLAccess();
- }
- }
-
if (beanAuthMethod != null || transportGuarantee != null)
{
/*
@@ -212,11 +138,11 @@
</user-data-constraint>
</security-constraint>
*/
- List<SecurityConstraintMetaData> securityContraints = jbwmd.getSecurityContraints();
+ List<SecurityConstraintMetaData> securityContraints = jbossWebMD.getSecurityContraints();
if (securityContraints == null)
{
securityContraints = new ArrayList<SecurityConstraintMetaData>();
- jbwmd.setSecurityContraints(securityContraints);
+ jbossWebMD.setSecurityContraints(securityContraints);
}
SecurityConstraintMetaData securityConstraint = new SecurityConstraintMetaData();
securityContraints.add(securityConstraint);
@@ -264,17 +190,16 @@
// Optional login-config/auth-method
if (authMethod != null)
{
- LoginConfigMetaData loginConfig = jbwmd.getLoginConfig();
+ LoginConfigMetaData loginConfig = jbossWebMD.getLoginConfig();
if (loginConfig == null)
{
loginConfig = new LoginConfigMetaData();
- jbwmd.setLoginConfig(loginConfig);
+ jbossWebMD.setLoginConfig(loginConfig);
}
loginConfig.setAuthMethod(authMethod);
loginConfig.setRealmName("EJBServiceEndpointServlet Realm");
- final SecurityBuilder securityBuilder = this.getSecurityBuilder( dep );
- securityBuilder.addSecurityRoles(jbwmd, dep);
+ this.setSecurityRoles(jbossWebMD, dep);
}
}
@@ -295,8 +220,7 @@
private void createJBossWebAppDescriptor( final Deployment dep, final JBossWebMetaData jbossWebMD )
{
// Set security domain
- final SecurityBuilder securityBuilder = this.getSecurityBuilder( dep );
- securityBuilder.addSecurityDomain( jbossWebMD, dep );
+ this.setSecurityDomain( jbossWebMD, dep );
// Set context root
final String contextRoot = dep.getService().getContextRoot();
@@ -313,11 +237,137 @@
* @param dep webservice EJB deployment
* @return security builder for EJB deployment
*/
- private SecurityBuilder getSecurityBuilder( final Deployment dep )
+ private SecurityMetaDataAccessorEJB getEjbSecurityMetaDataAccessor( final Deployment dep )
{
final boolean isJaxws = WSHelper.isJaxwsDeployment( dep );
- return isJaxws ? this.securityBuilderEJB3 : this.securityBuilderEJB21;
+ return isJaxws ? this.ejb3SecurityAccessor : this.ejb21SecurityAccessor;
}
+
+ /**
+ * Creates servlets part of web.xml descriptor.
+ *
+ * <pre>
+ * <servlet>
+ * <servlet-name>WSEndpointShortName</servlet-name>
+ * <servlet-class>WSEndpointTargetBeanName</servlet-class>
+ * </servlet>
+ * </pre>
+ *
+ * @param dep webservice deployemnt
+ * @param jbossWebMD jboss web meta data
+ */
+ private void createServlets( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ {
+ final JBossServletsMetaData servlets = this.getServlets( jbossWebMD );
+ for ( final Endpoint endpoint : dep.getService().getEndpoints() )
+ {
+ final JBossServletMetaData servlet = new JBossServletMetaData();
+ servlet.setServletName( endpoint.getShortName() );
+ servlet.setServletClass( endpoint.getTargetBeanName() );
+
+ servlets.add( servlet );
+ }
+ }
+
+ /**
+ * Creates servlet-mapping part of web.xml descriptor.
+ *
+ * <pre>
+ * <servlet-mapping>
+ * <servlet-name>WSEndpointShortName</servlet-name>
+ * <url-pattern>WSEndpointURLPattern</url-pattern>
+ * </servlet-mapping>
+ * </pre>
+ *
+ * @param dep webservice deployemnt
+ * @param jbossWebMD jboss web meta data
+ */
+ private void createServletMappings( final Deployment dep, final JBossWebMetaData jbossWebMD )
+ {
+ final List< ServletMappingMetaData > servletMappings = this.getServletMappings( jbossWebMD );
+
+ for ( final Endpoint ep : dep.getService().getEndpoints() )
+ {
+ final ServletMappingMetaData servletMapping = new ServletMappingMetaData();
+ servletMapping.setServletName( ep.getShortName() );
+ servletMapping.setUrlPatterns( Arrays.asList( new String[] { ep.getURLPattern() } ) ); // TODO:
+
+ servletMappings.add( servletMapping );
+ }
+ }
+
+ /**
+ * Gests servlets meta data from jboss web meta data.
+ * If not found it creates new servlets meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlets meta data
+ */
+ private JBossServletsMetaData getServlets( final JBossWebMetaData jbossWebMD )
+ {
+ JBossServletsMetaData servlets = jbossWebMD.getServlets();
+ if ( servlets == null )
+ {
+ servlets = new JBossServletsMetaData();
+ jbossWebMD.setServlets( servlets );
+ }
+
+ return servlets;
+ }
+
+ /**
+ * Gests servlet mappings meta data from jboss web meta data.
+ * If not found it creates new servlet mappings meta data
+ * and associates them with jboss web meta data.
+ *
+ * @param jbossWebMD jboss web meta data
+ * @return servlet mappings meta data
+ */
+ private List< ServletMappingMetaData > getServletMappings( final JBossWebMetaData jbossWebMD )
+ {
+ List< ServletMappingMetaData > servletMappings = jbossWebMD.getServletMappings();
+ if ( servletMappings == null )
+ {
+ servletMappings = new ArrayList< ServletMappingMetaData >();
+ jbossWebMD.setServletMappings( servletMappings );
+ }
+
+ return servletMappings;
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#addSecurityDomain(JBossWebMetaData, Deployment)
+ *
+ * @param jbossWebMD jboss web meta data
+ * @param dep webservice deployment
+ */
+ public final void setSecurityDomain( final JBossWebMetaData jbossWebMD, final Deployment dep )
+ {
+ final String securityDomain = this.getEjbSecurityMetaDataAccessor( dep ).getSecurityDomain( dep ); // TODO: review (javadoc)
+
+ if ( securityDomain != null )
+ {
+ jbossWebMD.setSecurityDomain( securityDomain );
+ }
+ }
+
+ /**
+ * @see org.jboss.webservices.integration.tomcat.SecurityMetaDataAccessorEJB#addSecurityRoles(JBossWebMetaData, Deployment)
+ *
+ * @param jbossWebMD jboss web meta data
+ * @param dep webservice deployment
+ */
+ public final void setSecurityRoles( final JBossWebMetaData jbossWebMD, final Deployment dep )
+ {
+ final SecurityRolesMetaData securityRolesMD = this.getEjbSecurityMetaDataAccessor( dep ).getSecurityRoles( dep ); // TODO: review (javadoc)
+
+ if ( securityRolesMD != null )
+ {
+ jbossWebMD.setSecurityRoles( securityRolesMD );
+ }
+ }
+
}
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifier.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -44,7 +44,7 @@
* @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
* @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
*/
-public final class WebMetaDataModifier
+final class WebMetaDataModifier
{
/**
Modified: container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/java/org/jboss/webservices/integration/tomcat/WebMetaDataModifyingDeploymentAspect.java 2009-08-05 09:50:33 UTC (rev 10489)
@@ -34,7 +34,7 @@
{
/** Web meta data modifier. */
- private WebMetaDataModifier webMetaDataModifier;
+ private WebMetaDataModifier webMetaDataModifier = new WebMetaDataModifier();
/**
* Constructor.
@@ -45,16 +45,6 @@
}
/**
- * Sets Web meta data modifier. This method is called using MC injection.
- *
- * @param webMDModifier web meta data modifier
- */
- public void setWebMetaDataModifier( final WebMetaDataModifier webMDModifier )
- {
- this.webMetaDataModifier = webMDModifier;
- }
-
- /**
* Modifies web meta data.
*
* @param dep webservice deployment
Modified: container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-08-05 08:55:51 UTC (rev 10488)
+++ container/jboss50/branches/ropalka-jboss510/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-08-05 09:50:33 UTC (rev 10489)
@@ -54,20 +54,16 @@
</bean>
<!-- WSDeploymentAspectDeployers factory -->
- <bean name="WSDeployersFactory" class="org.jboss.webservices.integration.deployers.WSDeployersFactory">
+ <bean name="WSAspectizedDeployersFactory" class="org.jboss.webservices.integration.deployers.WSAspectizedDeployersFactory">
<constructor>
<parameter>
<inject bean="Deployers"/>
</parameter>
</constructor>
- <incallback method="newDeployer"/>
+ <incallback method="addDeployer"/>
+ <uncallback method="removeDeployer"/>
</bean>
- <!-- Deployment aspect helper beans -->
- <bean name="WSSecurityBuilderEJB21" class="org.jboss.webservices.integration.tomcat.SecurityBuilderEJB21"/>
- <bean name="WSSecurityBuilderEJB3" class="org.jboss.webservices.integration.tomcat.SecurityBuilderEJB3"/>
- <bean name="WSWebMetaDataModifier" class="org.jboss.webservices.integration.tomcat.WebMetaDataModifier"/>
-
<!-- The AS specific deployment aspects -->
<bean name="WSContainerMetaDataDeploymentAspect" class="org.jboss.webservices.integration.metadata.ContainerMetaDataDeploymentAspect">
<property name="provides">ContainerMetaData, VFSRoot</property>
@@ -138,15 +134,12 @@
<bean name="WSWebMetaDataModifyingDeploymentAspect" class="org.jboss.webservices.integration.tomcat.WebMetaDataModifyingDeploymentAspect">
<property name="requires">WebMetaData, ContextProperties, StackDescriptor</property>
<property name="provides">WebMetaData</property>
- <property name="webMetaDataModifier"><inject bean="WSWebMetaDataModifier"/></property>
<property name="relativeOrder">33</property> <!-- [JBDEPLOY-201] workaround -->
</bean>
<bean name="WSWebMetaDataCreatingDeploymentAspect" class="org.jboss.webservices.integration.tomcat.WebMetaDataCreatingDeploymentAspect">
<property name="requires">VirtualHosts,URLPattern</property>
<property name="provides">WebMetaData</property>
- <property name="securityBuilderEJB21"><inject bean="WSSecurityBuilderEJB21"/></property>
- <property name="securityBuilderEJB3"><inject bean="WSSecurityBuilderEJB3"/></property>
<property name="relativeOrder">32</property> <!-- [JBDEPLOY-201] workaround -->
</bean>
14 years, 9 months
JBossWS SVN: r10488 - in stack/cxf/trunk/modules: server/src/main/resources/jbossws-cxf.sar/META-INF/services and 1 other directory.
by jbossws-commits@lists.jboss.org
Author: alessio.soldano(a)jboss.com
Date: 2009-08-05 04:55:51 -0400 (Wed, 05 Aug 2009)
New Revision: 10488
Modified:
stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin
Log:
[JBWS-2707] Removing empty lines from xjc plugin conf causing CNFE on JDK 1.5
Modified: stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin
===================================================================
--- stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin 2009-08-04 16:58:40 UTC (rev 10487)
+++ stack/cxf/trunk/modules/client/src/main/resources/META-INF/services/com.sun.tools.xjc.Plugin 2009-08-05 08:55:51 UTC (rev 10488)
@@ -1,6 +1,3 @@
com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin
-
com.sun.tools.xjc.addon.apache_cxf.bug671.Bug671Plugin
-
-com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
-
+com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
\ No newline at end of file
Modified: stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin
===================================================================
--- stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin 2009-08-04 16:58:40 UTC (rev 10487)
+++ stack/cxf/trunk/modules/server/src/main/resources/jbossws-cxf.sar/META-INF/services/com.sun.tools.xjc.Plugin 2009-08-05 08:55:51 UTC (rev 10488)
@@ -1,6 +1,3 @@
com.sun.tools.xjc.addon.apache_cxf.ts.ToStringPlugin
-
com.sun.tools.xjc.addon.apache_cxf.bug671.Bug671Plugin
-
-com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
-
+com.sun.tools.xjc.addon.apache_cxf.dv.DefaultValuePlugin
\ No newline at end of file
14 years, 9 months