jax ws - JAX-WS implementation annotations vs. interface annotnations -


i configure jax-ws web service using annotations. use endpoint interface annotated values , used server client, share interface.

my interface looks this:

@webservice(name = constants.name, servicename = constants.service_name, targetnamespace = constants.namespace) @soapbinding public interface imanagementbean {     @webmethod(operationname = "getstatistics")     igetstatsresponse getstatistics(igetstatsrequest request,         @webparam(name = "gridname", header = true, partname = "gridname") string gridname)         throws webserviceexception; } 

in corresponding implementation use same annotations, looks quite redundant me.

is there way tell implementation "pull" annotations interface instead of defining them on both sides?

if don't interface, avoid interface.

you can safely start without interfaces , introduce them later need arises. approach fundamentally different in java ee 5. compared java 2 platform, enterprise edition (j2ee) 2003, java ee 6 code simpler, in terms of elimination of several layers, indirections, , abstractions. unlike j2ee, java ee 6 consists of annotated classes without dependencies on platform. approach eliminates need separate business logic infrastructure , makes majority of j2ee patterns , best practices superfluous. in java ee 6, simple cases can solved 2 layers: presentation , business logic.

java ee 6: simplicity design - adam bien


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -