Browse DevX
Sign up for e-mail newsletters from DevX


Java EE 5.0: Towards Ease of Development : Page 3

Any J2EE developer knows how hard enterprise Java can be. Find out how the set of new Java EE 5.0 features, such as Web services support, annotations, and enhanced CMP, can make it easier.




Building the Right Environment to Support AI, Machine Learning and Deep Learning

New CMP Tags

Java EE 5.0 provides many new tags for container-managed persistence (CMP). Developers just specify the table name and column names as annotations, and the container does the rest.

For example, in the following code snippet, @Table specifies that the Account class data will be stored in the ACCOUNT table:

@Entity @Table(name = "ACCOUNT") public class Account implements java.io.Serializable { @Id public String getUserId() { return userId; } @Embedded public ContactDetails getContactDetails() { return info; } @Column(name="FIRSTNAME") public String getGivenName(){ return givenName; } }

A developer can use the @Column tag to map business field names to more appropriate table column names.

Web Services in Java EE Container

The principal goal of Java EE 5.0 is to provide a simplified model for Web services development that is easy to learn and quick to develop. To that end, it provides the Web services infrastructure developers require for building robust, maintainable, and highly interoperable integration applications.

Java EE 5.0 will provide Web Services Metadata as an easy-to-use syntax for describing Web services at the source-code level for the Java EE platform. The syntax will be amenable to manipulation by tools. For example, the following code implements a Web service:

@WebService(name="MyPOIntf", targetNamespace = "urn:MyPurchaseOrderService") @SOAPBinding(style = SOAPBinding.Style.RPC) public interface MyPOIntf extends Remote { @WebMethod @WebResult(name="result") public String submitPODetails(String poXmlString) throws RemoteException; }

First, an interface is defined for the end points with WebService annotations. Then any class can implement the functionality for the Web service by implementing this interface.

While Web services still remain a mystery to many seasoned Java developers, Java EE 5.0 will enable them to easily develop and deploy their existing enterprise business applications into Web services applications without much hassle. So even though J2EE's complexity guarantees my paycheck for some years to come, six months to a year from now (Java EE 5.0 originally was scheduled for release by the second half of 2005, but due to JCP approval delays, it has been postponed to Q1 of 2006.), I imagine the IT market will be flooded with Java EE Web services developers.

Raghu Donepudi, an independent contractor, currently is a technical manager for a federal government agency. He has a master's degree in Computer Science from Lamar University in Texas. He is a Sun-certified Java developer and the author of many software design techniques.
Comment and Contribute






(Maximum characters: 1200). You have 1200 characters left.



Thanks for your registration, follow us on our social networks to keep up-to-date