Questions and Answers - Client Tier

 
 


Guidelines, Patterns, and code for end-to-end Java applications.



Questions and Answers - Client Tier
  1. How should my applets talk to my enterprise beans ?

  2. Can enterprise bean data be imported directly into a StarOffice spreadsheet?

  3. Is there a way to import data from EJBs directly into an Excel spreadsheet?

1.   How should my applets talk to my enterprise beans ?

We recommend making services from EJB technology-based components ("enterprise bean services") available to applets through a web-tier servlet. The servlet acts as a facade that unifies the applet's access to back-end data, and isolates the applet code from changes in the enterprise bean classes.

Applet accesses enterprise beans through servlet

  • You may don't have control over the Java Runtime Environment which is running the applet, so you don't know if you can access enterprise beans at all. Any version of the JRE can handle a simple XML parser, which is all that is needed to provide services to the applet.
  • Clients behind firewalls may not be able to make RMI-IIOP connections, so they can't access the enterprise beans directly. The servlet can serve any format deliverable over HTTP through the firewall.
  • Exposing the EJB tier to the outside world is a security risk. The servlet acts as a single point of control for what enterprise bean functions are externally available.
  • The servlet can decouple applets (and other clients) from the EJB tier, allowing their implementations to vary independently. This ability may be less important for applets, which are typically loaded at runtime, but custom clients that require installation can benefit from this decoupling. The web tier implementation can be changed as needed changed to correspond to changes in the entity beans' APIs, while maintaining the original contract with the installed base of clients. (This is a general benefit of the Facade design pattern.)

a spreadsheetSession Facade

2.   Can enterprise bean data be imported directly into a StarOffice TM spreadsheet?

TM TM

estore/pendingorders.jspdocs/starofficeDemo.html

discussion on applets and enterprise beans

3.   Is there a way to import data from EJBs directly into an Excel spreadsheet?

docs/excelDemo.html

See also:

Session state in the Client tier
Left Curve
Java SDKs and Tools
Right Curve
Left Curve
Java Resources
Right Curve
JavaOne Banner Java 8 banner (182)