1

I adopt a software architecture where I have one single data access in the persistence layer.

Indeed, the persistence layer is a mere java application (JAR file) that I consider as an dependency, thanks to Maven's POM.

So, when I need to access the database, I just call some DAO classes from some Servlet or such.

Since I am considering multithreading via Tomcat, I took advantage of StringBuffer, but SonarQube, which detects that my Back-End API is a mere Java-App, recommends to use StringBuilder instead.

Is SonarQube right, or should I stick to StringBuffer?

Or is multi-threading out-of-scope when it comes to APIs?

3

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.