[jboss-cvs] JBossAS SVN: r59890 - in trunk/ejb3/src/main/org/jboss: ejb3/mdb and 4 other directories.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Sun Jan 21 12:51:33 EST 2007
Author: thomas.diesler at jboss.com
Date: 2007-01-21 12:51:33 -0500 (Sun, 21 Jan 2007)
New Revision: 59890
Removed:
trunk/ejb3/src/main/org/jboss/ejb3/webservice/
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java
trunk/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java
trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
trunk/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainerInvocation.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
trunk/ejb3/src/main/org/jboss/injection/WebServiceContextPropertyInjector.java
Log:
Implement WebServiceContext.getUserPrincipal(), isUserInRole()
Modified: trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/EJBContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -53,9 +53,11 @@
import org.jboss.annotation.ejb.PoolClass;
import org.jboss.aop.AspectManager;
import org.jboss.aop.ClassContainer;
+import org.jboss.aop.MethodInfo;
import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.annotation.AnnotationElement;
import org.jboss.aop.joinpoint.ConstructorInvocation;
+import org.jboss.aop.util.MethodHashing;
import org.jboss.ejb3.entity.PersistenceUnitDeployment;
import org.jboss.ejb3.interceptor.InterceptorInfo;
import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
@@ -916,4 +918,16 @@
{
return invokeStats;
}
+
+
+ public MethodInfo getMethodInfo(Method method)
+ {
+ long hash = MethodHashing.calculateHash(method);
+ MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
+ if (info == null)
+ {
+ throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
+ }
+ return info;
+ }
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/EJBContainerInvocation.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -41,9 +41,9 @@
protected T ctx;
private BeanContextLifecycleCallback<T> callback;
- public EJBContainerInvocation(MethodInfo info, Interceptor[] interceptors)
+ public EJBContainerInvocation(MethodInfo info)
{
- super(info, interceptors);
+ super(info, info.getInterceptors());
}
public EJBContainerInvocation(Interceptor[] interceptors, long methodHash, Method advisedMethod, Method unadvisedMethod, Advisor advisor)
Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3AnnotationHandler.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -127,7 +127,7 @@
String ejbName = ejbNames.get(ejbIndex);
if (ejbType == EJB_TYPE.STATELESS)
{
- StatelessContainer container = getStatelessContainer(ejbIndex);
+ EJBContainer container = getStatelessContainer(ejbIndex);
container.setJaccContextId(getJaccContextId());
containers.add(container);
}
@@ -211,7 +211,7 @@
}
- protected StatelessContainer getStatelessContainer(int ejbIndex) throws Exception
+ protected EJBContainer getStatelessContainer(int ejbIndex) throws Exception
{
String containerName = getAspectDomain(ejbIndex, defaultSLSBDomain);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/Ejb3DescriptorHandler.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -121,7 +121,6 @@
import org.jboss.ejb3.metamodel.XmlAnnotation;
import org.jboss.ejb3.service.ServiceContainer;
import org.jboss.ejb3.stateful.StatefulContainer;
-import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.logging.Logger;
import org.jboss.metamodel.descriptor.InjectionTarget;
import org.jboss.metamodel.descriptor.MessageDestinationRef;
@@ -287,14 +286,14 @@
}
}
- protected StatelessContainer getStatelessContainer(int ejbIndex)
+ protected EJBContainer getStatelessContainer(int ejbIndex)
throws Exception
{
String ejbName = ejbNames.get(ejbIndex);
EnterpriseBean enterpriseBean = ejbs.get(ejbIndex);
- StatelessContainer container = super.getStatelessContainer(ejbIndex);
+ EJBContainer container = super.getStatelessContainer(ejbIndex);
container.setAssemblyDescriptor(dd.getAssemblyDescriptor());
Modified: trunk/ejb3/src/main/org/jboss/ejb3/SessionContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/SessionContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/SessionContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -287,9 +287,8 @@
return invokeEJBObjectMethod(factory, id, info, args);
}
- Interceptor[] aspects = info.getInterceptors();
// FIXME: Ahem, stateful container invocation works on all.... (violating contract though)
- EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, aspects, id);
+ EJBContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/mdb/ConsumerContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -103,8 +103,7 @@
throw new RuntimeException("Could not resolve beanClass method from proxy call");
}
- Interceptor[] aspects = info.getInterceptors();
- newSi = new EJBContainerInvocation(info, aspects);
+ newSi = new EJBContainerInvocation(info);
newSi.setArguments(si.getArguments());
newSi.setMetaData(si.getMetaData());
newSi.setAdvisor(this);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/mdb/MessagingContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -239,8 +239,7 @@
pushEnc();
try
{
- Interceptor[] aspects = info.getInterceptors();
- EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
+ EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
return nextInvocation.invokeNext();
Modified: trunk/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/service/ServiceContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -288,8 +288,7 @@
{
throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
}
- Interceptor[] aspects = info.getInterceptors();
- EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
+ EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
@@ -337,8 +336,7 @@
{
throw new RuntimeException("Could not resolve beanClass method from proxy call");
}
- Interceptor[] aspects = info.getInterceptors();
- newSi = new EJBContainerInvocation(info, aspects);
+ newSi = new EJBContainerInvocation(info);
newSi.setArguments(si.getArguments());
newSi.setMetaData(si.getMetaData());
newSi.setAdvisor(this);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -21,13 +21,29 @@
*/
package org.jboss.ejb3.stateful;
+import java.lang.reflect.Field;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.annotation.PostConstruct;
+import javax.annotation.PreDestroy;
+import javax.ejb.EJBHome;
+import javax.ejb.EJBObject;
+import javax.ejb.Handle;
+import javax.ejb.Init;
+import javax.ejb.PostActivate;
+import javax.ejb.PrePassivate;
+import javax.ejb.Remote;
+import javax.ejb.RemoteHome;
+import javax.ejb.TimerService;
+
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.annotation.ejb.RemoteBindings;
import org.jboss.annotation.ejb.cache.Cache;
import org.jboss.aop.AspectManager;
import org.jboss.aop.MethodInfo;
-import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.util.MethodHashing;
@@ -47,22 +63,6 @@
import org.jboss.injection.JndiFieldInjector;
import org.jboss.logging.Logger;
-import javax.annotation.PostConstruct;
-import javax.annotation.PreDestroy;
-import javax.ejb.EJBHome;
-import javax.ejb.EJBObject;
-import javax.ejb.Handle;
-import javax.ejb.Init;
-import javax.ejb.PostActivate;
-import javax.ejb.PrePassivate;
-import javax.ejb.Remote;
-import javax.ejb.RemoteHome;
-import javax.ejb.TimerService;
-import java.lang.reflect.Field;
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import java.util.Map;
-
/**
* Comment
*
@@ -194,9 +194,7 @@
return invokeEJBLocalObjectMethod(id, info, args);
}
- Interceptor[] aspects = info.getInterceptors();
- StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(
- info, aspects, id);
+ StatefulContainerInvocation nextInvocation = new StatefulContainerInvocation(info, id);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
@@ -315,8 +313,6 @@
}
else
{
- Interceptor[] aspects = info.getInterceptors();
-
if (si.getId() == null)
{
StatefulBeanContext ctx = getCache().create();
@@ -326,7 +322,7 @@
{
newId = si.getId();
}
- newSi = new StatefulContainerInvocation(info, aspects, newId);
+ newSi = new StatefulContainerInvocation(info, newId);
newSi.setArguments(si.getArguments());
newSi.setMetaData(si.getMetaData());
newSi.setAdvisor(this);
@@ -799,8 +795,6 @@
Class[] initParameterTypes, Object[] initParameterValues)
{
StatefulContainerInvocation newStatefulInvocation = null;
- Interceptor[] aspects = info.getInterceptors();
- Object newId = null;
StatefulBeanContext ctx = null;
if (initParameterTypes.length > 0)
@@ -808,9 +802,8 @@
else
ctx = getCache().create();
- newId = ctx.getId();
- newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
- newId);
+ Object newId = ctx.getId();
+ newStatefulInvocation = new StatefulContainerInvocation(info, newId);
newStatefulInvocation.setArguments(statefulInvocation.getArguments());
newStatefulInvocation.setMetaData(statefulInvocation.getMetaData());
@@ -823,19 +816,16 @@
StatefulRemoteInvocation statefulInvocation)
{
StatefulContainerInvocation newStatefulInvocation = null;
- Interceptor[] aspects = info.getInterceptors();
Object newId = null;
if (statefulInvocation.getId() == null)
{
StatefulBeanContext ctx = getCache().create();
newId = ctx.getId();
- newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
- newId);
+ newStatefulInvocation = new StatefulContainerInvocation(info, newId);
}
else
{
- newStatefulInvocation = new StatefulContainerInvocation(info, aspects,
- statefulInvocation.getId());
+ newStatefulInvocation = new StatefulContainerInvocation(info, statefulInvocation.getId());
}
newStatefulInvocation.setArguments(statefulInvocation.getArguments());
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainerInvocation.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainerInvocation.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateful/StatefulContainerInvocation.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -22,6 +22,7 @@
package org.jboss.ejb3.stateful;
import java.lang.reflect.Method;
+
import org.jboss.aop.Advisor;
import org.jboss.aop.MethodInfo;
import org.jboss.aop.advice.Interceptor;
@@ -44,9 +45,9 @@
this.id = id;
}
- public StatefulContainerInvocation(MethodInfo info, Interceptor[] interceptors, Object id)
+ public StatefulContainerInvocation(MethodInfo info, Object id)
{
- super(info, interceptors);
+ super(info);
this.id = id;
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessBeanContext.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -21,10 +21,12 @@
*/
package org.jboss.ejb3.stateless;
-import javax.xml.rpc.handler.MessageContext;
+import javax.xml.ws.WebServiceContext;
import org.jboss.ejb3.BaseContext;
+import org.jboss.injection.lang.reflect.BeanProperty;
+
/**
* Comment
*
@@ -33,30 +35,30 @@
*/
public class StatelessBeanContext extends BaseContext
{
- private MessageContext rpcMessageContext;
- private javax.xml.ws.handler.MessageContext wsMessageContext;
+ private javax.xml.rpc.handler.MessageContext jaxrpcMessageContext;
+ private BeanProperty webServiceContextProperty;
- public MessageContext getMessageContextJAXRPC()
+ public javax.xml.rpc.handler.MessageContext getMessageContextJAXRPC()
{
- return rpcMessageContext;
+ return jaxrpcMessageContext;
}
- public javax.xml.ws.handler.MessageContext getMessageContextJAXWS()
+ public void setMessageContextJAXRPC(javax.xml.rpc.handler.MessageContext rpcMessageContext)
{
- return wsMessageContext;
+ this.jaxrpcMessageContext = rpcMessageContext;
}
-
- public void remove()
+
+ public BeanProperty getWebServiceContextProperty()
{
+ return webServiceContextProperty;
}
-
- public void setMessageContextJAXRPC(MessageContext rpcMessageContext)
+
+ public void setWebServiceContextProperty(BeanProperty webServiceContextProperty)
{
- this.rpcMessageContext = rpcMessageContext;
+ this.webServiceContextProperty = webServiceContextProperty;
}
-
- public void setMessageContextJAXWS(javax.xml.ws.handler.MessageContext wsMessageContext)
+
+ public void remove()
{
- this.wsMessageContext = wsMessageContext;
}
}
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessContainer.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -22,46 +22,42 @@
package org.jboss.ejb3.stateless;
+import java.lang.reflect.Method;
+import java.util.Hashtable;
+import java.util.Map;
+
+import javax.ejb.EJBException;
+import javax.ejb.Handle;
+import javax.ejb.Timer;
+import javax.ejb.TimerService;
+import javax.naming.NamingException;
+
import org.jboss.annotation.ejb.LocalBinding;
import org.jboss.annotation.ejb.RemoteBinding;
import org.jboss.annotation.ejb.RemoteBindings;
import org.jboss.aop.AspectManager;
import org.jboss.aop.MethodInfo;
-import org.jboss.aop.advice.Interceptor;
import org.jboss.aop.joinpoint.Invocation;
import org.jboss.aop.joinpoint.InvocationResponse;
import org.jboss.aop.joinpoint.MethodInvocation;
-import org.jboss.aop.util.MethodHashing;
import org.jboss.aspects.asynch.FutureHolder;
import org.jboss.ejb.AllowedOperationsAssociation;
import org.jboss.ejb.AllowedOperationsFlags;
-import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.BeanContextLifecycleCallback;
+import org.jboss.ejb3.EJBContainerInvocation;
import org.jboss.ejb3.Ejb3Deployment;
import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.ProxyUtils;
import org.jboss.ejb3.SessionContainer;
-import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.interceptor.InterceptorInfoRepository;
import org.jboss.ejb3.timerservice.TimedObjectInvoker;
import org.jboss.ejb3.timerservice.TimerServiceFactory;
import org.jboss.logging.Logger;
import org.jboss.proxy.ejb.handle.HomeHandleImpl;
import org.jboss.proxy.ejb.handle.StatelessHandleImpl;
-import org.jboss.injection.EncInjector;
-import javax.ejb.EJBException;
-import javax.ejb.Handle;
-import javax.ejb.SessionContext;
-import javax.ejb.Timer;
-import javax.ejb.TimerService;
-import javax.naming.NamingException;
-import java.lang.reflect.Method;
-import java.util.Hashtable;
-import java.util.Map;
-import java.util.HashMap;
-
/**
* Comment
*
@@ -145,8 +141,7 @@
try
{
MethodInfo info = (MethodInfo) methodInterceptors.get(callbackHandler.getTimeoutCalllbackHash());
- Interceptor[] aspects = info.getInterceptors();
- EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info, aspects);
+ EJBContainerInvocation nextInvocation = new EJBContainerInvocation(info);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
nextInvocation.invokeNext();
@@ -192,13 +187,7 @@
ClassLoader oldLoader = Thread.currentThread().getContextClassLoader();
try
{
- long hash = MethodHashing.calculateHash(method);
- MethodInfo info = (MethodInfo) methodInterceptors.get(hash);
- if (info == null)
- {
- throw new RuntimeException("Could not resolve beanClass method from proxy call: " + method.toString());
- }
-
+ MethodInfo info = getMethodInfo(method);
Method unadvisedMethod = info.getUnadvisedMethod();
try
@@ -212,8 +201,7 @@
return invokeLocalHomeMethod(info, args);
}
- Interceptor[] aspects = info.getInterceptors();
- EJBContainerInvocation<StatelessContainer, StatelessBeanContext> nextInvocation = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info, aspects);
+ EJBContainerInvocation<StatelessContainer, StatelessBeanContext> nextInvocation = new EJBContainerInvocation<StatelessContainer, StatelessBeanContext>(info);
nextInvocation.setAdvisor(this);
nextInvocation.setArguments(args);
nextInvocation.setContextCallback(callback);
@@ -276,9 +264,8 @@
{
EJBContainerInvocation newSi = null;
- Interceptor[] aspects = info.getInterceptors();
- newSi = new EJBContainerInvocation(info, aspects);
+ newSi = new EJBContainerInvocation(info);
newSi.setArguments(si.getArguments());
newSi.setMetaData(si.getMetaData());
newSi.setAdvisor(this);
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessLocalProxyFactory.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -24,6 +24,7 @@
import java.lang.reflect.InvocationTargetException;
import javax.ejb.LocalHome;
import org.jboss.annotation.ejb.LocalBinding;
+import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.JBossProxy;
import org.jboss.ejb3.NonSerializableFactory;
import org.jboss.ejb3.ProxyFactoryHelper;
@@ -42,7 +43,7 @@
Class[] interfaces;
Class[] localInterfaces = ProxyFactoryHelper.getLocalInterfaces(container);
- StatelessContainer statelessContainer = (StatelessContainer) container;
+ EJBContainer statelessContainer = (EJBContainer) container;
interfaces = new Class[localInterfaces.length + 2];
System.arraycopy(localInterfaces, 0, interfaces, 0, localInterfaces.length);
@@ -61,7 +62,7 @@
public void start() throws Exception
{
super.start();
- StatelessContainer statelessContainer = (StatelessContainer) container;
+ EJBContainer statelessContainer = (EJBContainer) container;
LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
if (localHome != null)
{
@@ -76,7 +77,7 @@
public void stop() throws Exception
{
super.stop();
- StatelessContainer statelessContainer = (StatelessContainer) container;
+ EJBContainer statelessContainer = (EJBContainer) container;
LocalHome localHome = (LocalHome) statelessContainer.resolveAnnotation(LocalHome.class);
if (localHome != null)
{
Modified: trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/ejb3/stateless/StatelessRemoteProxyFactory.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -27,6 +27,7 @@
import org.jboss.aop.Advisor;
import org.jboss.aop.AspectManager;
import org.jboss.aop.advice.AdviceStack;
+import org.jboss.ejb3.EJBContainer;
import org.jboss.ejb3.JBossProxy;
import org.jboss.ejb3.ProxyFactoryHelper;
import org.jboss.ejb3.remoting.RemoteProxyFactory;
@@ -82,7 +83,7 @@
public void start() throws Exception
{
super.start();
- StatelessContainer statelessContainer = (StatelessContainer) container;
+ EJBContainer statelessContainer = (EJBContainer) container;
RemoteHome remoteHome = (RemoteHome) statelessContainer.resolveAnnotation(RemoteHome.class);
if (remoteHome != null)
{
@@ -104,7 +105,7 @@
public void stop() throws Exception
{
super.stop();
- StatelessContainer statelessContainer = (StatelessContainer) container;
+ EJBContainer statelessContainer = (EJBContainer) container;
RemoteHome remoteHome = (RemoteHome) statelessContainer.resolveAnnotation(RemoteHome.class);
if (remoteHome != null)
{
Modified: trunk/ejb3/src/main/org/jboss/injection/WebServiceContextPropertyInjector.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/injection/WebServiceContextPropertyInjector.java 2007-01-21 17:44:42 UTC (rev 59889)
+++ trunk/ejb3/src/main/org/jboss/injection/WebServiceContextPropertyInjector.java 2007-01-21 17:51:33 UTC (rev 59890)
@@ -21,15 +21,17 @@
*/
package org.jboss.injection;
+import javax.ejb.EJBContext;
+
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.stateless.StatelessBeanContext;
-import org.jboss.ejb3.webservice.WebServiceContextImpl;
import org.jboss.injection.lang.reflect.BeanProperty;
/**
* Injects a WebServiceContext into a bean.
*
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
+ * @author Thomas.Diesler at jboss.com
* @version $Revision: $
*/
public class WebServiceContextPropertyInjector implements Injector
@@ -51,10 +53,9 @@
public void inject(BeanContext ctx)
{
if(!(ctx instanceof StatelessBeanContext))
- {
throw new RuntimeException("Can only inject on stateless bean context");
- }
- property.set(ctx.getInstance(), new WebServiceContextImpl((StatelessBeanContext) ctx));
+
+ ((StatelessBeanContext)ctx).setWebServiceContextProperty(property);
}
public Class getInjectionClass()
More information about the jboss-cvs-commits
mailing list