• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

7. Flash Remoting and Java > 7.4. Service Types

Service Types

Flash clients can communicate with several different service types running on a Java server. This section provides an overview of the different service types and how they are used with Flash Remoting.

JavaBean Services

Macromedia uses the term JavaBean service to refer to a Java class accessed through Flash Remoting that implements the java.io.Serializable interface (a.k.a. “implements Serializable“). While JavaBean means many things to many people, we will use Macromedia’s term to identify this service type. In the case of JavaBean services, the fact that a class implements Serializable tells Flash Remoting that the service class can be stored in the user’s session.

JavaBean services must have a no-argument constructor (a constructor that does not take any arguments) to be used with Remoting. If you have no other constructors, the default no-argument constructor implicit in the class is sufficient. If you have other constructors, you must explicitly implement a no-argument constructor. Otherwise, the Remoting gateway returns an error of type java.lang.InstantiationException because the gateway cannot create an instance of the service even though it can find the service class.


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint