com.ibm.websphere.samples.workarea.companycontextclient
Class J2EEClient
java.lang.Object
com.ibm.websphere.samples.workarea.companycontextclient.J2EEClient
public class J2EEClient
- extends java.lang.Object
The J2EEClient drives WorkArea usage between the WebSphere J2EE
client container and the WebSphere EJB container. This client has exactly the
same appearance as the Servlet; therefore, users have only to
figure out how to use one client and can immediately use the other. That's why
the decision was made to use the JEditorFrame which can read and display html.
JEditorFrame has some limitations, however, which result in some non-traditional
code. First, JEditorFrame is buggy. Tags it doesn't understand result in unformatted
display with no feedback. Crashing isn't unheard of. More significantly, JEditorFrame
is perfectly happy to display buttons and the like, but there's no mechanism for registering
listeners for the events. Unlike traditional browsers, JEditorFrame doesn't automatically load
pages from url events; instead, it sends an event via the hyperLinkUpdate method; within that
method, the implementor can do whatever they want. Therefore, we attach 'urls' that simply
indicate internally what url was invoked; we then do the right thing locally, whether that be
to update the company or priority or company or to lookup the home, create an session instance,
and invoke the bean.
Just like the servlet, when we invoke the bean, we first begin a WorkArea and set into it
the company and priority. We then call the bean without explicit parameters; the bean responds
with a string [] that corresponds to the bean trace. We embed that string [] with a client trace
into the html view and redraw.
Constructor Summary |
J2EEClient()
Default constructor called in main. |
Method Summary |
static void |
main(java.lang.String[] args)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
J2EEClient
public J2EEClient()
- Default constructor called in main.
main
public static void main(java.lang.String[] args)