Annotations are being ignored, AS7 is silent

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Annotations are being ignored, AS7 is silent

Rostislav Svoboda
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@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.
AS7 should help users to discover possible problems quickly and not be silent.

For me this is usability issue. I would like to know your opinion and possible solutions too :).


Thanks,
Rosta
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Annotations are being ignored, AS7 is silent

Alessio Soldano
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@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.

--
Alessio Soldano
Web Service Lead, JBoss
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Annotations are being ignored, AS7 is silent

jtgreene
Administrator
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@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
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev
Reply | Threaded
Open this post in threaded view
|

Re: Annotations are being ignored, AS7 is silent

Rostislav Svoboda
Hi,

----- Original Message -----

> 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@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.

General solution would be nice but it's better to have something than just silent server.

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

Agree, my issue will be solved when WS is used by default.

Rosta

> --
> Jason T. Greene
> JBoss AS Lead / EAP Platform Architect
> JBoss, a division of Red Hat
>
_______________________________________________
jboss-as7-dev mailing list
[hidden email]
https://lists.jboss.org/mailman/listinfo/jboss-as7-dev