HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

Is J# a part of J2EE?
Absolutely not! J# is a language developed by Microsoft. It's very similar to Java in syntax and semantics. However, that's where the similarity ends. Java can be compiled into bytecodes (class files) that run on any platform. J# can only be compiled into code that runs on Microsoft Windows platforms. J# is a part of Microsoft's .NET initiative.

What are J2EE design patterns? Are there any good sources regarding them?
If you're familiar with the term design patterns as it applies to object-oriented programming, you'll find that EJB design patterns apply to distributed Java programming using EJBs and other J2EE APIs. J2EE design patterns describe patterns of solutions applied to similar problems in the same context.

Some good sources for EJB and J2EE design patterns are EJB Design Patterns by Floyd Marinescu; Core J2EE Patterns by Deepak Alur, John Crupi, and Dan Malks;
http://developer.java.sun.com/developer/ technicalArticles/J2EE/despat; and www.theserverside.com/patterns/index.jsp.

Does an entity bean always need a primary key?
Yes. An entity bean represents a row in a table in a relational database. Each row in any RDBMS requires a primary key, which is the way to store and retrieve the data stored in that row. Since an entity bean maps to a row, it needs a primary key. The columns of the row (or the combination of fields of the entity bean) that compose the primary key are defined in the EJB's deployment descriptor.

Are there any official APIs for developing Web services in Java?
While there are different tools and app server vendors that give you the ability to convert your Java components to Web services, Sun (the official source) offers a set of APIs for Web services in Java in the form of a toolset the Java Web Services Developer Pack (Java WSDP). Java WSDP allows developers to build, test, and deploy XML applications, Web services, and Web applications on the Java platform. The Java WSDP provides Java standard implementations of existing key Web services standards, including WSDL, SOAP, ebXML, and UDDI, as well as important Java standard implementations for Web application development, such as JSP and the JSTL (JSP Standard Tag Library).

What is EJB QL? How is it used?
Enterprise JavaBeans Query Language attempts to fill in the gaps between the EJB model, which offers a standard way to access the database through the object model, and SQL, which offers a much richer set of queries for accessing RDBMS. EJB QL defines queries for the finder and for select methods of an entity bean with container-managed persistence. EJB QL is a subset of SQL92 and offers extensions that allow navigation over the relationships defined in an entity bean's abstract schema.

EJB QL is not used inside the EJB classes. Rather, the queries are defined in the deployment descriptor of the entity bean. The application server deployment tool translates these queries into the corresponding SQL that allows access to the database. The syntax of EJB QL is pretty much the same as SQL syntax and should be easy to pick up for someone familiar with SQL.

There seems to be a lot of UML design in EJB. Are there any APIs that allow UML design to translate to EJBs?
Some of the IDE vendors such as Borland (JBuilder) and Rational offer some capabilities to convert from one form to another. However, the conversion is usually one-way and not always maintainable as the design evolves. Currently there's a JSR 26 (Java Specification Request) called "UML/EJB Mapping Specification" that describes a standard mapping between the EJB architecture and UML.

All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.