[jboss-cvs] JBossAS SVN: r68818 - trunk/webservices/src/main/org/jboss/wsf/container/jboss50.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Thu Jan 10 07:39:25 EST 2008
Author: thomas.diesler at jboss.com
Date: 2008-01-10 07:39:25 -0500 (Thu, 10 Jan 2008)
New Revision: 68818
Modified:
trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java
trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java
trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java
Log:
Prevent NPE on HTTP access to JMS endpoints
Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java 2008-01-10 12:33:26 UTC (rev 68817)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerJSE.java 2008-01-10 12:39:25 UTC (rev 68818)
@@ -77,7 +77,7 @@
}
catch (Exception ex)
{
- throw new IllegalStateException("Canot get target bean instance", ex);
+ throw new IllegalStateException("Cannot get target bean instance", ex);
}
}
return targetBean;
Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java 2008-01-10 12:33:26 UTC (rev 68817)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB21.java 2008-01-10 12:39:25 UTC (rev 68818)
@@ -57,8 +57,21 @@
try
{
- InvocationContext invContext = epInv.getInvocationContext();
- Object targetBean = invContext.getTargetBean();
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance", ex);
+ }
+ }
Class implClass = targetBean.getClass();
Method seiMethod = epInv.getJavaMethod();
Method implMethod = getImplMethod(implClass, seiMethod);
Modified: trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java
===================================================================
--- trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java 2008-01-10 12:33:26 UTC (rev 68817)
+++ trunk/webservices/src/main/org/jboss/wsf/container/jboss50/InvocationHandlerMDB3.java 2008-01-10 12:39:25 UTC (rev 68818)
@@ -57,8 +57,21 @@
try
{
- InvocationContext invContext = epInv.getInvocationContext();
- Object targetBean = invContext.getTargetBean();
+ InvocationContext invCtx = epInv.getInvocationContext();
+ Object targetBean = invCtx.getTargetBean();
+ if (targetBean == null)
+ {
+ try
+ {
+ Class epImpl = ep.getTargetBeanClass();
+ targetBean = epImpl.newInstance();
+ invCtx.setTargetBean(targetBean);
+ }
+ catch (Exception ex)
+ {
+ throw new IllegalStateException("Canot get target bean instance", ex);
+ }
+ }
Class implClass = targetBean.getClass();
Method seiMethod = epInv.getJavaMethod();
Method implMethod = getImplMethod(implClass, seiMethod);
More information about the jboss-cvs-commits
mailing list