Spring AOP and DSLContext

73 views
Skip to first unread message

Iveta Ivanova

unread,
Apr 23, 2022, 11:23:11 AM4/23/22
to jOOQ User Group
Hello Lukas,

We encountered the following issue: 
We are using Spring AOP extensively and we have a problem with the initialization of the DSLConext as spring bean. As spring bean it was scanned (each of his  ~798 methods) if it should be advised. So our server started for more than 7 minutes. We made kind a hack. We extend the DefaultDSLContext with new class that has @Aspect annotation but without any point cut configuration - because aspects are not scanned. 
Do you ever have such a problem? 
Do you have an idea for a better fix?

Best Regards, 
Iveta Ivanova

Lukas Eder

unread,
Apr 25, 2022, 5:31:02 AM4/25/22
to jOOQ User Group
Hi Iveta,

Thanks a lot for your message.

I remember having seen such problems in the past on some community channels. I'm not sure why this scanning is so slow, you could probably profile it and report bugs to Spring. Surely, they're doing something inefficient, it shouldn't take this long (7 minutes!) Maybe, they're not taking into account the possibility of complex type hierarchies like jOOQ's where the hierarchy graph is very complex?

As a workaround, you should configure Spring not to scan jOOQ types. Your approach seems viable as a workaround. A better approach might be to exclude all org.jooq packages as a whole, because there are other entry points into the jOOQ API than DSLContext.

But again, a thorough fix can only be expected if Spring addresses whatever they're not doing correctly. You're probably not the only ones having this problem.
Best Regards,
Lukas

--
You received this message because you are subscribed to the Google Groups "jOOQ User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jooq-user+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jooq-user/0aa6bdee-6cd5-4c37-b705-20ddb100fb0bn%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages