Discussions

News: JSR 181: Web Services Metadata for the Java Platform released

  1. JSR-181, which defines eight annotations to enable easy definition of Java Web Services in a J2EE container, has been released.
    Included annotations are:
    • javax.jws.WebService
    • javax.jws.WebMethod
    • javax.jws.OneWay
    • javax.jws.WebParam
    • javax.jws.WebResult
    • javax.jws.HandlerChain
    • javax.jws.soap.SOAPBinding
    • javax.jws.soap.SOAPMessageHandlers
    In JavaOne 2005, a session on the strengths and benefits of Java5 and future releases covered this JSR as being how web services will be enabled in the future.

    The reference implementation is available for download from the BEA.

    Threaded Messages (3)

  2. Annotation madness[ Go to top ]

    My oh my. One the one hand we boast about trying to make things as simple as possible by using POJOs whereever we can, on the other hand we engage into polluting those with "annotations" (essentially nothing but deployment descriptors that are in-line) in order to introduce dependencies again. Given an example about Spring integration on JavaOne General session, indeed weird things may happen.

    Imagine an EJB where the _code_ is annotated to support ten different application servers and two different transaction models, imagine a web worker class that binds to five different presentation frameworks via annotations.

    Exactly the same will happen to web services, since soon we will notice that it is not enough to just use these annotations, but that we will need an extended set for each vendor (special features, transactions, clustering....).

    And since we will use AOP and reflection on top of that, noone will be able to understand what is happening in a particular peace of code.

    Good for job security, though. Every cloud has a silver lining...no hold on: Every cloud has a zinc lining, silver's down this week.....
  3. Annotation madness[ Go to top ]

    Note that you can divide the annotations (atleast in ejb3) - for instance the @Stateful you would put in the bean, but the vendor-specific configuration data will be in a desriptor...the two can live together!
  4. Annotation madness[ Go to top ]

    Imagine an EJB where the _code_ is annotated to support ten different application servers and two different transaction models, imagine a web worker class that binds to five different presentation frameworks via annotations.

    You might be blowing things a little out of proportion. I think you'll find most applications aren’t deployed to ten different flavours of application server, they are deployed to one. I'm looking forward to fewer xml files...
    And since we will use AOP and reflection on top of that, noone will be able to understand what is happening in a particular peace of code.
    The technology could obviously be over used but I don't think you could get much clearer than:
    <code>
    package foo;

    import javax.jws.WebService;

    @WebService
    public class StockPriceService
    {
      public float getASX200()
      {
        return 4277.5;
      }
    }
    </code>

    Cheers,
    Dan