Tim Holloway wrote:I worked with someone who'd been brought up on COBOL. COBOL, as originally designed, had source programs that were generally one enormous procedure. When he first started working with more modern languages such as Pascal, he got a little frustrated because enormous monolithic procedures often wouldn't even compile - the resource allocation and optimization schemes used in these languages was oriented towards smaller units.
A common complaint about Java is over-abstraction: defining an Interface and concrete classes for virtually everything and that's really just another case of the famous small-child-with-hammer syndrome. But in OOP languages it is true that a single program code unit should normally be something you can print on a single piece of paper. Anything larger is probably trying to do too much.
More important than the number of classes is how you organize class packages. Here again, the key is that a package should do one thing and do it well. Packages enhance code re-usability and help hide internals from mis-use by outsiders. Java Modules, of course, take that one step further. But that's another topic.
Stephan van Hulst wrote:Looks like you have an application that uses JAX-B annotations. Is it a Maven application? Can you show us the POM? Can you show us an example of where you use the JAX-B annotations?
Rob Spoor wrote:That method was added in version 1.1 of the validation framework; see https://docs.oracle.com/javaee/7/api/javax/validation/Configuration.html#getDefaultParameterNameProvider--. Since you're using JBoss 6.1, which is ancient, it probably provides version 1.0.
I'm curious though - why are you a) using JBoss 6.1, which is ancient, and b) using Spring Boot inside a container, whereas one of its main selling points is to not have to depend on a container?
If you need ReST (or any other HTTP request) to set off a long-running process, then you should use the HTTP request to queue up an out-of-band processor and either poll for completion (as successive periodic HTTP requests) or provide some sort of callback mechanism to notify anyone who wants to know when the long-running request is done. Email, for example.