[jboss-cvs] JBossAS SVN: r108200 - trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Fri Sep 17 04:23:55 EDT 2010
Author: jharting
Date: 2010-09-17 04:23:55 -0400 (Fri, 17 Sep 2010)
New Revision: 108200
Modified:
trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyDeploymentScanningData.java
trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java
trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java
Log:
RESTEASY-449 let resteasy.unwrapped.exceptions context parameter to be overridden
Modified: trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyDeploymentScanningData.java
===================================================================
--- trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyDeploymentScanningData.java 2010-09-17 04:45:52 UTC (rev 108199)
+++ trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyDeploymentScanningData.java 2010-09-17 08:23:55 UTC (rev 108200)
@@ -18,6 +18,7 @@
private Set<String> providers = new LinkedHashSet<String>();
private Class<? extends Application> applicationClass;
private boolean bootClasses;
+ private boolean unwrappedExceptionsParameterSet;
public Class<? extends Application> getApplicationClass()
{
@@ -112,5 +113,13 @@
return createDispatcher || !resources.isEmpty() || !providers.isEmpty();
}
+ public boolean isUnwrappedExceptionsParameterSet()
+ {
+ return unwrappedExceptionsParameterSet;
+ }
+ public void setUnwrappedExceptionsParameterSet(boolean unwrappedExceptionsParameterSet)
+ {
+ this.unwrappedExceptionsParameterSet = unwrappedExceptionsParameterSet;
+ }
}
Modified: trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java
===================================================================
--- trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java 2010-09-17 04:45:52 UTC (rev 108199)
+++ trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyIntegrationDeployer.java 2010-09-17 08:23:55 UTC (rev 108200)
@@ -157,7 +157,10 @@
{
}
- ResteasyIntegrationDeployer.setContextParameter(webdata, ResteasyContextParameters.RESTEASY_UNWRAPPED_EXCEPTIONS, "javax.ejb.EJBException");
+ if (!resteasy.isUnwrappedExceptionsParameterSet())
+ {
+ setContextParameter(webdata, ResteasyContextParameters.RESTEASY_UNWRAPPED_EXCEPTIONS, "javax.ejb.EJBException");
+ }
if (resteasy.hasBootClasses()) return;
Modified: trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java
===================================================================
--- trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java 2010-09-17 04:45:52 UTC (rev 108199)
+++ trunk/resteasy-int/jar/src/main/java/org/jboss/resteasy/integration/deployers/ResteasyScannerDeployer.java 2010-09-17 08:23:55 UTC (rev 108200)
@@ -130,7 +130,7 @@
servlet.setInitParam(params);
}
params.add(param);
- ResteasyIntegrationDeployer.setContextParameter(webdata, ResteasyContextParameters.RESTEASY_UNWRAPPED_EXCEPTIONS, "javax.ejb.EJBException");
+
try
{
Thread.currentThread().getContextClassLoader().loadClass(ResteasyIntegrationDeployer.CDI_INJECTOR_FACTORY_CLASS);
@@ -207,6 +207,10 @@
{
hasJndiParam = true;
}
+ else if (param.getParamName().equals(ResteasyContextParameters.RESTEASY_UNWRAPPED_EXCEPTIONS))
+ {
+ scanningData.setUnwrappedExceptionsParameterSet(true);
+ }
}
}
More information about the jboss-cvs-commits
mailing list