Web Services
  Home arrow Web Services arrow Page 4 - Deploying an EJB Application
Dev Articles Forums 
ADO.NET  
Apache  
ASP  
ASP.NET  
C#  
C++  
ColdFusion  
COM/COM+  
Delphi-Kylix  
Design Usability  
Development Cycles  
DHTML  
Embedded Tools  
Flash  
Graphic Design  
HTML  
IIS  
Interviews  
Java  
JavaScript  
MySQL  
Oracle  
Photoshop  
PHP  
Reviews  
Ruby-on-Rails  
SQL  
SQL Server  
Style Sheets  
VB.Net  
Visual Basic  
Web Authoring  
Web Services  
Web Standards  
XML  
Mobile Linux 
App Generation ROI 
IBM® developerWorks 
Weekly Newsletter
 
Developer Updates  
Free Website Content 
 RSS  Articles
 RSS  Forums
 RSS  All Feeds
Write For Us Get Paid 
Request Media Kit
Contact Us 
Site Map 
Privacy Policy 
Support 
 USERNAME
 
 PASSWORD
 
 
  >>> SIGN UP!  
  Lost Password? 
WEB SERVICES

Deploying an EJB Application
By: Sams Publishing
  • Search For More Articles!
  • Disclaimer
  • Author Terms
  • Rating: 4 stars4 stars4 stars4 stars4 stars / 4
    2006-06-01

    Table of Contents:
  • Deploying an EJB Application
  • Configuring Axis to Invoke the SkatesService Session Bean
  • EJB Wrap-Up
  • JSR109 Client Code

  • Rate this Article: Poor Best 
      ADD THIS ARTICLE TO:
      Del.ici.ous Digg
      Blink Simpy
      Google Spurl
      Y! MyWeb Furl
    Email Me Similar Content When Posted
    Add Developer Shed Article Feed To Your Site
    Email Article To Friend
    Print Version Of Article
    PDF Version Of Article
     
     
    ADVERTISEMENT


    Deploying an EJB Application - JSR109 Client Code


    (Page 4 of 4 )

    Another aspect of JSR109 is the support for managing clients, which would have helped with the test client we wrote earlier. JSR109 allows any managed Web service client to be configured outside the code. In the same way that references to datasources, EJBs, URLs, and so on can be managed by the container, 109 also supports this for service-refs (resource refs to Web services). This works for EJBs, servlets, or J2EE application clients (known as thick or managed clients) making calls to Web services. The benefit is that a reconfiguration of the application can retarget the Web service—including changing the WSDL and the list of JAX-RPC handlers to be called (JAX-RPC handlers are components that are run outside the application logic and can modify or look at the SOAP message).

    In this model, the client code would look like:

    Service sps = ic.lookup("java:comp/env/
    skatesProductsRef"); SkatesProducts sp =
    sps.getPort(SkatesProducts.class); sp.addProduct(...)

    JSR109 Wrap-Up

    JSR109/WSEE offers a well-defined way to deploy Web services into an application server. Effectively, it standardizes much of what Axis does in a J2EE environment. The benefits to the developer and deployment engineer are knowing that the applications and deployment will be portable across application servers, and some simplification—for example, the requirement to package and deploy Axis as a Web application is removed. JSR109 also offers a managed client environment that allows Web services to be referred to logically using the service-ref capability. In the future, these facilities will be enhanced by the Web Services Meta-data for Java standard (JSR181). JSR181 allows programmers to annotate their code with meta-data tags that define how the code will be deployed as a service, or use Web services.

    Summary

    In this chapter, we've shown how Enterprise JavaBeans can be exposed as Web services. The two approaches show that Axis can be used to expose EJBs as services, providing a way of exposing existing or newly created EJB business objects over SOAP; and that JSR109 provides a simpler, more integrated approach to exposing stateless session beans as Web services, using a DD and inbuilt J2EE 1.4 capabilities.

    Using J2EE as a development environment for services adds both standardization and enhanced quality of service. However, the real benefit comes when you're building complex applications that integrate across reliable, transactional, and secure environments.

    Resources

    • J2EEhttp://java.sun.com/j2ee

    • JSR109http://www.jcp.org/en/jsr/detail?id=109


    DISCLAIMER: The content provided in this article is not warranted or guaranteed by Developer Shed, Inc. The content provided is intended for entertainment and/or educational purposes in order to introduce to the reader key ideas, concepts, and/or product reviews. As such it is incumbent upon the reader to employ real-world tactics for security and implementation of best practices. We are not liable for any negative consequences that may result from implementing any information covered in our articles or tutorials. If this is a hardware review, it is not recommended to open and/or modify your hardware.

       · This article is an excerpt from the book "Building Web Services with Java: Making...
     

    Buy this book now. This article is excerpted from chapter 7 of the book Building Web Services with Java: Making sense of XML, SOAP, WSDL, and UDDI, written by Steve Graham et al. (Sams; ISBN: 0672326418). Check it out today at your favorite bookstore. Buy this book now.

    WEB SERVICES ARTICLES

    - Safety, Idempotence, and the Resource-Orient...
    - The Resource-Oriented Architecture in Action
    - Features of the Resource-Oriented Architectu...
    - The Resource-Oriented Architecture
    - Getting Started with Flex
    - Automated Billing and Faxing for the Web
    - An Introduction to Web Services
    - The Foundations of Web Services: From Novice...
    - Web Services Reengineering: Finishing Touches
    - Fault Handling with Web Services
    - Flow and Web Services
    - Process Lifecycles and Web Services
    - Business Processes and Web Services
    - Orchestrating Web Services
    - Notifications and Resources in the WS-Resour...







    © 2003-2009 by Developer Shed. All rights reserved. DS Cluster 6 Hosted by Hostway
    For more Enterprise Application Development news, visit eWeek