Building Java Enterprise Applications, Vol. 1: Architecture (O'Reilly Java)
Aimed at the more experienced Java developer,Building Java Enterprise Applicationsprovides a detailed tour of the best practices for today's J2EE architecture. Filled with particularly good advice on using Enterprise JavaBeans (EJBs) and LDAP directory services, this title lays the groundwork for building the next generation of Java software.As volume one of a planned three-volume series, this book centers on "blueprints" for using the best of J2EE technologies for creating scalable software. The focus here is on a meaningful, single practical case study on a database for a brokerage house. The selection of leading-edge technologies (EJB and LDAP) are what real Java developers are likely to face on the job, and the author's knowledgeable and thorough explanation of all the relevant details of implementing the sample system sets a high standard.Early sections define the scope and requirements of the model database and directory server. The author then turns to implementing the database, including building tables. (Actual SQL for different databases including Oracle and MySQL is included in an appendix.) Similarly, the "real" details of modeling a directory server (using LDAP) is set out to show how users, passwords, and other information can be leveraged across a larger organization. After the groundwork is in place, this text zeroes in on using Enterprise JavaBeans (EJB) 2.0 to model each business entity in the system (as well as application logic). Standout material shows off building an entity EJB with multiple interfaces, classes, and deployment descriptors all clearly presented.The use of the manager session bean to hide the details of JNDI and LDAP comes next, and this bit of intellectual property will surely justify the price of this book for anyone seeking to combine EJBs and LDAP. From here, the application logic gets filled in using other EJB features (like session beans, both stateful and stateless). A later chapter adds asynchronous processing abilities using the Java Message Service (JMS) and the new message bean type, new for EJB 2.0. The assembled system then gets a simple front end to test it out, though the focus clearly is on the data tier. (More on user interfaces is promised in the second volume of this series, which will concentrate on Web applications.)Useful appendices provide the  nuts and bolts of running actual software, like OpenLDAP, a free directory server, BEA WebLogic, plus full source code for all beans discussed in this text. All in all, this book is a worthwhile choice for understanding the right ways for designing on the Java platform today when it comes to higher-end enterprise software.--Richard DraganTopics covered:Introduction to architecture for Java Enterprise applications; case study for a client/broker database for a brokerage with scheduling support, data, business, and presentation layers explained; primer for database design (including SQL, constraints, and tables); designing an LDAP directory (plus directory hierarchies); Enterprise JavaBean 2.0 basics (remote, local, and local home interfaces, plus primary keys); EJB deployment descriptors; implementing sequences for new records in EJBs (a sequence bean); using a manager EJB for JNDI/LDAP processing; connection sharing for performance; adding sample data; deployment; using patterns for business logic with EJBs (the Facade pattern); stateful vs. stateless beans; asynchronous processing and message beans (including JMS basics); extending the data architecture for Web applications (and Web services); appendices for sample SQL scripts and database-specific hints for MySQL, Oracle, and PostgreSQL; and a reference to running OpenLDAP, iPlanet Directory Server, and BEA WebLogic Application Server.