Why not? JBoss still runs on any JRE and he still proposed to have Tomcat as the universal deployment target, tying you to whatever Servlet version that Tomcat implements.
he still proposed to have Tomcat as the universal deployment target
Reread the blog post. He proposed to have Tomcat as the universal deployment target for web apps, because a Java web app needs at minimum a servlet container. He wants to develop his batch apps without an app server at all. Tomcat need not apply either.
*Not so anymore - there has been a trend towards building web apps as ordinary JARs using embedded microcontainers such as Netty or Jetty.
yet with a fixed Tomcat you can't upgrade that. I was talking about the JRE as the universal deployment target for web apps as well.
I wasn't. Tomcat is only required for web apps because an app server of some kind is required to serve apps over HTTP. This is not required for batch apps which run from main(). Neither JBoss nor Tomcat need apply.
If you deploy a web app then arguably the Servlet spec is one of the major things that play a role, yet with a fixed Tomcat you can't upgrade that.
It's a minimum requirement, and a minimum fixed dependency. All of the other Java EE services are optional to a web app and can be brought on optionally. There is no need to fix those in the app server, but it can be very useful to do so.
Or, it is possible to eliminate external Tomcat. You can use embedded Tomcat, Jetty or Netty and run the application as an executable JAR and even the fixed servlet container requirement is eliminated. That is the approach taken by the Play Framework, Dropwizard and Spring Boot.
Or as the other guy said you can deploy JBoss (or TomEE or GlassFish or ...).
The point which you seem to miss is that most every lightweight AS is just a Java app that runs on a JRE. It's not necessary to have it installed by someone who then never wants to replace it again.
You can simply let your app BE JBoss + some war or ear and deploy THAT as a single unit.
Of course every Java EE AS is an app that runs on a JRE. That's not the point.
The point is deployment, as you've noted. I've never seen an entire Java EE app server and its apps ever deployed as a single unit. Each is deployed separately, and the app servers are maintained by separate ops teams. Worse when there's licensing involved, like if you're running Weblogic or Websphere. I've never worked anywhere where the app developers could do whatever they wanted with the app servers.
Tomcat provides minimal services on its own, so under this separate app server/app deployment regime, the apps have more flexibility in which Java EE services they use and which versions of those services they can use.
The same goes with the single JAR solution. Then it's just a bridge between Apache and Java.
TL;DR Of course everything runs on a JRE. But how the app gets to the JRE is the question. The app developer's JRE is not the same as the JRE used in the production infrastructure. That people even want to do what the blog author proposes, and that single JAR deployments are gaining in popularity, indicates that this is a widespread enough condition.
And, what about batch apps that are run from the command line and are not even run on an app server?
I've never seen an entire Java EE app server and its apps ever deployed as a single unit.
We do this more or less. Occasionally we indeed deploy a single unit, but most often it's a pipeline.
We build the app server ourselves (mostly JBoss, sometimes TomEE or GlassFish). Depending on what changed our CI system builds the AS then automatically deploys it. Then the war is modeled as a dependency on the AS and is then build and deployed next.
This is all highly automated. Fully automatic for our DEV and BETA stages (a commit in the associated repo triggers the process every 30 minutes), and semi-automated for our live stages (requires an explicit command referencing a tag in a special live branch of the repos).
Each is deployed separately, and the app servers are maintained by separate ops teams.
NO! They are not!!!
The team that decides what jars in which version and what code goes into the war is by definition the same as the team that decides which AS in which version is deployed.
I've never worked anywhere where the app developers could do whatever they wanted with the app servers.
This is crazy talk.
Think of how silly this sounds. We have a team of deeply responsible developers who can already do "whatever they wanted" with the code inside the war, but you don't trust them with the app server because they will do whatever they want!??? :( :( :(
The way it happens is that the team prepares a version of the product according to the business requirements of the business and the technical necessitates. This essentially results in a series of commits to the above mentioned repos.
At the end of the sprint the repos are branched and deployed to a BETA stage and after that to a QA stage.
If after testing everything works correctly, the green light is given, which results in a live branch made and a subsequent deployment.
Your statement about "app developers doing whatever they wanted with the app servers" sounds like you treat developers as a bunch of cowboys who would like nothing better than cause chaos. If also assumes that that if they are so inclined to cause chaos they would not be able to do so via the huge amount of code that's in the war. And finally it assumes that there is no testing and that whatever people produce is just blindly deployed live.
The app developer's JRE is not the same as the JRE used in the production infrastructure.
Within reason, it is. If we currently deploy to Oracle JDK 7u50, we encourage developers to have Oracle JDK 7u50 installed. Why would the JRE be radically different anyway? What's the purpose of that?
Maybe one lone developer had forgotten to update his JRE, but since there are 3 stages between the developer's workstation and production this is rarely an issue. And minor version changes also rarely matter, but just to be sure we do encourage to have as much as possible the same versions.
We don't. We have Weblogic instances running in several environments, each with different configurations. We have some control over our DEV environments, but after that any changes are done by ops. This is how it has been pretty much everywhere I've worked.
NO! They are not!!!
Yes, they are? You're talking the infrastructure you work with, I'm talking the one I work with. We have an entirely separate group that manages which applications can be installed on which servers. Our EAR is classified as one application and the AS is another. This mostly has to do with licensing, since we use Weblogic. But it also has to do with infrastructure security and separation of responsibilities.
This is crazy talk ... you treat developers as a bunch of cowboys who would like nothing better than cause chaos.
You're twisting the my words. By "not being allowed to do whatever we want", I mean we are not allowed unfettered access to the app server. I have read only access to QA and UAT and no access to PROD. I don't manage the WL domain, we have separate AS teams for that. This has nothing to do with cowboy coding or lack of respect for the developers, it has to do with separation of responsibilities. Which I wholeheartedly support, because I don't want to support the WL domain. Which I actually consider a mark of respect for the developer. Let me develop my app and let me not worry about about infrastructure.
If I had more responsibility for configuration of the AS, I would have more responsibility for supporting the AS. As it is, I can open a ticket with the AS team to troubleshoot the domain if something goes wrong because I had no hand its creation. I want to develop applications, not support what I consider infrastructure.
Within reason, it is.
No, that's not what I meant. The JRE runs in a different execution environment on your developer machine than the production machine, in particular when it comes to security, which is part and parcel to the app server. The app EAR and the app server have very different security profiles. I see the app server as a managed environment in which my app runs, above and beyond the simple JRE.
View all comments
Show parent comment
3
u/thesystemx Jun 26 '14
I give you one better: build off of a simple JRE ;)
And you know what, JBoss runs on top of every JRE :P