In a distributed application, parts of the application logic run on one machine, and parts run on another machine. With Sybase IQ, you can create distributed Java applications, where part of the logic runs in the database server, and part on the client machine.
Sybase IQ is capable of exchanging Java objects with an external, Java client.
Having the client application retrieve a Java object from a database is the key task in a distributed application This section describes how to accomplish that task.
In other parts of this appendix, we describe several tasks related to retrieving objects, but these tasks should not be confused with retrieving the object itself. For example:
“Queries using JDBC” describes how to retrieve an object into a SQL variable. This does not solve the problem of getting the object into your Java application.
“Queries using JDBC” also describes how to retrieve the public fields and the return value of Java methods. Again, this is distinct from retrieving an object into a Java application.
“Inserting and retrieving objects” describes how to retrieve objects into server-side Java classes. Again, this is not the same as retrieving them into a client application.
There are two tasks in building a distributed application.
Building a distributed application
Any class running in the server must implement the Serializable interface. This is very simple.
The client-side application must import the class, so the object can be reconstructed on the client side.
These tasks are described in the following sections.