[jboss-cvs] JBossAS SVN: r109227 - in branches/switchboard-integration: server/src/etc/deployers and 2 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Nov 10 10:10:44 EST 2010
Author: richard.opalka at jboss.com
Date: 2010-11-10 10:10:44 -0500 (Wed, 10 Nov 2010)
New Revision: 109227
Added:
branches/switchboard-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java
Modified:
branches/switchboard-integration/component-matrix/pom.xml
branches/switchboard-integration/server/src/etc/deployers/switchboard-jboss-beans.xml
branches/switchboard-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
Log:
[JBAS-8625] Implemented WebServiceContext switchboard RP
Modified: branches/switchboard-integration/component-matrix/pom.xml
===================================================================
--- branches/switchboard-integration/component-matrix/pom.xml 2010-11-10 12:49:55 UTC (rev 109226)
+++ branches/switchboard-integration/component-matrix/pom.xml 2010-11-10 15:10:44 UTC (rev 109227)
@@ -54,7 +54,7 @@
<version.jboss.jbossts>4.11.0.Final</version.jboss.jbossts>
<version.jboss.jbossws-native>3.4.0.CR3</version.jboss.jbossws-native>
<version.jboss.jbossws-cxf>3.4.0.CR3</version.jboss.jbossws-cxf>
- <version.jboss.jbossws-common>1.4.0.CR3</version.jboss.jbossws-common>
+ <version.jboss.jbossws-common>1.4.0.CR3.SP1</version.jboss.jbossws-common>
<version.jboss.jbossws-framework>3.4.0.CR3</version.jboss.jbossws-framework>
<version.jboss.jbossws-spi>1.4.0.CR3</version.jboss.jbossws-spi>
<version.jboss.jms-integration-tests>1.0.1.GA</version.jboss.jms-integration-tests>
Modified: branches/switchboard-integration/server/src/etc/deployers/switchboard-jboss-beans.xml
===================================================================
--- branches/switchboard-integration/server/src/etc/deployers/switchboard-jboss-beans.xml 2010-11-10 12:49:55 UTC (rev 109226)
+++ branches/switchboard-integration/server/src/etc/deployers/switchboard-jboss-beans.xml 2010-11-10 15:10:44 UTC (rev 109227)
@@ -26,13 +26,17 @@
<key>java.net.URL</key>
<value><bean name="org.jboss.switchboard.URLResourceProvider" class="org.jboss.switchboard.mc.resource.provider.URLResourceProvider"/></value>
</entry>
- </map>
+ <entry>
+ <key>javax.xml.ws.WebServiceContext</key>
+ <value><inject bean="org.jboss.switchboard.WebServiceContextResourceProvider"/></value>
+ </entry>
+ </map>
</property>
</bean>
<!-- ResourceProvider for java:comp/UserTransaction (EE.5.10 of Java EE 6 spec) -->
<bean name="org.jboss.switchboard.UserTransactionRefResourceProvider" class="org.jboss.as.switchboard.resource.provider.UserTransactionRefResourceProvider"/>
-
+
<!-- ResourceProvider for java:comp/TransactionSynchronizationRegistry (EE.5.11 of Java EE 6 spec) -->
<bean name="org.jboss.switchboard.TransactionSyncRegistryRefResourceProvider" class="org.jboss.as.switchboard.resource.provider.TransactionSynchronizationRefResourceProvider"/>
Added: branches/switchboard-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java
===================================================================
--- branches/switchboard-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java (rev 0)
+++ branches/switchboard-integration/webservices/src/main/java/org/jboss/webservices/integration/injection/WebServiceContextResourceProvider.java 2010-11-10 15:10:44 UTC (rev 109227)
@@ -0,0 +1,76 @@
+/*
+ * JBoss, Home of Professional Open Source.
+ * Copyright 2009, Red Hat Middleware LLC, and individual contributors
+ * as indicated by the @author tags. See the copyright.txt file in the
+ * distribution for a full listing of individual contributors.
+ *
+ * This is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU Lesser General Public License as
+ * published by the Free Software Foundation; either version 2.1 of
+ * the License, or (at your option) any later version.
+ *
+ * This software is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this software; if not, write to the Free
+ * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
+ * 02110-1301 USA, or see the FSF site: http://www.fsf.org.
+ */
+package org.jboss.webservices.integration.injection;
+
+import javax.xml.ws.WebServiceContext;
+
+import org.jboss.deployers.structure.spi.DeploymentUnit;
+import org.jboss.switchboard.javaee.jboss.environment.JBossResourceRefType;
+import org.jboss.switchboard.mc.spi.MCBasedResourceProvider;
+import org.jboss.switchboard.spi.Resource;
+import org.jboss.wsf.common.injection.ThreadLocalAwareWebServiceContext;
+
+/**
+ * WebServiceContext resource provider.
+ *
+ * @author <a href="mailto:ropalka at redhat.com">Richard Opalka</a>
+ */
+public final class WebServiceContextResourceProvider implements MCBasedResourceProvider<JBossResourceRefType>
+{
+
+ @Override
+ public Resource provide(final DeploymentUnit unit, final JBossResourceRefType type)
+ {
+ return new WebServiceContextResource(ThreadLocalAwareWebServiceContext.getInstance());
+ }
+
+ @Override
+ public Class<JBossResourceRefType> getEnvironmentEntryType()
+ {
+ return JBossResourceRefType.class;
+ }
+
+ /**
+ * Switchboard web service context resource.
+ */
+ private static final class WebServiceContextResource implements Resource
+ {
+ private final WebServiceContext target;
+
+ private WebServiceContextResource(final WebServiceContext target)
+ {
+ this.target = target;
+ }
+
+ @Override
+ public Object getDependency()
+ {
+ return null;
+ }
+
+ @Override
+ public Object getTarget()
+ {
+ return this.target;
+ }
+ }
+}
Modified: branches/switchboard-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
--- branches/switchboard-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-11-10 12:49:55 UTC (rev 109226)
+++ branches/switchboard-integration/webservices/src/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2010-11-10 15:10:44 UTC (rev 109227)
@@ -2,12 +2,18 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <!-- processes service-ref (@WebServiceRef) resources (EE.5.6 of Java EE6 spec) -->
+ <!-- processes @WebServiceRef resources and their DD equivalents (EE.5.6 of Java EE6 spec) -->
<bean
name="org.jboss.switchboard.WebServiceRefResourceProvider"
class="org.jboss.webservices.integration.injection.ServiceRefResourceProvider"
/>
+ <!-- processes @Resource annotated WebServiceContext beans (EE.5.6 of Java EE6 spec) -->
+ <bean
+ name="org.jboss.switchboard.WebServiceContextResourceProvider"
+ class="org.jboss.webservices.integration.injection.WebServiceContextResourceProvider"
+ />
+
<!-- Wraps single instance of the kernel -->
<bean name="WSIoCContainerProxy" class="org.jboss.webservices.integration.ioc.IoCContainerProxyImpl">
<property name="kernel"><inject bean="jboss.kernel:service=Kernel"/></property>
More information about the jboss-cvs-commits
mailing list