Author: richard.opalka(a)jboss.com
Date: 2009-09-24 09:07:03 -0400 (Thu, 24 Sep 2009)
New Revision: 10771
Added:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
Modified:
container/jboss50/branches/ropalka/pom.xml
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
Log:
[JBWS-2772] removing AS IL dependency
Modified: container/jboss50/branches/ropalka/pom.xml
===================================================================
--- container/jboss50/branches/ropalka/pom.xml 2009-09-24 13:05:14 UTC (rev 10770)
+++ container/jboss50/branches/ropalka/pom.xml 2009-09-24 13:07:03 UTC (rev 10771)
@@ -24,8 +24,8 @@
<!-- Properties -->
<properties>
- <jbossws.common.version>1.2.0.GA</jbossws.common.version>
- <jbossws.spi.version>1.2.0.GA</jbossws.spi.version>
+ <jbossws.common.version>1.2.1-SNAPSHOT</jbossws.common.version>
+ <jbossws.spi.version>1.2.1-SNAPSHOT</jbossws.spi.version>
<!--
JBoss component versions taken from
Added:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
===================================================================
---
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/config/ServerConfigFactoryImpl.java 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1,65 @@
+/*
+ * 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.config;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+import org.jboss.wsf.spi.management.ServerConfig;
+import org.jboss.wsf.spi.management.ServerConfigFactory;
+
+/**
+ * Retrieves webservices stack specific config from MC kernel.
+ *
+ * @author <a href="mailto:hbraun@redhat.com">Heiko Braun</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class ServerConfigFactoryImpl extends ServerConfigFactory
+{
+
+ /** The bean name in the kernel registry. */
+ private static final String BEAN_NAME = "WSServerConfig";
+
+ /**
+ * Constructor.
+ */
+ public ServerConfigFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * Returns config registered in MC kernel.
+ *
+ * @return config
+ */
+ public ServerConfig getServerConfig()
+ {
+ final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ final IoCContainerProxyFactory iocContainerFactory =
spiProvider.getSPI(IoCContainerProxyFactory.class);
+ final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
+
+ return iocContainer.getBean(ServerConfigFactoryImpl.BEAN_NAME,
ServerConfig.class);
+ }
+
+}
Added:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
===================================================================
---
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/endpoint/HttpServerFactoryImpl.java 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1,66 @@
+/*
+ * 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.endpoint;
+
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
+import org.jboss.wsf.spi.http.HttpServer;
+import org.jboss.wsf.spi.http.HttpServerFactory;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+
+/**
+ * Lookups http server inside MC container.
+ *
+ * @author <a href="mailto:tdiesler@redhat.com">Thomas Diesler</a>
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class HttpServerFactoryImpl extends HttpServerFactory
+{
+
+ /** The default bean name. */
+ private static final String BEAN_NAME = "WSHTTPServer";
+
+ /**
+ * Constructor.
+ */
+ public HttpServerFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * Returns http server registered in MC kernel.
+ *
+ * @return http server
+ */
+ @Override
+ public HttpServer getHttpServer()
+ {
+ final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ final IoCContainerProxyFactory iocContainerFactory =
spiProvider.getSPI(IoCContainerProxyFactory.class);
+ final IoCContainerProxy iocContainer = iocContainerFactory.getContainer();
+
+ return iocContainer.getBean(HttpServerFactoryImpl.BEAN_NAME, HttpServer.class);
+ }
+
+}
Modified:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java
===================================================================
---
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-09-24
13:05:14 UTC (rev 10770)
+++
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/invocation/InvocationHandlerEJB3.java 2009-09-24
13:07:03 UTC (rev 10771)
@@ -25,14 +25,15 @@
import javax.xml.ws.WebServiceException;
-import org.jboss.dependency.spi.ControllerContext;
-import org.jboss.kernel.spi.dependency.KernelController;
import org.jboss.webservices.integration.util.ASHelper;
+import org.jboss.wsf.spi.SPIProvider;
+import org.jboss.wsf.spi.SPIProviderResolver;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.invocation.Invocation;
import org.jboss.wsf.spi.invocation.integration.InvocationContextCallback;
import org.jboss.wsf.spi.invocation.integration.ServiceEndpointContainer;
-import org.jboss.wsf.spi.util.KernelLocator;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
/**
* Handles invocations on EJB3 endpoints.
@@ -44,7 +45,7 @@
{
/** MC kernel controller. */
- private final KernelController controller;
+ private final IoCContainerProxy iocContainer;
/** EJB3 container name. */
private String containerName;
@@ -59,7 +60,9 @@
{
super();
- this.controller = KernelLocator.getKernel().getController();
+ final SPIProvider spiProvider = SPIProviderResolver.getInstance().getProvider();
+ final IoCContainerProxyFactory iocContainerFactory =
spiProvider.getSPI(IoCContainerProxyFactory.class);
+ this.iocContainer = iocContainerFactory.getContainer();
}
/**
@@ -88,13 +91,11 @@
if (ejb3ContainerNotInitialized)
{
- final ControllerContext context =
this.controller.getInstalledContext(this.containerName);
- if (context == null)
+ this.serviceEndpointContainer = this.iocContainer.getBean(this.containerName,
ServiceEndpointContainer.class);
+ if (this.serviceEndpointContainer == null)
{
throw new WebServiceException("Cannot find service endpoint target:
" + this.containerName);
}
-
- this.serviceEndpointContainer = (ServiceEndpointContainer) context.getTarget();
}
return this.serviceEndpointContainer;
Added:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
===================================================================
---
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyFactoryImpl.java 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1,56 @@
+/*
+ * 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.ioc;
+
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+import org.jboss.wsf.spi.ioc.IoCContainerProxyFactory;
+
+/**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class IoCContainerProxyFactoryImpl implements IoCContainerProxyFactory
+{
+
+ /** Container proxy singleton. */
+ private static final IoCContainerProxy CONTAINER =
IoCContainerProxyImpl.getInstance();
+
+ /**
+ * Constructor.
+ */
+ public IoCContainerProxyFactoryImpl()
+ {
+ super();
+ }
+
+ /**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxyFactory#getContainer()
+ *
+ * @return IoC container proxy
+ */
+ public IoCContainerProxy getContainer()
+ {
+ return IoCContainerProxyFactoryImpl.CONTAINER;
+ }
+
+}
Added:
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
===================================================================
---
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/java/org/jboss/webservices/integration/ioc/IoCContainerProxyImpl.java 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1,88 @@
+/*
+ * 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.ioc;
+
+import org.jboss.dependency.spi.ControllerContext;
+import org.jboss.kernel.Kernel;
+import org.jboss.kernel.spi.dependency.KernelController;
+import org.jboss.wsf.spi.ioc.IoCContainerProxy;
+
+/**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxy
+ *
+ * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
+ */
+public final class IoCContainerProxyImpl implements IoCContainerProxy
+{
+
+ /** Singleton. */
+ private static final IoCContainerProxy SINGLETON = new IoCContainerProxyImpl();
+ /** JBoss MC kernel. */
+ private static Kernel kernel;
+
+ /**
+ * Constructor.
+ */
+ public IoCContainerProxyImpl()
+ {
+ super();
+ }
+
+ /**
+ * Returns container proxy instance.
+ *
+ * @return container proxy instance
+ */
+ static IoCContainerProxy getInstance()
+ {
+ return IoCContainerProxyImpl.SINGLETON;
+ }
+
+ /**
+ * Sets JBoss kernel - invoked via MC injection.
+ *
+ * @param kernel JBoss kernel
+ */
+ public void setKernel(final Kernel kernel)
+ {
+ IoCContainerProxyImpl.kernel = kernel;
+ }
+
+ /**
+ * @see org.jboss.wsf.spi.ioc.IoCContainerProxy#getBean(java.lang.String,
java.lang.Class)
+ *
+ * @param <T> bean type
+ * @param beanName bean name inside IoC registry
+ * @param clazz bean type class
+ * @return bean instance
+ * @throws IllegalArgumentException if bean is not found
+ */
+ @SuppressWarnings("unchecked")
+ public <T> T getBean(final String beanName, final Class<T> clazz)
+ {
+ final KernelController controller = IoCContainerProxyImpl.kernel.getController();
+ final ControllerContext ctx = controller.getInstalledContext(beanName);
+
+ return (T)ctx.getTarget();
+ }
+
+}
Modified:
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml
===================================================================
---
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-24
13:05:14 UTC (rev 10770)
+++
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.deployer/META-INF/stack-agnostic-jboss-beans.xml 2009-09-24
13:07:03 UTC (rev 10771)
@@ -2,14 +2,18 @@
<deployment xmlns="urn:jboss:bean-deployer:2.0">
- <!-- Locate the single instance of the kernel -->
- <bean name="WSKernelLocator"
class="org.jboss.wsf.spi.util.KernelLocator">
+ <!-- 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>
</bean>
<!-- Locate the single instance of the MBeanServer -->
<bean name="WSMBeanServerLocator"
class="org.jboss.wsf.framework.management.MBeanServerLocator">
- <property name="mbeanServer"><inject bean="JMXKernel"
property="mbeanServer"/></property>
+ <constructor>
+ <parameter>
+ <inject bean="JMXKernel" property="mbeanServer"/>
+ </parameter>
+ </constructor>
</bean>
<!-- Endpoint API http server -->
Added:
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
===================================================================
---
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.http.HttpServerFactory 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.endpoint.HttpServerFactoryImpl
\ No newline at end of file
Added:
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
===================================================================
---
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory
(rev 0)
+++
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.ioc.IoCContainerProxyFactory 2009-09-24
13:07:03 UTC (rev 10771)
@@ -0,0 +1 @@
+org.jboss.webservices.integration.ioc.IoCContainerProxyFactoryImpl
\ No newline at end of file
Modified:
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory
===================================================================
---
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory 2009-09-24
13:05:14 UTC (rev 10770)
+++
container/jboss50/branches/ropalka/src/main/resources/jbossws-jboss.jar/META-INF/services/org.jboss.wsf.spi.management.ServerConfigFactory 2009-09-24
13:07:03 UTC (rev 10771)
@@ -1 +1 @@
-org.jboss.wsf.framework.management.ServerConfigFactoryImpl
\ No newline at end of file
+org.jboss.webservices.integration.config.ServerConfigFactoryImpl
\ No newline at end of file