• Post Reply Bookmark Topic Watch Topic
  • New Topic

Should this class implement Serializable ?

 
Hussein Baghdadi
clojure forum advocate
Bartender
Posts: 3479
Clojure Mac Objective C
  • Mark post as helpful
  • send pies
  • 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.
 
Rr Kumaran
Ranch Hand
Posts: 548
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
No.
 
Doug Hoople
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
  • 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
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!