Author: richard.opalka(a)jboss.com
Date: 2012-09-20 04:17:56 -0400 (Thu, 20 Sep 2012)
New Revision: 16744
Removed:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/servlet/
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
Log:
[JBWS-3550] removin useless classes
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/deployment/AbstractDefaultEndpoint.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -33,7 +33,6 @@
import org.jboss.ws.api.monitoring.RecordFilter;
import org.jboss.ws.api.monitoring.RecordProcessor;
import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.injection.PreDestroyHolder;
import org.jboss.wsf.spi.deployment.AbstractExtensible;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.EndpointState;
@@ -218,26 +217,14 @@
@Override
public <T> T addAttachment(Class<T> clazz, Object obj)
{
- boolean isPreDestroyHolderClass = clazz.equals(PreDestroyHolder.class); //
JBWS-2268 hack
- boolean isObjectClass = clazz.equals(Object.class); // JBWS-2486 hack
-
- if (!isPreDestroyHolderClass && !isObjectClass)
- {
- assertEndpointSetterAccess();
- }
+ assertEndpointSetterAccess();
return super.addAttachment(clazz, obj);
}
@Override
public <T> T removeAttachment(Class<T> key)
{
- boolean isPreDestroyHolderClass = key.equals(PreDestroyHolder.class); // JBWS-2268
hack
- boolean isObjectClass = key.equals(Object.class); // JBWS-2486 hack
-
- if (!isPreDestroyHolderClass && !isObjectClass)
- {
- assertEndpointSetterAccess();
- }
+ assertEndpointSetterAccess();
return super.removeAttachment(key);
}
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/InjectionHelper.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -24,14 +24,9 @@
import java.lang.reflect.Field;
import java.lang.reflect.Method;
import java.util.Collection;
-import java.util.ResourceBundle;
import javax.xml.ws.WebServiceContext;
-import org.jboss.logging.Logger;
-import org.jboss.ws.api.util.BundleUtils;
-import org.jboss.ws.common.injection.finders.PostConstructMethodFinder;
-import org.jboss.ws.common.injection.finders.PreDestroyMethodFinder;
import org.jboss.ws.common.injection.finders.ResourceFieldFinder;
import org.jboss.ws.common.injection.finders.ResourceMethodFinder;
import org.jboss.ws.common.reflection.ClassProcessor;
@@ -43,22 +38,13 @@
*/
public final class InjectionHelper
{
- private static final ResourceBundle bundle =
BundleUtils.getBundle(InjectionHelper.class);
-
- private static final Logger LOG = Logger.getLogger(InjectionHelper.class);
-
- private static final ClassProcessor<Method> POST_CONSTRUCT_METHOD_FINDER = new
PostConstructMethodFinder();
- private static final ClassProcessor<Method> PRE_DESTROY_METHOD_FINDER = new
PreDestroyMethodFinder();
private static final ClassProcessor<Method> WEB_SERVICE_CONTEXT_METHOD_FINDER =
new ResourceMethodFinder(WebServiceContext.class, true);
private static final ClassProcessor<Field> WEB_SERVICE_CONTEXT_FIELD_FINDER =
new ResourceFieldFinder(WebServiceContext.class, true);
/**
* Forbidden constructor.
*/
- private InjectionHelper()
- {
- super();
- }
+ private InjectionHelper() {}
/**
* Injects @Resource annotated accessible objects referencing WebServiceContext.
@@ -102,68 +88,6 @@
}
/**
- * Calls @PostConstruct annotated method if exists.
- *
- * @param instance to invoke @PostConstruct annotated method on
- * @see org.jboss.ws.common.injection.finders.PostConstructMethodFinder
- * @see javax.annotation.PostConstruct
- */
- public static void callPostConstructMethod(final Object instance)
- {
- if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"OBJECT_INSTANCE_CANNOT_BE_NULL"));
-
- final Collection<Method> methods =
POST_CONSTRUCT_METHOD_FINDER.process(instance.getClass());
-
- if (methods.size() > 0)
- {
- final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PostConstruct annotated method: " + method);
- try
- {
- invokeMethod(instance, method, null);
- }
- catch (Exception e)
- {
- final String message = "Calling of @PostConstruct annotated method
failed: " + method;
- InjectionException.rethrow(message, e);
- }
- }
- }
-
- /**
- * Calls @PreDestroy annotated method if exists.
- *
- * @param instance to invoke @PreDestroy annotated method on
- * @see org.jboss.ws.common.injection.finders.PreDestroyMethodFinder
- * @see javax.annotation.PreDestroy
- */
- public static void callPreDestroyMethod(final Object instance)
- {
- if (instance == null)
- throw new IllegalArgumentException(BundleUtils.getMessage(bundle,
"OBJECT_INSTANCE_CANNOT_BE_NULL"));
-
- final Collection<Method> methods =
PRE_DESTROY_METHOD_FINDER.process(instance.getClass());
-
- if (methods.size() > 0)
- {
- final Method method = methods.iterator().next();
- if (LOG.isTraceEnabled())
- LOG.trace("Calling @PreDestroy annotated method: " + method);
- try
- {
- invokeMethod(instance, method, null);
- }
- catch (Exception e)
- {
- final String message = "Calling of @PreDestroy annotated method failed:
" + method;
- InjectionException.rethrow(message, e);
- }
- }
- }
-
- /**
* Invokes method on object with specified arguments.
*
* @param instance to invoke method on
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/PreDestroyHolder.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,62 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.injection;
-
-/**
- * Utility class for pre destroy registration.
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard
Opalka</a>
- */
-public final class PreDestroyHolder
-{
-
- private final Object object;
- private final int hashCode;
-
- public PreDestroyHolder(Object object)
- {
- super();
- this.hashCode = System.identityHashCode(object);
- this.object = object;
- }
-
- public final Object getObject()
- {
- return this.object;
- }
-
- public final boolean equals(Object o)
- {
- if (o instanceof PreDestroyHolder)
- {
- return ((PreDestroyHolder)o).hashCode == this.hashCode;
- }
-
- return false;
- }
-
- public final int hashCode()
- {
- return this.hashCode;
- }
-
-}
\ No newline at end of file
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/AbstractPostConstructPreDestroyAnnotatedMethodFinder.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,71 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.injection.finders;
-
-import java.lang.annotation.Annotation;
-import java.lang.reflect.Method;
-import java.util.Collection;
-
-import org.jboss.ws.common.reflection.AnnotatedMethodFinder;
-
-/**
- * Abstract @PostConstruct and @PreDestroy annotations method finder.
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard
Opalka</a>
- */
-abstract class AbstractPostConstructPreDestroyAnnotatedMethodFinder<A extends
Annotation>
-extends AnnotatedMethodFinder<A>
-{
-
- /**
- * Constructor.
- *
- * @param annotationClass annotation.
- */
- AbstractPostConstructPreDestroyAnnotatedMethodFinder(final Class<A>
annotationClass)
- {
- super(annotationClass);
- }
-
- @Override
- public void validate(final Collection<Method> methods)
- {
- super.validate(methods);
-
- // Ensure all methods preconditions
- ReflectionUtils.assertOnlyOneMethod(methods, getAnnotation());
- }
-
- @Override
- public void validate(final Method method)
- {
- super.validate(method);
-
- // Ensure all method preconditions
- Class<A> annotation = getAnnotation();
- ReflectionUtils.assertNoParameters(method, annotation);
- ReflectionUtils.assertVoidReturnType(method, annotation);
- ReflectionUtils.assertNoCheckedExceptionsAreThrown(method, annotation);
- ReflectionUtils.assertNotStatic(method, annotation);
- }
-
-}
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PostConstructMethodFinder.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.injection.finders;
-
-import javax.annotation.PostConstruct;
-
-/**
- * @PostConstruct method finder.
- *
- * The PostConstruct annotation is used on a method that needs to be executed after
dependency injection is done
- * to perform any initialization. This method MUST be invoked before the class is put
into service. This annotation
- * MUST be supported on all classes that support dependency injection. The method
annotated with PostConstruct MUST
- * be invoked even if the class does not request any resources to be injected. Only one
method can be annotated with
- * this annotation. The method on which the PostConstruct annotation is applied MUST
fulfill all of the following criteria:
- * <ul>
- * <li>The method MUST NOT have any parameters.
- * <li>The return type of the method MUST be void.
- * <li>The method MUST NOT throw a checked exception.
- * <li>The method on which PostConstruct is applied MAY be public, protected,
package private or private.
- * <li>The method MUST NOT be static.
- * <li>The method MAY be final.
- * <li>If the method throws an unchecked exception the class MUST NOT be put into
service.
- * </ul>
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard
Opalka</a>
- */
-public final class PostConstructMethodFinder
-extends AbstractPostConstructPreDestroyAnnotatedMethodFinder<PostConstruct>
-{
-
- /**
- * Constructor.
- */
- public PostConstructMethodFinder()
- {
- super(PostConstruct.class);
- }
-
-}
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/injection/finders/PreDestroyMethodFinder.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,58 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2009, Red Hat Middleware LLC, and individual contributors
- * as indicated by the @author tags. See the copyright.txt file in the
- * distribution for a full listing of individual contributors.
- *
- * This is free software; you can redistribute it and/or modify it
- * under the terms of the GNU Lesser General Public License as
- * published by the Free Software Foundation; either version 2.1 of
- * the License, or (at your option) any later version.
- *
- * This software is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- * Lesser General Public License for more details.
- *
- * You should have received a copy of the GNU Lesser General Public
- * License along with this software; if not, write to the Free
- * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
- * 02110-1301 USA, or see the FSF site:
http://www.fsf.org.
- */
-package org.jboss.ws.common.injection.finders;
-
-import javax.annotation.PreDestroy;
-
-/**
- * @PreDestroy method finder.
- *
- * The PreDestroy annotation is used on methods as a callback notification to signal that
the instance
- * is in the process of being removed by the container. The method annotated with
PreDestroy is typically
- * used to release resources that it has been holding. This annotation MUST be supported
by all container
- * managed objects that support PostConstruct except the application client container in
Java EE 5.
- * The method on which the PreDestroy annotation is applied MUST fulfill all of the
following criteria:
- * <ul>
- * <li>The method MUST NOT have any parameters.
- * <li>The return type of the method MUST be void.
- * <li>The method MUST NOT throw a checked exception.
- * <li>The method on which PreDestroy is applied MAY be public, protected,
package private or private.
- * <li>The method MUST NOT be static.
- * <li>The method MAY be final.
- * <li>If the method throws an unchecked exception it is ignored.
- * </ul>
- *
- * @author <a href="mailto:richard.opalka@jboss.org">Richard
Opalka</a>
- */
-public final class PreDestroyMethodFinder
-extends AbstractPostConstructPreDestroyAnnotatedMethodFinder<PreDestroy>
-{
-
- /**
- * Constructor.
- */
- public PreDestroyMethodFinder()
- {
- super(PreDestroy.class);
- }
-
-}
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/DefaultResourceInjectorFactory.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,37 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.invocation;
-
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * @author Heiko.Braun(a)jboss.com
- * Created: Jul 19, 2007
- */
-public class DefaultResourceInjectorFactory extends ResourceInjectorFactory
-{
- public ResourceInjector newResourceInjector()
- {
- return new WebServiceContextInjector();
- }
-}
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/InvocationHandlerJAXWS.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -24,7 +24,6 @@
import javax.xml.ws.WebServiceContext;
import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.ws.common.injection.PreDestroyHolder;
import org.jboss.ws.common.injection.ThreadLocalAwareWebServiceContext;
import org.jboss.wsf.spi.deployment.Endpoint;
import org.jboss.wsf.spi.deployment.Reference;
@@ -56,15 +55,6 @@
final Object targetBean = reference.getValue();
InjectionHelper.injectWebServiceContext(targetBean,
ThreadLocalAwareWebServiceContext.getInstance());
-
- if (!reference.isInitialized())
- {
- this.log.debug("Calling postConstruct method on JAXWS JSE endpoint: "
+ targetBean);
- InjectionHelper.callPostConstructMethod(targetBean);
- reference.setInitialized();
- }
-
- endpoint.addAttachment(PreDestroyHolder.class, new PreDestroyHolder(targetBean));
}
/**
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextAdapter.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,61 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2010, 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.ws.common.invocation;
-
-import java.security.Principal;
-
-import javax.servlet.http.HttpServletRequest;
-import javax.xml.ws.WebServiceContext;
-import javax.xml.ws.handler.MessageContext;
-
-import org.jboss.wsf.spi.invocation.WebServiceContextDelegate;
-
-/**
- * Web service context which security related methods delegate to servlet container.
- *
- * @author alessio.soldano(a)jboss.com
- * @author <a href="mailto:ropalka@redhat.com">Richard Opalka</a>
- */
-public final class WebServiceContextAdapter extends WebServiceContextDelegate
-{
-
- private final HttpServletRequest httpRequest;
-
- public WebServiceContextAdapter(final WebServiceContext ctx)
- {
- super(ctx);
- httpRequest =
(HttpServletRequest)ctx.getMessageContext().get(MessageContext.SERVLET_REQUEST);
- }
-
- @Override
- public Principal getUserPrincipal()
- {
- return httpRequest.getUserPrincipal();
- }
-
- @Override
- public boolean isUserInRole(String role)
- {
- return httpRequest.isUserInRole(role);
- }
-
-}
Deleted:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/invocation/WebServiceContextInjector.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -1,41 +0,0 @@
-/*
- * JBoss, Home of Professional Open Source.
- * Copyright 2006, 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.ws.common.invocation;
-
-import javax.xml.ws.WebServiceContext;
-
-import org.jboss.ws.common.injection.InjectionHelper;
-import org.jboss.wsf.spi.invocation.ResourceInjector;
-
-/**
- * Inject the JAXWS WebServiceContext
- *
- * @author Thomas.Diesler(a)jboss.org
- * @author ropalka(a)redhat.com
- */
-public class WebServiceContextInjector extends ResourceInjector
-{
- public void inject(Object instance, WebServiceContext context)
- {
- InjectionHelper.injectWebServiceContext(instance, context);
- }
-}
Modified:
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java
===================================================================
---
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-20
08:04:37 UTC (rev 16743)
+++
common/branches/ropalka_JBWS-3550/src/main/java/org/jboss/ws/common/spi/DefaultSPIProvider.java 2012-09-20
08:17:56 UTC (rev 16744)
@@ -27,7 +27,6 @@
import org.jboss.ws.api.util.ServiceLoader;
import org.jboss.ws.common.deployment.DefaultDeploymentModelFactory;
import org.jboss.ws.common.deployment.DefaultLifecycleHandlerFactory;
-import org.jboss.ws.common.invocation.DefaultResourceInjectorFactory;
import org.jboss.ws.common.management.DefaultEndpointMetricsFactory;
import org.jboss.ws.common.management.DefaultEndpointRegistryFactory;
import org.jboss.ws.common.management.DefaultJMSEndpointResolver;
@@ -37,7 +36,6 @@
import org.jboss.wsf.spi.WSFException;
import org.jboss.wsf.spi.deployment.DeploymentModelFactory;
import org.jboss.wsf.spi.deployment.LifecycleHandlerFactory;
-import org.jboss.wsf.spi.invocation.ResourceInjectorFactory;
import org.jboss.wsf.spi.invocation.SecurityAdaptorFactory;
import org.jboss.wsf.spi.management.EndpointMetricsFactory;
import org.jboss.wsf.spi.management.EndpointRegistryFactory;
@@ -72,10 +70,6 @@
{
returnType = loadService(spiType, DefaultLifecycleHandlerFactory.class,
loader);
}
- else if (ResourceInjectorFactory.class.equals(spiType))
- {
- returnType = loadService(spiType, DefaultResourceInjectorFactory.class,
loader);
- }
else if (ServiceRefHandlerFactory.class.equals(spiType))
{
returnType = loadService(spiType, DefaultServiceRefHandlerFactory.class,
loader);