I wanted to put down a quick placeholder about problems I see with the J2EE specification. This is not to say that I don't think great applications can be built using J2EE and if I had to build certain types of applications today, I'd choose J2EE. I do want to take a direct look at how we program applications using J2EE so we understand the best way to improve it and future programming tools.
This was a spec written by people primarily considering the manageability of code assets. They wanted to create a "safer" programming environment for a less skilled type of Java programmer. But in my view, this really does not exist. Those types of programmers use perl, python, or vbscript productively and will never get or be able to adhere to the complexity of the EJB interfaces. It imposes a lot of discipline and structure which you must learn and offers limited real functionality by itself. I think manageability is an important feature for a development environment, but it is something you layer on a design with constraints, test suites, performance measuring tools, and tools for helping automate the important programming tasks.
There are a lot more bad things about EJB - the content of the XML files - the fact that you cannot use threads or static variables, the performance of remote invocation, but I think these problems are relatively well known so I won't go into their specifics.
Right now, Java implements persistence using the serializable facility but this is clearly too restrictive a mechanism to perform general application state maintenance. I think this is a particularly hard thing to integrate into a language and that is why I'm looking at building it in from scratch on my own. The language Jade is one of the cleanest implementations of what I'm talking about here (www.jadeworld.com) but I think the performance of their stuff is probably not that good based on their architecture.
The big problem though is that persistence is a big political hot button for just about everyone. No big company will agree to a standard which conflicts with the revenue goals of that company and large companies have a lot invested in existing persistence standards. It may be that they have a lot invested in the lock-in you get with today's persistence standards but even if that is not the case, getting a single universal persistence solution past most standards committees has been a daunting task. JDO may be the best candidate and it has limited acceptance and (in my opinion) has only standardized a small fraction of what we need in this area.
A more generalized scope concept (similar to that as implemented in ATG's nucleus) that is built in to the language will both improve the power of logic you can implement with a simple declarative construct. This reduces the amount of code, potentially improves the efficiency of the system, and I believe will improve the manageability of the code. Also, by recognizing the applications are assembled by merging together layers, we can reduce the amount of copying and improve the manageability of the code assets that way too.
As a result of these missing features in the base language, they are implemented time and again in other specs popping up in J2EE. If there was one standard persistence model which was used for managing all component configurations, we would not need all of the DTDs for all of the XXX specifier files and all of the wizard tools for managing that state. There could be one set of admin UIs for managing application configuration, centralized application deployment and management.
The newest part of J2EE is the web services which adds a whole new "glue" layer - yet one more programming interface for programmers to learn and more code for them to write to accomplish even the simplest of programming tasks. To me, there should be one overriding model of the program which is rich enough to generate all of the glue necessary. I think Java is trying to get to this with their meta-data JSRs - at least they are headed in the right direction. I'm not sure you can accomplish this properly though without a generative programming environment and better integrated persistence.
I think part of the problem is that folks really want a software grid like architecture (see www.globus.org, though I think this is primarily used by the scientific community and may lack the necessary notions of transactions and data integrity for enterprise programming in this form). Once again, how modules are configured and deployed are problems that if solved at the foundation layer, minimize copying and thus minimize maintenance. When state is replicated in a XML files stored as special locations in some Jar file, it seems to me that you have a much more complicated beast to manage. Configuration is as important as code and should be managed with a more powerful environment than replicated proprietary monolithic XML files.