Good day to you all. I hope someone can help this Java newbie. :-) I am new to servlets having been thrown in at the deep end having to pick up a project which is two-thirds complete. However, I wish to get some expert advice to make sure that before I continue I am taking the right road (my experience constitutes two weeks reading and a four-day course on Java basics).
The current state is that we have a set of servlets which reproduce data from the database, mostly based on some form information (for example return all products owned by a client: showProducts?clientId=xxx). There will also be some pages which do database updates, but this is part of my future work. Currently, ALL the data is loaded from the (Oracle) database into memory at login time, and held in so-called "Bean" objects (but I'm not convinced that's a good name for them). References to these bean objects are kept in session attributes. The data is then retrieved from memory and the database is not touched after the initial data-loading. The servlets are hosted by tomcat (just locally for the moment). The intention is that they will be used by a few users, not even a hundred, but must cope with more than one. Here comes the question. From my reading I think there are two options I can see being feasible for this project, but I don't know which is better, or whether there is another option I haven't considered... 1. The login mass data load is removed, and instead all the data retrieval, instead of being from memory, is rewritten to use prepared statements and get the data which would be better cached by Oracle anyway than being read into memory. Any future update statements (and selects which read from the relevant tables) would have to be synchronized. 2. We use Enterprise Java Beans. Firstly, this is all really new stuff to me. I have read (I believe on this list) that Tomcat is not an EJB container. Therefore I guess we would have to have some other web application service running to act as the EJB container which would persist throughout the life of the web server. Then the Tomcat-delivered servlets would make calls to some session beans (where would they be?) which would manipulate the data from the entity beans which represent the database. Option 1 sounds simpler to me, and I could start implementing that right now, but before I go I want to make sure I am doing the right thing! I apologise if I have not explained something properly there. If anyone can offer any advice then it would be greatly appreciated. I can offer better explanation if needed. Thanks in advance, Dan ___________________________________________________________________________ To unsubscribe, send email to [EMAIL PROTECTED] and include in the body of the message "signoff SERVLET-INTEREST". Archives: http://archives.java.sun.com/archives/servlet-interest.html Resources: http://java.sun.com/products/servlet/external-resources.html LISTSERV Help: http://www.lsoft.com/manuals/user/user.html
