It is important to invoke the methods of a remote EJB in an efficient manner. This recipe illustrates how to return data from a remote EJB using a coarse-grained approach. This is then contrasted with a fine-grained approach to accessing the elements of an EJB which is less efficient.
The position of a satellite in orbit can be specified using a set of six orbital parameters. For the interested reader, a good discussion of these parameters is found in the Wikipedia article at http://en.wikipedia.org/wiki/Orbital_elements. We will create the class
PositionBean to hold these parameters. We will also use an
OrbitalElements EJB to return an instance of the
PositionBean using a remote interface. A client ...