Skip to content
This repository has been archived by the owner on Jun 3, 2024. It is now read-only.

Spring batch component using @Timed does not increment count attribute #215

Open
condessalovelace opened this issue Jun 29, 2018 · 0 comments

Comments

@condessalovelace
Copy link

I'm using Spring Batch and there's a component that extends JdbcCursorItemReader which is used as reader in a chunk. I have added the @Timed annotation on doRead() method:

@Timed(name = "Read")
@Override
public T doRead() throws Exception {
    return super.doRead();
}

This method is invoked by Spring AOP, so the problem is that the time and stop methods are not triggered by this annotation (count == 0, even when the method is called), although the metric is registered (log shows it).

This problem is a limitation or I'm doing something wrong? (Methods called explicitly work as expected, i.e., the counter and other properties are incremented).

@condessalovelace condessalovelace changed the title Spring batch component anotated with @Timed does not increment count attribute Spring batch component using @Timed does not increment count attribute Jun 29, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant