[jboss-cvs] JBossAS SVN: r69926 - in trunk: webservices/src/main/org/jboss/wsf/container/jboss50 and 1 other directory.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Feb 19 07:57:33 EST 2008
Author: thomas.diesler at jboss.com
Date: 2008-02-19 07:57:32 -0500 (Tue, 19 Feb 2008)
New Revision: 69926
Modified:
trunk/ejb3/src/main/org/jboss/ejb3/session/ClassProxyHack.java
trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
Log:
[EJBTHREE-1192] ClassProxyHack breaks all EJB3 Web Service endpoints
Modified: trunk/ejb3/src/main/org/jboss/ejb3/session/ClassProxyHack.java
===================================================================
--- trunk/ejb3/src/main/org/jboss/ejb3/session/ClassProxyHack.java 2008-02-19 11:49:40 UTC (rev 69925)
+++ trunk/ejb3/src/main/org/jboss/ejb3/session/ClassProxyHack.java 2008-02-19 12:57:32 UTC (rev 69926)
@@ -36,7 +36,7 @@
* @author <a href="mailto:carlo.dewolf at jboss.com">Carlo de Wolf</a>
* @version $Revision: $
*/
-class ClassProxyHack implements ClassProxy
+public class ClassProxyHack implements ClassProxy
{
private SessionContainer container;
@@ -46,7 +46,13 @@
this.container = container;
}
-
+
+ // Workaround for [EJBTHREE-1192] ClassProxyHack breaks all EJB3 Web Service endpoints
+ public SessionContainer getContainer()
+ {
+ return container;
+ }
+
public InvocationResponse _dynamicInvoke(Invocation invocation) throws Throwable
{
return container.dynamicInvoke(null, invocation);
Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2008-02-19 11:49:40 UTC (rev 69925)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerEJB3.java 2008-02-19 12:57:32 UTC (rev 69926)
@@ -35,6 +35,7 @@
import org.jboss.ejb3.BeanContext;
import org.jboss.ejb3.BeanContextLifecycleCallback;
import org.jboss.ejb3.EJBContainerInvocation;
+import org.jboss.ejb3.session.ClassProxyHack;
import org.jboss.ejb3.stateless.StatelessBeanContext;
import org.jboss.ejb3.stateless.StatelessContainer;
import org.jboss.injection.lang.reflect.BeanProperty;
@@ -89,7 +90,19 @@
try
{
Dispatcher dispatcher = Dispatcher.singleton;
- StatelessContainer container = (StatelessContainer)dispatcher.getRegistered(objectName.getCanonicalName());
+ Object regobj = dispatcher.getRegistered(objectName.getCanonicalName());
+
+
+ StatelessContainer container;
+
+ // Workaround for [EJBTHREE-1192] ClassProxyHack breaks all EJB3 Web Service endpoints
+ if (regobj instanceof StatelessContainer)
+ container = (StatelessContainer)regobj;
+ else if (regobj instanceof StatelessContainer)
+ container = (StatelessContainer)((ClassProxyHack)regobj).getContainer();
+ else
+ throw new IllegalStateException("Unsupported obj instance: " + regobj);
+
Class beanClass = container.getBeanClass();
Method method = getImplMethod(beanClass, wsInv.getJavaMethod());
More information about the jboss-cvs-commits
mailing list