diff options
author | Ivan Topolnjak <ivantopo@gmail.com> | 2015-01-30 03:25:54 +0100 |
---|---|---|
committer | Ivan Topolnjak <ivantopo@gmail.com> | 2015-01-30 03:25:54 +0100 |
commit | 30a91e935445d764d58d9e329236e9696264eeff (patch) | |
tree | 4f2765bbc7be1cb75b623bd688eb9a5cc187275c /kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala | |
parent | 1cfe038ff70cc459515d2ee6eb3ae216c823ec47 (diff) | |
download | Kamon-30a91e935445d764d58d9e329236e9696264eeff.tar.gz Kamon-30a91e935445d764d58d9e329236e9696264eeff.tar.bz2 Kamon-30a91e935445d764d58d9e329236e9696264eeff.zip |
+ all: use ModuleSupervisor init all auto-start modules.
The new ModuleSupervisor implementation will make use of
special configuration keys under the `kamon.modules` section
to detect all the available modules in the classpath and do
two things with that info:
1. Log the AspectJ Weaver missing error if any of the
available modules requires AspectJ.
2. Start all available modules that are marked with the
auto-start setting.
Diffstat (limited to 'kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala')
-rw-r--r-- | kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala b/kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala new file mode 100644 index 00000000..bbb8b69b --- /dev/null +++ b/kamon-core/src/main/scala/kamon/supervisor/AspectJPresent.scala @@ -0,0 +1,15 @@ +package kamon.supervisor + +import org.aspectj.lang.ProceedingJoinPoint +import org.aspectj.lang.annotation.{ Around, Aspect, Pointcut } + +@Aspect +class AspectJPresent { + + @Pointcut("execution(* kamon.supervisor.KamonSupervisor.isAspectJPresent())") + def isAspectJPresentAtModuleSupervisor(): Unit = {} + + @Around("isAspectJPresentAtModuleSupervisor()") + def aroundIsAspectJPresentAtModuleSupervisor(pjp: ProceedingJoinPoint): Boolean = true + +} |