[Design of JBoss Web Services] - Re: JBMETA-44, ws annotation processing for references
by alessio.soldano@jboss.com
This said, here is the current implementation for finding out the serviceImplClass and targetClassName used for the bind (from NativeServiceRefBinderJAXWS):
| String serviceImplClass = null;
|
| // #1 Use the explicit @WebServiceRef.value
| if (wsref != null && wsref.value() != Object.class)
| serviceImplClass = wsref.value().getName();
|
| // #2 Use the target ref type
| if (serviceImplClass == null && targetClass != null && Service.class.isAssignableFrom(targetClass))
| serviceImplClass = targetClass.getName();
|
| // #3 Use <service-interface>
| if (serviceImplClass == null && serviceRef.getServiceInterface() != null)
| serviceImplClass = serviceRef.getServiceInterface();
|
| // #4 Use javax.xml.ws.Service
| if (serviceImplClass == null)
| serviceImplClass = Service.class.getName();
|
| // #1 Use the explicit @WebServiceRef.type
| if (wsref != null && wsref.type() != Object.class)
| targetClassName = wsref.type().getName();
|
| // #2 Use the target ref type
| if (targetClassName == null && targetClass != null && Service.class.isAssignableFrom(targetClass) == false)
| targetClassName = targetClass.getName();
|
We have (#4) setting javax.xml.ws.Service as serviceImplClass when #1, #2 and #3 give no result. This imho hides an error, ie. not failing when @WebServiceRef.type is not set and the annotation has type (class) target. As a matter of fact, the javaee 5 doc says (https://java.sun.com/javaee/5/docs/api/javax/xml/ws/WebServiceRef.html):
anonymous wrote :
| type
|
| public abstract Class type
|
| The Java type of the resource. For field annotations, the default is the type of the field. For method annotations, the default is the type of the JavaBeans property. For class annotations, there is no default and this must be specified.
|
Thomas, do you have an opinion about this? I think this implementation is simply a bit looser, nothing more.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4158002#4158002
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4158002
16 years, 3 months
[Design of JBoss/Tomcat Integration] - Re: JBAS-5268 - Mapping legacy web classloading rules
by scott.stark@jboss.org
"adrian(a)jboss.org" wrote : I'm trying to figure out how the old configuration worked in terms of precedence
| of all the different flags for parent first or scoped classloading.
|
| It complicated by having two flags for java2ClassLoadingCompliance in jboss-web.xml
| one on the class-loading element and another on the loader repository.
|
| We still aren't doing it properly for the legacy configurations.
|
| As far as I can tell, the attribute on the class-loading element controls behaviour
| at the tomcat classloader level in 4.2.x, but the flag on the loader repository config
| controls the entire hierarchical loader repository.
| The final value will be overridden by each depending on what you are trying to achieve.
|
That is correct.
"adrian(a)jboss.org" wrote :
| So I think the rules are supposed to be (below true means delegate to parent first).
|
| a) class-loading attribute = true + no loader repository config => true
| b) class-loading attribute = false + no loader repository config => false
| c) class-loading attribute = true + loader repository config = true => true
| d) class-loading attribute = false + loader repository config = true => false
| e) class-loading attribute = true + loader repository config = false => true (1)
| f) class-loading attribute = false + loader repository config = false => false
|
| NOTE (1) is for the edge case where some other classloader is in the web-app's
| loader repository. Since the loader repository has a scoped definition,
| classes in that other classloader would be prefered before the default classloading
| domain.
|
| I think we doing everything correct, except case (d).
| i.e. the loader repository config saying delegate to the parent first is overridding
| the class-loading attribute saying do scoped classloading.
|
| This is because JBossWebAppParsingDeployer is not looking at the
| class-loading attribute when setting up the LoaderRepositoryConfig.
|
| But this code needs moving the WarClassLoaderDeployer anyway
| with it constructing the new ClassLoadingMetaData directly.
Yes, I agree with this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4157986#4157986
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4157986
16 years, 3 months