网页功能: 加入收藏 设为首页 网站搜索  
J2EE vs. Microsoft.NET(3)
发表日期:2004-07-27作者:[转贴] 出处:  


III. J2EE 
--------------------------------------------------------------------------------


The Java 2 Platform, Enterprise Edition (J2EE) was designed to simplify complex problems with the development, deployment, and management of multi-tier enterprise solutions. J2EE is an industry standard, and is the result of a large industry initiative led by Sun Microsystems. 

It's important for you to realize that J2EE is a standard, not a product. You cannot "download" J2EE. Rather you download a set of Adobe Acrobat PDF files which describe agreements between applications and the containers in which they run. So long as both sides obey the J2EE contracts, applications can be deployed in a variety of container environments. 

The J2EE camp's goal is to give customers choice of vendor products and tools, and to encourage best-of-breed products to emerge through competition. The only way this would ever happen is if the industry as a whole were bought-into J2EE. To secure buy-in, Sun collaborated with other vendors of eBusiness platforms, such as BEA, IBM, and Oracle, in defining J2EE. Sun then initiated the Java Community Process (JCP) to solicit new ideas to improve J2EE over time. The reason Sun did this is because they had to do so to achieve success--the best way to secure buy-in to an idea is to involve others in defining that idea. 


Java: The foundation for J2EE 

The J2EE architecture is based on the Java programming language. What's exciting about Java is that it enables organizations to write their code once, and deploy that code onto any platform. The process is as follows: 



Developers write source code in Java. 
The Java code is compiled into bytecode, which is a cross-platform intermediary, halfway between source code and machine language. 
When the code is ready to run, the Java Runtime Environment (JRE) interprets this bytecode and executes it at run-time. 


J2EE is an application of Java. Your J2EE components are transformed into bytecode and executed by a JRE at runtime. Even the containers are typically written in Java. 


J2EE and Web Services 
J2EE has historically been an architecture for building server-side deployments in the Java programming language. It can be used to build traditional web sites, software components, or packaged applications. J2EE has recently been extended to include support for building XML-based web services as well. These web services can interoperate with other web services that may or may not have been written to the J2EE standard. 

J2EE web services development model is shown in Figure 1. 



 

Figure 1 Developing web services with J2EE 


Briefly, Figure 1 is explained as follows: 
J2EE application is hosted within a container, which provides qualities of service necessary for enterprise applications, such as transactions, security, and persistence services. 

The business layer performs business processing and data logic. In large-scale J2EE applications, business logic is built using Enterprise JavaBeans (EJB) components. This layer performs business processing and data logic. It connects to databases using Java Database Connectivity (JDBC) or SQL/J, or existing systems using the Java Connector Architecture (JCA). It can also connect to business partners using web services technologies (SOAP, UDDI, WSDL, ebXML) through the Java APIs for XML (the JAX APIs). 

Business partners can connect with J2EE applications through web services technologies (SOAP, UDDI, WSDL, ebXML). A servlet, which is a request/response oriented Java object, can accept web service requests from business partners. The servlet uses the JAX APIs to perform web services operations. Shared context services will be standardized in the future through shared context standards that will be included with J2EE. 

Traditional 'thick' clients such as applets or applications connect directly to the EJB layer through the Internet Inter-ORB Protocol (IIOP) rather than web services, since generally the thick clients are written by the same organization that authored J2EE application, and therefore there is no need for XML-based web service collaboration. 

Web browsers and wireless devices connect to JavaServer Pages (JSPs) which render user interfaces in HTML, XHTML, or WML. 


Reference Implementation 
In addition to the specifications, Sun also ships a reference implementation of J2EE. Developers write applications to this to ensure portability of their components. This implementation should not be used for production, but rather just for testing purposes. 


Additional Services 
All vendors that offer J2EE platforms provide additional features not found in the standard. Some of them impact portability, such as extended EAI functionality, E-Commerce components, or advanced B2B integration. Other features, such as load-balancing, transparent fail-over, and caching, do not affect portability of application code, because they are implicit services which are provided behind-the-scenes by the container. 




我来说两句】 【加入收藏】 【返加顶部】 【打印本页】 【关闭窗口
中搜索 J2EE vs. Microsoft.NET(3)
本类热点文章
  Java读取文件中含有中文的解决办法
  Java读取文件中含有中文的解决办法
  简单加密/解密方法包装, 含encode(),de..
  EJB 3.0规范全新体验
  java简单的获取windows系统网卡mac地址
  让Java程序带着JRE一起上路
  抢先体验"野马"J2SE6.0
  Java连接各种数据库的实例
  Java连接各种数据库的实例
  JAVA的XML编程实例解析
  Java学习从入门到精通(附FAQ)
  新手必读:Java学习的捷径
最新分类信息我要发布 
最新招聘信息

关于我们 / 合作推广 / 给我留言 / 版权举报 / 意见建议 / 广告投放  
Copyright ©2003-2024 Lihuasoft.net webmaster(at)lihuasoft.net
网站编程QQ群   京ICP备05001064号 页面生成时间:0.01125