Java Enterprise in a Nutshell

Overview

Java Enterprise in a Nutshell is an indispensable quick reference for Java programmers who are writing distributed enterprise applications. The book provides fast-paced tutorials on the following Java Enterprise APIs:

  • JDBC, a vendor-independent API for accessing relational database systems
  • RMI, a Java-only approach to distributed computing that relies on remote method ...
See more details below
Available through our Marketplace sellers.
Other sellers (Paperback)
  • All (36) from $1.99   
  • New (4) from $1.99   
  • Used (32) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$1.99
Seller since 2009

Feedback rating:

(45)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
BRAND NEW BOOK, with a remainder mark on the outside edge. 100% satisfaction is guaranteed!

Ships from: POINT ROBERTS, WA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$16.85
Seller since 2009

Feedback rating:

(847)

Condition: New
1565924835 *BRAND NEW* Ships Same Day or Next!

Ships from: Springfield, VA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$30.34
Seller since 2014

Feedback rating:

(257)

Condition: New
Brand New Item.

Ships from: Chatham, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$45.00
Seller since 2014

Feedback rating:

(136)

Condition: New
Brand new.

Ships from: acton, MA

Usually ships in 1-2 business days

  • Standard, 48 States
  • Standard (AK, HI)
Page 1 of 1
Showing All
Close
Sort by
Sending request ...

Overview

Java Enterprise in a Nutshell is an indispensable quick reference for Java programmers who are writing distributed enterprise applications. The book provides fast-paced tutorials on the following Java Enterprise APIs:

  • JDBC, a vendor-independent API for accessing relational database systems
  • RMI, a Java-only approach to distributed computing that relies on remote method invocation
  • Java IDL, a CORBA-based, language-independent approach to distributed computing
  • Java servlets, a mechanism for extending a web server that allows Java code to perform tasks traditionally handled by CGI scripts
  • JNDI, a generic Java API for working with networked naming and directory services
  • Enterprise JavaBeans, a component model that separates high-level business logic from low-level housekeeping chores like security and transaction management

These APIs are the building blocks of the Java 2 Platform, Enterprise Edition (J2EE), Sun's recently announced new platform for enterprise computing. J2EE is the standard Java 2 platform with a number of extensions for enterprise development.

Java Enterprise in a Nutshell also contains O'Reilly's classic-style, quick-reference material for all of the classes in the various packages that comprise the Enterprise APIs. This material includes the core Enterprise APIs that are part of Java 1.2, as well as numerous standard extensions.

This book is a companion to both Java in a Nutshell, 3rd Edition, which covers the key non-graphical, non-enterprise APIs in Java 1.2, and Java Foundation Classes in a Nutshell, which describes the graphics- and GUI-related classes of Java 1.2.


If you are using Java and running Enterprise APIs in large heterogeneous and mission critical networked environments, this desktop quick reference may be a valuable addition to your library. It contains descriptions of each of the Enterprise APIs on the Java 2 platform, and is geared toward intermediate and advanced programmers. Please note that this publication is not a tutorial on Enterprise API use. For maximum benefit, users should be familiar with the Java environment.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
With Java 2, the Java platform offers a complete, mature set of APIs for enterprise applications. java enterprise in a nutshell brings O'Reilly's trademarked In a Nutshell format to these APIs — and that's good news for anyone developing mission-critical applications with Java.

The authors present fast, insightful tutorials and example-rich quick-references for each of six key technologies. You'll walk through the fundamentals of JDBC for accessing relational database systems (if you're new to this, it'll help to already know a little SQL). Next, review RMI for creating distributed computing systems; and the Java IDL for interfacing with remote CORBA objects.

Java Enterprise in a Nutshell also covers Java servlets, a great cross-platform solution for extending web servers; JNDI, a protocol-independent interface to network name and directory services systems; and finally, Enterprise JavaBeans, Sun's component model for units of business logic and business data.

You'll wonder how you got along without this book — just as thousands of developers wonder how they got along with its best-selling companions, Java in a Nutshell, Third Edition and Java Foundation Classes in a Nutshell. —Bill Carnada

Read More Show Less

