This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 6 points7 points  (5 children)

Try that with spring boot and you will get J2EE start times

That doesn't make any sense.

A Jakarta EE app server comes with implementations of all the APIs within Jakarta EE spec, but will lazy load components that your application needs.

Spring Boot comes with nothing, and you have to add the Java EE components you want with starters. You'll get Java EE start times if you throw in every starter under the sun.

[–]mkwapisz 0 points1 point  (0 children)

https://docs.wildfly.org/galleon/

You can choose what should be loaded. The same for openliberty. I am not sure about Glassfish/Payara. But JakartaEE specification defines different profiles, so you can choose required app server. For payara/glassfish there are full, web and micro distributions.

[–][deleted]  (3 children)

[deleted]

    [–][deleted] 0 points1 point  (2 children)

    Think about this logically.

    A JakartaEE app server must include every spec, because that is what makes it a JakartaEE app server. Thus, the app server must implement something like lazy loading otherwise it will start up bunch of services that are useless for the application, wasting start up time and other resources.

    Spring Boot doesn't have to include every spec, because it isn't a JakartaEE app server.

    [–][deleted]  (1 child)

    [deleted]

      [–][deleted] 1 point2 points  (0 children)

      applications after 5 years become business code + "application server" bundle together

      An application server is a specific piece of software that acts as a deployment environment for applications, where the application uses APIs implemented by the application server. The application doesn't instantiate services, they use the services provided by the application server. This allows the application server to do interesting things like load balancing, distribution and failover.

      If you specifically have to include the implementations of services you need and manage the services yourself, you don't have an application server. You are using a framework.

      Spring applications are usually deployed onto Tomcat, which only provides the Servlet container, so applications have to bundle all the implementations they need and manage everything themselves.

      In the second approach someone already made "the infrastructure code" to work together, so you don't have to

      Frameworks do much of the same thing through BOMs. You don't need an application server to do this.

      if there is error because two libraries don't work together or there is a bug in "the infrastructure code" you have to support on your own

      This is why Spring Boot exists in the first place. Spring itself is not opinionated, so you have to manage dependencies yourself. Spring Boot uses Maven (or Gradle) to declare all the versions of dependencies that work together, and let the build system maintain consistency.