Hi all,
a question concerning Jaworski's
Test:
"Suppose that the business logic of an existing application is implemented using a set of CGI programs.
Which
Java technologies can be used to implement the CGI programs as a Java-based solution?
A. JMAPI
B. Screen scrapers
C. Enterprise JavaBeans
D.
Servlets The correct answers are:
C. Enterprise JavaBeans
D. Servlets"
Technically it is possible to replace CGI by EJBs, but it probabely/maybe would not match the customer's needs nor budget.
Having used CGI up to that time
- all clients send http requests, probabely with name/value pair parameters appended after the question mark, and
- all clients expect html or at least http answers as byte streams.
Replacing the CGI programs by EJBs would make it necessary to rewrite or at least heavily change all client software. Instead of sending a http request (byte array) and receiving a http byte stream the clients now would have to lookup a JNDI reference to the
EJB's home interface, narrow and cast to an object realizing the EJB's remote interface, and then call [hopefully parameterized] methods of this EJB object. This is a pretty different approach, and therefore this requires totally rewriting the client's code too. If the customer has been asked and has agreed, this is fine, really. But can this be expected to be the normal case?
What do you think?
If no, such a doubtful answer should not be expected in the real and not in a mock test?
Thomas.