• Post Reply Bookmark Topic Watch Topic
  • New Topic

static method wrapped up as a web service

 
Cameron Wallace McKenzie
author and cow tipper
Saloon Keeper
Posts: 4968
1
Hibernate Spring Tomcat Server
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It seems that all of the wizards that are lying around wrap up instance level methods and make them available as a web service. My question is:

What about wrapping up a static method and making it available as a web service?

Do you see any drawbacks, incompatibilities or problems with such an approach?

Just wondering.

-Cameron
 
Peer Reynders
Bartender
Posts: 2968
6
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Cameron McKenzie:

What about wrapping up a static method and making it available as a web service?
Do you see any drawbacks, incompatibilities or problems with such an approach?


  • Thread-safety - parallel web service requests would cause collisions that are easily avoided with separate object instances. Trying to synchronize static invocations would negatively impact scalability.
  • As web services are supposed to be stateless there is no equivalent concept to Java's "static". If you use a correlation identifier to tie together separate web service invocations then that is a matter of your business process, not something that the web service interface itself is concerned with as it can support correlation IDs through regular capabilities.

  •  
    • Post Reply Bookmark Topic Watch Topic
    • New Topic
    Boost this thread!