× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Before I ask question, I should probably mention that I'm a newbie to webapp.  
so, here I go:
 
1) When multiple users send request to a wepapp (Created using jsp, struts... 
and uses Tomcat as the servlet container) at the same time, how does each of 
them get handle?  FIFO or the servlet container just spawn of a child job for 
each request and process them at the same time?
 
2) This is the main problem that I'm dealing with
    2.1) I've a DAO class that uses datasource to get a connection object.  
Connection object is declared as static.  See below:
          private static Connection conn = null;
            public DAO() throws DAOException {
            if (conn == null) {
                setConn(); 
            }
    2.2) All database DAO objects extends DAO class to get connection object to 
do file io.  I'm trying to add commitment control to this webapp.  I can do 
this by doing conn.setAutoCommit(false).  My question is that conn is a static 
object, as I understand it, that means there will only be one instance per jvm. 
 If multiple user send request to this webapp, how can I handle the commit and 
rollback to make sure that it doesn't interface with each request.
 
thanks.
 
 
 

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.