From c18c845a6f319b0548cf0ed524055f4e9f9e907f Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Mon, 28 Sep 2015 23:04:10 -0400 Subject: [PATCH 1/3] Add missing json-simple dependency --- pom.xml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pom.xml b/pom.xml index 3f2e357ca..fa30935a8 100644 --- a/pom.xml +++ b/pom.xml @@ -88,6 +88,11 @@ taglibs-standard-jstlel + + com.googlecode.json-simple + json-simple + 1.1 + com.jayway.jsonpath json-path From e8c944f6bbfcca96781b28b8d3f4c543e17fb259 Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Mon, 28 Sep 2015 23:45:26 -0400 Subject: [PATCH 2/3] remove version number --- pom.xml | 1 - 1 file changed, 1 deletion(-) diff --git a/pom.xml b/pom.xml index fa30935a8..989ba3cbc 100644 --- a/pom.xml +++ b/pom.xml @@ -91,7 +91,6 @@ com.googlecode.json-simple json-simple - 1.1 com.jayway.jsonpath From 5a6c108efbb0df1f32258e97981957bbaccae29c Mon Sep 17 00:00:00 2001 From: Joe Freeman Date: Wed, 30 Sep 2015 21:20:34 -0400 Subject: [PATCH 3/3] Added comments when CallMonitoringAspect called CallMonitoringAspect is not invoked when spring-data-jpa is used. Spent 4 hours trying to understand why jmx bean wasn't showing message counts. Use JPA or JDBC if you want call counts exposed via JMX / AOP --- pom.xml | 4 ---- .../samples/petclinic/util/CallMonitoringAspect.java | 2 ++ src/main/webapp/WEB-INF/web.xml | 2 ++ 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/pom.xml b/pom.xml index 989ba3cbc..3f2e357ca 100644 --- a/pom.xml +++ b/pom.xml @@ -88,10 +88,6 @@ taglibs-standard-jstlel - - com.googlecode.json-simple - json-simple - com.jayway.jsonpath json-path diff --git a/src/main/java/org/springframework/samples/petclinic/util/CallMonitoringAspect.java b/src/main/java/org/springframework/samples/petclinic/util/CallMonitoringAspect.java index 3c699842f..494d6503e 100644 --- a/src/main/java/org/springframework/samples/petclinic/util/CallMonitoringAspect.java +++ b/src/main/java/org/springframework/samples/petclinic/util/CallMonitoringAspect.java @@ -26,6 +26,8 @@ import org.springframework.util.StopWatch; /** * Simple aspect that monitors call count and call invocation time. It uses JMX annotations and therefore can be * monitored using any JMX console such as the jConsole + * + * This is only useful if you use JPA or JDBC. Spring-data-jpa doesn't have any correctly annotated classes to join on * * @author Rob Harrop * @author Juergen Hoeller diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index bd3ea6d4a..e0c93f4f6 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -8,6 +8,7 @@ Spring PetClinic Spring PetClinic sample application + spring.profiles.active jpa @@ -19,6 +20,7 @@ jdbc --> +