Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to solve circular dependencies between JARs?

I am working on a big project with a lot of JARs and for sure no documentation exists!! :(

To ensure that there is no memory leakage in the application, I've used JBoss Tattletale to check for circular dependencies between Jars and unfortunately I have found many.

Can you please guide me on how to solve circular dependencies between JARs??

Thanks in advance.

like image 813
M.ES Avatar asked Dec 05 '25 01:12

M.ES


1 Answers

You can break dependencies by dependency inversion. To avoid and resolve circular dependencies, it helps to design a tiered architecture.

That said, the circular dependencies do not cause memory leakage. But breaking circular dependencies has a lot of positive effects, mainly modularization. This not only increases flexibility, but also helps in checking and resolving problems, memory leaks included.

If you do not break circular dependent packages, those behave very similar to one large, monolithic package!

like image 172
DaveFar Avatar answered Dec 07 '25 15:12

DaveFar



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!