• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Should this class implement Serializable ?

 
clojure forum advocate
Posts: 3479
Mac Objective C Clojure
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
assume that my web service contains the following method :
public Book getBook(int isbn) throws RemoteException;
my question is :
should Book class (or bean if you want) implements Serializable interface ??
thanks.
 
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This begs the real question: For the purposes of building a Web Service from a JavaBean, what's the technical definition of a JavaBean? I was under the impression that same John had, that the class had to be Serializable, which is obviously not true.

I'm working with the IBM Redbook samples, and the first one is a JavaBean-based Web Service. The class, WeatherForecast, implements no interface and extends no superclass. Every WS-published method throws 'Exception,' but other than that, there's nothing special going on.

So what elements DO you need so that a JavaBean can grow up to be a Web Service? What exceptions should it throw and are there any considerations about deployment layout (directory/jar structure)?

Keeping the answer limited to Web Service requirements...

...When is a JavaBean really a JavaBean?

Thanks.
Doug Hoople
MCSD.NET, MCDBA, MCSE, MCT, SCJP1.4
 
Straws are for suckers. Now suck on this tiny ad!
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic