What You’ll Need

Before getting into the thick of things, let’s take a moment to cover what you’ll need to work through this book. Most crucial are the APIs involved, but also important are the application server, the tools I’ll refer to, and all the support facilities for writing enterprise applications. You’ll also probably have your own set of tools (code editors, HTML editors, etc.), and you should not have too much trouble adapting to any of the instructions for specific products that you use.

APIs

First and foremost, this book is focused on the 1.3 version of the J2EE specification. You can download the J2EE specification from Sun online at http://java.sun.com/j2ee. I also highly recommend that you download the J2EE SDK (essentially the reference implementation), which can be used for running the example code.

Let me say a word about application servers. There are as many application server vendors as there are colors, and picking one isn’t always a trivial task. Additionally, trying to cover the nuances of each application server in a single book is simply impossible; you’ll always find a vendor or version that doesn’t fit the instructions, and in those cases a book’s instructions can cause confusion instead of resolving it. To keep this to a minimum, I’ve taken two steps. First, the content in the chapters of this book is focused on APIs, code, and deployment descriptors, and will work on any J2EE 1.3 application server. In other words, the chapters are all vendor-neutral. However, this leaves a lot of vendor-specific detail up in the air, as most application servers have specific instructions for setup and deployment. To accommodate this, the appendixes in this book will show you how to get the examples to work using the BEA Weblogic application server.

If you work in an environment where another application server is in use, you can take your applications and deploy them to that application server, using the specific vendor’s documentation. The result is an application that is as portable as it can be in today’s world of too-many variations on the J2EE theme. Additionally, as demand and time dictate, instructions for working with other popular application servers will be posted online at this book’s web site, http://www.newInstance.com. I’m going to handle this process much like an open source project, so if you go online and don’t see your vendor covered, I welcome your help and will work with you to get instructions online for your application server. Hopefully, this will be the best compromise between getting you timely and accurate information, and not creating confusion throughout the book’s text.

There is also specific software needed for chapters that go beyond Java; for example, you’ll need a directory server for the LDAP chapters and a database for the data store chapters. I’ll discuss specific alternatives in those chapters and explain what factors can influence your choices in these areas. I try to always recommend (at a minimum) an open source option and a popular commercial alternative. More often than not, one of these will result in a good match for your needs.

Tools and Utilities

I also recommend a few tools and utilities for this book. While you can certainly make your own choices here, I’ll let you know what has worked for me. First, you’ll want a Java Integrated Development Environment (IDE). While I often use wordpad, vi , or Emacs for editing code, large projects demand keeping up with three, four, or more active files. It’s here that an IDE can really help out. I prefer jEdit, available for free at http://www.jedit.org. There are tons of helpful plug-ins, Java syntax highlighting is included, and it has good support with new versions coming out fast and often.

I also recommend that you have a tool for working with databases that allows fast SQL querying. Here, I am fond of a commercial tool, SQL Navigator, which is available for purchase at http://www.quest.com/sql_navigator/. This tool allows interactive querying, a nice interface for setting up your database schema, and a lot more. It’s also particularly useful when dealing with Oracle, its preferred database, as it allows you to use PL/SQL, triggers, and other features specific to Oracle. Outside of SQL Navigator, there are many other free tools available for working with databases.

Finally, quite a bit of XML will be in play throughout the EJB chapters. It’s needed to write deployment descriptors, and I’ll also examine using XML for properties and configuration information. Additionally, many application servers add vendor-specific XML descriptors that you’ll need at deployment time. I recommend an XML editor to make validation of these files easy. While you can (as I did until recently) write some command-line tools using an XML parser to handle this task, I again have recently taken up using an IDE. jEdit works well here, and I have also had some success with XMLSpy, available at http://www.xmlspy.com. All these tools are optional, and I won’t dwell on them in the text, but they can really increase productivity and make life a little easier.

Related Works

In addition to everything I’ve said so far, I’m a big advocate of books as an aid in learning and programming. A famous preacher, Lester Roloff, once said, “The best memory is the pencil.” I tend to agree, as I’m constantly making notes about this method or that class, trying to remember what they do. However, there are a lot of books already written with these notes categorized, indexed, and explained in detail, so I’ll provide you a short list of books that may be helpful as you work through this volume.

Generally, these are books on the technologies that are detailed in this work, and will help you get up to speed on the basics of these technologies. Many times, I assume you have knowledge of the topics in these books, and they are all worthwhile additions to your library.

  • Enterprise JavaBeans, by Richard Monson-Haefel

  • Database Programming with JDBC and Java, by George Reese

  • Java Enterprise in a Nutshell, by David Flanagan, Jim Farley, William Crawford, and Kris Magnusson

  • Java Message Service, by Richard Monson-Haefel and David Chappell

  • MySQL and mSQL, by Randy Jay Yarger, George Reese, and Tim King

  • Oracle Design, by Dave Ensor and Ian Stevenson

All of these are published by O’Reilly. Obviously there are many other helpful books out there, but these should get you started. Armed with this information, you’re ready to move beyond introduction into the world of enterprise application programming.

Get Building Java Enterprise Applications now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.