Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. microserf

    Profiling a J2EE Application

    Thanks Dian, but the point of line-by-line profiling is to see which function calls take a long time. An alternative to line-by-line would be to collect profiling data on method calls, but it would be less useful to know that a lot of time is spent in the foo() method than to know that a...
  2. microserf

    Profiling a J2EE Application

    Hi How can I profile a J2EE application? Specifically, I want to be able to see which lines of code in my servlets take the most time to execute. I have seen people suggest adding logging code to do this, but this is messy (adding code that doesn't need to be there) and time-consuming (if I...
  3. microserf

    Database Connection Pooling in J2SE 1.4.2

    ... ah, I wondered what Dian was going on about...
  4. microserf

    Database Connection Pooling in J2SE 1.4.2

    Thanks sedj, Do you have any recommendations as to which connection pooling library I should choose? My requirements are that I should have to make minimal changes to my code (I don't need the very best performance, I just need to reuse connections). Thanks
  5. microserf

    Database Connection Pooling in J2SE 1.4.2

    Hi all If I am using J2SE 1.4.2, a mysql DB (connecting using com.mysql.jdbc.Driver) and if I get a DB connection using DriverManager.getConnection(), are my DB connections pooled? (I.e. if I call close() on a connection object, is the connection actually closed, or just returned to a pool of...
  6. microserf

    is StringBuffer.append("c1").append("c2") faster ? than spli

    This thread seems to be about what is called 'premature optimisation'. Who cares if one method is faster than the other? You should write your code to be correct. If you later find that it does not meet your specification for speed, then you should profile your program to find out where it's...
  7. microserf

    Edit or View Resultset from Database - Design Question

    The functionality you require is probably best implemented as a combination of a servlet (for the business logic) and one or more JSPs (for the presentation). You will need to write code that will format the data returned in a ResultSet in a table, adding in the 'edit' and 'view' links. The...
  8. microserf

    How to write startup code

    The HttpServlet has an init() method which is called by the servlet container when the servlet is placed into service (this is inherited from GenericServlet). You can override this method in your servlet class to achieve your aims. Note that there is a matching destroy() method which is called...
  9. microserf

    Programmatically determine servlet container port etc.

    Thanks, but using HttpServletRequest.getServerPort() would only tell me the port number that the request was using. It would not tell me about all of the ports that are configured, which is what I want.
  10. microserf

    JDBC with mySQL question -- URGENT

    I would lift the following line out of the while loop: s2 = conn.prepareStatement("select product_image_path from product_images where product_id = ?"); The PreparedStatement class is, in part, designed to allow you to efficiently run similar queries multiple times. So before entering the...
  11. microserf

    How to check the number of digits in an integer

    Note that integers can be negative, so the solution posted above, which basically just counts how many characters are required to render the integer as text will not work for negative integers (as the first character will be the '-' character indicating a negative number). I suggest taking the...
  12. microserf

    Programmatically determine servlet container port etc.

    Hi I am writing a custom JSP tag and I need to be able to determine how the servlet container is configured. Specifically, I want to be able to do things like get a list of the port numbers in use and which schemes they are using (e.g. HTTPS on port 8443). Is this possible? I know I can...

Part and Inventory Search

Back
Top