Thursday January 27, 2005
Feedback on J2EE Tutorial & deployment descriptors needed
For J2EE 5, Sun is putting a lot of effort into making enterprise applications easier to create, deploy, and use. Deployment descriptors consistently come up as a source of discontent with the J2EE development process. Right now we're scoping the J2EE 5 Tutorial, and would like your feedback on how the Tutorial should deal with deployment descriptors.
Of these three options, which do you prefer?
- No discussion of deployment descriptors, provide pre-assembled JARs/WARs/EARs
- Provide detailed instructions on assembling the JARs/WARs/EARs with a graphical tool like
deploytool - Provide both "fast track" instructions (option 1) and "slow track" instructions (option 2)
Related to this, what is your preferred development environment?
- IDE (like NetBeans, Java Studio Creator, Eclipse, JBuilder)
- command-line tools & text editor (vi, Emacs, TextEdit, etc.)
Trackback URL: http://blogs.sun.com/ievans/entry/feedback_on_j2ee_tutorial_deployment
Post a Comment:

I think it would be nice to have a tutorial on how to use Ant to manage and automate j2ee build cycles. I know Ant is not directly related to J2EE but I could argue that Ant provides the lowest barrier to entry for setting up a release/deployment management group wihtin organizations. This is critical given that large organizations now have a lot of j2ee applications and the TCO related to release/deployment management is being impacted.
Posted by Avram Levin on January 28, 2005 at 12:48 AM PST #
Posted by Joseph Ottinger on January 28, 2005 at 03:40 AM PST #
1/ assess what Netbeans 4.1 can do today. (hint: it does a lot and even more)
2/ asess what J2EE 5.0 spec will bring to even simplify 1/
3/ educate the J2EE developer community that without tools, there are doomed. I hust cannot believe that an EJ Module with some 50 CMP beans (small database, in the enteprise world) can be effectively developed, configure, debugged, deployed witout an IDE. Now the issue is which IDE? Well, Sun is very well invested in NetBeans. You could also pick Eclipse if you can convince upper management this is the right businees decision. Meanwhile, we should invest all the available resources in what we have: J2EE 5.0 implementation, and its support in NetBeans 5.0. This includes:
a/ engineering: we are well covered here
b/QE: tests should be driven by the IDE: this is what the developer will experience
c/Docs and tutorials/samples: tailored to run well wtih NetBeans. As a side effect, they will run well with CLI and ANT, since NetBeans uses ANT as a build system, natively (i.e not import/export, ant IS the build system)
Posted by ludo on January 29, 2005 at 08:29 AM PST #
Ludo: I agree that ease of deployment is the goal, and that it is almost impossible to hand-write deployment descriptors for anything but the most trivial of enterprise apps. You're right: the J2EE platform did emphasize the role of deployer too much.
With that said, there is no standard tool or method of generating deployment descriptors (so far). Not only that, the IDE field is far from standardized. The question is how do we introduce "ease of use" in a way that doesnt' immediately alienate the other 70% of J2EE developers that don't use or like the tool we are pushing?
Posted by Ian Evans on January 31, 2005 at 01:59 PM PST #
Posted by Martin on February 01, 2005 at 12:46 AM PST #
Posted by Martin on February 01, 2005 at 12:48 AM PST #
Martin:
We do, in fact, include pre-built JARs/WARs/EARs for all the examples, and they can be dropped into the auto-deploy directory, or deployed with asadmin, or through deploytool, or through the Admin Console. Therein lies some of the problem: if we documented all the possible ways to deploy the JARs/WARs/EARs, the tutorial would be quite confusing.
Another problem with simply using auto-deploy is that our examples require resources outside the JAR/WAR/EAR (database connections, JNDI names, etc.).
Deployment from the command-line is as simple as:
<code>asant build</code>
<code>asant deploy</code>
Not every example can be deployed from the command-line currently, mostly due to resource consraints, but J2EE Tutorial.next will have command-line deployment for all examples.
We do not document how to write deployment descriptors by hand. We never have and never will. We have been documenting how to use deploytool for hand-assembling the apps.
The J2EE Tutorial's big challenge is finding the middle ground between material for the programming novice, J2SE programmers who are just getting into enterprise development, and experienced J2EE programmers who want to learn about new features and technologies. We've tried to provide multiple paths for these disparate users, and for the next release we're trying to find a better solution to this problem.
Posted by Ian Evans on February 01, 2005 at 01:06 PM PST #