[jboss-as7-dev] Annotations are being ignored, AS7 is silent

Jason T. Greene jason.greene at redhat.com
Thu Oct 13 10:06:18 EDT 2011


On 10/13/11 8:58 AM, Alessio Soldano wrote:
> Hi,
>
> On 10/13/2011 03:26 PM, Rostislav Svoboda wrote:
>> Hi guys.
>>
>> I have problem with AS7 usability. I tried to deploy jar file with WS endpoint defined in EJB. I used standalone server without any additional configuration.
>>
>> {code}
>> [standalone at localhost:9999 /] deploy /home/rsvoboda/svn/jbossws-cxf-4.0.0.Beta6/modules/testsuite/shared-tests/target/test-libs/jaxws-benchmark-datatypes-ejb3.jar
>> 'jaxws-benchmark-datatypes-ejb3.jar' deployed successfully.
>> {code}
>>
>> There was no error in deployment and I expected to have endpoint accessible. But it wasn't because WS subsystem is enabled only in -preview.xml profile. My deployment was processed only by EJB subsystem.
>>
>> I would expect something like:
>> {code}
>> 'jaxws-benchmark-datatypes-ejb3.jar' deployed successfully.
>> WARN: WS subsystem is not enabled.
>> {code}
>>
>> This is general issue, basically unresolved dependencies due to annotations only are not detected.
>
> I actually partially misled Rostislav on this on IRC - sorry. Currently,
> jaxws api are added to any deployment, given a jaxws client can live
> everywhere. They're part of javaee api after all.
> We could probably figure out a way to have a DUP for checking for the
> existence of @WebService annotation and print a warning if the
> webservices subsystem is not there.
>
> This said, I believe the mentioned silent behaviour is still an issue in
> some cases; for instance when having a @Foo annotated class in a given
> deployment which does not depend on the module providing Foo.

I can't really think of a workable general solution to this problem. The 
presence of an unknown annotation doesn't necessarily mean there is a 
problem. After all it is just meta information. Doing a warning on when 
an unknown annotation is found would be extremely annoying. The best we 
could do is have a specialized list of annotations that we know about 
that require a specific DUP to be available, and then trigger a warning.

This specific problem though disappears in 7.1, since we are going to 
have WS on by default.

-- 
Jason T. Greene
JBoss AS Lead / EAP Platform Architect
JBoss, a division of Red Hat


More information about the jboss-as7-dev mailing list