Alessio Soldano [
http://community.jboss.org/people/asoldano] created the discussion
"Re: Load on startup is ignored - JaxWS webservice is always initialized first"
To view the discussion, visit:
http://community.jboss.org/message/618298#618298
--------------------------------------------------------------
Well, this is not really an issue then ;-) I mean, you're not allowed to throw checked
exception, so I don't see anything wrong in you not being allowed to throw your
ConfigurationException unless it's a RuntimeException.
We need to check if you can actually declare "throws Exception" and go with
that, in any case that's an edge case. The code for the validation in any case is as
follows:
public static void assertNoCheckedExceptionsAreThrown(final Method method, Class<?
extends Annotation> annotation)
{
Class<?>[] declaredExceptions = method.getExceptionTypes();
for (int i = 0; i < declaredExceptions.length; i++)
{
Class<?> exception = declaredExceptions[i];
if (!exception.isAssignableFrom(RuntimeException.class))
{
throw new InjectionException(BundleUtils.getMessage(bundle,
"METHOD_CANNOT_THROW_CHECKED_EXCEPTIONS", new Object[]{
getAnnotationMessage(annotation) , method}));
}
}
}
--------------------------------------------------------------
Reply to this message by going to Community
[
http://community.jboss.org/message/618298#618298]
Start a new discussion in JBoss AS7 Development at Community
[
http://community.jboss.org/choose-container!input.jspa?contentType=1&...]