+ /** Do it calmly in order to avoid NPE */
+ private Boolean isSpringInstrumented(Bundle bundle) {
+ Dictionary<?, ?> headers = bundle.getHeaders();
+ if (headers != null && headers.get("Spring-Context") != null)
+ return true;
+ Enumeration<?> springEntryPaths = bundle
+ .getEntryPaths("/META-INF/spring");
+ if (springEntryPaths != null && springEntryPaths.hasMoreElements())
+ return true;
+ return false;
+ }
+