原文:http://docs.oracle.com/javaee/7/tutorial/doc/overview008.htm
翻譯:石卓林 shizhuolin@hotmail.com
Several APIs that are required by the Java EE 7 platform are included in the Java Platform, Standard Edition 7 (Java SE 7) and are thus available to Java EE applications.
Java EE 7平臺所必須的Several API包括在Java平臺標準版7(Java SE 7)中,從而可用于Java EE利用.
The Java Database Connectivity (JDBC) API lets you invoke SQL commands from Java programming language methods. You use the JDBC API in an enterprise bean when you have a session bean access the database. You can also use the JDBC API from a servlet or a JSP page to access the database directly without going through an enterprise bean.
The JDBC API has two parts:
The Java SE 7 platform requires JDBC 4.1.
Java數據庫連接(JDBC) API讓你可以在Java程序語言方法中調用SQL命令. 當你有1個會話bean訪問數據庫時你可以在企業bean中使用JDBC API. 固然你也能夠在servlet或jsp頁面中使用JDBC API直接連接數據庫而不需要通過企業bean.
JDBC API包括兩部份:
Java SE 7平臺要求JDBC 4.1.
The Java Naming and Directory Interface (JNDI) API provides naming and directory functionality, enabling applications to access multiple naming and directory services, such as LDAP, DNS, and NIS. The JNDI API provides applications with methods for performing standard directory operations, such as associating attributes with objects and searching for objects using their attributes. Using JNDI, a Java EE application can store and retrieve any type of named Java object, allowing Java EE applications to coexist with many legacy applications and systems.
Java EE naming services provide application clients, enterprise beans, and web components with access to a JNDI naming environment. A naming environment allows a component to be customized without the need to access or change the component's source code. A container implements the component's environment and provides it to the component as a JNDI naming context.
The naming environment provides four logical namespaces: java:comp, java:module, java:app, and java:global for objects available to components, modules, or applications or shared by all deployed applications. A Java EE component can access named system-provided and user-defined objects. The names of some system-provided objects, such as a default JDBC DataSource object, a default JMS connection factory, and a JTA UserTransaction object, are stored in the java:comp namespace. The Java EE platform allows a component to name user-defined objects, such as enterprise beans, environment entries, JDBC DataSource objects, and messaging destinations.
A Java EE component can also locate its environment naming context by using JNDI interfaces. A component can create a javax.naming.InitialContext object and look up the environment naming context in InitialContext under the name java:comp/env. A component's naming environment is stored directly in the environment naming context or in any of its direct or indirect subcontexts.
Java命名和目錄接口(JNDI) API提供命名和目錄服務功能, 使利用可以訪問多個命名和目錄服務,例如LDAP, DNS和NIS. 此JNDI API提供了利用和方法以處理標準目錄操作, 例如對象屬性訪問和使用屬性搜索對象. 使用JNDI,Java EE利用可以存儲和恢復任意Java命名對象類型, 允許Java EE利用與很多傳統利用和系統共存.
Java EE命名服務為利用客戶端,企業bean和web組件訪問JNDI命名提供環境. 1個命名環境允許自定義組件訪問而不需要更改組件源碼. 容器實現組件的環境,并將其提供給該組件作為JNDI命名上下文.
此命名環境為所有部署利用中的有效組件,模塊,利用或同享等對象提供4種邏輯命名空間: java:comp, java:module, java:app和java:global. 1個Java EE組件可以訪問系統命名提供的或用戶定義的對象. 1些系統提供的對象的名稱, 例如1個默許的JDBC數據源對象,1個默許的JMS連接工廠和默許的JTA用戶事務對象, 包括被存儲在java:comp命名空間中的對象. Java EE 平臺允許用戶定義組件為命名對象,例如企業bean,環境項, JDBC數據源對象和消息目的地.
在Java EE組件中還可以通過使用JNDI接口找到它的環境命名上下文. 1個組件可以創建1個javax.naming.InitialContext對象并且在InitialContext中的java:comp/env名稱中查詢環境命名上下文.組件的命名環境是直接存儲在環境命名上下文或任何直接或間接的子上下文中.
The JavaBeans Activation Framework (JAF) is used by the JavaMail API. JAF provides standard services to determine the type of an arbitrary piece of data, encapsulate access to it, discover the operations available on it, and create the appropriate JavaBeans component to perform those operations.
JavaBeans活化框架(JAF)用于JavaMail API. JAF提供標準服務以肯定任意數據類型,封裝其訪問,發現其可用操作并且創建相應的JavaBean組件來履行這些操作.
The Java API for XML Processing (JAXP), part of the Java SE platform, supports the processing of XML documents using Document Object Model (DOM), Simple API for XML (SAX), and Extensible Stylesheet Language Transformations (XSLT). JAXP enables applications to parse and transform XML documents independently of a particular XML-processing implementation.
JAXP also provides namespace support, which lets you work with schemas that might otherwise have naming conflicts. Designed to be flexible, JAXP lets you use any XML-compliant parser or XSL processor from within your application and supports the Worldwide Web Consortium (W3C) schema. You can find information on the W3C schema at http://www.w3.org/XML/Schema.
用于XML處理的Java API(JAXP)是Java SE平臺的1部份,其支持使用文檔對象模型(DOM)處理XML文檔, XML簡單API(SAX)和擴大樣式語言轉換(XSLT). JAXP使利用程序可使用特定XML處理實現做到獨立解析和轉換XML文檔.
JAXP也提供命名空間支持, 可以在你有可能的命名沖突時使用架構工作.通過靈活設計, JAXP讓你可以在你的利用中使用任意的合適的XML解析器和XSL處理器,并且支持萬維網WEB同盟(W3C)架構.你可以在W3C計劃http://www.w3.org/XML/Schema中找到相干信息.
The Java Architecture for XML Binding (JAXB) provides a convenient way to bind an XML schema to a representation in Java language programs. JAXB can be used independently or in combination with JAX-WS, in which case it provides a standard data binding for web service messages. All Java EE application client containers, web containers, and EJB containers support the JAXB API.
The Java EE 7 platform requires JAXB 2.2.
用于XML綁定的體系結構(JAXB)為在Java語言程序中綁定XML架構到表現層提供便捷方法. JAXB可以單獨使用或與JAX-WS組合使用, 它在1些案例中為web服務消息提供標準的數據綁定. 所有Java EE利用客戶端容器,web容器和EJB容器支持JAXB API.
Java EE 7平臺要求JAXB 2.2.
The Java API for XML Web Services (JAX-WS) specification provides support for web services that use the JAXB API for binding XML data to Java objects. The JAX-WS specification defines client APIs for accessing web services as well as techniques for implementing web service endpoints. The Implementing Enterprise Web Services specification describes the deployment of JAX-WS-based services and clients. The EJB and Java Servlet specifications also describe aspects of such deployment. JAX-WS-based applications can be deployed using any of these deployment models.
The JAX-WS specification describes the support for message handlers that can process message requests and responses. In general, these message handlers execute in the same container and with the same privileges and execution context as the JAX-WS client or endpoint component with which they are associated. These message handlers have access to the same JNDI namespace as their associated component. Custom serializers and deserializers, if supported, are treated in the same way as message handlers.
The Java EE 7 platform requires JAX-WS 2.2.
用于XML Web服務的Java API(JAX-WS)規范為在WEB服務中使用JAXB綁定XML數據和Java對象提供支持. JAX-WS規范為web服務客戶端訪問web服務的技術實現定義客戶端API.實現了企業web服務規范化的基于JAX-WS的服務服務和客戶端部署描寫 . EJB和Java Servlet規范也為部署提供部份描寫.基于JAX-WS的利用可使用任意部署模型部署.
JAX-WS規范描寫為處理消息要求和響應的消息處理程序提供支持. 在通常情況中, 這些消息處理程序在同1個容器中用相同的權限和履行上下文的JAX-WS客戶端或與其關聯的終端組件1起履行. 這些消息處理程序可以訪問相同的JNDI命名空間及其相干組件. 如果支持自定義序列化和反序列化的話, 則以一樣的方式對待消息處理程序.
Java EE 7平臺要求JAX-WS 2.2.
The SOAP with Attachments API for Java (SAAJ) is a low-level API on which JAX-WS depends. SAAJ enables the production and consumption of messages that conform to the SOAP 1.1 and 1.2 specifications and the SOAP with Attachments note. Most developers do not use the SAAJ API, instead using the higher-level JAX-WS API.
Java中附帶的SOAP API(SAAJ)是1種依賴JAX-WS的低級API. SAAJ使消息的生產和消費尊從SOAP 1.1/1.2規范和附帶的SOAP注釋. 多數開發人員不使用SAAJ API,反而使用高級JAX-WS API.
The Java Authentication and Authorization Service (JAAS) provides a way for a Java EE application to authenticate and authorize a specific user or group of users to run it.
JAAS is a Java programming language version of the standard Pluggable Authentication Module (PAM) framework, which extends the Java platform security architecture to support user-based authorization.
Java和認證服務(JAAS)為Java EE利用授權和驗證運行它的特定用戶或組提供方法.
JAAS是標準可插入認證模塊框架的Java程序語言版本, 那些擴大的Java平臺安全部系支持基于用戶的認證.
Annotations enable a declarative style of programming in the Java platform.
The Java EE 7 platform requires Common Annotations for the Java Platform 1.2.
注解使得在Java平臺中可使用編程的方式聲明樣式.
Java EE 7平臺要求Java平臺通用注解 1.2.