tomcat-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clive Welch <>
Subject Servlets, Dates and EJB's
Date Mon, 29 Oct 2001 12:40:48 GMT

I'm making progress in my understanding of all things J2EE with JBoss and

I'm now hitting a number of design related issues and I'd really appreciate
some pointers either to the solution or mailing lists and/or newsgroups that
cover these issues.

I've got a servlet that handles a form posted to it where some members are
dates. The servlet needs to update a CMP EJB. What's the best approach here?
Do I:

1. Convert the parameter to a date in the servlet and then pass it to the
EJB? This way I can handle the error and return HTML informing the user.

2. Override the set function on the EJB and convert the date in the EJB?
What do I do about errors here? Throw an exception in the set function and
catch it in the servlet?

3. Is direct access to a CMP EJB from the servlet a good idea?

Another servlet provides a list of details - projects in my case. At the
moment there's only a few records but I need to add functionality to provide
pages with say 10 items in each, similar to the results you get from a
search engine.

At the moment I have a stateless session bean that manages a collection of
projects. Implementing the page using this will be relatively
straightforward. But:

4. Is this how its done? Is this the best way? What other approaches are



Totalise - the Users ISP
To become a member and a shareholder

To unsubscribe, e-mail:   <>
For additional commands, e-mail: <>

View raw message