Page 1 of 2 12 LastLast
Results 1 to 10 of 15

Thread: Getting JDBC performance and HTTP endpoint data with Spring Insight?

  1. #1

    Default Getting JDBC performance and HTTP endpoint data with Spring Insight?

    We have a fairly large application, and I thought I'd try running it under Spring Insight. I have it setup, running from within eclipse, and things are pretty nice, but I notice that I have no JDBC data and no HTTP enpoint data for my application.

    I moved my datasource declaration from the app's context.xml into the server's <GlobalNamingResources>. I've added parameters to match the example on http://static.springsource.com/proje.../radmjdbc.html, including in particular the jdbcInterceptors.

    The application continues to work, queries the database through hibernate, etc. But I still have no statements listed on any of the traces.

    As for the HTTP enpoints, I don't even know where to start investigating. Any suggestions?

    Thank you

  2. #2
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    If you have jars for the JDBC driver outside the application, Spring Insight won't collect data for it. We might extend this in future, but currently the JDBC drivers must reside in webapps/<app>/lib directory and you application must use those jars.

    I am not sure why HTTP endpoints don't work for you, though. Can you provide more details on your configuration?

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  3. #3

    Default

    Thank you for your quick reply. I am trying putting the jars in there now, and I'll give you a bit more details tomorrow (it's quitting time here

  4. #4
    Join Date
    Sep 2008
    Posts
    2

    Default

    I can see app traces fine in the recent activity view, but I can't see any HTTP endpoint activity either in the application health view.

    Our app is Spring 2.5.x and running as the ROOT context in tomcat.

  5. #5

    Default

    I moved the jdbc drivers (mysql) to .../webapps/myapp/WEB-INF/lib (which I think is what you were suggesting) but that means the classes aren't found in the <GlobalNamingResources> section. I moved the resource definition back to the application's context.xml. That still didn't work (ClassNotFound for com.mysql.jdbc.Driver)

    I moved the jar to <tomcat root>/lib/ and the driver class is found. But I still get no JDBC data in the traces (whether the resource is defined in the <GlobalNamingResources> or in the context.xml).

    As for the HTTP endpoints, my application is very large, so I thought I'd try something simpler. I used the springtravel application (through the STS tutorials). With the application as-is from the tutorial, I get endpoints. I noticed that the application uses annotations to map requests (and parameters) to method calls. We do not use annotations. I changed the sample code to use bean-driven configuration, with a handler mapping. No more endpoints.

    So, am I right in assuming to be listed in the "Application Health", endpoints must be configured through annotations?

    I also noticed that in the traces, some methods are listed and their execution time is listed, but some aren't. For a number of calls, I have the total run time, the time for Spring Web Dispatch, the time spent in FileValidator#validate (our class/code), and the time to Resolve View and Render View. Is there something I can do to show how long, say, calls to the DAO took?

    More on our project: we do not use annotations at all. Beans are spread out in a number of files, many of which in dependent ("utility") projects. Some of the bean files are outside the application's area. We use hibernate to access a mysql db. We also have solr running in a different webapp, and make requests from it. The application also uses GWT (with rpc).

    I'll see if I can get JDBC data with a simpler setup

  6. #6
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    sneakybeaky,

    Can you file a bug. We have so far focused on webapps at non-root context and ROOT context may be something we need to handle.

    Thanks.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  7. #7
    Join Date
    Jun 2006
    Location
    SF Bay Area, California
    Posts
    524

    Default

    Nancy,

    Spring Insight's instrumentation works off of annotations for the web part (Controllers, mainly). Other parts such as JDBC, transaction management, and top-level HTTP requests work without any consideration for annotations.

    Every call should show time taken. Can you post a screenshot of what you see. This way, we can notice a bug, if any.

    Also, please add to JIRA any issues you face, any suggestion for improvements etc.

    Thanks.

    -Ramnivas
    Ramnivas Laddad (Follow me on Twitter)
    AspectJ in Action: Enterprise AOP with Spring Applications (2nd edition). Now available!

  8. #8
    Join Date
    Apr 2008
    Location
    Philadelphia, US
    Posts
    198

    Post

    Hey Guys,

    Confirming the "not seeing SQL performance break down / tracing", in fact nothing SQLish at all, just HTTP trace and details.

    Have Oracle JDBC driver JAR in "WEB-INF/lib" + put it under "tc-server-6.0.20.C/lib".

    I would create a JIRA, but looking at the project list (http://jira.springframework.org/secu...edCategory=all) not sure where to create it. Let me know where, and I will.
    Humans are stateful and mutable beings that have no problems processing many things concurrently and share state with others + they are usually "coupled"

  9. #9
    Join Date
    Apr 2008
    Location
    Philadelphia, US
    Posts
    198

    Arrow

    ok, found the JIRA ( took a google search )

    created the first JIRA in Spring Insight history: https://issuetracker.springsource.com/browse/INSIGHT-1
    Humans are stateful and mutable beings that have no problems processing many things concurrently and share state with others + they are usually "coupled"

  10. #10
    Join Date
    Sep 2008
    Posts
    2

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •