Author: thomas.diesler(a)jboss.com
Date: 2007-07-27 00:37:52 -0400 (Fri, 27 Jul 2007)
New Revision: 4013
Added:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataDeploymentAspect.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JSEArchiveMetaDataAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/MDBMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java
Removed:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/ApplicationMetaDataAdapterEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapterFactory.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB3.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdapter.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedApplicationMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedBeanMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedMessageDrivenMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedSessionMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebMetaData.java
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebSecurityMetaData.java
Modified:
trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
Log:
Refactor container meta data
Deleted:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/ApplicationMetaDataAdapterEJB21.java
===================================================================
---
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/ApplicationMetaDataAdapterEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/ApplicationMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,82 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss40;
-
-// $Id$
-
-import org.jboss.metadata.BeanMetaData;
-import org.jboss.metadata.EjbPortComponentMetaData;
-import org.jboss.metadata.MessageDrivenMetaData;
-import org.jboss.metadata.SessionMetaData;
-import org.jboss.wsf.container.jboss42.AbstractApplicationMetaDataAdapter;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedSessionMetaData;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ApplicationMetaDataAdapterEJB21 extends AbstractApplicationMetaDataAdapter
-{
- @Override
- protected UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
- {
- UnifiedBeanMetaData ubmd = null;
- if (bmd instanceof SessionMetaData)
- {
- ubmd = new UnifiedSessionMetaData();
- }
- else if (bmd instanceof MessageDrivenMetaData)
- {
- ubmd = new UnifiedMessageDrivenMetaData();
-
((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
- }
-
- if (ubmd != null)
- {
- ubmd.setEjbName(bmd.getEjbName());
- ubmd.setEjbClass(bmd.getEjbClass());
- ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
- ubmd.setHome(bmd.getHome());
- ubmd.setLocalHome(bmd.getLocalHome());
- ubmd.setJndiName(bmd.getJndiName());
- ubmd.setLocalJndiName(bmd.getLocalJndiName());
-
- EjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- UnifiedEjbPortComponentMetaData upcmd = new
UnifiedEjbPortComponentMetaData();
- upcmd.setPortComponentName(pcmd.getPortComponentName());
- upcmd.setPortComponentURI(pcmd.getPortComponentURI());
- upcmd.setAuthMethod(pcmd.getAuthMethod());
- upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
- //upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
- ubmd.setPortComponent(upcmd);
- }
- }
- return ubmd;
- }
-}
Copied:
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java
(from rev 4012,
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/ApplicationMetaDataAdapterEJB21.java)
===================================================================
---
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java
(rev 0)
+++
trunk/integration/jboss40/src/main/java/org/jboss/wsf/container/jboss40/EJBArchiveMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,82 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss40;
+
+// $Id$
+
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
+import org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBArchiveMetaDataAdapterEJB21 extends EJBArchiveMetaDataAdapter
+{
+ @Override
+ protected EJBMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+ {
+ EJBMetaData ubmd = null;
+ if (bmd instanceof SessionMetaData)
+ {
+ ubmd = new SLSBMetaData();
+ }
+ else if (bmd instanceof MessageDrivenMetaData)
+ {
+ ubmd = new MDBMetaData();
+
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(bmd.getEjbName());
+ ubmd.setEjbClass(bmd.getEjbClass());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+ ubmd.setHome(bmd.getHome());
+ ubmd.setLocalHome(bmd.getLocalHome());
+ ubmd.setJndiName(bmd.getJndiName());
+ ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+ EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ ubmd.setPortComponentName(pcmd.getPortComponentName());
+ ubmd.setPortComponentURI(pcmd.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcmd.getAuthMethod());
+ smd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ //smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ ubmd.setSecurityMetaData(smd);
+ }
+ }
+ return ubmd;
+ }
+}
Modified: trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml
===================================================================
--- trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-27
03:15:32 UTC (rev 4012)
+++ trunk/integration/jboss40/src/main/resources/jbossws-jboss40-config.xml 2007-07-27
04:37:52 UTC (rev 4013)
@@ -80,6 +80,11 @@
<!--
The container deployment aspects
-->
+ <bean name="WSContainerMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss42.ContainerMetaDataDeploymentAspect">
+ <property name="provides">ContainerMetaData</property>
+ <property name="metaDataAdapter"><inject
bean="WSContainerMetaDataAdapter"/></property>
+ </bean>
+
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
@@ -118,11 +123,6 @@
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
</bean>
- <bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss42.UnifiedDeploymentInfoDeploymentAspect">
- <property name="provides">ContainerMetaData</property>
- <property name="deploymentInfoAdapter"><inject
bean="WSDeploymentInfoAdapter"/></property>
- </bean>
-
<bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
@@ -141,9 +141,9 @@
</bean>
<!-- Deployment aspect helper beans -->
- <bean name="WSApplicationMetaDataAdapterEJB21"
class="org.jboss.wsf.container.jboss40.ApplicationMetaDataAdapterEJB21"/>
- <bean name="WSApplicationMetaDataAdapterEJB3"
class="org.jboss.wsf.container.jboss42.ApplicationMetaDataAdapterEJB3"/>
- <bean name="WSDeploymentInfoAdapter"
class="org.jboss.wsf.container.jboss42.DeploymentInfoAdapter">
+ <bean name="WSApplicationMetaDataAdapterEJB21"
class="org.jboss.wsf.container.jboss40.EJBArchiveMetaDataAdapterEJB21"/>
+ <bean name="WSApplicationMetaDataAdapterEJB3"
class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB3"/>
+ <bean name="WSContainerMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.ContainerMetaDataAdapter">
<property name="applicationMetaDataAdapterEJB21"><inject
bean="WSApplicationMetaDataAdapterEJB21"/></property>
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
@@ -153,7 +153,7 @@
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSServiceRefMetaDataAdapter"
class="org.jboss.wsf.container.jboss40.ServiceRefMetaDataAdapter"/>
<bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.framework.deployment.DefaultWebAppDesciptorModifierImpl"/>
- <bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.WebMetaDataAdapter"/>
+ <bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.JSEArchiveMetaDataAdapter"/>
<bean name="WSWebXMLRewriter"
class="org.jboss.wsf.framework.deployment.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
@@ -163,6 +163,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -171,7 +172,6 @@
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
@@ -180,6 +180,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -187,7 +188,6 @@
<inject bean="WSEndpointMetricsDeploymentAspect"/>
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
<inject bean="WSWebAppDeploymentAspect"/>
<inject bean="WSWebAppGeneratorDeploymentAspect"/>
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/AbstractApplicationMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,89 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.BeanMetaData;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public abstract class AbstractApplicationMetaDataAdapter
-{
- public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentInfo di)
- {
- ApplicationMetaData apmd = (ApplicationMetaData)di.metaData;
- dep.addAttachment(ApplicationMetaData.class, apmd);
-
- UnifiedApplicationMetaData appMetaData = new UnifiedApplicationMetaData();
- buildUnifiedBeanMetaData(appMetaData, apmd);
- appMetaData.setConfigName(apmd.getConfigName());
- appMetaData.setConfigFile(apmd.getConfigFile());
- appMetaData.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
- appMetaData.setSecurityDomain(apmd.getSecurityDomain());
- appMetaData.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
- return appMetaData;
- }
-
- protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData
apmd)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return apmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- protected void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd,
ApplicationMetaData metaData)
- {
- List<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
- Iterator it = metaData.getEnterpriseBeans();
- while (it.hasNext())
- {
- BeanMetaData bmd = (BeanMetaData)it.next();
- UnifiedBeanMetaData ubmd = buildUnifiedBeanMetaData(bmd);
- if (ubmd != null)
- {
- beans.add(ubmd);
- }
- }
- umd.setEnterpriseBeans(beans);
- }
-
- protected abstract UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
-}
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,81 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import org.jboss.metadata.BeanMetaData;
-import org.jboss.metadata.EjbPortComponentMetaData;
-import org.jboss.metadata.MessageDrivenMetaData;
-import org.jboss.metadata.SessionMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedSessionMetaData;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ApplicationMetaDataAdapterEJB21 extends AbstractApplicationMetaDataAdapter
-{
- @Override
- protected UnifiedBeanMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
- {
- UnifiedBeanMetaData ubmd = null;
- if (bmd instanceof SessionMetaData)
- {
- ubmd = new UnifiedSessionMetaData();
- }
- else if (bmd instanceof MessageDrivenMetaData)
- {
- ubmd = new UnifiedMessageDrivenMetaData();
-
((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
- }
-
- if (ubmd != null)
- {
- ubmd.setEjbName(bmd.getEjbName());
- ubmd.setEjbClass(bmd.getEjbClass());
- ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
- ubmd.setHome(bmd.getHome());
- ubmd.setLocalHome(bmd.getLocalHome());
- ubmd.setJndiName(bmd.getJndiName());
- ubmd.setLocalJndiName(bmd.getLocalJndiName());
-
- EjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- UnifiedEjbPortComponentMetaData upcmd = new
UnifiedEjbPortComponentMetaData();
- upcmd.setPortComponentName(pcmd.getPortComponentName());
- upcmd.setPortComponentURI(pcmd.getPortComponentURI());
- upcmd.setAuthMethod(pcmd.getAuthMethod());
- upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
- upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
- ubmd.setPortComponent(upcmd);
- }
- }
- return ubmd;
- }
-}
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,103 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import java.util.ArrayList;
-
-import javax.management.MBeanServer;
-import javax.management.ObjectName;
-
-import org.jboss.ejb3.Ejb3ModuleMBean;
-import org.jboss.ejb3.stateless.StatelessContainer;
-import org.jboss.logging.Logger;
-import org.jboss.mx.util.MBeanProxy;
-import org.jboss.mx.util.MBeanProxyCreationException;
-import org.jboss.mx.util.MBeanServerLocator;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.WSFDeploymentException;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedSessionMetaData;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Apr-2007
- */
-public class ApplicationMetaDataAdapterEJB3
-{
- // logging support
- private static Logger log = Logger.getLogger(ApplicationMetaDataAdapterEJB3.class);
-
- public static final String DEPLOYED_OBJECT =
"org.jboss.ws.ejb3.deployed.object";
-
- public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep)
- {
- UnifiedApplicationMetaData appMetaData = null;
-
- ObjectName oname = (ObjectName)dep.getProperty(DEPLOYED_OBJECT);
-
- // jboss.j2ee:service=EJB3,module=some-ejb3.jar
- if (oname != null && oname.getDomain().equals("jboss.j2ee")
&& "EJB3".equals(oname.getKeyProperty("service")))
- {
- Ejb3ModuleMBean ejb3Module = getEJB3Module(oname);
-
- ArrayList<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
- for (Object container : ejb3Module.getContainers().values())
- {
- if (container instanceof StatelessContainer)
- {
- StatelessContainer slc = (StatelessContainer)container;
- UnifiedBeanMetaData usmd = new UnifiedSessionMetaData();
- usmd.setEjbName(slc.getEjbName());
- usmd.setEjbClass(slc.getBeanClassName());
- beans.add(usmd);
- }
- }
-
- appMetaData = new UnifiedApplicationMetaData();
- appMetaData.setEnterpriseBeans(beans);
- }
- return appMetaData;
- }
-
- static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
- {
- Ejb3ModuleMBean ejb3Module;
- try
- {
- MBeanServer server = MBeanServerLocator.locateJBoss();
- ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
- if (ejb3Module == null)
- throw new WSFDeploymentException("Cannot obtain EJB3 module: " +
objectName);
-
- return ejb3Module;
- }
- catch (MBeanProxyCreationException ex)
- {
- throw new WSFDeploymentException("Cannot obtain proxy to EJB3
module");
- }
- }
-}
Copied:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
(from rev 4012,
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java)
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,117 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.io.File;
+import java.net.MalformedURLException;
+import java.net.URL;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.framework.deployment.WebXMLRewriter;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ContainerMetaDataAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ContainerMetaDataAdapter.class);
+
+ private EJBArchiveMetaDataAdapterEJB3 applicationMetaDataAdapterEJB3;
+ private EJBArchiveMetaDataAdapter applicationMetaDataAdapterEJB21;
+ private JSEArchiveMetaDataAdapter webMetaDataAdapter;
+
+ public void setApplicationMetaDataAdapterEJB21(EJBArchiveMetaDataAdapter adapter)
+ {
+ this.applicationMetaDataAdapterEJB21 = adapter;
+ }
+
+ public void setApplicationMetaDataAdapterEJB3(EJBArchiveMetaDataAdapterEJB3 adapter)
+ {
+ this.applicationMetaDataAdapterEJB3 = adapter;
+ }
+
+ public void setWebMetaDataAdapter(JSEArchiveMetaDataAdapter adapter)
+ {
+ this.webMetaDataAdapter = adapter;
+ }
+
+ public void buildContainerMetaData(Deployment dep, DeploymentInfo di)
+ {
+ dep.addAttachment(DeploymentInfo.class, di);
+ dep.setProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT, di.deployedObject);
+
+ if (di.metaData instanceof WebMetaData)
+ {
+ JSEArchiveMetaData webMetaData = webMetaDataAdapter.buildUnifiedWebMetaData(dep,
di);
+ if (webMetaData != null)
+ dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
+
+ dep.setProperty(WebXMLRewriter.WEBAPP_URL, getDeploymentURL(di));
+ }
+ else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() ==
DeploymentType.JAXWS_EJB3)
+ {
+ EJBArchiveMetaData appMetaData =
applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+ else if (di.metaData instanceof ApplicationMetaData)
+ {
+ EJBArchiveMetaData appMetaData =
applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, di);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+ }
+
+ private URL getDeploymentURL(DeploymentInfo di)
+ {
+ URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
+ if ("file".equals(deploymentURL.getProtocol()))
+ {
+ String path = deploymentURL.getPath();
+ if (new File(path).isFile())
+ {
+ try
+ {
+ deploymentURL = new URL("jar:file:" + path + "!/");
+ }
+ catch (MalformedURLException e)
+ {
+ // ignore
+ }
+ }
+ }
+ return deploymentURL;
+ }
+}
Copied:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataDeploymentAspect.java
(from rev 4012,
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java)
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataDeploymentAspect.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ContainerMetaDataDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+//$Id: UnifiedDeploymentInfoDeployer.java 3407 2007-06-03 16:06:36Z
thomas.diesler(a)jboss.com $
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ContainerMetaDataDeploymentAspect extends DeploymentAspect
+{
+ private ContainerMetaDataAdapter metaDataAdapter;
+
+ public void setMetaDataAdapter(ContainerMetaDataAdapter adapter)
+ {
+ this.metaDataAdapter = adapter;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ DeploymentInfo di = dep.getAttachment(DeploymentInfo.class);
+ if (di == null)
+ throw new IllegalStateException("Cannot obtain deployment info");
+
+ metaDataAdapter.buildContainerMetaData(dep, di);
+ }
+}
\ No newline at end of file
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,117 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import java.io.File;
-import java.net.MalformedURLException;
-import java.net.URL;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.Deployment.DeploymentType;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-
-/**
- * Build container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class DeploymentInfoAdapter
-{
- // logging support
- private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
-
- private ApplicationMetaDataAdapterEJB3 applicationMetaDataAdapterEJB3;
- private AbstractApplicationMetaDataAdapter applicationMetaDataAdapterEJB21;
- private WebMetaDataAdapter webMetaDataAdapter;
-
- public void setApplicationMetaDataAdapterEJB21(AbstractApplicationMetaDataAdapter
adapter)
- {
- this.applicationMetaDataAdapterEJB21 = adapter;
- }
-
- public void setApplicationMetaDataAdapterEJB3(ApplicationMetaDataAdapterEJB3 adapter)
- {
- this.applicationMetaDataAdapterEJB3 = adapter;
- }
-
- public void setWebMetaDataAdapter(WebMetaDataAdapter adapter)
- {
- this.webMetaDataAdapter = adapter;
- }
-
- public void buildDeploymentInfo(Deployment dep, DeploymentInfo di)
- {
- dep.addAttachment(DeploymentInfo.class, di);
- dep.setProperty(ApplicationMetaDataAdapterEJB3.DEPLOYED_OBJECT,
di.deployedObject);
-
- if (di.metaData instanceof WebMetaData)
- {
- UnifiedWebMetaData webMetaData = webMetaDataAdapter.buildUnifiedWebMetaData(dep,
di);
- if (webMetaData != null)
- dep.addAttachment(UnifiedWebMetaData.class, webMetaData);
-
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, getDeploymentURL(di));
- }
- else if (dep.getType() == DeploymentType.JAXRPC_EJB3 || dep.getType() ==
DeploymentType.JAXWS_EJB3)
- {
- UnifiedApplicationMetaData appMetaData =
applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep);
- if (appMetaData != null)
- dep.addAttachment(UnifiedApplicationMetaData.class, appMetaData);
- }
- else if (di.metaData instanceof ApplicationMetaData)
- {
- UnifiedApplicationMetaData appMetaData =
applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, di);
- if (appMetaData != null)
- dep.addAttachment(UnifiedApplicationMetaData.class, appMetaData);
- }
- }
-
- private URL getDeploymentURL(DeploymentInfo di)
- {
- URL deploymentURL = (di.localUrl != null ? di.localUrl : di.url);
- if ("file".equals(deploymentURL.getProtocol()))
- {
- String path = deploymentURL.getPath();
- if (new File(path).isFile())
- {
- try
- {
- deploymentURL = new URL("jar:file:" + path + "!/");
- }
- catch (MalformedURLException e)
- {
- // ignore
- }
- }
- }
- return deploymentURL;
- }
-}
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapterFactory.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapterFactory.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/DeploymentInfoAdapterFactory.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import org.jboss.kernel.spi.registry.KernelRegistry;
-import org.jboss.kernel.spi.registry.KernelRegistryEntry;
-import org.jboss.ws.integration.KernelLocator;
-
-/**
- * @author Thomas.Diesler(a)jboss.org
- * @since 10-Mar-2007
- */
-public class DeploymentInfoAdapterFactory
-{
- // Hide ctor
- private DeploymentInfoAdapterFactory()
- {
- }
-
- public static DeploymentInfoAdapter getDeploymentInfoAdapter()
- {
- KernelRegistry registry = KernelLocator.getKernel().getRegistry();
- KernelRegistryEntry entry =
registry.getEntry("WSDeploymentInfoAdapter");
- return (DeploymentInfoAdapter)entry.getTarget();
- }
-}
Added:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapter.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapter.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public abstract class EJBArchiveMetaDataAdapter
+{
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentInfo di)
+ {
+ ApplicationMetaData apmd = (ApplicationMetaData)di.metaData;
+ dep.addAttachment(ApplicationMetaData.class, apmd);
+
+ EJBArchiveMetaData appMetaData = new EJBArchiveMetaData();
+ buildUnifiedBeanMetaData(appMetaData, apmd);
+ appMetaData.setConfigName(apmd.getConfigName());
+ appMetaData.setConfigFile(apmd.getConfigFile());
+ appMetaData.setWebServiceContextRoot(apmd.getWebServiceContextRoot());
+ appMetaData.setSecurityDomain(apmd.getSecurityDomain());
+ appMetaData.setPublishLocationAdapter(getPublishLocationAdpater(apmd));
+ return appMetaData;
+ }
+
+ protected PublishLocationAdapter getPublishLocationAdpater(final ApplicationMetaData
apmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return apmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ protected void buildUnifiedBeanMetaData(EJBArchiveMetaData umd, ApplicationMetaData
metaData)
+ {
+ List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ Iterator it = metaData.getEnterpriseBeans();
+ while (it.hasNext())
+ {
+ BeanMetaData bmd = (BeanMetaData)it.next();
+ EJBMetaData ubmd = buildUnifiedBeanMetaData(bmd);
+ if (ubmd != null)
+ {
+ beans.add(ubmd);
+ }
+ }
+ umd.setEnterpriseBeans(beans);
+ }
+
+ protected abstract EJBMetaData buildUnifiedBeanMetaData(BeanMetaData bmd);
+}
Copied:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java
(from rev 4012,
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB21.java)
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,81 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import org.jboss.metadata.BeanMetaData;
+import org.jboss.metadata.EjbPortComponentMetaData;
+import org.jboss.metadata.MessageDrivenMetaData;
+import org.jboss.metadata.SessionMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBArchiveMetaDataAdapterEJB21 extends EJBArchiveMetaDataAdapter
+{
+ @Override
+ protected EJBMetaData buildUnifiedBeanMetaData(BeanMetaData bmd)
+ {
+ EJBMetaData ubmd = null;
+ if (bmd instanceof SessionMetaData)
+ {
+ ubmd = new SLSBMetaData();
+ }
+ else if (bmd instanceof MessageDrivenMetaData)
+ {
+ ubmd = new MDBMetaData();
+
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(bmd.getEjbName());
+ ubmd.setEjbClass(bmd.getEjbClass());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+ ubmd.setHome(bmd.getHome());
+ ubmd.setLocalHome(bmd.getLocalHome());
+ ubmd.setJndiName(bmd.getJndiName());
+ ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+ EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ ubmd.setPortComponentName(pcmd.getPortComponentName());
+ ubmd.setPortComponentURI(pcmd.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcmd.getAuthMethod());
+ smd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ ubmd.setSecurityMetaData(smd);
+ }
+ }
+ return ubmd;
+ }
+}
Copied:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB3.java
(from rev 4012,
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/ApplicationMetaDataAdapterEJB3.java)
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB3.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/EJBArchiveMetaDataAdapterEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,103 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.util.ArrayList;
+
+import javax.management.MBeanServer;
+import javax.management.ObjectName;
+
+import org.jboss.ejb3.Ejb3ModuleMBean;
+import org.jboss.ejb3.stateless.StatelessContainer;
+import org.jboss.logging.Logger;
+import org.jboss.mx.util.MBeanProxy;
+import org.jboss.mx.util.MBeanProxyCreationException;
+import org.jboss.mx.util.MBeanServerLocator;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.WSFDeploymentException;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Apr-2007
+ */
+public class EJBArchiveMetaDataAdapterEJB3
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB3.class);
+
+ public static final String DEPLOYED_OBJECT =
"org.jboss.ws.ejb3.deployed.object";
+
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep)
+ {
+ EJBArchiveMetaData appMetaData = null;
+
+ ObjectName oname = (ObjectName)dep.getProperty(DEPLOYED_OBJECT);
+
+ // jboss.j2ee:service=EJB3,module=some-ejb3.jar
+ if (oname != null && oname.getDomain().equals("jboss.j2ee")
&& "EJB3".equals(oname.getKeyProperty("service")))
+ {
+ Ejb3ModuleMBean ejb3Module = getEJB3Module(oname);
+
+ ArrayList<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ for (Object container : ejb3Module.getContainers().values())
+ {
+ if (container instanceof StatelessContainer)
+ {
+ StatelessContainer slc = (StatelessContainer)container;
+ EJBMetaData usmd = new SLSBMetaData();
+ usmd.setEjbName(slc.getEjbName());
+ usmd.setEjbClass(slc.getBeanClassName());
+ beans.add(usmd);
+ }
+ }
+
+ appMetaData = new EJBArchiveMetaData();
+ appMetaData.setEnterpriseBeans(beans);
+ }
+ return appMetaData;
+ }
+
+ static Ejb3ModuleMBean getEJB3Module(ObjectName objectName)
+ {
+ Ejb3ModuleMBean ejb3Module;
+ try
+ {
+ MBeanServer server = MBeanServerLocator.locateJBoss();
+ ejb3Module = (Ejb3ModuleMBean)MBeanProxy.get(Ejb3ModuleMBean.class, objectName,
server);
+ if (ejb3Module == null)
+ throw new WSFDeploymentException("Cannot obtain EJB3 module: " +
objectName);
+
+ return ejb3Module;
+ }
+ catch (MBeanProxyCreationException ex)
+ {
+ throw new WSFDeploymentException("Cannot obtain proxy to EJB3
module");
+ }
+ }
+}
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/InvocationHandlerEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -50,8 +50,8 @@
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
/**
* Handles invocations on EJB21 endpoints.
@@ -86,8 +86,8 @@
{
String ejbName = ep.getShortName();
Deployment dep = ep.getService().getDeployment();
- UnifiedApplicationMetaData apMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JAXWSDeployerHookEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -62,7 +62,7 @@
Service service = dep.getService();
- Ejb3ModuleMBean ejb3Module =
ApplicationMetaDataAdapterEJB3.getEJB3Module(di.deployedObject);
+ Ejb3ModuleMBean ejb3Module =
EJBArchiveMetaDataAdapterEJB3.getEJB3Module(di.deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof EJBContainer)
@@ -93,7 +93,7 @@
boolean isWebserviceDeployment = false;
// Check if the ejb3 contains annotated endpoints
- Ejb3ModuleMBean ejb3Module =
ApplicationMetaDataAdapterEJB3.getEJB3Module(unit.deployedObject);
+ Ejb3ModuleMBean ejb3Module =
EJBArchiveMetaDataAdapterEJB3.getEJB3Module(unit.deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
if (manager instanceof EJBContainer)
Copied:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JSEArchiveMetaDataAdapter.java
(from rev 4012,
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java)
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JSEArchiveMetaDataAdapter.java
(rev 0)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/JSEArchiveMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss42;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.List;
+import java.util.Map;
+import java.util.Map.Entry;
+
+import org.jboss.deployment.DeploymentInfo;
+import org.jboss.deployment.J2eeApplicationMetaData;
+import org.jboss.deployment.J2eeModuleMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JSEArchiveMetaDataAdapter
+{
+ public JSEArchiveMetaData buildUnifiedWebMetaData(Deployment dep, DeploymentInfo di)
+ {
+ String contextRoot = null;
+
+ WebMetaData wmd = (WebMetaData)di.metaData;
+ dep.addAttachment(WebMetaData.class, wmd);
+
+ if (di.parent != null)
+ {
+ J2eeApplicationMetaData appmd = (J2eeApplicationMetaData)di.parent.metaData;
+ Iterator it = appmd.getModules();
+ while (it.hasNext())
+ {
+ J2eeModuleMetaData module = (J2eeModuleMetaData)it.next();
+ if (module.getFileName().equals(dep.getSimpleName()))
+ contextRoot = module.getWebContext();
+ }
+ }
+
+ if (contextRoot == null)
+ contextRoot = wmd.getContextRoot();
+
+ JSEArchiveMetaData webMetaData = new JSEArchiveMetaData();
+ webMetaData.setContextRoot(contextRoot);
+ webMetaData.setServletMappings(wmd.getServletMappings());
+ webMetaData.setServletClassNames(getServletClassMap(wmd));
+ webMetaData.setConfigName(wmd.getConfigName());
+ webMetaData.setConfigFile(wmd.getConfigFile());
+ webMetaData.setSecurityDomain(wmd.getSecurityDomain());
+ webMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
+ webMetaData.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
+
+ return webMetaData;
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return wmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ private List<JSESecurityMetaData> getSecurityMetaData(final Iterator
securityConstraints)
+ {
+ ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new
ArrayList<JSESecurityMetaData>();
+
+ while (securityConstraints.hasNext())
+ {
+ WebSecurityMetaData securityMetaData =
(WebSecurityMetaData)securityConstraints.next();
+
+ JSESecurityMetaData current = new JSESecurityMetaData();
+ unifiedsecurityMetaData.add(current);
+
+ current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+ HashMap resources = securityMetaData.getWebResources();
+ for (Object webResourceObj : resources.values())
+ {
+ WebResourceCollection webResource = (WebResourceCollection)webResourceObj;
+ JSEResourceCollection currentResource =
current.addWebResource(webResource.getName());
+ for (String currentPattern : webResource.getUrlPatterns())
+ {
+ currentResource.addPattern(currentPattern);
+ }
+ }
+
+ }
+
+ return unifiedsecurityMetaData;
+ }
+
+ private Map<String, String> getServletClassMap(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServletClassMap().entrySet().iterator();
+ while (it.hasNext())
+ {
+ Map.Entry entry = (Entry)it.next();
+ String servletName = (String)entry.getKey();
+ String servletClass = (String)entry.getValue();
+ // Skip JSPs
+ if (servletClass != null)
+ mappings.put(servletName, servletClass);
+ }
+ return mappings;
+ }
+}
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -31,7 +31,7 @@
import org.jboss.metadata.AssemblyDescriptorMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.SecurityHandler;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
/**
* Generate a service endpoint deployment for EJB endpoints
@@ -43,7 +43,7 @@
{
public void addSecurityDomain(Element jbossWeb, Deployment dep)
{
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData == null)
throw new IllegalStateException("Cannot obtain application meta
data");
Modified:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/SecurityHandlerEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -50,7 +50,7 @@
{
String securityDomain = null;
- ObjectName deployedObject =
(ObjectName)dep.getProperty(ApplicationMetaDataAdapterEJB3.DEPLOYED_OBJECT);
+ ObjectName deployedObject =
(ObjectName)dep.getProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT);
Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
@@ -81,7 +81,7 @@
public void addSecurityRoles(Element webApp, Deployment dep)
{
// The container objects below provide access to all of the ejb metadata
- ObjectName deployedObject =
(ObjectName)dep.getProperty(ApplicationMetaDataAdapterEJB3.DEPLOYED_OBJECT);
+ ObjectName deployedObject =
(ObjectName)dep.getProperty(EJBArchiveMetaDataAdapterEJB3.DEPLOYED_OBJECT);
Ejb3ModuleMBean ejb3Module = getEJB3Module(deployedObject);
for (Object manager : ejb3Module.getContainers().values())
{
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-//$Id: UnifiedDeploymentInfoDeployer.java 3407 2007-06-03 16:06:36Z
thomas.diesler(a)jboss.com $
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-
-/**
- * A deployer that builds the UnifiedDeploymentInfo
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedDeploymentInfoDeploymentAspect extends DeploymentAspect
-{
- private DeploymentInfoAdapter deploymentInfoAdapter;
-
- public void setDeploymentInfoAdapter(DeploymentInfoAdapter adapter)
- {
- this.deploymentInfoAdapter = adapter;
- }
-
- @Override
- public void create(Deployment dep)
- {
- DeploymentInfo di = dep.getAttachment(DeploymentInfo.class);
- if (di == null)
- throw new IllegalStateException("Cannot obtain deployment info");
-
- deploymentInfoAdapter.buildDeploymentInfo(dep, di);
- }
-}
\ No newline at end of file
Deleted:
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java
===================================================================
---
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss42/src/main/java/org/jboss/wsf/container/jboss42/WebMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss42;
-
-// $Id$
-
-import java.util.ArrayList;
-import java.util.HashMap;
-import java.util.Iterator;
-import java.util.List;
-import java.util.Map;
-import java.util.Map.Entry;
-
-import org.jboss.deployment.DeploymentInfo;
-import org.jboss.deployment.J2eeApplicationMetaData;
-import org.jboss.deployment.J2eeModuleMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.WebSecurityMetaData;
-import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-
-/**
- * Build container independent web meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class WebMetaDataAdapter
-{
- public UnifiedWebMetaData buildUnifiedWebMetaData(Deployment dep, DeploymentInfo di)
- {
- String contextRoot = null;
-
- WebMetaData wmd = (WebMetaData)di.metaData;
- dep.addAttachment(WebMetaData.class, wmd);
-
- if (di.parent != null)
- {
- J2eeApplicationMetaData appmd = (J2eeApplicationMetaData)di.parent.metaData;
- Iterator it = appmd.getModules();
- while (it.hasNext())
- {
- J2eeModuleMetaData module = (J2eeModuleMetaData)it.next();
- if (module.getFileName().equals(dep.getSimpleName()))
- contextRoot = module.getWebContext();
- }
- }
-
- if (contextRoot == null)
- contextRoot = wmd.getContextRoot();
-
- UnifiedWebMetaData webMetaData = new UnifiedWebMetaData();
- webMetaData.setContextRoot(contextRoot);
- webMetaData.setServletMappings(wmd.getServletMappings());
- webMetaData.setServletClassNames(getServletClassMap(wmd));
- webMetaData.setConfigName(wmd.getConfigName());
- webMetaData.setConfigFile(wmd.getConfigFile());
- webMetaData.setSecurityDomain(wmd.getSecurityDomain());
- webMetaData.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
- webMetaData.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
-
- return webMetaData;
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return wmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- private List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator
securityConstraints)
- {
- ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new
ArrayList<UnifiedWebSecurityMetaData>();
-
- while (securityConstraints.hasNext())
- {
- WebSecurityMetaData securityMetaData =
(WebSecurityMetaData)securityConstraints.next();
-
- UnifiedWebSecurityMetaData current = new UnifiedWebSecurityMetaData();
- unifiedsecurityMetaData.add(current);
-
- current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
-
- HashMap resources = securityMetaData.getWebResources();
- for (Object webResourceObj : resources.values())
- {
- WebResourceCollection webResource = (WebResourceCollection)webResourceObj;
- UnifiedWebResourceCollection currentResource =
current.addWebResource(webResource.getName());
- for (String currentPattern : webResource.getUrlPatterns())
- {
- currentResource.addPattern(currentPattern);
- }
- }
-
- }
-
- return unifiedsecurityMetaData;
- }
-
- private Map<String, String> getServletClassMap(WebMetaData wmd)
- {
- Map<String, String> mappings = new HashMap<String, String>();
- Iterator it = wmd.getServletClassMap().entrySet().iterator();
- while (it.hasNext())
- {
- Map.Entry entry = (Entry)it.next();
- String servletName = (String)entry.getKey();
- String servletClass = (String)entry.getValue();
- // Skip JSPs
- if (servletClass != null)
- mappings.put(servletName, servletClass);
- }
- return mappings;
- }
-}
Modified: trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml
===================================================================
--- trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-27
03:15:32 UTC (rev 4012)
+++ trunk/integration/jboss42/src/main/resources/jbossws-jboss42-config.xml 2007-07-27
04:37:52 UTC (rev 4013)
@@ -80,6 +80,11 @@
<!--
The container deployment aspects
-->
+ <bean name="WSContainerMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss42.ContainerMetaDataDeploymentAspect">
+ <property name="provides">ContainerMetaData</property>
+ <property name="metaDataAdapter"><inject
bean="WSContainerMetaDataAdapter"/></property>
+ </bean>
+
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
@@ -117,11 +122,6 @@
<property name="webXMLRewriter"><inject
bean="WSWebXMLRewriter"/></property>
</bean>
- <bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss42.UnifiedDeploymentInfoDeploymentAspect">
- <property name="provides">ContainerMetaData</property>
- <property name="deploymentInfoAdapter"><inject
bean="WSDeploymentInfoAdapter"/></property>
- </bean>
-
<bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
@@ -140,9 +140,9 @@
</bean>
<!-- Deployment aspect helper beans -->
- <bean name="WSApplicationMetaDataAdapterEJB21"
class="org.jboss.wsf.container.jboss42.ApplicationMetaDataAdapterEJB21"/>
- <bean name="WSApplicationMetaDataAdapterEJB3"
class="org.jboss.wsf.container.jboss42.ApplicationMetaDataAdapterEJB3"/>
- <bean name="WSDeploymentInfoAdapter"
class="org.jboss.wsf.container.jboss42.DeploymentInfoAdapter">
+ <bean name="WSApplicationMetaDataAdapterEJB21"
class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB21"/>
+ <bean name="WSApplicationMetaDataAdapterEJB3"
class="org.jboss.wsf.container.jboss42.EJBArchiveMetaDataAdapterEJB3"/>
+ <bean name="WSContainerMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.ContainerMetaDataAdapter">
<property name="applicationMetaDataAdapterEJB21"><inject
bean="WSApplicationMetaDataAdapterEJB21"/></property>
<property name="applicationMetaDataAdapterEJB3"><inject
bean="WSApplicationMetaDataAdapterEJB3"/></property>
<property name="webMetaDataAdapter"><inject
bean="WSWebMetaDataAdapter"/></property>
@@ -151,7 +151,7 @@
<bean name="WSSecurityHandlerEJB21"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB21"/>
<bean name="WSSecurityHandlerEJB3"
class="org.jboss.wsf.container.jboss42.SecurityHandlerEJB3"/>
<bean name="WSWebAppDesciptorModifier"
class="org.jboss.wsf.framework.deployment.DefaultWebAppDesciptorModifierImpl"/>
- <bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.WebMetaDataAdapter"/>
+ <bean name="WSWebMetaDataAdapter"
class="org.jboss.wsf.container.jboss42.JSEArchiveMetaDataAdapter"/>
<bean name="WSWebXMLRewriter"
class="org.jboss.wsf.framework.deployment.WebXMLRewriterImpl">
<property name="desciptorModifier"><inject
bean="WSWebAppDesciptorModifier"/></property>
</bean>
@@ -161,6 +161,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -169,7 +170,6 @@
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
@@ -178,6 +178,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -185,7 +186,6 @@
<inject bean="WSEndpointMetricsDeploymentAspect"/>
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
<inject bean="WSWebAppDeploymentAspect"/>
<inject bean="WSWebAppGeneratorDeploymentAspect"/>
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,156 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.*;
-import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
-import org.jboss.metadata.ApplicationMetaData.Webservices;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.*;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class ApplicationMetaDataAdapterEJB21
-{
- // logging support
- private static Logger log = Logger.getLogger(ApplicationMetaDataAdapterEJB21.class);
-
- public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentUnit unit)
- {
- ApplicationMetaData appMetaData = unit.getAttachment(ApplicationMetaData.class);
- dep.addAttachment(ApplicationMetaData.class, appMetaData);
-
- UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
- buildUnifiedBeanMetaData(umd, appMetaData);
- buildWebservicesMetaData(umd, appMetaData);
- umd.setSecurityDomain(appMetaData.getSecurityDomain());
-
- return umd;
- }
-
- private void buildWebservicesMetaData(UnifiedApplicationMetaData umd,
ApplicationMetaData apmd)
- {
- Webservices webservices = apmd.getWebservices();
- if (webservices != null)
- {
- String contextRoot = webservices.getContextRoot();
- umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
-
- List<WebserviceDescription> wsDescriptions =
webservices.getWebserviceDescriptions();
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not
supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescription wsd = wsDescriptions.get(0);
- umd.setConfigName(wsd.getConfigName());
- umd.setConfigFile(wsd.getConfigFile());
- }
-
- umd.setWebServiceContextRoot(contextRoot);
- }
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final Webservices
webservices)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
- {
- if (wsd.getDescriptionName().equals(name))
- {
- wsdlPublishLocation = wsd.getWsdlPublishLocation();
- }
- }
- return wsdlPublishLocation;
- }
- };
- }
-
- private void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd,
ApplicationMetaData appMetaData)
- {
- List<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
- Iterator it = appMetaData.getEnterpriseBeans();
- while (it.hasNext())
- {
- BeanMetaData bmd = (BeanMetaData)it.next();
- buildUnifiedBeanMetaData(beans, bmd);
- }
- umd.setEnterpriseBeans(beans);
- }
-
- private UnifiedBeanMetaData buildUnifiedBeanMetaData(List<UnifiedBeanMetaData>
beans, BeanMetaData bmd)
- {
- UnifiedBeanMetaData ubmd = null;
- if (bmd instanceof SessionMetaData)
- {
- ubmd = new UnifiedSessionMetaData();
- }
- else if (bmd instanceof MessageDrivenMetaData)
- {
- ubmd = new UnifiedMessageDrivenMetaData();
-
((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
- }
-
- if (ubmd != null)
- {
- ubmd.setEjbName(bmd.getEjbName());
- ubmd.setEjbClass(bmd.getEjbClass());
- ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
- ubmd.setHome(bmd.getHome());
- ubmd.setLocalHome(bmd.getLocalHome());
- ubmd.setJndiName(bmd.getJndiName());
- ubmd.setLocalJndiName(bmd.getLocalJndiName());
-
- EjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- UnifiedEjbPortComponentMetaData upcmd = new
UnifiedEjbPortComponentMetaData();
- upcmd.setPortComponentName(pcmd.getPortComponentName());
- upcmd.setPortComponentURI(pcmd.getPortComponentURI());
- upcmd.setAuthMethod(pcmd.getAuthMethod());
- upcmd.setTransportGuarantee(pcmd.getTransportGuarantee());
- upcmd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
- ubmd.setPortComponent(upcmd);
- }
-
- beans.add(ubmd);
- }
- return ubmd;
- }
-}
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB3.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB3.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,160 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.Container;
-import org.jboss.ejb3.EJBContainer;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.ejb3.session.SessionContainer;
-import org.jboss.ejb3.mdb.MessagingContainer;
-import org.jboss.ejb3.metamodel.*;
-import org.jboss.logging.Logger;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.*;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData.PublishLocationAdapter;
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * Build container independent application meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 14-Apr-2007
- */
-public class ApplicationMetaDataAdapterEJB3
-{
- // logging support
- private static Logger log = Logger.getLogger(ApplicationMetaDataAdapterEJB3.class);
-
- public UnifiedApplicationMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentUnit unit)
- {
- Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
- dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
-
- EjbJarDD jarDD = unit.getAttachment(EjbJarDD.class);
- UnifiedApplicationMetaData umd = new UnifiedApplicationMetaData();
- buildUnifiedBeanMetaData(umd, ejb3Deployment);
- buildWebservicesMetaData(umd, jarDD);
-
- return umd;
- }
-
- private void buildWebservicesMetaData(UnifiedApplicationMetaData umd, EjbJarDD jarDD)
- {
- // nothing to do
- if (jarDD == null)
- return;
-
- Webservices webservices = jarDD.getWebservices();
- if (webservices != null)
- {
- String contextRoot = webservices.getContextRoot();
- umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
-
- List<WebserviceDescription> wsDescriptions =
webservices.getWebserviceDescriptions();
- if (wsDescriptions.size() > 1)
- log.warn("Multiple <webservice-description> elements not
supported");
-
- if (wsDescriptions.size() > 0)
- {
- WebserviceDescription wsd = wsDescriptions.get(0);
- umd.setConfigName(wsd.getConfigName());
- umd.setConfigFile(wsd.getConfigFile());
-
- // com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1
- // WSEjbWebServiceRefTest1VerifyTargetEndpointAddress
- if (contextRoot == null)
- contextRoot = "/" + wsd.getDescriptionName();
- }
-
- umd.setWebServiceContextRoot(contextRoot);
- }
- }
-
- private void buildUnifiedBeanMetaData(UnifiedApplicationMetaData umd, Ejb3Deployment
ejb3Deployment)
- {
- List<UnifiedBeanMetaData> ubmdList = new
ArrayList<UnifiedBeanMetaData>();
- Iterator<Container> it =
ejb3Deployment.getEjbContainers().values().iterator();
- while (it.hasNext())
- {
- EJBContainer container = (EJBContainer)it.next();
- UnifiedBeanMetaData ubmd = null;
- if (container instanceof SessionContainer)
- {
- ubmd = new UnifiedSessionMetaData();
- }
- else if (container instanceof MessagingContainer)
- {
- ubmd = new UnifiedMessageDrivenMetaData();
- log.warn("No implemented: initialize MDB destination");
-
//((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessagingContainer)container).getDestination());
- }
-
- if (ubmd != null)
- {
- ubmd.setEjbName(container.getEjbName());
- ubmd.setEjbClass(container.getBeanClassName());
-
- EnterpriseBean bean = container.getXml();
- Ejb3PortComponent pcMetaData = (bean != null ? bean.getPortComponent() :
null);
- if (pcMetaData != null)
- {
- UnifiedEjbPortComponentMetaData ejbPortComp = new
UnifiedEjbPortComponentMetaData();
- ejbPortComp.setPortComponentName(pcMetaData.getPortComponentName());
- ejbPortComp.setPortComponentURI(pcMetaData.getPortComponentURI());
- ejbPortComp.setAuthMethod(pcMetaData.getAuthMethod());
- ejbPortComp.setTransportGuarantee(pcMetaData.getTransportGuarantee());
- ejbPortComp.setSecureWSDLAccess(pcMetaData.getSecureWSDLAccess());
-
- ubmd.setPortComponent(ejbPortComp);
- }
-
- ubmdList.add(ubmd);
- }
- }
- umd.setEnterpriseBeans(ubmdList);
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final Webservices
webservices)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- String wsdlPublishLocation = null;
- for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
- {
- if (wsd.getDescriptionName().equals(name))
- {
- wsdlPublishLocation = wsd.getWsdlPublishLocation();
- }
- }
- return wsdlPublishLocation;
- }
- };
- }
-}
Copied:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
(from rev 4012,
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java)
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java
(rev 0)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,114 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+//$Id$
+
+import java.net.URL;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.ApplicationMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.wsf.framework.deployment.WebXMLRewriter;
+import org.jboss.wsf.spi.deployment.ArchiveDeployment;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+
+/**
+ * Build container independent deployment info.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class ContainerMetaDataAdapter
+{
+ // logging support
+ private static Logger log = Logger.getLogger(ContainerMetaDataAdapter.class);
+
+ private EJBArchiveMetaDataAdapterEJB3 applicationMetaDataAdapterEJB3 = new
EJBArchiveMetaDataAdapterEJB3();
+ private EJBArchiveMetaDataAdapterEJB21 applicationMetaDataAdapterEJB21 = new
EJBArchiveMetaDataAdapterEJB21();
+ private JSEArchiveMetaDataAdapter webMetaDataAdapter = new
JSEArchiveMetaDataAdapter();
+
+ public void setApplicationMetaDataAdapterEJB21(EJBArchiveMetaDataAdapterEJB21
adapter)
+ {
+ this.applicationMetaDataAdapterEJB21 = adapter;
+ }
+
+ public void setApplicationMetaDataAdapterEJB3(EJBArchiveMetaDataAdapterEJB3 adapter)
+ {
+ this.applicationMetaDataAdapterEJB3 = adapter;
+ }
+
+ public void setWebMetaDataAdapter(JSEArchiveMetaDataAdapter adapter)
+ {
+ this.webMetaDataAdapter = adapter;
+ }
+
+ public void buildContainerMetaData(Deployment dep, DeploymentUnit unit)
+ {
+ dep.addAttachment(DeploymentUnit.class, unit);
+
+ try
+ {
+ // JSE endpoints
+ if (unit.getAttachment(WebMetaData.class) != null)
+ {
+ JSEArchiveMetaData webMetaData =
webMetaDataAdapter.buildUnifiedWebMetaData(dep, unit);
+ if (webMetaData != null)
+ dep.addAttachment(JSEArchiveMetaData.class, webMetaData);
+
+ if (dep instanceof ArchiveDeployment)
+ {
+ URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
+ dep.setProperty(WebXMLRewriter.WEBAPP_URL, webURL);
+ }
+ }
+
+ // EJB3 endpoints
+ else if (unit.getAttachment(Ejb3Deployment.class) != null)
+ {
+ EJBArchiveMetaData appMetaData =
applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep, unit);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+
+ // EJB21 endpoints
+ else if (unit.getAttachment(ApplicationMetaData.class) != null)
+ {
+ EJBArchiveMetaData appMetaData =
applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, unit);
+ if (appMetaData != null)
+ dep.addAttachment(EJBArchiveMetaData.class, appMetaData);
+ }
+ }
+ catch (RuntimeException rte)
+ {
+ throw rte;
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException(ex);
+ }
+ }
+}
Copied:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java
(from rev 4012,
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java)
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java
(rev 0)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ContainerMetaDataDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,54 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+//$Id: UnifiedDeploymentInfoDeployer.java 3772 2007-07-01 19:29:13Z
thomas.diesler(a)jboss.com $
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
+
+/**
+ * A deployer that builds the UnifiedDeploymentInfo
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 25-Apr-2007
+ */
+public class ContainerMetaDataDeploymentAspect extends DeploymentAspect
+{
+ private ContainerMetaDataAdapter metaDataAdapter = new ContainerMetaDataAdapter();
+
+ public void setMetaDataAdapter(ContainerMetaDataAdapter adapter)
+ {
+ this.metaDataAdapter = adapter;
+ }
+
+ @Override
+ public void create(Deployment dep)
+ {
+ DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
+ if (unit == null)
+ throw new IllegalStateException("Cannot obtain deployment unit");
+
+ metaDataAdapter.buildContainerMetaData(dep, unit);
+ }
+}
\ No newline at end of file
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/DeploymentInfoAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,114 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id$
-
-import java.net.URL;
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.ejb3.Ejb3Deployment;
-import org.jboss.logging.Logger;
-import org.jboss.metadata.ApplicationMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.wsf.framework.deployment.WebXMLRewriter;
-import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-
-/**
- * Build container independent deployment info.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class DeploymentInfoAdapter
-{
- // logging support
- private static Logger log = Logger.getLogger(DeploymentInfoAdapter.class);
-
- private ApplicationMetaDataAdapterEJB3 applicationMetaDataAdapterEJB3 = new
ApplicationMetaDataAdapterEJB3();
- private ApplicationMetaDataAdapterEJB21 applicationMetaDataAdapterEJB21 = new
ApplicationMetaDataAdapterEJB21();
- private WebMetaDataAdapter webMetaDataAdapter = new WebMetaDataAdapter();
-
- public void setApplicationMetaDataAdapterEJB21(ApplicationMetaDataAdapterEJB21
adapter)
- {
- this.applicationMetaDataAdapterEJB21 = adapter;
- }
-
- public void setApplicationMetaDataAdapterEJB3(ApplicationMetaDataAdapterEJB3 adapter)
- {
- this.applicationMetaDataAdapterEJB3 = adapter;
- }
-
- public void setWebMetaDataAdapter(WebMetaDataAdapter adapter)
- {
- this.webMetaDataAdapter = adapter;
- }
-
- public void buildDeploymentInfo(Deployment dep, DeploymentUnit unit)
- {
- dep.addAttachment(DeploymentUnit.class, unit);
-
- try
- {
- // JSE endpoints
- if (unit.getAttachment(WebMetaData.class) != null)
- {
- UnifiedWebMetaData webMetaData =
webMetaDataAdapter.buildUnifiedWebMetaData(dep, unit);
- if (webMetaData != null)
- dep.addAttachment(UnifiedWebMetaData.class, webMetaData);
-
- if (dep instanceof ArchiveDeployment)
- {
- URL webURL = ((ArchiveDeployment)dep).getRootFile().toURL();
- dep.setProperty(WebXMLRewriter.WEBAPP_URL, webURL);
- }
- }
-
- // EJB3 endpoints
- else if (unit.getAttachment(Ejb3Deployment.class) != null)
- {
- UnifiedApplicationMetaData appMetaData =
applicationMetaDataAdapterEJB3.buildUnifiedApplicationMetaData(dep, unit);
- if (appMetaData != null)
- dep.addAttachment(UnifiedApplicationMetaData.class, appMetaData);
- }
-
- // EJB21 endpoints
- else if (unit.getAttachment(ApplicationMetaData.class) != null)
- {
- UnifiedApplicationMetaData appMetaData =
applicationMetaDataAdapterEJB21.buildUnifiedApplicationMetaData(dep, unit);
- if (appMetaData != null)
- dep.addAttachment(UnifiedApplicationMetaData.class, appMetaData);
- }
- }
- catch (RuntimeException rte)
- {
- throw rte;
- }
- catch (Exception ex)
- {
- throw new IllegalStateException(ex);
- }
- }
-}
Copied:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java
(from rev 4012,
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB21.java)
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java
(rev 0)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,156 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.logging.Logger;
+import org.jboss.metadata.*;
+import org.jboss.metadata.ApplicationMetaData.WebserviceDescription;
+import org.jboss.metadata.ApplicationMetaData.Webservices;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.*;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBArchiveMetaDataAdapterEJB21
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB21.class);
+
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentUnit unit)
+ {
+ ApplicationMetaData appMetaData = unit.getAttachment(ApplicationMetaData.class);
+ dep.addAttachment(ApplicationMetaData.class, appMetaData);
+
+ EJBArchiveMetaData umd = new EJBArchiveMetaData();
+ buildUnifiedBeanMetaData(umd, appMetaData);
+ buildWebservicesMetaData(umd, appMetaData);
+ umd.setSecurityDomain(appMetaData.getSecurityDomain());
+
+ return umd;
+ }
+
+ private void buildWebservicesMetaData(EJBArchiveMetaData umd, ApplicationMetaData
apmd)
+ {
+ Webservices webservices = apmd.getWebservices();
+ if (webservices != null)
+ {
+ String contextRoot = webservices.getContextRoot();
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
+
+ List<WebserviceDescription> wsDescriptions =
webservices.getWebserviceDescriptions();
+ if (wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not
supported");
+
+ if (wsDescriptions.size() > 0)
+ {
+ WebserviceDescription wsd = wsDescriptions.get(0);
+ umd.setConfigName(wsd.getConfigName());
+ umd.setConfigFile(wsd.getConfigFile());
+ }
+
+ umd.setWebServiceContextRoot(contextRoot);
+ }
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final Webservices
webservices)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String wsdlPublishLocation = null;
+ for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
+ {
+ if (wsd.getDescriptionName().equals(name))
+ {
+ wsdlPublishLocation = wsd.getWsdlPublishLocation();
+ }
+ }
+ return wsdlPublishLocation;
+ }
+ };
+ }
+
+ private void buildUnifiedBeanMetaData(EJBArchiveMetaData umd, ApplicationMetaData
appMetaData)
+ {
+ List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ Iterator it = appMetaData.getEnterpriseBeans();
+ while (it.hasNext())
+ {
+ BeanMetaData bmd = (BeanMetaData)it.next();
+ buildUnifiedBeanMetaData(beans, bmd);
+ }
+ umd.setEnterpriseBeans(beans);
+ }
+
+ private EJBMetaData buildUnifiedBeanMetaData(List<EJBMetaData> beans,
BeanMetaData bmd)
+ {
+ EJBMetaData ubmd = null;
+ if (bmd instanceof SessionMetaData)
+ {
+ ubmd = new SLSBMetaData();
+ }
+ else if (bmd instanceof MessageDrivenMetaData)
+ {
+ ubmd = new MDBMetaData();
+
((MDBMetaData)ubmd).setDestinationJndiName(((MessageDrivenMetaData)bmd).getDestinationJndiName());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(bmd.getEjbName());
+ ubmd.setEjbClass(bmd.getEjbClass());
+ ubmd.setServiceEndpointInterface(bmd.getServiceEndpoint());
+ ubmd.setHome(bmd.getHome());
+ ubmd.setLocalHome(bmd.getLocalHome());
+ ubmd.setJndiName(bmd.getJndiName());
+ ubmd.setLocalJndiName(bmd.getLocalJndiName());
+
+ EjbPortComponentMetaData pcmd = bmd.getPortComponent();
+ if (pcmd != null)
+ {
+ ubmd.setPortComponentName(pcmd.getPortComponentName());
+ ubmd.setPortComponentURI(pcmd.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcmd.getAuthMethod());
+ smd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ ubmd.setSecurityMetaData(smd);
+ }
+
+ beans.add(ubmd);
+ }
+ return ubmd;
+ }
+}
Copied:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java
(from rev 4012,
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/ApplicationMetaDataAdapterEJB3.java)
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java
(rev 0)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/EJBArchiveMetaDataAdapterEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,166 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+// $Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.ejb3.Container;
+import org.jboss.ejb3.EJBContainer;
+import org.jboss.ejb3.Ejb3Deployment;
+import org.jboss.ejb3.mdb.MessagingContainer;
+import org.jboss.ejb3.metamodel.Ejb3PortComponent;
+import org.jboss.ejb3.metamodel.EjbJarDD;
+import org.jboss.ejb3.metamodel.EnterpriseBean;
+import org.jboss.ejb3.metamodel.WebserviceDescription;
+import org.jboss.ejb3.metamodel.Webservices;
+import org.jboss.ejb3.session.SessionContainer;
+import org.jboss.logging.Logger;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.SLSBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData.PublishLocationAdapter;
+
+/**
+ * Build container independent application meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 14-Apr-2007
+ */
+public class EJBArchiveMetaDataAdapterEJB3
+{
+ // logging support
+ private static Logger log = Logger.getLogger(EJBArchiveMetaDataAdapterEJB3.class);
+
+ public EJBArchiveMetaData buildUnifiedApplicationMetaData(Deployment dep,
DeploymentUnit unit)
+ {
+ Ejb3Deployment ejb3Deployment = unit.getAttachment(Ejb3Deployment.class);
+ dep.addAttachment(Ejb3Deployment.class, ejb3Deployment);
+
+ EjbJarDD jarDD = unit.getAttachment(EjbJarDD.class);
+ EJBArchiveMetaData umd = new EJBArchiveMetaData();
+ buildUnifiedBeanMetaData(umd, ejb3Deployment);
+ buildWebservicesMetaData(umd, jarDD);
+
+ return umd;
+ }
+
+ private void buildWebservicesMetaData(EJBArchiveMetaData umd, EjbJarDD jarDD)
+ {
+ // nothing to do
+ if (jarDD == null)
+ return;
+
+ Webservices webservices = jarDD.getWebservices();
+ if (webservices != null)
+ {
+ String contextRoot = webservices.getContextRoot();
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(webservices));
+
+ List<WebserviceDescription> wsDescriptions =
webservices.getWebserviceDescriptions();
+ if (wsDescriptions.size() > 1)
+ log.warn("Multiple <webservice-description> elements not
supported");
+
+ if (wsDescriptions.size() > 0)
+ {
+ WebserviceDescription wsd = wsDescriptions.get(0);
+ umd.setConfigName(wsd.getConfigName());
+ umd.setConfigFile(wsd.getConfigFile());
+
+ // com/sun/ts/tests/webservices12/ejb/annotations/WSEjbWebServiceRefTest1
+ // WSEjbWebServiceRefTest1VerifyTargetEndpointAddress
+ if (contextRoot == null)
+ contextRoot = "/" + wsd.getDescriptionName();
+ }
+
+ umd.setWebServiceContextRoot(contextRoot);
+ }
+ }
+
+ private void buildUnifiedBeanMetaData(EJBArchiveMetaData umd, Ejb3Deployment
ejb3Deployment)
+ {
+ List<EJBMetaData> ubmdList = new ArrayList<EJBMetaData>();
+ Iterator<Container> it =
ejb3Deployment.getEjbContainers().values().iterator();
+ while (it.hasNext())
+ {
+ EJBContainer container = (EJBContainer)it.next();
+ EJBMetaData ubmd = null;
+ if (container instanceof SessionContainer)
+ {
+ ubmd = new SLSBMetaData();
+ }
+ else if (container instanceof MessagingContainer)
+ {
+ ubmd = new MDBMetaData();
+ log.warn("No implemented: initialize MDB destination");
+
//((UnifiedMessageDrivenMetaData)ubmd).setDestinationJndiName(((MessagingContainer)container).getDestination());
+ }
+
+ if (ubmd != null)
+ {
+ ubmd.setEjbName(container.getEjbName());
+ ubmd.setEjbClass(container.getBeanClassName());
+
+ EnterpriseBean bean = container.getXml();
+ Ejb3PortComponent pcmd = (bean != null ? bean.getPortComponent() : null);
+ if (pcmd != null)
+ {
+ ubmd.setPortComponentName(pcmd.getPortComponentName());
+ ubmd.setPortComponentURI(pcmd.getPortComponentURI());
+ EJBSecurityMetaData smd = new EJBSecurityMetaData();
+ smd.setAuthMethod(pcmd.getAuthMethod());
+ smd.setTransportGuarantee(pcmd.getTransportGuarantee());
+ smd.setSecureWSDLAccess(pcmd.getSecureWSDLAccess());
+ ubmd.setSecurityMetaData(smd);
+ }
+
+ ubmdList.add(ubmd);
+ }
+ }
+ umd.setEnterpriseBeans(ubmdList);
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final Webservices
webservices)
+ {
+ return new PublishLocationAdapter() {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String wsdlPublishLocation = null;
+ for (WebserviceDescription wsd : webservices.getWebserviceDescriptions())
+ {
+ if (wsd.getDescriptionName().equals(name))
+ {
+ wsdlPublishLocation = wsd.getWsdlPublishLocation();
+ }
+ }
+ return wsdlPublishLocation;
+ }
+ };
+ }
+}
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/InvocationHandlerEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -52,8 +52,8 @@
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.SecurityAdaptor;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
/**
* Handles invocations on EJB21 endpoints.
@@ -83,8 +83,8 @@
{
String ejbName = ep.getShortName();
Deployment dep = ep.getService().getDeployment();
- UnifiedApplicationMetaData apMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WebServiceException("Cannot obtain ejb meta data for: " +
ejbName);
Copied:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java
(from rev 4012,
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdapter.java)
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java
(rev 0)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/JSEArchiveMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,150 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.container.jboss50;
+
+// $Id$
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.deployment.J2eeApplicationMetaData;
+import org.jboss.deployment.J2eeModuleMetaData;
+import org.jboss.metadata.WebMetaData;
+import org.jboss.metadata.WebSecurityMetaData;
+import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
+import org.jboss.metadata.web.Servlet;
+import org.jboss.metadata.web.ServletMapping;
+import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData.PublishLocationAdapter;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
+
+import java.util.*;
+
+/**
+ * Build container independent web meta data
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JSEArchiveMetaDataAdapter
+{
+ public JSEArchiveMetaData buildUnifiedWebMetaData(Deployment dep, DeploymentUnit
unit)
+ {
+ String contextRoot = null;
+
+ WebMetaData wmd = unit.getAttachment(WebMetaData.class);
+ dep.addAttachment(WebMetaData.class, wmd);
+
+ if (unit.getParent() != null)
+ {
+ J2eeApplicationMetaData appmd =
unit.getParent().getAttachment(J2eeApplicationMetaData.class);
+ if (appmd != null)
+ {
+ J2eeModuleMetaData module = appmd.getModule(dep.getSimpleName());
+ if (module != null)
+ contextRoot = module.getWebContext();
+ }
+ }
+
+ if (contextRoot == null)
+ contextRoot = wmd.getContextRoot();
+
+ JSEArchiveMetaData umd = new JSEArchiveMetaData();
+ umd.setContextRoot(contextRoot);
+ umd.setServletMappings(getServletMappings(wmd));
+ umd.setServletClassNames(getServletClassMap(wmd));
+ umd.setConfigName(wmd.getConfigName());
+ umd.setConfigFile(wmd.getConfigFile());
+ umd.setSecurityDomain(wmd.getSecurityDomain());
+ umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
+ umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
+
+ return umd;
+ }
+
+ private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
+ {
+ return new PublishLocationAdapter()
+ {
+ public String getWsdlPublishLocationByName(String name)
+ {
+ return wmd.getWsdlPublishLocationByName(name);
+ }
+ };
+ }
+
+ protected List<JSESecurityMetaData> getSecurityMetaData(final Iterator
securityConstraints)
+ {
+ ArrayList<JSESecurityMetaData> unifiedsecurityMetaData = new
ArrayList<JSESecurityMetaData>();
+
+ while (securityConstraints.hasNext())
+ {
+ WebSecurityMetaData securityMetaData =
(WebSecurityMetaData)securityConstraints.next();
+
+ JSESecurityMetaData current = new JSESecurityMetaData();
+ unifiedsecurityMetaData.add(current);
+
+ current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
+
+ Map<String, WebResourceCollection> resources =
securityMetaData.getWebResources();
+ for (WebResourceCollection webResource : resources.values())
+ {
+ JSEResourceCollection currentResource =
current.addWebResource(webResource.getName());
+ for (String currentPattern : webResource.getUrlPatterns())
+ {
+ currentResource.addPattern(currentPattern);
+ }
+ }
+ }
+
+ return unifiedsecurityMetaData;
+ }
+
+ private Map<String, String> getServletMappings(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServletMappings().iterator();
+ while (it.hasNext())
+ {
+ ServletMapping sm = (ServletMapping)it.next();
+ // FIXME - Add support for multiple mappings
+ mappings.put(sm.getName(), sm.getUrlPatterns().get(0));
+ }
+ return mappings;
+ }
+
+ private Map<String, String> getServletClassMap(WebMetaData wmd)
+ {
+ Map<String, String> mappings = new HashMap<String, String>();
+ Iterator it = wmd.getServlets().iterator();
+ while (it.hasNext())
+ {
+ Servlet servlet = (Servlet)it.next();
+ // Skip JSPs
+ if (servlet.getServletClass() == null || servlet.getServletClass().length() ==
0)
+ continue;
+
+ mappings.put(servlet.getName(), servlet.getServletClass());
+ }
+ return mappings;
+ }
+}
Modified:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/SecurityHandlerEJB21.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -28,7 +28,7 @@
import org.jboss.metadata.AssemblyDescriptorMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.SecurityHandler;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
import java.util.Iterator;
import java.util.Map;
@@ -43,7 +43,7 @@
{
public void addSecurityDomain(Element jbossWeb, Deployment dep)
{
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData == null)
throw new IllegalStateException("Cannot obtain application meta
data");
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/UnifiedDeploymentInfoDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,54 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-//$Id: UnifiedDeploymentInfoDeployer.java 3772 2007-07-01 19:29:13Z
thomas.diesler(a)jboss.com $
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
-
-/**
- * A deployer that builds the UnifiedDeploymentInfo
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 25-Apr-2007
- */
-public class UnifiedDeploymentInfoDeploymentAspect extends DeploymentAspect
-{
- private DeploymentInfoAdapter deploymentInfoAdapter = new DeploymentInfoAdapter();
-
- public void setDeploymentInfoAdapter(DeploymentInfoAdapter adapter)
- {
- this.deploymentInfoAdapter = adapter;
- }
-
- @Override
- public void create(Deployment dep)
- {
- DeploymentUnit unit = dep.getAttachment(DeploymentUnit.class);
- if (unit == null)
- throw new IllegalStateException("Cannot obtain deployment unit");
-
- deploymentInfoAdapter.buildDeploymentInfo(dep, unit);
- }
-}
\ No newline at end of file
Deleted:
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdapter.java
===================================================================
---
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdapter.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/java/org/jboss/wsf/container/jboss50/WebMetaDataAdapter.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,150 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.container.jboss50;
-
-// $Id$
-
-import org.jboss.deployers.structure.spi.DeploymentUnit;
-import org.jboss.deployment.J2eeApplicationMetaData;
-import org.jboss.deployment.J2eeModuleMetaData;
-import org.jboss.metadata.WebMetaData;
-import org.jboss.metadata.WebSecurityMetaData;
-import org.jboss.metadata.WebSecurityMetaData.WebResourceCollection;
-import org.jboss.metadata.web.Servlet;
-import org.jboss.metadata.web.ServletMapping;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData.PublishLocationAdapter;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
-
-import java.util.*;
-
-/**
- * Build container independent web meta data
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class WebMetaDataAdapter
-{
- public UnifiedWebMetaData buildUnifiedWebMetaData(Deployment dep, DeploymentUnit
unit)
- {
- String contextRoot = null;
-
- WebMetaData wmd = unit.getAttachment(WebMetaData.class);
- dep.addAttachment(WebMetaData.class, wmd);
-
- if (unit.getParent() != null)
- {
- J2eeApplicationMetaData appmd =
unit.getParent().getAttachment(J2eeApplicationMetaData.class);
- if (appmd != null)
- {
- J2eeModuleMetaData module = appmd.getModule(dep.getSimpleName());
- if (module != null)
- contextRoot = module.getWebContext();
- }
- }
-
- if (contextRoot == null)
- contextRoot = wmd.getContextRoot();
-
- UnifiedWebMetaData umd = new UnifiedWebMetaData();
- umd.setContextRoot(contextRoot);
- umd.setServletMappings(getServletMappings(wmd));
- umd.setServletClassNames(getServletClassMap(wmd));
- umd.setConfigName(wmd.getConfigName());
- umd.setConfigFile(wmd.getConfigFile());
- umd.setSecurityDomain(wmd.getSecurityDomain());
- umd.setPublishLocationAdapter(getPublishLocationAdpater(wmd));
- umd.setSecurityMetaData(getSecurityMetaData(wmd.getSecurityContraints()));
-
- return umd;
- }
-
- private PublishLocationAdapter getPublishLocationAdpater(final WebMetaData wmd)
- {
- return new PublishLocationAdapter()
- {
- public String getWsdlPublishLocationByName(String name)
- {
- return wmd.getWsdlPublishLocationByName(name);
- }
- };
- }
-
- protected List<UnifiedWebSecurityMetaData> getSecurityMetaData(final Iterator
securityConstraints)
- {
- ArrayList<UnifiedWebSecurityMetaData> unifiedsecurityMetaData = new
ArrayList<UnifiedWebSecurityMetaData>();
-
- while (securityConstraints.hasNext())
- {
- WebSecurityMetaData securityMetaData =
(WebSecurityMetaData)securityConstraints.next();
-
- UnifiedWebSecurityMetaData current = new UnifiedWebSecurityMetaData();
- unifiedsecurityMetaData.add(current);
-
- current.setTransportGuarantee(securityMetaData.getTransportGuarantee());
-
- Map<String, WebResourceCollection> resources =
securityMetaData.getWebResources();
- for (WebResourceCollection webResource : resources.values())
- {
- UnifiedWebResourceCollection currentResource =
current.addWebResource(webResource.getName());
- for (String currentPattern : webResource.getUrlPatterns())
- {
- currentResource.addPattern(currentPattern);
- }
- }
- }
-
- return unifiedsecurityMetaData;
- }
-
- private Map<String, String> getServletMappings(WebMetaData wmd)
- {
- Map<String, String> mappings = new HashMap<String, String>();
- Iterator it = wmd.getServletMappings().iterator();
- while (it.hasNext())
- {
- ServletMapping sm = (ServletMapping)it.next();
- // FIXME - Add support for multiple mappings
- mappings.put(sm.getName(), sm.getUrlPatterns().get(0));
- }
- return mappings;
- }
-
- private Map<String, String> getServletClassMap(WebMetaData wmd)
- {
- Map<String, String> mappings = new HashMap<String, String>();
- Iterator it = wmd.getServlets().iterator();
- while (it.hasNext())
- {
- Servlet servlet = (Servlet)it.next();
- // Skip JSPs
- if (servlet.getServletClass() == null || servlet.getServletClass().length() ==
0)
- continue;
-
- mappings.put(servlet.getName(), servlet.getServletClass());
- }
- return mappings;
- }
-}
Modified:
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml
===================================================================
---
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/jboss50/src/main/resources/jbossws-jboss50.deployer/META-INF/jbossws-deployer-beans.xml 2007-07-27
04:37:52 UTC (rev 4013)
@@ -134,6 +134,10 @@
<!--
The container deployment aspects
-->
+ <bean name="WSContainerMetaDataDeploymentAspect"
class="org.jboss.wsf.container.jboss50.ContainerMetaDataDeploymentAspect">
+ <property name="provides">ContainerMetaData</property>
+ </bean>
+
<bean name="WSContextRootDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleContextRootDeploymentAspect">
<property name="requires">ContainerMetaData</property>
<property name="provides">ContextRoot</property>
@@ -170,10 +174,6 @@
<property name="requires">ContextProperties,
StackDescriptor</property>
</bean>
- <bean name="WSUnifiedDeploymentInfoDeploymentAspect"
class="org.jboss.wsf.container.jboss50.UnifiedDeploymentInfoDeploymentAspect">
- <property name="provides">ContainerMetaData</property>
- </bean>
-
<bean name="WSURLPatternDeploymentAspect"
class="org.jboss.wsf.framework.deployment.BackwardCompatibleURLPatternDeploymentAspect">
<property name="requires">ContextRoot,
ContainerMetaData</property>
<property name="provides">URLPattern</property>
@@ -206,6 +206,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerJSE"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -214,7 +215,6 @@
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
<inject bean="WSModifyWebMetaDataDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
</set>
</property>
@@ -223,6 +223,7 @@
<property name="manager"><inject
bean="WSDeploymentAspectManagerEJB"/></property>
<property name="aspects">
<set class="java.util.HashSet"
elementClass="org.jboss.wsf.spi.deployment.DeploymentAspect">
+ <inject bean="WSContainerMetaDataDeploymentAspect"/>
<inject bean="WSContextRootDeploymentAspect"/>
<inject bean="WSEndpointAddressDeploymentAspect"/>
<inject bean="WSEndpointHandlerDeploymentAspect"/>
@@ -230,7 +231,6 @@
<inject bean="WSEndpointMetricsDeploymentAspect"/>
<inject bean="WSEndpointNameDeploymentAspect"/>
<inject bean="WSEndpointRegistryDeploymentAspect"/>
- <inject bean="WSUnifiedDeploymentInfoDeploymentAspect"/>
<inject bean="WSURLPatternDeploymentAspect"/>
<inject bean="WSWebAppDeploymentAspect"/>
<inject bean="WSWebAppGeneratorDeploymentAspect"/>
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/BackwardCompatibleContextRootDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -25,11 +25,10 @@
import java.util.StringTokenizer;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
/**
* A deployer that assigns the context root to the service.
@@ -58,7 +57,7 @@
{
String firstToken = st.nextToken();
if (contextRoot != null && contextRoot.equals(firstToken) ==
false)
- throw new IllegalStateException("All endpoints must share the
same <context-root>: " + contextRoot + "!=" + firstToken);
+ throw new IllegalStateException("All endpoints must share the
same <context-root>: " + contextRoot + "!=" + firstToken);
contextRoot = firstToken;
}
@@ -72,15 +71,11 @@
{
String urlPattern = null;
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
{
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
- UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- urlPattern = pcmd.getPortComponentURI();
- }
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+ urlPattern = bmd.getPortComponentURI();
}
return urlPattern;
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/ContextRootDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -28,8 +28,8 @@
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
/**
* A deployer that assigns the context root to the service
@@ -62,7 +62,7 @@
String contextRoot = null;
// #1 Use the explicit context root from the web meta data
- UnifiedWebMetaData webMetaData = dep.getAttachment(UnifiedWebMetaData.class);
+ JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (webMetaData != null)
contextRoot = webMetaData.getContextRoot();
@@ -84,7 +84,7 @@
}
// #3 Use the explicit context root from webservices/context-root
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (contextRoot == null && appMetaData != null)
{
contextRoot = appMetaData.getWebServiceContextRoot();
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointHandlerDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -35,9 +35,9 @@
import org.jboss.wsf.spi.invocation.InvocationType;
import org.jboss.wsf.spi.invocation.RequestHandler;
import org.jboss.wsf.spi.invocation.RequestHandlerFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
/**
* A deployer that assigns the handlers to the Endpoint
@@ -89,11 +89,11 @@
String key = dep.getType().toString();
// Use a special key for MDB endpoints
- UnifiedApplicationMetaData uapp =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
if (uapp != null)
{
- UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
- if (bmd instanceof UnifiedMessageDrivenMetaData)
+ EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
+ if (bmd instanceof MDBMetaData)
{
key = "JAXRPC_MDB21";
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/EndpointNameDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -23,9 +23,9 @@
//$Id$
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -53,13 +53,13 @@
name.append(Endpoint.SEPID_PROPERTY_ENDPOINT + "=" +
ep.getShortName());
// Append the JMS destination, for an MDB endpoint
- UnifiedApplicationMetaData uapp =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData uapp = dep.getAttachment(EJBArchiveMetaData.class);
if (uapp != null)
{
- UnifiedBeanMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
- if (bmd instanceof UnifiedMessageDrivenMetaData)
+ EJBMetaData bmd = uapp.getBeanByEjbName(ep.getShortName());
+ if (bmd instanceof MDBMetaData)
{
- String destName =
((UnifiedMessageDrivenMetaData)bmd).getDestinationJndiName();
+ String destName = ((MDBMetaData)bmd).getDestinationJndiName();
name.append(",jms=" + destName);
}
}
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/URLPatternDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -24,13 +24,12 @@
//$Id$
import org.jboss.wsf.spi.annotation.WebContext;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Deployment;
+import org.jboss.wsf.spi.deployment.DeploymentAspect;
import org.jboss.wsf.spi.deployment.Endpoint;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
/**
* A deployer that assigns the URLPattern to endpoints.
@@ -66,7 +65,7 @@
String urlPattern = null;
// #1 For JSE lookup the url-pattern from the servlet mappings
- UnifiedWebMetaData webMetaData = dep.getAttachment(UnifiedWebMetaData.class);
+ JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (webMetaData != null)
{
String epName = ep.getShortName();
@@ -76,15 +75,11 @@
}
// #2 Use the explicit urlPattern from port-component/port-component-uri
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ep.getShortName())
!= null)
{
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
- UnifiedEjbPortComponentMetaData pcmd = bmd.getPortComponent();
- if (pcmd != null)
- {
- urlPattern = pcmd.getPortComponentURI();
- }
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ep.getShortName());
+ urlPattern = bmd.getPortComponentURI();
}
// #3 For EJB use @WebContext.urlPattern
Modified:
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/framework/deployment/WebAppGeneratorDeploymentAspect.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -45,9 +45,9 @@
import org.jboss.wsf.spi.deployment.WSFDeploymentException;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
/**
* A deployer that generates a webapp for an EJB endpoint
@@ -180,16 +180,16 @@
secureWSDLAccess = anWebContext.secureWSDLAccess();
}
- UnifiedApplicationMetaData appMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData appMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (appMetaData != null && appMetaData.getBeanByEjbName(ejbName) !=
null)
{
- UnifiedBeanMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
- UnifiedEjbPortComponentMetaData pc = bmd.getPortComponent();
- if (pc != null)
+ EJBMetaData bmd = appMetaData.getBeanByEjbName(ejbName);
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
{
- beanAuthMethod = pc.getAuthMethod();
- transportGuarantee = pc.getTransportGuarantee();
- secureWSDLAccess = pc.getSecureWSDLAccess();
+ beanAuthMethod = smd.getAuthMethod();
+ transportGuarantee = smd.getTransportGuarantee();
+ secureWSDLAccess = smd.getSecureWSDLAccess();
}
}
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/ContainerMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,83 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+//$Id: BasicDeploymentContext.java 3959 2007-07-20 14:44:19Z heiko.braun(a)jboss.com $
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Set;
+
+import org.jboss.wsf.spi.deployment.Extendible;
+
+/**
+ * A general extendible artifact
+ *
+ * @author Thomas.Diesler(a)jboss.com
+ * @since 20-Apr-2007
+ */
+public class ContainerMetaData implements Extendible
+{
+ private Map<Class, Object> attachments = new HashMap<Class, Object>();
+ private Map<String, Object> properties = new HashMap<String, Object>();
+
+ public Collection<Object> getAttachments()
+ {
+ return attachments.values();
+ }
+
+ public <T> T getAttachment(Class<T> clazz)
+ {
+ return (T)attachments.get(clazz);
+ }
+
+ public <T> T addAttachment(Class<T> clazz, Object obj)
+ {
+ return (T)attachments.put(clazz, obj);
+ }
+
+ public <T> T removeAttachment(Class<T> key)
+ {
+ return (T)attachments.remove(key);
+ }
+
+ public Set<String> getProperties()
+ {
+ return properties.keySet();
+ }
+
+ public Object getProperty(String key)
+ {
+ return properties.get(key);
+ }
+
+ public void removeProperty(String key)
+ {
+ properties.remove(key);
+ }
+
+ public void setProperty(String key, Object value)
+ {
+ properties.put(key, value);
+ }
+}
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
(from rev 4012,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedApplicationMetaData.java)
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBArchiveMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,129 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+//$Id$
+
+import java.util.ArrayList;
+import java.util.Iterator;
+import java.util.List;
+
+/**
+ * The container independent top level meta data from the jboss.xml and ejb-jar.xml
descriptor.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBArchiveMetaData extends ContainerMetaData
+{
+ /** ArrayList<BeanMetaData> for the ejbs */
+ private List<EJBMetaData> beans = new ArrayList<EJBMetaData>();
+ /** The optional JBossWS config-name */
+ private String configName;
+ /** The optional JBossWS config-file */
+ private String configFile;
+ /** The web context root to use for web services */
+ private String webServiceContextRoot;
+ /** The security-domain value assigned to the application */
+ private String securityDomain;
+ /** A HashMap<String, String> for webservice description publish locations */
+ private PublishLocationAdapter publishLocationAdapter;
+
+ public EJBMetaData getBeanByEjbName(String ejbName)
+ {
+ for (EJBMetaData beanMetaData : beans)
+ {
+ if (beanMetaData.getEjbName().equals(ejbName))
+ {
+ return beanMetaData;
+ }
+ }
+ return null;
+ }
+
+ public Iterator<EJBMetaData> getEnterpriseBeans()
+ {
+ return beans.iterator();
+ }
+
+ public void setEnterpriseBeans(List<EJBMetaData> beans)
+ {
+ this.beans = beans;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getWebServiceContextRoot()
+ {
+ return webServiceContextRoot;
+ }
+
+ public void setWebServiceContextRoot(String contextRoot)
+ {
+ this.webServiceContextRoot = contextRoot;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String publishLocation = (publishLocationAdapter != null ?
publishLocationAdapter.getWsdlPublishLocationByName(name) : null);
+ return publishLocation;
+
+ }
+
+ public interface PublishLocationAdapter
+ {
+ String getWsdlPublishLocationByName(String name);
+ }
+}
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,159 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+//$Id: UnifiedBeanMetaData.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
+
+/**
+ * The container independent common meta data class for the entity, message-driven and
session beans.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public abstract class EJBMetaData extends ContainerMetaData
+{
+ // The ejb-name element specifies an enterprise bean's name.
+ private String ejbName;
+ // The ejb-class element contains the fully-qualified name of the enterprise
bean's class.
+ private String ejbClass;
+ // The home element contains the fully-qualified name of the enterprise bean's
home interface. */
+ private String homeClass;
+ // The local-home element contains the fully-qualified name of the enterprise
bean's local home interface.
+ private String localHomeClass;
+ // The service-endpoint element contains the fully-qualified name of the beans service
endpoint interface (SEI)
+ private String seiName;
+ // The JNDI name under with the home interface should be bound
+ private String jndiName;
+ // The JNDI name under with the local home interface should be bound
+ private String localJndiName;
+ // The optional port-component-name
+ private String portComponentName;
+ // The optional port-component-uri
+ private String portComponentURI;
+ // The optional security meta data
+ private EJBSecurityMetaData securityMetaData;
+
+ public String getEjbName()
+ {
+ return ejbName;
+ }
+
+ public void setEjbName(String ejbName)
+ {
+ this.ejbName = ejbName;
+ }
+
+ public String getEjbClass()
+ {
+ return ejbClass;
+ }
+
+ public void setEjbClass(String ejbClass)
+ {
+ this.ejbClass = ejbClass;
+ }
+
+ public String getServiceEndpointInterface()
+ {
+ return seiName;
+ }
+
+ public void setServiceEndpointInterface(String seiName)
+ {
+ this.seiName = seiName;
+ }
+
+ public String getContainerObjectNameJndiName()
+ {
+ return getHome() != null ? getJndiName() : getLocalJndiName();
+ }
+
+ public String getHome()
+ {
+ return homeClass;
+ }
+
+ public void setHome(String homeClass)
+ {
+ this.homeClass = homeClass;
+ }
+
+ public String getJndiName()
+ {
+ return jndiName;
+ }
+
+ public void setJndiName(String jndiName)
+ {
+ this.jndiName = jndiName;
+ }
+
+ public String getLocalHome()
+ {
+ return localHomeClass;
+ }
+
+ public void setLocalHome(String localHomeClass)
+ {
+ this.localHomeClass = localHomeClass;
+ }
+
+ public String getLocalJndiName()
+ {
+ return localJndiName;
+ }
+
+ public void setLocalJndiName(String localJndiName)
+ {
+ this.localJndiName = localJndiName;
+ }
+
+ public String getPortComponentName()
+ {
+ return portComponentName;
+ }
+
+ public void setPortComponentName(String portComponentName)
+ {
+ this.portComponentName = portComponentName;
+ }
+
+ public String getPortComponentURI()
+ {
+ return portComponentURI;
+ }
+
+ public void setPortComponentURI(String portComponentURI)
+ {
+ this.portComponentURI = portComponentURI;
+ }
+
+ public EJBSecurityMetaData getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+
+ public void setSecurityMetaData(EJBSecurityMetaData securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
+}
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/EJBSecurityMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,68 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+//$Id: UnifiedBeanMetaData.java 3772 2007-07-01 19:29:13Z thomas.diesler(a)jboss.com $
+
+/**
+ * The container independent EJB security meta data class
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class EJBSecurityMetaData
+{
+ private String authMethod;
+ private String transportGuarantee;
+ private boolean secureWSDLAccess;
+
+ public String getAuthMethod()
+ {
+ return authMethod;
+ }
+
+ public void setAuthMethod(String authMethod)
+ {
+ this.authMethod = authMethod;
+ }
+
+ public String getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
+
+ public boolean getSecureWSDLAccess()
+ {
+ return secureWSDLAccess;
+ }
+
+ public void setSecureWSDLAccess(Boolean access)
+ {
+ if (access != null)
+ this.secureWSDLAccess = access;
+ }
+}
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
(from rev 4012,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebMetaData.java)
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSEArchiveMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,143 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+//$Id$
+
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * The container independent representation of the web.xml and jboss-web.xml deployment
descriptors
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class JSEArchiveMetaData extends ContainerMetaData
+{
+ // The war context root as specified at the jboss-web.xml descriptor level.
+ private String contextRoot;
+ // The servlet-mapping <servlet-name, url-pattern>
+ private Map<String, String> servletMappings = new HashMap<String,
String>();
+ // The servlet <servlet-name, servlet-class>
+ private Map<String, String> servletClassNames = new HashMap<String,
String>();
+ // The optional JBossWS config-name
+ private String configName;
+ // The optional JBossWS config-file
+ private String configFile;
+ // The security-domain value assigned to the application
+ private String securityDomain;
+ // A HashMap<String, String> for webservice description publish locations
+ private PublishLocationAdapter publishLocationAdapter;
+ // web.xml security-constraints
+ private List<JSESecurityMetaData> securityMetaData;
+
+ public String getContextRoot()
+ {
+ return contextRoot;
+ }
+
+ public void setContextRoot(String contextRoot)
+ {
+ this.contextRoot = contextRoot;
+ }
+
+ public Map<String, String> getServletMappings()
+ {
+ return servletMappings;
+ }
+
+ public void setServletMappings(Map<String, String> servletMappings)
+ {
+ this.servletMappings = servletMappings;
+ }
+
+ public Map<String, String> getServletClassNames()
+ {
+ return servletClassNames;
+ }
+
+ public void setServletClassNames(Map<String, String> servletClassNames)
+ {
+ this.servletClassNames = servletClassNames;
+ }
+
+ public String getConfigName()
+ {
+ return configName;
+ }
+
+ public void setConfigName(String configName)
+ {
+ this.configName = configName;
+ }
+
+ public String getConfigFile()
+ {
+ return configFile;
+ }
+
+ public void setConfigFile(String configFile)
+ {
+ this.configFile = configFile;
+ }
+
+ public String getSecurityDomain()
+ {
+ return securityDomain;
+ }
+
+ public void setSecurityDomain(String securityDomain)
+ {
+ this.securityDomain = securityDomain;
+ }
+
+ public List<JSESecurityMetaData> getSecurityMetaData()
+ {
+ return securityMetaData;
+ }
+
+ public void setSecurityMetaData(List<JSESecurityMetaData> securityMetaData)
+ {
+ this.securityMetaData = securityMetaData;
+ }
+
+ public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
+ {
+ this.publishLocationAdapter = publishLocationAdapter;
+ }
+
+ public String getWsdlPublishLocationByName(String name)
+ {
+ String publishLocation = null;
+ if (publishLocationAdapter != null)
+ publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
+ return publishLocation;
+
+ }
+
+ public interface PublishLocationAdapter
+ {
+ String getWsdlPublishLocationByName(String name);
+ }
+}
Copied:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
(from rev 4012,
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebSecurityMetaData.java)
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/JSESecurityMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,89 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+// $Id$
+
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.HashSet;
+
+/**
+ *
+ * @author darran.lofthouse(a)jboss.com
+ * @since Oct 22, 2006
+ */
+public class JSESecurityMetaData
+{
+ // The optional security-constraint/user-data-constraint/transport-guarantee
+ private String transportGuarantee;
+ // The HashMap for the security-constraint/web-resource-collection elements.
+ private HashMap<String, JSEResourceCollection> webResources = new
HashMap<String, JSEResourceCollection>();
+
+ public JSEResourceCollection addWebResource(final String name)
+ {
+ JSEResourceCollection wrc = new JSEResourceCollection(name);
+ webResources.put(name, wrc);
+ return wrc;
+ }
+
+ public Collection<JSEResourceCollection> getWebResources()
+ {
+ return webResources.values();
+ }
+
+ public String getTransportGuarantee()
+ {
+ return transportGuarantee;
+ }
+
+ public void setTransportGuarantee(String transportGuarantee)
+ {
+ this.transportGuarantee = transportGuarantee;
+ }
+
+ public static class JSEResourceCollection
+ {
+ private String name;
+ private HashSet<String> urlPatterns = new HashSet<String>();
+
+ public JSEResourceCollection(final String name)
+ {
+ this.name = name;
+ }
+
+ public String getName()
+ {
+ return name;
+ }
+
+ public void addPattern(String pattern)
+ {
+ urlPatterns.add(pattern);
+ }
+
+ public HashSet<String> getUrlPatterns()
+ {
+ return urlPatterns;
+ }
+ }
+}
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/MDBMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/MDBMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/MDBMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,47 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+
+// $Id: UnifiedMessageDrivenMetaData.java 3146 2007-05-18 22:55:26Z
thomas.diesler(a)jboss.com $
+
+
+/**
+ * The container independent metadata of a message driven bean.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class MDBMetaData extends EJBMetaData
+{
+ private String destinationJndiName;
+
+ public String getDestinationJndiName()
+ {
+ return destinationJndiName;
+ }
+
+ public void setDestinationJndiName(String destinationJndiName)
+ {
+ this.destinationJndiName = destinationJndiName;
+ }
+}
Property changes on:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/MDBMetaData.java
___________________________________________________________________
Name: svn:executable
+ *
Added:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java
===================================================================
--- trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java
(rev 0)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/SLSBMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -0,0 +1,37 @@
+/*
+ * JBoss, Home of Professional Open Source
+ * Copyright 2005, JBoss Inc., and individual contributors as indicated
+ * by the @authors tag. See the copyright.txt in the distribution for a
+ * full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
+ */
+package org.jboss.wsf.spi.metadata.j2ee;
+
+
+// $Id: UnifiedSessionMetaData.java 3146 2007-05-18 22:55:26Z thomas.diesler(a)jboss.com $
+
+
+/**
+ * The container independent metadata of a stateless session bean.
+ *
+ * @author Thomas.Diesler(a)jboss.org
+ * @since 05-May-2006
+ */
+public class SLSBMetaData extends EJBMetaData
+{
+
+}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedApplicationMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedApplicationMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedApplicationMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,129 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-//$Id$
-
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
-
-/**
- * The container independent top level meta data from the jboss.xml and ejb-jar.xml
descriptor.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedApplicationMetaData
-{
- /** ArrayList<BeanMetaData> for the ejbs */
- private List<UnifiedBeanMetaData> beans = new
ArrayList<UnifiedBeanMetaData>();
- /** The optional JBossWS config-name */
- private String configName;
- /** The optional JBossWS config-file */
- private String configFile;
- /** The web context root to use for web services */
- private String webServiceContextRoot;
- /** The security-domain value assigned to the application */
- private String securityDomain;
- /** A HashMap<String, String> for webservice description publish locations */
- private PublishLocationAdapter publishLocationAdapter;
-
- public UnifiedBeanMetaData getBeanByEjbName(String ejbName)
- {
- for (UnifiedBeanMetaData beanMetaData : beans)
- {
- if (beanMetaData.getEjbName().equals(ejbName))
- {
- return beanMetaData;
- }
- }
- return null;
- }
-
- public Iterator<UnifiedBeanMetaData> getEnterpriseBeans()
- {
- return beans.iterator();
- }
-
- public void setEnterpriseBeans(List<UnifiedBeanMetaData> beans)
- {
- this.beans = beans;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getWebServiceContextRoot()
- {
- return webServiceContextRoot;
- }
-
- public void setWebServiceContextRoot(String contextRoot)
- {
- this.webServiceContextRoot = contextRoot;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
- public String getWsdlPublishLocationByName(String name)
- {
- String publishLocation = (publishLocationAdapter != null ?
publishLocationAdapter.getWsdlPublishLocationByName(name) : null);
- return publishLocation;
-
- }
-
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedBeanMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedBeanMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedBeanMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,138 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-//$Id$
-
-/**
- * The container independent common meta data class for the entity, message-driven and
session beans.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public abstract class UnifiedBeanMetaData
-{
- /** The ejb-name element specifies an enterprise bean's name. */
- private String ejbName;
- /** The ejb-class element contains the fully-qualified name of the enterprise
bean's class. */
- private String ejbClass;
- /** The home element contains the fully-qualified name of the enterprise
- bean's home interface. */
- private String homeClass;
- /** The local-home element contains the fully-qualified name of the
- enterprise bean's local home interface. */
- private String localHomeClass;
- /** The service-endpoint element contains the fully-qualified name of the beans
service endpoint interface (SEI) */
- protected String seiName;
- /** The JNDI name under with the home interface should be bound */
- private String jndiName;
- /** The JNDI name under with the local home interface should be bound */
- private String localJndiName;
- /** The jboss port-component binding for a ejb webservice */
- protected UnifiedEjbPortComponentMetaData portComponent;
-
- public String getEjbName()
- {
- return ejbName;
- }
-
- public void setEjbName(String ejbName)
- {
- this.ejbName = ejbName;
- }
-
- public String getEjbClass()
- {
- return ejbClass;
- }
-
- public void setEjbClass(String ejbClass)
- {
- this.ejbClass = ejbClass;
- }
-
- public UnifiedEjbPortComponentMetaData getPortComponent()
- {
- return portComponent;
- }
-
- public void setPortComponent(UnifiedEjbPortComponentMetaData portComponent)
- {
- this.portComponent = portComponent;
- }
-
- public String getServiceEndpointInterface()
- {
- return seiName;
- }
-
- public void setServiceEndpointInterface(String seiName)
- {
- this.seiName = seiName;
- }
-
- public String getContainerObjectNameJndiName()
- {
- return getHome() != null ? getJndiName() : getLocalJndiName();
- }
-
- public String getHome()
- {
- return homeClass;
- }
-
- public void setHome(String homeClass)
- {
- this.homeClass = homeClass;
- }
-
- public String getJndiName()
- {
- return jndiName;
- }
-
- public void setJndiName(String jndiName)
- {
- this.jndiName = jndiName;
- }
-
- public String getLocalHome()
- {
- return localHomeClass;
- }
-
- public void setLocalHome(String localHomeClass)
- {
- this.localHomeClass = localHomeClass;
- }
-
- public String getLocalJndiName()
- {
- return localJndiName;
- }
-
- public void setLocalJndiName(String localJndiName)
- {
- this.localJndiName = localJndiName;
- }
-
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedEjbPortComponentMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,91 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-
-//$Id$
-
-
-/**
- * The container independent metadata for session/port-component element from jboss.xml
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedEjbPortComponentMetaData
-{
- private String portComponentName;
- private String portComponentURI;
- private String authMethod;
- private String transportGuarantee;
- private Boolean secureWSDLAccess;
-
- public String getPortComponentName()
- {
- return portComponentName;
- }
-
- public void setPortComponentName(String portComponentName)
- {
- this.portComponentName = portComponentName;
- }
-
- public String getPortComponentURI()
- {
- return portComponentURI;
- }
-
- public void setPortComponentURI(String portComponentURI)
- {
- this.portComponentURI = portComponentURI;
- }
-
- public String getAuthMethod()
- {
- return authMethod;
- }
-
- public void setAuthMethod(String authMethod)
- {
- this.authMethod = authMethod;
- }
-
- public String getTransportGuarantee()
- {
- return transportGuarantee;
- }
-
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-
- public Boolean getSecureWSDLAccess()
- {
- return secureWSDLAccess;
- }
-
- public void setSecureWSDLAccess(Boolean secureWSDLAccess)
- {
- this.secureWSDLAccess = secureWSDLAccess;
- }
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedMessageDrivenMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedMessageDrivenMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,47 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-
-// $Id$
-
-
-/**
- * The container independent metadata of a message driven bean.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedMessageDrivenMetaData extends UnifiedBeanMetaData
-{
- private String destinationJndiName;
-
- public String getDestinationJndiName()
- {
- return destinationJndiName;
- }
-
- public void setDestinationJndiName(String destinationJndiName)
- {
- this.destinationJndiName = destinationJndiName;
- }
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedSessionMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedSessionMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedSessionMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-
-// $Id$
-
-
-/**
- * The container independent metadata of a message driven bean.
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedSessionMetaData extends UnifiedBeanMetaData
-{
-
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,143 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-//$Id$
-
-import java.util.HashMap;
-import java.util.List;
-import java.util.Map;
-
-/**
- * The container independent representation of the web.xml and jboss-web.xml deployment
descriptors
- *
- * @author Thomas.Diesler(a)jboss.org
- * @since 05-May-2006
- */
-public class UnifiedWebMetaData
-{
- /** The war context root as specified at the jboss-web.xml descriptor level. */
- private String contextRoot;
- /** The servlet-mapping <servlet-name, url-pattern> */
- private Map<String, String> servletMappings = new HashMap<String,
String>();
- /** The servlet <servlet-name, servlet-class> */
- private Map<String, String> servletClassNames = new HashMap<String,
String>();
- /** The optional JBossWS config-name */
- private String configName;
- /** The optional JBossWS config-file */
- private String configFile;
- /** The security-domain value assigned to the application */
- private String securityDomain;
- /** A HashMap<String, String> for webservice description publish locations */
- private PublishLocationAdapter publishLocationAdapter;
- /** web.xml security-constraints */
- private List<UnifiedWebSecurityMetaData> securityMetaData;
-
- public String getContextRoot()
- {
- return contextRoot;
- }
-
- public void setContextRoot(String contextRoot)
- {
- this.contextRoot = contextRoot;
- }
-
- public Map<String, String> getServletMappings()
- {
- return servletMappings;
- }
-
- public void setServletMappings(Map<String, String> servletMappings)
- {
- this.servletMappings = servletMappings;
- }
-
- public Map<String, String> getServletClassNames()
- {
- return servletClassNames;
- }
-
- public void setServletClassNames(Map<String, String> servletClassNames)
- {
- this.servletClassNames = servletClassNames;
- }
-
- public String getConfigName()
- {
- return configName;
- }
-
- public void setConfigName(String configName)
- {
- this.configName = configName;
- }
-
- public String getConfigFile()
- {
- return configFile;
- }
-
- public void setConfigFile(String configFile)
- {
- this.configFile = configFile;
- }
-
- public String getSecurityDomain()
- {
- return securityDomain;
- }
-
- public void setSecurityDomain(String securityDomain)
- {
- this.securityDomain = securityDomain;
- }
-
- public List<UnifiedWebSecurityMetaData> getSecurityMetaData()
- {
- return securityMetaData;
- }
-
- public void setSecurityMetaData(List<UnifiedWebSecurityMetaData>
securityMetaData)
- {
- this.securityMetaData = securityMetaData;
- }
-
- public void setPublishLocationAdapter(PublishLocationAdapter publishLocationAdapter)
- {
- this.publishLocationAdapter = publishLocationAdapter;
- }
-
- public String getWsdlPublishLocationByName(String name)
- {
- String publishLocation = null;
- if (publishLocationAdapter != null)
- publishLocation = publishLocationAdapter.getWsdlPublishLocationByName(name);
- return publishLocation;
-
- }
-
- public interface PublishLocationAdapter
- {
- String getWsdlPublishLocationByName(String name);
- }
-}
Deleted:
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebSecurityMetaData.java
===================================================================
---
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebSecurityMetaData.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/integration/spi/src/main/java/org/jboss/wsf/spi/metadata/j2ee/UnifiedWebSecurityMetaData.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -1,95 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source
- * Copyright 2005, JBoss Inc., and individual contributors as indicated
- * by the @authors tag. See the copyright.txt in the distribution for a
- * full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.wsf.spi.metadata.j2ee;
-
-import java.util.Collection;
-import java.util.HashMap;
-import java.util.HashSet;
-
-/**
- *
- * @author darran.lofthouse(a)jboss.com
- * @since Oct 22, 2006
- */
-public class UnifiedWebSecurityMetaData
-{
-
- /** The optional security-constraint/user-data-constraint/transport-guarantee */
- private String transportGuarantee;
-
- /**
- * The HashMap for the security-constraint/web-resource-collection
- * elements.
- */
- private HashMap<String, UnifiedWebResourceCollection> webResources = new
HashMap<String, UnifiedWebResourceCollection>();
-
- public UnifiedWebResourceCollection addWebResource(final String name)
- {
- UnifiedWebResourceCollection wrc = new UnifiedWebResourceCollection(name);
- webResources.put(name, wrc);
-
- return wrc;
- }
-
- public Collection<UnifiedWebResourceCollection> getWebResources()
- {
- return webResources.values();
- }
-
- public String getTransportGuarantee()
- {
- return transportGuarantee;
- }
-
- public void setTransportGuarantee(String transportGuarantee)
- {
- this.transportGuarantee = transportGuarantee;
- }
-
- public static class UnifiedWebResourceCollection
- {
- private String name;
- /** The required url-pattern element(s) */
- private HashSet<String> urlPatterns = new HashSet<String>();
-
- public UnifiedWebResourceCollection(final String name)
- {
- this.name = name;
- }
-
- public String getName()
- {
- return name;
- }
-
- public void addPattern(String pattern)
- {
- urlPatterns.add(pattern);
- }
-
- public HashSet<String> getUrlPatterns()
- {
- return urlPatterns;
- }
- }
-
-}
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/MetaDataBuilder.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -73,12 +73,12 @@
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.management.ServerConfig;
import org.jboss.wsf.spi.management.ServerConfigFactory;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedMessageDrivenMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData;
-import
org.jboss.wsf.spi.metadata.j2ee.UnifiedWebSecurityMetaData.UnifiedWebResourceCollection;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.MDBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSESecurityMetaData.JSEResourceCollection;
/** An abstract meta data builder.
*
@@ -204,20 +204,20 @@
idstr.append("," + ServerEndpointMetaData.SEPID_PROPERTY_ENDPOINT +
"=" + linkName);
// Add JMS destination JNDI name for MDB endpoints
- UnifiedApplicationMetaData apMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
if (apMetaData != null)
{
String ejbName = sepMetaData.getLinkName();
if (ejbName == null)
throw new WSException("Cannot obtain ejb-link from port
component");
- UnifiedBeanMetaData beanMetaData =
(UnifiedBeanMetaData)apMetaData.getBeanByEjbName(ejbName);
+ EJBMetaData beanMetaData = (EJBMetaData)apMetaData.getBeanByEjbName(ejbName);
if (beanMetaData == null)
throw new WSException("Cannot obtain ejb meta data for: " +
ejbName);
- if (beanMetaData instanceof UnifiedMessageDrivenMetaData)
+ if (beanMetaData instanceof MDBMetaData)
{
- UnifiedMessageDrivenMetaData mdMetaData =
(UnifiedMessageDrivenMetaData)beanMetaData;
+ MDBMetaData mdMetaData = (MDBMetaData)beanMetaData;
String jndiName = mdMetaData.getDestinationJndiName();
idstr.append(",jms=" + jndiName);
}
@@ -264,7 +264,7 @@
protected void initTransportGuaranteeJSE(Deployment dep, ServerEndpointMetaData
sepMetaData, String servletLink) throws IOException
{
String transportGuarantee = null;
- UnifiedWebMetaData webMetaData = dep.getAttachment(UnifiedWebMetaData.class);
+ JSEArchiveMetaData webMetaData = dep.getAttachment(JSEArchiveMetaData.class);
if (webMetaData != null)
{
Map<String, String> servletMappings = webMetaData.getServletMappings();
@@ -273,12 +273,12 @@
if (urlPattern == null)
throw new WSException("Cannot find <url-pattern> for servlet-name:
" + servletLink);
- List<UnifiedWebSecurityMetaData> securityList =
webMetaData.getSecurityMetaData();
- for (UnifiedWebSecurityMetaData currentSecurity : securityList)
+ List<JSESecurityMetaData> securityList =
webMetaData.getSecurityMetaData();
+ for (JSESecurityMetaData currentSecurity : securityList)
{
if (currentSecurity.getTransportGuarantee() != null &&
currentSecurity.getTransportGuarantee().length() > 0)
{
- for (UnifiedWebResourceCollection currentCollection :
currentSecurity.getWebResources())
+ for (JSEResourceCollection currentCollection :
currentSecurity.getWebResources())
{
for (String currentUrlPattern : currentCollection.getUrlPatterns())
{
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxrpc/JAXRPCServerMetaDataBuilder.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -43,11 +43,10 @@
import org.jboss.ws.metadata.wsse.WSSecurityConfiguration;
import org.jboss.ws.metadata.wsse.WSSecurityOMFactory;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.deployment.Deployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedEjbPortComponentMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedWebMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBSecurityMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.JSEArchiveMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData;
import org.jboss.wsf.spi.metadata.j2ee.serviceref.UnifiedHandlerMetaData.HandlerType;
import org.jboss.wsf.spi.metadata.webservices.PortComponentMetaData;
@@ -105,9 +104,7 @@
// Assign the WS-Security configuration,
WSSecurityConfigFactory wsseConfFactory =
WSSecurityConfigFactory.newInstance();
- WSSecurityConfiguration securityConfiguration =
wsseConfFactory.createConfiguration(
- wsMetaData.getRootFile(), WSSecurityOMFactory.SERVER_RESOURCE_NAME
- );
+ WSSecurityConfiguration securityConfiguration =
wsseConfFactory.createConfiguration(wsMetaData.getRootFile(),
WSSecurityOMFactory.SERVER_RESOURCE_NAME);
serviceMetaData.setSecurityConfiguration(securityConfiguration);
// For every port-component build the EndpointMetaData
@@ -144,8 +141,8 @@
initEndpointAddress(dep, sepMetaData);
- UnifiedApplicationMetaData apMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
- UnifiedWebMetaData webMetaData =
dep.getAttachment(UnifiedWebMetaData.class);
+ EJBArchiveMetaData apMetaData =
dep.getAttachment(EJBArchiveMetaData.class);
+ JSEArchiveMetaData webMetaData =
dep.getAttachment(JSEArchiveMetaData.class);
if (apMetaData != null)
{
wsMetaData.setSecurityDomain(apMetaData.getSecurityDomain());
@@ -156,8 +153,8 @@
serviceMetaData.setWsdlPublishLocation(wsdlPublishLocation);
// Copy <port-component> meta data
- UnifiedBeanMetaData beanMetaData =
apMetaData.getBeanByEjbName(linkName);
- if (beanMetaData == null)
+ EJBMetaData bmd = apMetaData.getBeanByEjbName(linkName);
+ if (bmd == null)
throw new WSException("Cannot obtain UnifiedBeanMetaData for:
" + linkName);
String configName = apMetaData.getConfigName();
@@ -165,24 +162,15 @@
if (configName != null || configFile != null)
sepMetaData.setConfigName(configName, configFile);
- UnifiedEjbPortComponentMetaData bpcMetaData =
beanMetaData.getPortComponent();
- if (bpcMetaData != null)
+ EJBSecurityMetaData smd = bmd.getSecurityMetaData();
+ if (smd != null)
{
- if (bpcMetaData.getAuthMethod() != null)
- {
- String authMethod = bpcMetaData.getAuthMethod();
- sepMetaData.setAuthMethod(authMethod);
- }
- if (bpcMetaData.getTransportGuarantee() != null)
- {
- String transportGuarantee = bpcMetaData.getTransportGuarantee();
- sepMetaData.setTransportGuarantee(transportGuarantee);
- }
- if (bpcMetaData.getSecureWSDLAccess() != null)
- {
- Boolean secureWSDLAccess = bpcMetaData.getSecureWSDLAccess();
- sepMetaData.setSecureWSDLAccess(secureWSDLAccess);
- }
+ String authMethod = smd.getAuthMethod();
+ sepMetaData.setAuthMethod(authMethod);
+ String transportGuarantee = smd.getTransportGuarantee();
+ sepMetaData.setTransportGuarantee(transportGuarantee);
+ Boolean secureWSDLAccess = smd.getSecureWSDLAccess();
+ sepMetaData.setSecureWSDLAccess(secureWSDLAccess);
}
}
else if (webMetaData != null)
Modified:
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java
===================================================================
---
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-07-27
03:15:32 UTC (rev 4012)
+++
trunk/jbossws-core/src/main/java/org/jboss/ws/metadata/builder/jaxws/JAXWSMetaDataBuilderEJB3.java 2007-07-27
04:37:52 UTC (rev 4013)
@@ -32,8 +32,8 @@
import org.jboss.ws.WSException;
import org.jboss.ws.metadata.umdm.UnifiedMetaData;
import org.jboss.wsf.spi.deployment.ArchiveDeployment;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedApplicationMetaData;
-import org.jboss.wsf.spi.metadata.j2ee.UnifiedBeanMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBArchiveMetaData;
+import org.jboss.wsf.spi.metadata.j2ee.EJBMetaData;
/**
* A server side meta data builder that is based on JSR-181 annotations
@@ -61,11 +61,11 @@
wsMetaData.setClassLoader(dep.getInitialClassLoader());
// The container objects below provide access to all of the ejb metadata
- UnifiedApplicationMetaData apMetaData =
dep.getAttachment(UnifiedApplicationMetaData.class);
- Iterator<UnifiedBeanMetaData> it = apMetaData.getEnterpriseBeans();
+ EJBArchiveMetaData apMetaData = dep.getAttachment(EJBArchiveMetaData.class);
+ Iterator<EJBMetaData> it = apMetaData.getEnterpriseBeans();
while (it.hasNext())
{
- UnifiedBeanMetaData beanMetaData = it.next();
+ EJBMetaData beanMetaData = it.next();
String ejbClassName = beanMetaData.getEjbClass();
Class<?> beanClass =
wsMetaData.getClassLoader().loadClass(ejbClassName);
if (beanClass.isAnnotationPresent(WebService.class) ||
beanClass.isAnnotationPresent(WebServiceProvider.class))