Can't we use spring for distributed java applications?

jakarta-ee, java, spring

Solution

Well, Spring is wide. So you can review point by point. I'm not specialist in Java EE but I'm sure Spring can cover a lot (if not all) of Java EE concerns. And I'm pretty sure Spring can handle most of layers/concerns in an application.

First of all, Spring IOC. You can configure an object graph with Spring IOC. It helps at any layer configuring all the components you need to implement a layer.

Spring-MVC-Web: you can configure an MVC web component in order to handle and serve all web application requests. I think you can make something cool with it. Configure web responses and its necesary configuration with other business elements (including IPC - Inter Process Comunication).

Spring Security is heritage from Acegi. It's a web framework for defining role-defined access to web resources.

I'm not sure if Hessian is Spring's too. Anyway it's lightweight and it helps comunicating with components in other processes à la RMI.

Well... I'm not sure about persistence, but I thing Spring has templates for JDBC, Hibernate, and all, so it can help anyway (as suggestions indicate: JmsTemplate and RestTemplate are available for communication with other business components!).

The core thinking here is: you can make an app from scratch, so in all cases, Spring can provide a framework to ease the difficult/repetitive tasks on every layer. Does Spring does it? Yes.

Please check other features to see if Spring has something for it. I'd bet it.

Problem

This came as an interview question. The interviewer asked me if you can use spring for all the purposes and get away without using any of the Java EE framework . I said yes, but he asked me how about if the application is distributed and what is the point of application servers. I am not sure about the answer. Does Spring do everything that the Java EE framework does?

Original source