Author: richard.opalka(a)jboss.com
Date: 2010-03-30 04:39:54 -0400 (Tue, 30 Mar 2010)
New Revision: 11883
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java
spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
Log:
[JBWS-2970] every endpoint will provide associated JNDI context at runtime, not at
deployment time
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-03-30 08:31:07
UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/Endpoint.java 2010-03-30 08:39:54
UTC (rev 11883)
@@ -24,6 +24,8 @@
import java.util.List;
import javax.management.ObjectName;
+import javax.naming.Context;
+import javax.naming.NamingException;
import org.jboss.wsf.spi.invocation.InvocationHandler;
import org.jboss.wsf.spi.invocation.RequestHandler;
@@ -127,4 +129,7 @@
/** Ask configured processors for processing of the given record **/
void processRecord(Record record);
+
+ /** Returns associated JNDI context with this endpoint. */
+ Context getJNDIContext();
}
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java 2010-03-30
08:31:07 UTC (rev 11882)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/deployment/integration/WebServiceDeclaration.java 2010-03-30
08:39:54 UTC (rev 11883)
@@ -51,12 +51,6 @@
String getComponentClassName();
/**
- * Returns JNDI context associated with EJB container.
- * @return
- */
- Context getContext();
-
- /**
* Get a unified meta data view represented by an annotation.
*
* @param t
Modified: spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java
===================================================================
--- spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2010-03-30
08:31:07 UTC (rev 11882)
+++ spi/trunk/src/main/java/org/jboss/wsf/spi/invocation/InvocationHandler.java 2010-03-30
08:39:54 UTC (rev 11883)
@@ -24,6 +24,8 @@
import java.lang.reflect.UndeclaredThrowableException;
import javax.management.MBeanException;
+import javax.naming.Context;
+import javax.naming.NamingException;
import org.jboss.wsf.spi.deployment.Endpoint;
@@ -36,14 +38,17 @@
*/
public abstract class InvocationHandler
{
- /** Create a container specific invocation **/
+ /** Create a container specific invocation */
public abstract Invocation createInvocation();
/** Invoke the the service endpoint */
public abstract void invoke(Endpoint ep, Invocation inv) throws Exception;
- /** Initilize the invocation handler **/
+ /** Initilize the invocation handler */
public abstract void init(Endpoint ep);
+
+ /** Returns JNDI context associated with endpoint */
+ public abstract Context getJNDIContext(Endpoint ep) throws NamingException;
protected void handleInvocationException(Throwable th) throws Exception
{
Modified:
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java
===================================================================
---
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2010-03-30
08:31:07 UTC (rev 11882)
+++
spi/trunk/src/main/java/org/jboss/wsf/spi/metadata/injection/InjectionsMetaData.java 2010-03-30
08:39:54 UTC (rev 11883)
@@ -27,8 +27,6 @@
import java.util.LinkedList;
import java.util.Map;
-import javax.naming.Context;
-
/**
* Injections metadata container.
*
@@ -55,40 +53,25 @@
private final Map<Class<? extends Annotation>, ReferenceResolver>
referenceResolvers;
/**
- * JNDI context.
- */
- private final Context ctx;
-
- /**
* Constructor.
*
* @param injections injection definitions list
- * @param ctx JNDI context
+ * @param resolvers reference resolvers
*/
- public InjectionsMetaData(Collection<InjectionMetaData> injections,
Map<Class<? extends Annotation>, ReferenceResolver> referenceResolvers,
Context ctx)
+ public InjectionsMetaData(Collection<InjectionMetaData> injections,
Map<Class<? extends Annotation>, ReferenceResolver> resolvers)
{
super();
if (injections == null)
throw new IllegalArgumentException("injections metadata list cannot be
null");
- if ((referenceResolvers == null) || (referenceResolvers.size() == 0))
+ if ((resolvers == null) || (resolvers.size() == 0))
throw new IllegalArgumentException("reference resolvers list cannot be null
or empty collection");
this.injections = injections;
- this.referenceResolvers = referenceResolvers;
- this.ctx = ctx;
+ this.referenceResolvers = resolvers;
}
/**
- * Returns associated JNDI context.
- * @return associated JNDI context
- */
- public Context getContext()
- {
- return this.ctx;
- }
-
- /**
* Returns all descriptor driven injections metadata for particular class.
*
* @param clazz class to return injection definitions for
Show replies by date