Product Details

  • ISBN-13: 9781565924833
  • Publisher: O'Reilly Media, Incorporated
  • Publication date: 12/1/1998
  • Series: In a Nutshell (O'Reilly) Series
  • Edition description: Older Edition
  • Edition number: 1
  • Pages: 662
  • Product dimensions: 6.05 (w) x 9.02 (h) x 1.12 (d)

Meet the Author

Kristopher Magnusson is the Open Source Programs Architect at Novell. He edited the original Java Directory Service Interface proposal for JavaSoft in 1996, worked on the Novell JNDI design team as the lead writer, and wrote JNDI sample code and tutorials. He earned a Bachelor's of Science from the University of Utah in 1991 in economics, has been active in the NeXT and open source communities for years, and loves object-oriented design and computing. He lives with his partner, Kristen, in Salt Lake City, where he enjoys community activism, mountain biking, and oenophilia.

David Flanagan is a computer programmer who spends most of his time writing about JavaScript and Java. His books with O'Reilly include Java in a Nutshell, Java Examples in a Nutshell, Java Foundation Classes in a Nutshell, JavaScript: The Definitive Guide, and JavaScript Pocket Reference. David has a degree in computer science and engineering from the Massachusetts Institute of Technology. He lives with his wife and son in the U.S. Pacific Northwest bewteen the cities of Seattle, Washington and Vancouver, British Columbia. David has a simple website at http://www.davidflanagan.com.

Jim Farley is a software engineer, computer scientist, and IT manager. His recent activities have included heading up the engineering group at the Harvard Business School and bringing good things to life at GE's Research and Development center. He's dealt with computing (distributed and otherwise) in lots of different ways, from automated image inspection to temporal reasoning systems. Jim has Bachelor's and Master's degrees in computer systems engineering from Rensselaer Polytechnic Institute.

William Crawford has been developing web-based enterprise applications since 1995, including one of the first web-based electronic medical record systems (at Children's Hospital in Boston) and some of the first enterprise-level uses of Java. He has consulted for a variety of institutional clients, including Boston Children's Hospital, Harvard Medical Center, numerous startups and several Fortune 500 companies. Prior to an acquisition he was CTO of Invantage, Incorporated in Cambridge, MA. He received a degree in history and economics from Yale University. He is the co-author of Java Servlet Programming, 2nd Edition, Java Enterprise in a Nutshell, 2nd Edition, and two forthcoming O'Reilly titles. Will is currently Principal Software Architect at Perceptive Informatics, Inc.Massachusetts, provider of software and services to the pharmaceutical industry. He can be reached at http://www.williamcrawford.info

Read More Show Less

Read an Excerpt


Chapter 4: Java IDL

4.4.3 Stringified Object References

As we've seen, Sun's implementation of Java IDL provides a nonstandard way to initialize an ORB to reference a remote Naming Service, so that one of the ORB's initial references is to the root context of the remote Naming Service. But what do you do if you want an object from a remote Naming Service, and your Java IDL implementation doesn't provide a way to directly initialize a reference to the remote service? Or, worse yet, what if the object that you want isn't stored in a Naming Service or available through any other CORBA service? How can your client get a reference to the object?

The CORBA standard comes to the rescue again. Part of the standard, called Interoperable Object References (IORs), includes a syntax for representing a remote object reference in the form of a printable string of characters. This stringified object reference includes enough information for a remote CORBA client to locate the object's home ORB and convert the string to a runtime stub reference to the object. Two methods on the ORB interface, object_to_string() and string_to_object(), let you convert a CORBA object reference to string form and back again.

Example 4.9 shows how to create an instance of our server implementation of the ThisOrThatServer interface, register it with the ORB, and generate a stringified object reference from the CORBA server object. A stringified reference to a remote object is called an Interoperable Object Reference (IOR) because it uses a format for object references that can be freely distributed between ORBs running a cross the network. In order for the IOR you generate to be acceptable to another ORB, both your ORB and the remote ORB have to be using the same inter-ORB communication protocol (IIOP, DCE-CIOP, etc.). In this example, our client and host are both running IIOP.

Example 4.9: Registering an Object/Getting Its Stringified Object Reference

import org.omg.CORBA.*; public class ServerInit {   public static void main(String[] argv) {   } }

The ServerInit class contains a main() method that is intended to be run on the server host for our remote object. The main() method first initializes a connection to the local ORB and then creates an instance of the ThisOrThatServerImpl class. This instance serves as the server implementation of our remote object. We create a stringified reference to the object using the object_to_string() method on the ORB and then output the stringified reference, so that it can be copied and sent to clients. Finally, by doing a synchronous wait() on a local object, the main() method goes into a wait state. This wait() is necessary to keep the ORB running so that it can respond to client requests. If we let the main() method exit, the server object we created is destroyed, and the IOR we generated is no longer valid.

A sample client for our object is shown in Example 4.10. The client accepts a stringified object reference as a command-line argument to its main() method. Then it initializes a local ORB reference and uses its string_to_object() method to convert the stringified reference to a live object reference. To do this, the ORB parses the encoded information in the stringified reference, makes a connection with the remote ORB serving the object, and generates a CORBA object reference for the client.

Example 4.10: A Client Utilizing a Stringified Object Reference

import org.omg.CORBA.*; public class ServerStringClient {   public static void main(String[] argv) {   } }

Before we can run the client, the remote object has to be registered with its ORB, so that we can get the stringified object reference:

objhost% java ServerInit ThisOrThatServer IOR: IOR:000000000000002349444c3a6a656e2f636f7262612f546869 734f72546861745365727665723a312e30000000000001000000000000003000010000000000 0a6c6f63616c686f737400043200000018afabcafe00000002496bb469000000080000000000 000000

Somehow, you have to get this IOR to the client host. You could embed the stringified object reference within a hidden field in a HTML page, so that a Java client can access it using a URL object. Or you could set up a simple server on a given port on your host that broadcasts the stringified object reference to whoever makes a socket connection. Or you could email the string to a colleague, and she can type the stringified reference into the startup command for her CORBA client. In any case, the client is invoked with the IOR as a command-line option:

clienthost% java ServerStringClient IOR:000000000000002349444c3a6a656e2f636f 7262612f546869734f72546861745365727665723a312e300000000000010000000000000030 000100000000000a6c6f63616c686f737400043200000018afabcafe00000002496bb4690000 00080000000000000000

The client uses the argument to reconstitute a remote reference to the server object, so that it can invoke methods on the remote object.

4.5 What If I Don't Know the Interface?

In the examples we've seen so far, we've always assumed that the Java interfaces for the remote objects are available at compile time. But what happens if they aren't? You might get a reference to a CORBA Object from a Naming Service, for example, and not know what interface that object implements. I mentioned earlier that you can use an org.omg.CORBA.Object reference directly to make requests and exchange data with its remote object.

The CORBA standard defines two complementary APIs for this purpose: the Dynamic Invocation Interface (DII) that a client can use to make remote method requests of a server object, and the Dynamic Skeleton Interface (DSI) that a server-side skeleton can use to forward method invocations to its server implementation object. Both of these APIs provide the same essential function: a dynamic interface to an object whose interface is not known at compile time. The DII offers this functionality to clients of CORBA objects, and the DSI provides it to the server-side skeletons that bridge the object implementation with the ORB.

The DII and DSI may seem like sidebar topics in the CORBA world, but in reality they are at the heart of CORBA and how it works. When we generate Java stubs and skeletons from IDL interfaces, the code that is generated uses the DII and DSI to execute remote method calls. The details of how this is done are shielded from you, the developer, by the Java interface you use to interact with the remote object. But it's still worthwhile to understand how CORBA objects implement their distributed nature, especially in situations where the Java interface for the remote object is not there, and you need to deal directly with these details.

In this section, we take a look at how the DII works and how you might use it in a client. We won't cover the DSI in this book, since its practical uses are even more limited for the average developer. Note, however, that the API of the DSI is analogous to that of the DII, so you shouldn't have much trouble mapping the following explanation to the DSI as well.

4.5.1 Dynamic Invocation Interface

The Dynamic Invocation Interface provides abstract representations of remote method requests and their arguments. In simple terms, this means it includes objects that represent remote method requests and parameters that are passed with these method requests. Methods on these objects allow you to set the parameters to the request, make the request, and get the results. DII's central classes are:

Request

A request to invoke a method on a remote object. Created by the client and issued through the ORB to the server object.

NamedValue

A named parameter to a method request. Conceptually, this is a name tied to an Any value. The name of the value must match the name of the parameter as specified in the IDL interface the remote object satisfies.

NVList

A list of NamedValue parameters used to represent an argument list passed into a remote method request.

Any

A general argument value. An Any object can contain the Java equivalent of any basic IDL type or an Object that can be described in IDL.

Context

A list of NamedValue objects used to specify any details of the client environment that shouldn't be passed as method arguments.

Once you get an org.omg.CORBA.Object reference to a remote object (using any of the approaches we've already covered), you can create and issue a method request to the object by building a parameter list for the method call, making a NamedValue object to hold the result, making a Context object and putting any useful environment values in it, and then using all of these items to create a Request object that corresponds to a particular method on the object. Example 4.11 shows a sample DII client that gets a reference to a remote object through a Naming Service and then makes a dynamic call to its doThis() method.

Example 4.11: Client Using DII to Make Remote Method Call

import org.omg.CORBA.*; import org.omg.CosNaming.*; public class DIISimpleClient {   public static void main(String argv[]) {   } }

Note that in most situations you will have the Java interface for the remote object available in your client along with its helper class, so you'll be able to narrow the Object reference to a specific type. One exception might be if you're building some kind of software development tool, and you want to provide a dynamic execution utility for the CORBA code being developed. The previous example demonstrates how a CORBA method call can be carried out at this lower level, in case you ever find it necessary to do so. And when you're trying to fix a problem with your CORBA application, it's always better to understand what's going on under the hood, so to speak.

Read More Show Less

Table of Contents

  • Preface
  • Introducing the Java Enterprise APIs
    • Chapter 1: Introduction
    • Chapter 2: JDBC
    • Chapter 3: Remote Method Invocation
    • Chapter 4: Java IDL
    • Chapter 5: Java Servlets
    • Chapter 6: JNDI
    • Chapter 7: Enterprise JavaBeans


  • Enterprise Reference
    • Chapter 8: SQL Reference
    • Chapter 9: RMI Tools
    • Chapter 10: IDL Reference
    • Chapter 11: CORBA Services Reference
    • Chapter 12: Java IDL Tools


  • API Quick Reference
    • Chapter 13: The java.rmi Package
    • Chapter 14: The java.rmi.activation Package
    • Chapter 15: The java.rmi.dgc Package
    • Chapter 16: The java.rmi.registry Package
    • Chapter 17: The java.rmi.server Package
    • Chapter 18: The java.sql Package
    • Chapter 19: The javax.ejb Package
    • Chapter 20: The javax.ejb.deployment Package
    • Chapter 21: The javax.jms Package
    • Chapter 22: The javax.naming Package
    • Chapter 23: The javax.naming.directory Package
    • Chapter 24: The javax.naming.spi Package
    • Chapter 25: The javax.servlet Package
    • Chapter 26: The javax.servlet.http Package
    • Chapter 27: The javax.sql Package
    • Chapter 28: The javax.transaction Package
    • Chapter 29: The javax.transaction.xa Package
    • Chapter 30: The org.omg.CORBA Package
    • Chapter 31: The org.omg.CORBA.DynAnyPackage Package
    • Chapter 32: The org.omg.CORBA.ORBPackage Package
    • Chapter 33: The org.omg.CORBA.portable Package
    • Chapter 34: The org.omg.CORBA.TypeCodePackage Package
    • Chapter 35: The org.omg.CosNaming Package
    • Chapter 36: The org.omg.CosNaming.NamingContextPackage Package
    • Chapter 37: Class, Method, and Field Index


  • Colophon

Read More Show Less

Introduction

The Java Enterprise APIs are essential building blocks for creating enterprise-wide distributed applications in Java.

Java Enterprise in a Nutshell covers APIs:

  • RMI
  • IDL
  • JDBC
  • JNDI
  • Java Servlet
  • Enterprise JavaBeans

Providing a fast-paced tutorial and compact reference material on each of the technologies.
Covers Java 1.2.

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)