[jboss-cvs] JBossAS SVN: r83114 - projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Tue Jan 20 18:22:23 EST 2009
Author: xhuang at jboss.com
Date: 2009-01-20 18:22:23 -0500 (Tue, 20 Jan 2009)
New Revision: 83114
Added:
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_JBoss.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Open_Source.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Professional_Open_Source.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Alternative_DBs.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Author_Group.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Example_Installation.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Info.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Clustered_Singleton_Services.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Entity_EJBs.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_HTTP.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Intro.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Introduction.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JBoss_Cache_JGroups.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JMS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JNDI.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Deploy.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/EJB3.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Feedback.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Additional_Services.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Connectors_On_JBOSS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_EJBs_On_JBOSS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Messaging_On_JBOSS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Reference_Introduction.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Naming.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Revision_History.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Server_Configuration_Guide_CP03.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/The_CMP_Engine.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Transactions.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po
projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/What_This_Book_Covers.po
Log:
update
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_JBoss.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_JBoss.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_JBoss.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,170 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: About_JBoss.xml:5
+#, fuzzy, no-c-format
+msgid "About JBoss"
+msgstr "配置 JBoss"
+
+#. Tag: para
+#: About_JBoss.xml:6
+#, no-c-format
+msgid ""
+"JBoss, a division of Red Hat, is the global leader in open source middleware "
+"software, combining enterprise-class JEMS open source software with the "
+"industry’s leading services and tools to provide simply a better way to "
+"transform your business to Service-Oriented Architecture (SOA)."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:9
+#, no-c-format
+msgid ""
+"JBoss, pioneered the disruptive Professional Open Source model, which "
+"combines the best of the open source and proprietary software worlds to make "
+"open source a safe choice for the enterprise and give CIOs peace of mind. "
+"This includes the royalty-free software, transparent development and active "
+"community inherent in open source and the accountability and professional "
+"support services expected of a traditional software vendor. The company "
+"finds innovative open source projects and professionalizes the project from "
+"a hobby into a livelihood by hiring the lead developer(s), often the "
+"founders themselves. JBoss provides the resources, core development and "
+"support services to enable popular open source projects to scale into "
+"enterprise-class software."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:12
+#, no-c-format
+msgid ""
+"<emphasis>Coverage:</emphasis> North America and Europe on a direct basis. "
+"JBoss provides coverage worldwide via our extensive authorized partner "
+"network."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:15
+#, no-c-format
+msgid ""
+"<emphasis>Mission Statement:</emphasis> JBoss' mission is to "
+"revolutionize the way enterprise middleware software is built, distributed, "
+"and supported through the Professional Open Source model. We are committed "
+"to delivering innovative and high quality technology and services that make "
+"JBoss the safe choice for enterprises and software providers."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:18
+#, no-c-format
+msgid ""
+"<emphasis>Customers:</emphasis> Enterprise customers deploying JBoss "
+"technologies in mission-critical applications with professional services "
+"support from JBoss include Aviva Canada, Continental Airlines, La Quinta, "
+"NLG, MCI, Nielsen Media Research and Travelocity. For a current list of "
+"customer success stories, please visit the <ulink url=\"http://www.jboss.com/"
+"customers/index\">Customers</ulink> section of our website."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:21
+#, no-c-format
+msgid ""
+"<emphasis>Partners:</emphasis> JBoss works with software and hardware "
+"vendors, systems integrators and OEMs to deliver implementation services, "
+"frontline support, and certification for products embedded with JBoss "
+"technologies. For more information on the JBoss Certified Partner Program, "
+"please visit the <ulink url=\"http://www.jboss.com/partners/index"
+"\">Partners</ulink> section of our website."
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:24
+#, no-c-format
+msgid "Professional Open Source(tm) from JBoss Inc. offers you:"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:27
+#, no-c-format
+msgid "Standards-based and stable Java Middleware technology"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:32
+#, no-c-format
+msgid "No cost open source product licenses"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:37
+#, no-c-format
+msgid "Backed by a professional and expert support staff"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:42
+#, no-c-format
+msgid ""
+"Comprehensive services including <ulink url=\"http://www.jboss.com/services/"
+"profsupport\">Professional Support</ulink>, <ulink url=\"http://www.jboss."
+"com/services/certification\">Training</ulink>, and <ulink url=\"http://www."
+"jboss.com/services/consulting\">Consulting</ulink>"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:47
+#, no-c-format
+msgid "A very large and active community of developers"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:52
+#, no-c-format
+msgid ""
+"An extensive worldwide network of authorized and certified <ulink url="
+"\"http://www.jboss.com/partners/index\">partners</ulink>"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:58
+#, no-c-format
+msgid "Benefits of Professional Open Source from JBoss Inc.:"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:61
+#, no-c-format
+msgid "Lowest possible total cost of ownership"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:66
+#, no-c-format
+msgid "Reliable and safe technology"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:71
+#, no-c-format
+msgid "Support, accountability, and trust from a stable company"
+msgstr ""
+
+#. Tag: para
+#: About_JBoss.xml:76
+#, no-c-format
+msgid "Expedited problem resolution compared to commercial software vendors"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Open_Source.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Open_Source.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Open_Source.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,71 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: About_Open_Source.xml:5
+#, no-c-format
+msgid "About Open Source"
+msgstr ""
+
+#. Tag: para
+#: About_Open_Source.xml:6
+#, no-c-format
+msgid ""
+"The basic idea behind open source is very simple: When programmers can read, "
+"redistribute, and modify the source code for a piece of software, the "
+"software evolves. People improve it, people adapt it, people fix bugs. And "
+"this can happen at a speed that, if one is used to the slow pace of "
+"conventional software development, seems astonishing. Open Source is an "
+"often-misunderstood term relating to free software. The Open Source "
+"Initiative (OSI) web site provides a number of resources that define the "
+"various aspects of Open Source including an Open Source Definition at: "
+"<ulink url=\"http://www.opensource.org/docs/definition.html\">http://www."
+"opensource.org/docs/definition.html</ulink>. The following quote from the "
+"OSI home page summarizes the key aspects as they relate to JBoss nicely:"
+msgstr ""
+
+#. Tag: attribution
+#: About_Open_Source.xml:9
+#, no-c-format
+msgid "The Open Source Initiative"
+msgstr ""
+
+#. Tag: para
+#: About_Open_Source.xml:9
+#, no-c-format
+msgid ""
+"We in the open source community have learned that this rapid evolutionary "
+"process produces better software than the traditional closed model, in which "
+"only very few programmers can see the source and everybody else must blindly "
+"use an opaque block of bits."
+msgstr ""
+
+#. Tag: para
+#: About_Open_Source.xml:12
+#, no-c-format
+msgid ""
+"Open Source Initiative exists to make this case to the commercial world."
+msgstr ""
+
+#. Tag: para
+#: About_Open_Source.xml:15
+#, no-c-format
+msgid ""
+"Open source software is an idea whose time has finally come. For twenty "
+"years it has been building momentum in the technical cultures that built the "
+"Internet and the World Wide Web. Now it's breaking out into the "
+"commercial world, and that's changing all the rules. Are you ready?"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Professional_Open_Source.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Professional_Open_Source.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/About_Professional_Open_Source.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,73 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: About_Professional_Open_Source.xml:5
+#, no-c-format
+msgid "About Professional Open Source"
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:6
+#, no-c-format
+msgid ""
+"JBoss is the leader in the second generation of open source, which we have "
+"termed Professional Open Source. The Professional Open Source methodology is "
+"based on the following:"
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:12
+#, no-c-format
+msgid ""
+"We hire and pay experts in the open source community to write exceptional "
+"and innovative software full-time."
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:17
+#, no-c-format
+msgid ""
+"We only use open source licenses that are friendly to end-user IT shops, "
+"independent software vendors, and the community itself."
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:22
+#, no-c-format
+msgid ""
+"Directly and through our authorized partners, we deliver the best support "
+"services available; all of which are backed up by the real product experts."
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:27
+#, no-c-format
+msgid ""
+"Unlike first generation open source providers, we control the direction and "
+"source code for our projects. We can ensure that all bug fixes and patches "
+"are rolled into future versions of our products."
+msgstr ""
+
+#. Tag: para
+#: About_Professional_Open_Source.xml:32
+#, no-c-format
+msgid ""
+"By combining enterprise-proven technology, business-friendly open source "
+"licenses, and world-class support services, we have made Professional Open "
+"Source the safe choice for end-user enterprises and independent software "
+"vendors alike."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Alternative_DBs.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Alternative_DBs.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Alternative_DBs.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,796 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Alternative_DBs.xml:2
+#, no-c-format
+msgid "Use Alternative Databases with JBoss AS"
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:4
+#, no-c-format
+msgid "How to Use Alternative Databases"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:5
+#, no-c-format
+msgid ""
+"JBoss utilizes the Hypersonic database as its default database. While this "
+"is good for development and prototyping, you or your company will probably "
+"require another database to be used for production. This chapter covers "
+"configuring JBoss AS to use alternative databases. We cover the procedures "
+"for all officially supported databases on JBoss Enterprise Application "
+"Platform. They include: MySQL 5.0, PostgreSQL 8.1, Oracle 9i and 10g R2, DB2 "
+"7.2 and 8, Sybase ASE 12.5, as well as MS SQL 2005."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:8
+#, no-c-format
+msgid ""
+"Please note that in this chapter, we explain how to use alternative "
+"databases to support all services in JBoss AS. This includes all the system "
+"level services such as EJB and JMS. For individual applications (e.g., WAR "
+"or EAR) deployed in JBoss AS, you can still use any backend database by "
+"setting up the appropriate data source connection as described in <xref "
+"linkend=\"Connectors_on_JBoss-Configuring_JDBC_DataSources\"/>."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:10
+#, no-c-format
+msgid ""
+"We assume that you have already installed the external database server, and "
+"have it running. You should create an empty database named <literal>jboss</"
+"literal>, accessible via the username / password pair <literal>jbossuser / "
+"jbosspass</literal>. The <literal>jboss</literal> database is used to store "
+"JBoss AS internal data -- JBoss AS will automatically create tables and data "
+"in it."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:15
+#, fuzzy, no-c-format
+msgid "Install JDBC Drivers"
+msgstr "安装 JBoss"
+
+#. Tag: para
+#: Alternative_DBs.xml:17
+#, no-c-format
+msgid ""
+"For the JBoss Application Server and our applications to use the external "
+"database, we also need to install the database's JDBC driver. The JDBC "
+"driver is a JAR file, which you'll need to copy into your JBoss AS's "
+"<literal>jboss-as/server/production/lib</literal> directory. Replace "
+"<literal>production</literal> with the server configuration you are using if "
+"needed. This file is loaded when JBoss starts up. So if you have the JBoss "
+"AS running, you'll need to shut down and restart. The availability of JDBC "
+"drivers for different databases are as follows."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:20
+#, no-c-format
+msgid ""
+"MySQL JDBC drivers can be obtained from <ulink url=\"http://dev.mysql.com/"
+"downloads/connector/j/5.0.html\">http://dev.mysql.com/downloads/connector/"
+"j/5.0.html</ulink>. The download contains documentation, etc. for the JDBC "
+"connector, but you really only need the <literal>mysql-connector-java-5.0.4-"
+"bin.jar</literal> file to get MySQL to work with and be used by JBoss AS."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:22
+#, no-c-format
+msgid ""
+"PostgreSQL JDBC drivers can be obtained from: <ulink url=\"http://jdbc."
+"postgresql.org/\">http://jdbc.postgresql.org/</ulink>. For 8.2.3 version, we "
+"need the JDBC3 driver <literal>8.2-504 JDBC 3</literal>. The download is "
+"just the JDBC driver <literal>postgresql-8.2-504.jdbc3.jar</literal> file."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:24
+#, no-c-format
+msgid ""
+"Oracle thin JDBC drivers can be obtained from: <ulink url=\"http://www."
+"oracle.com/technology/software/tech/java/sqlj_jdbc/index.html\">http://www."
+"oracle.com/technology/software/tech/java/sqlj_jdbc/index.html</ulink> for "
+"your Oracle DB versions."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:26
+#, no-c-format
+msgid ""
+"IBM DB2 JDBC drivers can be downloaded from the IBM web site <ulink url="
+"\"http://www-306.ibm.com/software/data/db2/java/\">http://www-306.ibm.com/"
+"software/data/db2/java/</ulink>."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:29
+#, no-c-format
+msgid ""
+"Sybase JDBC drivers can be downloaded from the Sybase jConnect product page "
+"<ulink url=\"http://www.sybase.com/products/allproductsa-z/"
+"softwaredeveloperkit/jconnect\">http://www.sybase.com/products/allproductsa-"
+"z/softwaredeveloperkit/jconnect</ulink>"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:31
+#, no-c-format
+msgid ""
+"MS SQL Server JDBC drivers can be downloaded from the MSDN web site <ulink "
+"url=\"http://msdn.microsoft.com/data/jdbc/\">http://msdn.microsoft.com/data/"
+"jdbc/</ulink>."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:34
+#, no-c-format
+msgid "Special notes on Sybase"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:35
+#, no-c-format
+msgid ""
+"Some of the services in JBoss uses null values for the default tables that "
+"are created. Sybase Adaptive Server should be configured to allow nulls by "
+"default. <screen><command>sp_dboption db_name, \"allow nulls by default\", "
+"true</command></screen> Refer the sybase manuals for more options."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:43
+#, no-c-format
+msgid "Enable JAVA services"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:44
+#, no-c-format
+msgid ""
+"To use any java service like JMS, CMP, timers etc. configured with Sybase, "
+"java should be enabled on Sybase Adaptive Server. To do this use: "
+"<screen><command>sp_configure \"enable java\",1</command></screen> Refer the "
+"sybase manuals for more information."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:53
+#, no-c-format
+msgid ""
+"If java is not enabled you might see this exception being thrown when you "
+"try to use any of the above services."
+msgstr ""
+
+#. Tag: screen
+#: Alternative_DBs.xml:55
+#, no-c-format
+msgid ""
+"com.sybase.jdbc2.jdbc.SybSQLException: Cannot run this command because Java "
+"services are not enabled. A user with System Administrator (SA) role must "
+"reconfigure the system to enable Java"
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:57
+#, fuzzy, no-c-format
+msgid "CMP Configuration"
+msgstr "TCP 配置"
+
+#. Tag: para
+#: Alternative_DBs.xml:58
+#, no-c-format
+msgid ""
+"To use Container Managed Persistence for user defined Java objects with "
+"Sybase Adaptive Server Enterprise the java classes should be installed in "
+"the database. The system table 'sysxtypes' contains one row for each "
+"extended, Java-SQL datatype.This table is only used for Adaptive Servers "
+"enabled for Java. Install java classes using the installjava program. "
+"<screen><command>installjava -f <jar-file-name> -S<sybase-"
+"server> -U<super-user> -P<super-pass> -D<db-name></"
+"command></screen> Refer the installjava manual in Sybase for more options."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:73
+#, fuzzy, no-c-format
+msgid "Installing Java Classes"
+msgstr "安装 JBoss"
+
+#. Tag: para
+#: Alternative_DBs.xml:77
+#, no-c-format
+msgid ""
+"You have to be a super-user with required privileges to install java classes."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:82
+#, no-c-format
+msgid ""
+"The jar file you are trying to install should be created without compression."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:87
+#, no-c-format
+msgid ""
+"Java classes that you install and use in the server must be compiled with "
+"JDK 1.2.2. If you compile a class with a later JDK, you will be able to "
+"install it in the server using the installjava utility, but you will get a "
+"java.lang.ClassFormatError exception when you attempt to use the class. This "
+"is because Sybase Adaptive Server uses an older JVM internally, and hence "
+"requires the java classes to be compiled with the same."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:99
+#, no-c-format
+msgid "Creating a DataSource for the External Database"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:101
+#, no-c-format
+msgid ""
+"JBoss AS connects to relational databases via datasources. These datasource "
+"definitions can be found in the <literal>jboss-as/server/production/deploy</"
+"literal> directory. The datasource definitions are deployable just like WAR "
+"and EAR files. The datasource files can be recognized by looking for the XML "
+"files that end in <literal>*-ds.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:103
+#, no-c-format
+msgid ""
+"The datasource definition files for all supported external databases can be "
+"found in the <literal>jboss-as/docs/examples/jca</literal> directory."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:106
+#, fuzzy, no-c-format
+msgid "MySQL: <literal>mysql-ds.xml</literal>"
+msgstr "<literal>all</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:107
+#, fuzzy, no-c-format
+msgid "PostgreSQL: <literal>postgres-ds.xml</literal>"
+msgstr "<literal>log</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:108
+#, fuzzy, no-c-format
+msgid "Oracle: <literal>oracle-ds.xml</literal>"
+msgstr "<literal>all</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:109
+#, fuzzy, no-c-format
+msgid "DB2: <literal>db2-ds.xml</literal>"
+msgstr "<literal>all</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:110
+#, fuzzy, no-c-format
+msgid "Sybase: <literal>sybase-ds.xml</literal>"
+msgstr "<literal>all</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:111
+#, fuzzy, no-c-format
+msgid "MS SQL Server: <literal>mssql-ds.xml</literal>"
+msgstr "<literal>all</literal>"
+
+#. Tag: para
+#: Alternative_DBs.xml:114
+#, no-c-format
+msgid ""
+"The following code snippet shows the <literal>mysql-ds.xml</literal> file as "
+"an example. All the other <literal>*-ds.xml</literal> files are very "
+"similiar. You will need to change the <literal>connection-url</literal>, as "
+"well as the <literal>user-name</literal> / <literal>password</literal>, to "
+"fit your own database server installation."
+msgstr ""
+
+#. Tag: programlisting
+#: Alternative_DBs.xml:116
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<datasources>\n"
+" <local-tx-datasource>\n"
+" <jndi-name>MySqlDS</jndi-name>\n"
+" <connection-url>jdbc:mysql://localhost:3306/jboss</connection-url>\n"
+" <driver-class>com.mysql.jdbc.Driver</driver-class>\n"
+" <user-name>jbossuser</user-name>\n"
+" <password>jbosspass</password>\n"
+" <exception-sorter-class-name>\n"
+" org.jboss.resource.adapter.jdbc.vendor."
+"MySQLExceptionSorter\n"
+" </exception-sorter-class-name>\n"
+" <!-- should only be used on drivers after 3.22.1 with \"ping\" support\n"
+" <valid-connection-checker-class-name>\n"
+" org.jboss.resource.adapter.jdbc.vendor."
+"MySQLValidConnectionChecker\n"
+" </valid-connection-checker-class-name>\n"
+" -->\n"
+" <!-- sql to call when connection is created\n"
+" <new-connection-sql>some arbitrary sql</new-connection-sql>\n"
+" -->\n"
+" <!-- sql to call on an existing pooled connection when it is obtained "
+"from pool - \n"
+" MySQLValidConnectionChecker is preferred for newer drivers\n"
+" <check-valid-connection-sql>some arbitrary sql</check-valid-connection-"
+"sql>\n"
+" -->\n"
+"\n"
+" <!-- corresponding type-mapping in the standardjbosscmp-jdbc.xml "
+"(optional) -->\n"
+" <metadata>\n"
+" <type-mapping>mySQL</type-mapping>\n"
+" </metadata>\n"
+" </local-tx-datasource>\n"
+"\n"
+"</datasources>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:118
+#, no-c-format
+msgid ""
+"Once you customized the <literal>*-ds.xml</literal> file to connect to your "
+"external database, you need to copy it to the <literal>jboss-as/server/"
+"production/deploy</literal> directory. The database connection is now "
+"available through the JNDI name specified in the <literal>*-ds.xml</literal> "
+"file."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:123
+#, fuzzy, no-c-format
+msgid "Change Database for the JMS Services"
+msgstr "群集的 JMS 服务"
+
+#. Tag: para
+#: Alternative_DBs.xml:132
+#, no-c-format
+msgid ""
+"The JMS service in the JBoss AS uses relational databases to persist its "
+"messages. For improved performance, you should change the JMS service to "
+"take advantage of the external database. To do that, you need to replace the "
+"file <filename>jboss-as/server/production/deploy/jboss-messaging.sar/"
+"clustered-hsqldb-persistence-service.xml</filename> with a file in "
+"<filename>jboss-as/docs/examples/jms/</filename> depending on your external "
+"database and restart your server. <itemizedlist> <listitem><para>MySQL: "
+"<literal>mysql-persistence-service.xml</literal></para></listitem> "
+"<listitem><para>PostgreSQL: <literal>postgresql-persistence-service.xml</"
+"literal></para></listitem> <listitem><para>Oracle: <literal>oracle-"
+"persistence-service.xml</literal></para></listitem> <listitem><para>Sybase: "
+"<literal>sybase-persistence-service.xml</literal></para></listitem> "
+"<listitem><para>MS SQL Server: <literal>mssql-persistence-service.xml</"
+"literal></para></listitem> </itemizedlist> For the <literal>default</"
+"literal> and <literal>all</literal> configurations, replace the files "
+"<filename>jboss-as/server/default/deploy/jboss-messaging.sar/hsqldb-"
+"persistence-service.xml</filename> and <filename>jboss-as/server/all/deploy/"
+"jboss-messaging.sar/clustered-hsqldb-persistence-service.xml</filename> "
+"respectively."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:145
+#, no-c-format
+msgid "Support Foreign Keys in CMP Services"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:147
+#, no-c-format
+msgid ""
+"Next, we need to go change the <literal>jboss-as/server/production/conf/"
+"standardjbosscmp-jdbc.xml</literal> file so that the <literal>fk-constraint</"
+"literal> property is <literal>true</literal>. That is needed for all "
+"external databases we support on the JBoss Enterprise Application Platform. "
+"This file configures the database connection settings for the EJB2 CMP beans "
+"deployed in the JBoss AS."
+msgstr ""
+
+#. Tag: programlisting
+#: Alternative_DBs.xml:149
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<fk-constraint>true</fk-constraint>\n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:154
+#, no-c-format
+msgid "Specify Database Dialect for Java Persistence API"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:156
+#, no-c-format
+msgid ""
+"The Java Persistence API (JPA) entity manager can save EJB3 entity beans to "
+"any backend database. Hibernate provides the JPA implementation in JBoss AS. "
+"In order for Hibernate to work correctly with alternative databases, we "
+"recommend you configure the database dialect in the <varname>jboss-as/server/"
+"production/deploy/ejb3.deployer/META-INF/persistence.properties</varname> "
+"file. You need to un-comment the <varname>hibernate.dialect</varname> "
+"property and change its value to the following based on the database you "
+"setup."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:159
+#, no-c-format
+msgid "Oracle 9i: org.hibernate.dialect.Oracle9iDialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:160
+#, no-c-format
+msgid "Oracle 10g: org.hibernate.dialect.Oracle10gDialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:161
+#, no-c-format
+msgid "Microsoft SQL Server 2005: org.hibernate.dialect.SQLServerDialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:162
+#, no-c-format
+msgid "PostgresSQL 8.1: org.hibernate.dialect.PostgreSQLDialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:163
+#, no-c-format
+msgid "MySQL 5.0: org.hibernate.dialect.MySQL5Dialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:164
+#, no-c-format
+msgid "DB2 8.0: org.hibernate.dialect.DB2Dialect"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:165
+#, no-c-format
+msgid "Sybase ASE 12.5: org.hibernate.dialect.SybaseDialect"
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:168
+#, no-c-format
+msgid "DB2 7.2 with Universal JDBC Driver (Type 4)"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:169
+#, no-c-format
+msgid ""
+"Large Objects (LOBs) are supported only with DB2 Version 8 servers and above "
+"with the universal JDBC driver. Hence JMS services which stores messages as "
+"BLOBS and Timer services which uses BLOB fields for storing objects do not "
+"work with the JDBC Type 4 driver and DB2 7.2."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:175
+#, no-c-format
+msgid "DB2 7.2 with JDBC Type 2 driver"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:176
+#, no-c-format
+msgid ""
+"All JBoss services work with the JDBC Type 2 driver and DB2 Version 7.2 "
+"servers."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:186
+#, no-c-format
+msgid "Change Other JBoss AS Services to Use the External Database"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:188
+#, no-c-format
+msgid ""
+"Besides JMS, CMP, and JPA, we still need to hook up the rest of JBoss "
+"services with the external database. There are two ways to do it. One is "
+"easy but inflexible. The other is flexible but requires more steps. Now, "
+"let's discuss those two approaches respectively."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:191
+#, no-c-format
+msgid "The Easy Way"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:193
+#, no-c-format
+msgid ""
+"The easy way is just to change the JNDI name for the external database to "
+"<literal>DefaultDS</literal>. Most JBoss services are hard-wired to use the "
+"<literal>DefaultDS</literal> by default. So, by changing the datasource "
+"name, we do not need to change the configuration for each service "
+"individually."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:195
+#, no-c-format
+msgid ""
+"To change the JNDI name, just open the <literal>*-ds.xml</literal> file for "
+"your external database, and change the value of the <literal>jndi-name</"
+"literal> property to <literal>DefaultDS</literal>. For instance, in "
+"<literal>mysql-ds.xml</literal>, you'd change <literal>MySqlDS</literal> to "
+"<literal>DefaultDS</literal> and so on. You will need to remove the "
+"<literal>jboss-as/server/production/deploy/hsqldb-ds.xml</literal> file "
+"after you are done to avoid duplicated <literal>DefaultDS</literal> "
+"definition."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:197
+#, no-c-format
+msgid ""
+"In the <literal>jms/*-jdbc2-service.xml</literal> file, you should also "
+"change the datasource name in the <literal>depends</literal> tag for the "
+"<literal>PersistenceManagers</literal> MBean to <literal>DefaultDS</"
+"literal>. For instance, for <literal>mysql-jdbc2-service.xml</literal> file, "
+"we change the <literal>MySqlDS</literal> to <literal>DefaultDS</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: Alternative_DBs.xml:199
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"... ...\n"
+"<mbean code=\"org.jboss.mq.pm.jdbc2.PersistenceManager\"\n"
+" name=\"jboss.mq:service=PersistenceManager\">\n"
+" <depends optional-attribute-name=\"ConnectionManager\">\n"
+" jboss.jca:service=DataSourceBinding,name=DefaultDS\n"
+" </depends>\n"
+" ... ...\n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:204
+#, no-c-format
+msgid "The More Flexible Way"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:206
+#, no-c-format
+msgid ""
+"Changing the external datasource to <literal>DefaultDS</literal> is "
+"convenient. But if you have applications that assume the <literal>DefaultDS</"
+"literal> always points to the factory-default HSQL DB, that approach could "
+"break your application. Also, changing <literal>DefaultDS</literal> "
+"destination forces all JBoss services to use the external database. What if "
+"you want to use the external database only on some services?"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:208
+#, no-c-format
+msgid ""
+"A safer and more flexible way to hook up JBoss AS services with the external "
+"datasource is to manually change the <literal>DefaultDS</literal> in all "
+"standard JBoss services to the datasource JNDI name defined in your "
+"<literal>*-ds.xml</literal> file (e.g., the <literal>MySqlDS</literal> in "
+"<literal>mysql-ds.xml</literal> etc.). Below is a complete list of files "
+"that contain <literal>DefaultDS</literal>. You can update them all to use "
+"the external database on all JBoss services or update some of them to use "
+"different combination of datasources for different services."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:211
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/conf/login-config.xml</literal>: This "
+"file is used in Java EE container managed security services."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:213
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/conf/standardjbosscmp-jdbc.xml</"
+"literal>: This file configures the CMP beans in the EJB container."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:215
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/ejb-deployer.xml</literal>: This "
+"file configures the JBoss EJB deployer."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:217
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/schedule-manager-service.xml</"
+"literal>: This file configures the EJB timer services."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:219
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/snmp-adaptor.sar/attributes.xml</"
+"literal>: This file is used by the SNMP service."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:221
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/juddi-service.sar/META-INF/jboss-"
+"service.xml</literal>: This file configures the UUDI service."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:223
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/juddi-service.sar/juddi.war/WEB-"
+"INF/jboss-web.xml</literal>: This file configures the UUDI service."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:225
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/juddi-service.sar/juddi.war/WEB-"
+"INF/juddi.properties</literal>: This file configures the UUDI service."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:227
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/uuid-key-generator.sar/META-INF/"
+"jboss-service.xml</literal>: This file configures the UUDI service."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:229
+#, no-c-format
+msgid ""
+"<literal>jboss-as/server/production/deploy/jboss-messaging.sar/clustered-"
+"hsqldb-persistence-service.xml</literal>: This file configures the JMS "
+"persistence service as we discussed earlier."
+msgstr ""
+
+#. Tag: title
+#: Alternative_DBs.xml:238
+#, no-c-format
+msgid "A Special Note About Oracle DataBases"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:240
+#, no-c-format
+msgid ""
+"In our setup discussed in this chapter, we rely on the JBoss AS to "
+"automatically create needed tables in the external database upon server "
+"startup. That works most of the time. But for databases like Oracle, there "
+"might be some minor issues if you try to use the same database server to "
+"back more than one JBoss AS instance."
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:242
+#, no-c-format
+msgid ""
+"The Oracle database creates tables of the form <literal>schemaname."
+"tablename</literal>. The <literal>TIMERS</literal> and "
+"<literal>HILOSEQUENCES</literal> tables needed by JBoss AS would not get "
+"created on a schema if the table already exists on a different schema. To "
+"work around this issue, you need to edit the <literal>jboss-as/server/"
+"production/deploy/ejb-deployer.xml</literal> file to change the table name "
+"from <literal>TIMERS</literal> to something like <literal>schemaname2."
+"tablename</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: Alternative_DBs.xml:244
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"... ...\n"
+" <mbean code=\"org.jboss.ejb.txtimer.DatabasePersistencePolicy\" \n"
+" name=\"jboss.ejb:service=EJBTimerService,persistencePolicy=database"
+"\">\n"
+" <!-- DataSourceBinding ObjectName -->\n"
+" <depends optional-attribute-name=\"DataSource\">\n"
+" jboss.jca:service=DataSourceBinding,name=DefaultDS\n"
+" </depends>\n"
+" <!-- The plugin that handles database persistence -->\n"
+" <attribute name=\"DatabasePersistencePlugin\">\n"
+" org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin\n"
+" </attribute>\n"
+" <!-- The timers table name -->\n"
+" <attribute name=\"TimersTable\">TIMERS</attribute>\n"
+" </mbean> \n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Alternative_DBs.xml:246
+#, no-c-format
+msgid ""
+"Similarly, you need to change the <literal>jboss-as/server/production/deploy/"
+"uuid-key-generator.sar/META-INF/jboss-service.xml</literal> file to change "
+"the table name from <literal>HILOSEQUENCES</literal> to something like "
+"<literal>schemaname2.tablename</literal> as well."
+msgstr ""
+
+#. Tag: programlisting
+#: Alternative_DBs.xml:248
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"... ...\n"
+" <!-- HiLoKeyGeneratorFactory -->\n"
+" <mbean code=\"org.jboss.ejb.plugins.keygenerator.hilo."
+"HiLoKeyGeneratorFactory\"\n"
+" name=\"jboss:service=KeyGeneratorFactory,type=HiLo\">\n"
+" \n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+"\n"
+" <!-- Attributes common to HiLo factory instances -->\n"
+" \n"
+" <!-- DataSource JNDI name -->\n"
+" <depends optional-attribute-name=\"DataSource\">jboss.jca:"
+"service=DataSourceBinding,name=DefaultDS</depends>\n"
+"\n"
+" <!-- table name -->\n"
+" <attribute name=\"TableName\">HILOSEQUENCES</attribute>\n"
+" \n"
+" ... ...\n"
+"]]>"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Author_Group.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Author_Group.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Author_Group.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,21 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: author
+#: Author_Group.xml:6
+#, no-c-format
+msgid "<firstname>Red Hat Documentation Group</firstname> <surname></surname>"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Example_Installation.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Example_Installation.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Example_Installation.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,86 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Book_Example_Installation.xml:6
+#, no-c-format
+msgid "Book Example Installation"
+msgstr ""
+
+#. Tag: para
+#: Book_Example_Installation.xml:7
+#, no-c-format
+msgid ""
+"The book comes with the source code for the examples discussed in the book. "
+"You can download the examples zip file from <ulink url=\"http://www.redhat."
+"com/docs\">http://www.redhat.com/docs</ulink>. Unzipping the example code "
+"archive creates a <literal>server-config-guide</literal> directory. This is "
+"the <literal>examples</literal> directory referred to by the book."
+msgstr ""
+
+#. Tag: para
+#: Book_Example_Installation.xml:10
+#, no-c-format
+msgid ""
+"The only customization needed before the examples may be used is to set the "
+"location of the JBoss server distribution. This may be done by editing the "
+"<literal>examples/build.xml</literal> file and changing the <literal>jboss."
+"dist</literal> property value. This is shown in bold below:"
+msgstr ""
+
+#. Tag: programlisting
+#: Book_Example_Installation.xml:13
+#, no-c-format
+msgid ""
+"<project name=\"JBoss book examples\" default=\"build-all\" basedir=\"."
+"\">\n"
+" <!-- Allow overrides from a local properties file -->\n"
+" <property file=\"ant.properties\" />\n"
+"\n"
+" <!-- Override with your JBoss server bundle dist location -->\n"
+" <property name=\"jboss.dist\" value=\"${basedir}/../../../../"
+"jboss-eap-4.3/jboss-as\" />\n"
+" <property name=\"jboss.deploy.conf\" value=\"default\" />\n"
+" <property name=\"jboss.deploy.dir\" value=\"${jboss.dist}/server/"
+"${jboss.deploy.conf}/deploy\" />\n"
+" ...\n"
+" ..."
+msgstr ""
+
+#. Tag: para
+#: Book_Example_Installation.xml:14
+#, no-c-format
+msgid ""
+"or by creating an <literal>.ant.properties</literal> file in the examples "
+"directory that contains a definition for the <literal>jboss.dist</literal> "
+"property. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Book_Example_Installation.xml:17
+#, no-c-format
+msgid "jboss.dist=/usr/local/jboss-eap-4.3/jboss-as"
+msgstr ""
+
+#. Tag: para
+#: Book_Example_Installation.xml:18
+#, no-c-format
+msgid ""
+"Part of the verification process validates that the version you are running "
+"the examples against matches what the book examples were tested against. If "
+"you have a problem running the examples first look for the output of the "
+"validate target."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Info.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Info.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Book_Info.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,42 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Book_Info.xml:5
+#, fuzzy, no-c-format
+msgid "Server Configuration Guide CP03"
+msgstr "服务端配置"
+
+#. Tag: subtitle
+#: Book_Info.xml:6
+#, no-c-format
+msgid ""
+"for Use with JBoss Enterprise Application Platform 4.3 Cumulative Patch 3"
+msgstr ""
+
+#. Tag: para
+#: Book_Info.xml:13
+#, no-c-format
+msgid ""
+"This book is a guide to configuring the JBoss Application Server for JBoss "
+"Enterprise Application Platform."
+msgstr ""
+
+#. Tag: holder
+#: Book_Info.xml:24
+#, no-c-format
+msgid "&HOLDER;"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Clustered_Singleton_Services.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Clustered_Singleton_Services.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Clustered_Singleton_Services.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,468 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:5
+#, fuzzy, no-c-format
+msgid "Clustered Singleton Services"
+msgstr "群集的 JMS 服务"
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:6
+#, no-c-format
+msgid ""
+"A clustered singleton service (also known as an HA singleton) is a service "
+"that is deployed on multiple nodes in a cluster, but is providing its "
+"service on only one of the nodes. The node running the singleton service is "
+"typically called the master node. When the master fails or is shut down, "
+"another master is selected from the remaining nodes and the service is "
+"restarted on the new master. Thus, other than a brief interval when one "
+"master has stopped and another has yet to take over, the service is always "
+"being provided by one but only one node."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:9
+#, no-c-format
+msgid "Topology after the Master Node fails"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:17
+#, no-c-format
+msgid ""
+"The JBoss Application Server (AS) provides support for a number of "
+"strategies for helping you deploy clustered singleton services. In this "
+"section we will explore the different strategies. All of the strategies are "
+"built on top of the HAPartition service described in the introduction. They "
+"rely on the <literal>HAPartition</literal> to provide notifications when "
+"different nodes in the cluster start and stop; based on those notifications "
+"each node in the cluster can independently (but consistently) determine if "
+"it is now the master node and needs to begin providing a service."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:22
+#, fuzzy, no-c-format
+msgid "HASingletonDeployer service"
+msgstr "client-deployer-service.xml"
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:23
+#, no-c-format
+msgid ""
+"The simplest and most commonly used strategy for deploying an HA singleton "
+"is to take an ordinary deployment (war, ear, jar, whatever you would "
+"normally put in deploy) and deploy it in the <literal>$JBOSS_HOME/server/all/"
+"deploy-hasingleton</literal> directory instead of in <literal>deploy</"
+"literal>. The <literal>deploy-hasingleton</literal> directory does not lie "
+"under deploy or farm, so its contents are not automatically deployed when an "
+"AS instance starts. Instead, deploying the contents of this directory is the "
+"responsibility of a special service, the <literal>jboss.ha:"
+"service=HASingletonDeployer</literal> MBean (which itself is deployed via "
+"the deploy/deploy-hasingleton-service.xml file.) The HASingletonDeployer "
+"service is itself an HA Singleton, one whose provided service when it "
+"becomes master is to deploy the contents of deploy-hasingleton and whose "
+"service when it stops being the master (typically at server shutdown) is to "
+"undeploy the contents of <literal>deploy-hasingleton</literal>."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:26
+#, no-c-format
+msgid ""
+"So, by placing your deployments in <literal>deploy-hasingleton</literal> you "
+"know that they will be deployed only on the master node in the cluster. If "
+"the master node cleanly shuts down, they will be cleanly undeployed as part "
+"of shutdown. If the master node fails or is shut down, they will be deployed "
+"on whatever node takes over as master."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:29
+#, no-c-format
+msgid ""
+"Using deploy-hasingleton is very simple, but it does have two drawbacks:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:33
+#, no-c-format
+msgid ""
+"There is no hot-deployment feature for services in <literal>deploy-"
+"hasingleton</literal>. Redeploying a service that has been deployed to "
+"<literal>deploy-hasingleton</literal> requires a server restart."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:38
+#, no-c-format
+msgid ""
+"If the master node fails and another node takes over as master, your "
+"singleton service needs to go through the entire deployment process before "
+"it will be providing services. Depending on how complex the deployment of "
+"your service is and what sorts of startup activities it engages in, this "
+"could take a while, during which time the service is not being provided."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:50
+#, no-c-format
+msgid "Mbean deployments using HASingletonController"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:51
+#, no-c-format
+msgid ""
+"If your service is an Mbean (i.e., not a J2EE deployment like an ear or war "
+"or jar), you can deploy it along with a service called an "
+"HASingletonController in order to turn it into an HA singleton. It is the "
+"job of the HASingletonController to work with the HAPartition service to "
+"monitor the cluster and determine if it is now the master node for its "
+"service. If it determines it has become the master node, it invokes a method "
+"on your service telling it to begin providing service. If it determines it "
+"is no longer the master node, it invokes a method on your service telling it "
+"to stop providing service. Let's walk through an illustration."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:54
+#, no-c-format
+msgid ""
+"First, we have an MBean service that we want to make an HA singleton. The "
+"only thing special about it is it needs to expose in its MBean interface a "
+"method that can be called when it should begin providing service, and "
+"another that can be called when it should stop providing service:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Clustered_Singleton_Services.xml:57
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"public class HASingletonExample\n"
+"implements HASingletonExampleMBean { \n"
+" \n"
+"private boolean isMasterNode = false; \n"
+" \n"
+"public void startSingleton() { \n"
+"isMasterNode = true; \n"
+"} \n"
+". \n"
+"public boolean isMasterNode() { \n"
+"return isMasterNode; \n"
+" } \n"
+" \n"
+" public void stopSingleton() { \n"
+" isMasterNode = false; \n"
+" } \n"
+"} ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:59
+#, no-c-format
+msgid ""
+"We used “startSingleton” and “stopSingleton” in the above example, but you "
+"could name the methods anything."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:62
+#, no-c-format
+msgid ""
+"Next, we deploy our service, along with an HASingletonController to control "
+"it, most likely packaged in a .sar file, with the following <literal>META-"
+"INF/jboss-service.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Clustered_Singleton_Services.xml:65
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" <server> \n"
+" <!-- This MBean is an example of a clustered singleton --> \n"
+" <mbean code=\"org.jboss.ha.examples.HASingletonExample\" \n"
+" name=“jboss:service=HASingletonExample\"/> \n"
+" \n"
+" <!-- This HASingletonController manages the cluster Singleton --> \n"
+" <mbean code=\"org.jboss.ha.singleton.HASingletonController\" \n"
+" name=\"jboss:service=ExampleHASingletonController\"> \n"
+" \n"
+" <!-- Inject a ref to the HAPartition -->\n"
+" <depends optional-attribute-name=\"ClusterPartition\" proxy-"
+"type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:"
+"DefaultPartition}\n"
+" </depends> \n"
+" <!-- Inject a ref to the service being controlled -->\n"
+" <depends optional-attribute-name=\"TargetName\">\n"
+" jboss:service=HASingletonExample\n"
+" </depends>\n"
+" <!-- Methods to invoke when become master / stop being "
+"master -->\n"
+" <attribute name=\"TargetStartMethod\">startSingleton</"
+"attribute> \n"
+" <attribute name=\"TargetStopMethod\">stopSingleton</"
+"attribute> \n"
+" </mbean> \n"
+"</server> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:67
+#, no-c-format
+msgid "Voila! A clustered singleton service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:69
+#, no-c-format
+msgid ""
+"The obvious downside to this approach is it only works for MBeans. Upsides "
+"are that the above example can be placed in <literal>deploy</literal> or "
+"<literal>farm</literal> and thus can be hot deployed and farmed deployed. "
+"Also, if our example service had complex, time-consuming startup "
+"requirements, those could potentially be implemented in create() or start() "
+"methods. JBoss will invoke create() and start() as soon as the service is "
+"deployed; it doesn't wait until the node becomes the master node. So, the "
+"service could be primed and ready to go, just waiting for the controller to "
+"implement startSingleton() at which point it can immediately provide service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:72
+#, no-c-format
+msgid ""
+"The jboss.ha:service=HASingletonDeployer service discussed above is itself "
+"an interesting example of using an HASingletonController. Here is its "
+"deployment descriptor (extracted from the <literal>deploy/deploy-hasingleton-"
+"service.xml</literal> file):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Clustered_Singleton_Services.xml:75
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<mbean code=\"org.jboss.ha.singleton.HASingletonController\" \n"
+"name=\"jboss.ha:service=HASingletonDeployer\"> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" proxy-type=\"attribute"
+"\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <depends optional-attributeame=\"TargetName\">\n"
+" jboss.system:service=MainDeployer\n"
+" </depends> \n"
+" <attribute name=\"TargetStartMethod\">deploy</attribute> \n"
+" <attribute name=\"TargetStartMethodArgument\">\n"
+" ${jboss.server.home.url}/deploy-hasingleton\n"
+" </attribute> \n"
+" <attribute name=\"TargetStopMethod\">undeploy</attribute> \n"
+" <attribute name=\"TargetStopMethodArgument\">\n"
+" ${jboss.server.home.url}/deploy-hasingleton\n"
+" </attribute> \n"
+"</mbean> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:77
+#, no-c-format
+msgid ""
+"A few interesting things here. First the service being controlled is the "
+"<literal>MainDeployer</literal> service, which is the core deployment "
+"service in JBoss. That is, it's a service that wasn't written with an intent "
+"that it be controlled by an <literal>HASingletonController</literal>. But it "
+"still works! Second, the target start and stop methods are “deploy” and "
+"“undeploy”. No requirement that they have particular names, or even that "
+"they logically have “start” and “stop” functionality. Here the functionality "
+"of the invoked methods is more like “do” and “undo”. Finally, note the "
+"“<literal>TargetStart(Stop)MethodArgument</literal>” attributes. Your "
+"singleton service's start/stop methods can take an argument, in this case "
+"the location of the directory the <literal>MainDeployer</literal> should "
+"deploy/undeploy."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:85
+#, no-c-format
+msgid "HASingleton deployments using a Barrier"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:86
+#, no-c-format
+msgid ""
+"Services deployed normally inside deploy or farm that want to be started/"
+"stopped whenever the content of deploy-hasingleton gets deployed/undeployed, "
+"(i.e., whenever the current node becomes the master), need only specify a "
+"dependency on the Barrier mbean:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Clustered_Singleton_Services.xml:88
+#, no-c-format
+msgid ""
+"<![CDATA[<depends>jboss.ha:service=HASingletonDeployer,type=Barrier</"
+"depends>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:90
+#, no-c-format
+msgid ""
+"The way it works is that a BarrierController is deployed along with the "
+"jboss.ha:service=HASingletonDeployer MBean and listens for JMX notifications "
+"from it. A BarrierController is a relatively simple Mbean that can subscribe "
+"to receive any JMX notification in the system. It uses the received "
+"notifications to control the lifecycle of a dynamically created Mbean called "
+"the Barrier.The Barrier is instantiated, registered and brought to the "
+"CREATE state when the BarrierController is deployed. After that, the "
+"BarrierController starts and stops the Barrier when matching JMX "
+"notifications are received. Thus, other services need only depend on the "
+"Barrier MBean using the usual <depends> tag, and they will be started "
+"and stopped in tandem with the Barrier. When the BarrierController is "
+"undeployed the Barrier is destroyed too."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:94
+#, no-c-format
+msgid ""
+"This provides an alternative to the deploy-hasingleton approach in that we "
+"can use farming to distribute the service, while content in deploy-"
+"hasingleton must be copied manually on all nodes."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:97
+#, no-c-format
+msgid ""
+"On the other hand, the barrier-dependent service will be instantiated/"
+"created (i.e., any create() method invoked) on all nodes, but only started "
+"on the master node. This is different with the deploy-hasingleton approach "
+"that will only deploy (instantiate/create/start) the contents of the deploy-"
+"hasingleton directory on one of the nodes."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:101
+#, no-c-format
+msgid ""
+"So services depending on the barrier will need to make sure they do minimal "
+"or no work inside their create() step, rather they should use start() to do "
+"the work."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:104
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:105
+#, no-c-format
+msgid ""
+"The Barrier controls the start/stop of dependent services, but not their "
+"destruction, which happens only when the <literal>BarrierController</"
+"literal> is itself destroyed/undeployed. Thus using the <literal>Barrier</"
+"literal> to control services that need to be \"destroyed\" as part of their "
+"normal “undeploy” operation (like, for example, an <literal>EJBContainer</"
+"literal>) will not have the desired effect."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Clustered_Singleton_Services.xml:114
+#, no-c-format
+msgid "Determining the master node"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:115
+#, no-c-format
+msgid ""
+"The various clustered singleton management strategies all depend on the fact "
+"that each node in the cluster can independently react to changes in cluster "
+"membership and correctly decide whether it is now the “master node”. How is "
+"this done?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:118
+#, no-c-format
+msgid ""
+"Prior to JBoss AS 4.2.0, the methodology for this was fixed and simple. For "
+"each member of the cluster, the HAPartition mbean maintains an attribute "
+"called the CurrentView, which is basically an ordered list of the current "
+"members of the cluster. As nodes join and leave the cluster, JGroups ensures "
+"that each surviving member of the cluster gets an updated view. You can see "
+"the current view by going into the JMX console, and looking at the "
+"CurrentView attribute in the <literal>jboss:service=DefaultPartition</"
+"literal> mbean. Every member of the cluster will have the same view, with "
+"the members in the same order."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:121
+#, no-c-format
+msgid ""
+"Let's say, for example, that we have a 4 node cluster, nodes A through D, "
+"and the current view can be expressed as {A, B, C, D}. Generally speaking, "
+"the order of nodes in the view will reflect the order in which they joined "
+"the cluster (although this is not always the case, and should not be assumed "
+"to be the case.)"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:124
+#, no-c-format
+msgid ""
+"To further our example, let's say there is a singleton service (i.e., an "
+"<literal>HASingletonController</literal>) named Foo that's deployed around "
+"the cluster, except, for whatever reason, on B. The <literal>HAPartition</"
+"literal> service maintains across the cluster a registry of what services "
+"are deployed where, in view order. So, on every node in the cluster, the "
+"<literal>HAPartition</literal> service knows that the view with respect to "
+"the Foo service is {A, C, D} (no B)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:128
+#, no-c-format
+msgid ""
+"Whenever there is a change in the cluster topology of the Foo service, the "
+"<literal>HAPartition</literal> service invokes a callback on Foo notifying "
+"it of the new topology. So, for example, when Foo started on D, the Foo "
+"service running on A, C and D all got callbacks telling them the new view "
+"for Foo was {A, C, D}. That callback gives each node enough information to "
+"independently decide if it is now the master. The Foo service on each node "
+"does this by checking if they are the first member of the view – if they "
+"are, they are the master; if not, they're not. Simple as that."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Clustered_Singleton_Services.xml:132
+#, no-c-format
+msgid ""
+"If A were to fail or shutdown, Foo on C and D would get a callback with a "
+"new view for Foo of {C, D}. C would then become the master. If A restarted, "
+"A, C and D would get a callback with a new view for Foo of {C, D, A}. C "
+"would remain the master – there's nothing magic about A that would cause it "
+"to become the master again just because it was before."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_EJBs.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,1130 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:5
+#, no-c-format
+msgid "Clustered Session EJBs"
+msgstr "群集的 Session EJBs"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:6
+#, no-c-format
+msgid ""
+"Session EJBs provide remote invocation services. They are clustered based on "
+"the client-side interceptor architecture. The client application for a "
+"clustered session bean is exactly the same as the client for the non-"
+"clustered version of the session bean, except for a minor change to the "
+"<literal>java.naming.provier.url</literal> system property to enable HA-JNDI "
+"lookup (see previous section). No code change or re-compilation is needed on "
+"the client side. Now, let's check out how to configure clustered session "
+"beans in EJB 2.x and EJB 3.0 server applications respectively."
+msgstr ""
+"Session EJBs 提供远程的调用服务。它们按照客户端拦截器架构(client-side "
+"interceptor architecture)组成群集系统。群集的 session bean 的客户应用程序和"
+"非群集的版本是一模一样的,除了对启用 HA-JNDI 查找的 <literal>java.naming."
+"provier.url</literal> 系统属性的少许改动。对于客户端来说,不需要任何的源码改"
+"动或重新编译。现在,让我们看看怎么分别在 EJB 2.x 和 EJB 3.0 服务器应用程序里"
+"配置群集的 session beans。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:13
+#, no-c-format
+msgid "Stateless Session Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Stateless Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:14
+#, no-c-format
+msgid ""
+"Clustering stateless session beans is most probably the easiest case: as no "
+"state is involved, calls can be load-balanced on any participating node (i."
+"e. any node that has this specific bean deployed) of the cluster. To make a "
+"bean clustered, you need to modify its <literal>jboss.xml</literal> "
+"descriptor to contain a <literal><clustered></literal> tag."
+msgstr ""
+"群集的 stateless session beans 有可能是最简单的:因为不涉及到状态,调用可以在"
+"群集里的任何节点(部署有这个 bean 的节点)上进行负载平衡。要群集一个 bean,你"
+"需要修改它的 <literal>jboss.xml</literal> 描述符,使它包含一个 <literal><"
+"clustered></literal> 标签。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:18
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:21
+#, fuzzy, no-c-format
+msgid ""
+"The <literal><clustered>True</clustered></literal> element is "
+"really just an alias for the <literal><configuration-name>Clustered "
+"Stateless SessionBean</configuration-name></literal> element in the "
+"conf/standard-jboss.xml file."
+msgstr ""
+"<literal><clustered>True</clustered></literal> 元素实际上是 "
+"<literal><configuration-name>Clustered Stateless SessionBean</"
+"configuration-name></literal> 元素的一个别名。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:26
+#, fuzzy, no-c-format
+msgid ""
+"In the bean configuration, only the <clustered> element is mandatory. "
+"It indicates that the bean needs to support clustering features. The <"
+"cluster-config> element is optional and the default values of its "
+"attributes are indicated in the sample configuration above. Below is a "
+"description of the attributes in the <cluster-config> element.."
+msgstr ""
+"在 bean 配置里,只有 <literal><clustered></literal> 元素是强制的。它指"
+"出这个 bean 在群集里运行。<literal><cluster-config></literal> 元素是可"
+"选的,我们在上面的配置样本里指出了它的缺省值。下面是关于 <literal><"
+"cluster-config></literal> 元素里属性的描述。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:29
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">partition-name</emphasis> specifies the name of the "
+"cluster the bean participates in. The default value is "
+"<literal>DefaultPartition</literal>. The default partition name can also be "
+"set system-wide using the <literal>jboss.partition.name</literal> system "
+"property."
+msgstr ""
+"<emphasis role=\"bold\">partition-name</emphasis> 指定 bean 所参与的群集名。"
+"它的缺省值是 <literal>DefaultPartition</literal>。缺省的分区名也可以用 "
+"<literal>jboss.partition.name</literal> 系统属性跨系统地被指定。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:35
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">home-load-balance-policy</emphasis> indicates the "
+"class to be used by the home stub to balance calls made on the nodes of the "
+"cluster. By default, the proxy will load-balance calls in a "
+"<literal>RoundRobin</literal> fashion. You can also implement your own load-"
+"balance policy class or use the class <literal>FirstAvailable</literal> that "
+"persists to use the first node available that it meets until it fails."
+msgstr ""
+"<emphasis role=\"bold\">home-load-balance-policy</emphasis> 指出 home stub 所"
+"用来平衡节点上的调用的类。在缺省情况下,代理(proxy)会用 "
+"<literal>RoundRobin</literal> 方式平衡调用负载。你也可以实现自己的负载平衡策"
+"略类或持续使用所遇到的第一个可用节点直至其消亡的 <literal>FirstAvailable</"
+"literal> 类。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:42
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bean-load-balance-policy</emphasis> Indicates the "
+"class to be used by the bean stub to balance calls made on the nodes of the "
+"cluster. Comments made for the <literal>home-load-balance-policy</literal> "
+"attribute also apply."
+msgstr ""
+"<emphasis role=\"bold\">bean-load-balance-policy</emphasis>指出 home stub 所"
+"使用的平衡节点上的调用的类。对于 <literal>home-load-balance-policy</literal> "
+"属性的注释也同样适用。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:51
+#, no-c-format
+msgid "Stateful Session Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Stateful Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:52
+#, no-c-format
+msgid ""
+"Clustering stateful session beans is more complex than clustering their "
+"stateless counterparts since JBoss needs to manage the state information. "
+"The state of all stateful session beans are replicated and synchronized "
+"across the cluster each time the state of a bean changes. The JBoss AS uses "
+"the <literal>HASessionState</literal> MBean to manage distributed session "
+"states for clustered EJB 2.x stateful session beans. In this section, we "
+"cover both the session bean configuration and the <literal>HASessionState</"
+"literal> MBean configuration."
+msgstr ""
+"既然 JBoss 需要管理状态信息,群集 stateful session beans 就比群集 stateles "
+"ssession beans 更为复杂。当 stateful session beans 的状态改变时,所有状态在群"
+"集中复制和同步。JBoss AS 使用 <literal>HASessionState</literal> MBean 来为群"
+"集的 EJB 2.x stateful session beans 管理分布式的会话状态。在这部分内容里,我"
+"们将介绍 session bean 的配置和 <literal>HASessionState</literal> MBean 的配"
+"置。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:59
+#, no-c-format
+msgid "The EJB application configuration"
+msgstr "EJB 应用程序配置"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:60
+#, no-c-format
+msgid ""
+"In the EJB application, you need to modify the <literal>jboss.xml</literal> "
+"descriptor file for each stateful session bean and add the <literal><"
+"clustered></literal> tag."
+msgstr ""
+"在 EJB 应用程序里,你需要为每个 stateful session bean 修改 <literal>jboss."
+"xml</literal> 描述符文件并加入 <literal><clustered></literal> 标签。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:62
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:63
+#, no-c-format
+msgid ""
+"In the bean configuration, only the <literal><clustered></literal> tag "
+"is mandatory to indicate that the bean works in a cluster. The <literal><"
+"cluster-config></literal> element is optional and its default attribute "
+"values are indicated in the sample configuration above."
+msgstr ""
+"在 bean 的配置文件里,只有 <literal><clustered></literal> 标签是强制"
+"的,它指出 bean 处在群集系统里。<literal><cluster-config></literal> 元"
+"素是可选的,我们在上面的配置文件样本里指出了它的缺省属性值。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:67
+#, no-c-format
+msgid ""
+"The <literal><session-state-manager-jndi-name></literal> tag is used "
+"to give the JNDI name of the <literal>HASessionState</literal> service to be "
+"used by this bean."
+msgstr ""
+"<literal><session-state-manager-jndi-name></literal> 标签用来说明这个 "
+"bean 所用的 <literal>HASessionState</literal> 服务的名字。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:69
+#, no-c-format
+msgid ""
+"The description of the remaining tags is identical to the one for stateless "
+"session bean. Actions on the clustered stateful session bean's home "
+"interface are by default load-balanced, round-robin. Once the bean's remote "
+"stub is available to the client, calls will not be load-balanced round-robin "
+"any more and will stay \"sticky\" to the first node in the list."
+msgstr ""
+"余下的标签的描述和 stateless session bean 的描述是一样的。群集的 stateful "
+"session bean 的主接口上的动作缺省是基于 round-robin 负载平衡策略的。一旦 "
+"bean 的 remote stub 对于客户可用时,调用将不会再进行负载平衡而\"粘"
+"\"(sticky)在列表里的第一个节点上。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:75
+#, no-c-format
+msgid "Optimize state replication"
+msgstr "优化状态复制"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:76
+#, no-c-format
+msgid ""
+"As the replication process is a costly operation, you can optimise this "
+"behaviour by optionally implementing in your bean class a method with the "
+"following signature:"
+msgstr ""
+"因为复制过程是很消耗资源的,为了优化这个过程,你可以选择性地在你的 bean 类里"
+"实现有下面的签名的方法:"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:78
+#, no-c-format
+msgid "public boolean isModified ();"
+msgstr "public boolean isModified ();"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:79
+#, no-c-format
+msgid ""
+"Before replicating your bean, the container will detect if your bean "
+"implements this method. If your bean does, the container calls the "
+"<literal>isModified()</literal> method and it only replicates the bean when "
+"the method returns <literal>true</literal>. If the bean has not been "
+"modified (or not enough to require replication, depending on your own "
+"preferences), you can return <literal>false</literal> and the replication "
+"would not occur. This feature is available on JBoss AS 3.0.1+ only."
+msgstr ""
+"在复制你的 bean 之前,容器(container)将检测 bean 是否实现了这个方法。如果"
+"是,容器会调用 <literal>isModified()</literal> 方法并只在方法返回 "
+"<literal>true</literal> 时复制这个 bean。如果 bean 还没被更改(或者还不够来请"
+"求复制,这取决于你的喜好,你可以返回 <literal>false</literal>,这样复制就不会"
+"发生。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:87
+#, no-c-format
+msgid "The HASessionState service configuration"
+msgstr "HASessionState 服务配置"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:88
+#, no-c-format
+msgid ""
+"The <literal>HASessionState</literal> service MBean is defined in the "
+"<code>all/deploy/cluster-service.xml</code> file."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:90
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
+" name=\"jboss:service=HASessionState\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends> \n"
+" <!-- We now inject the partition into the HAJNDI service instead \n"
+" of requiring that the partition name be passed --> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends>\n"
+" <!-- JNDI name under which the service is bound -->\n"
+" <attribute name=\"JndiName\">/HASessionState/Default</attribute>\n"
+" <!-- Max delay before cleaning unreclaimed state.\n"
+"Defaults to 30*60*1000 => 30 minutes -->\n"
+"<attribute name=\"BeanCleaningDelay\">0</attribute>\n"
+"</mbean> ]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
+" name=\"jboss:service=HASessionState\">\n"
+" <depends>\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends>\n"
+" <!-- Name of the partition to which the service is linked -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+" <!-- JNDI name under which the service is bound -->\n"
+" <attribute name=\"JndiName\">/HASessionState/Default</"
+"attribute>\n"
+" <!-- Max delay before cleaning unreclaimed state.\n"
+" Defaults to 30*60*1000 => 30 minutes -->\n"
+" <attribute name=\"BeanCleaningDelay\">0</attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:92
+#, no-c-format
+msgid ""
+"The configuration attributes in the <literal>HASessionState</literal> MBean "
+"are listed below."
+msgstr "<literal>HASessionState</literal> MBean 里的配置属性如下所示:"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:95
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterPartition</emphasis> is a required attribute "
+"to inject the HAPartition service that HA-JNDI uses for intra-cluster "
+"communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:100
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis> is an optional attribute to "
+"specify the JNDI name under which this <literal>HASessionState</literal> "
+"service is bound. The default value is <literal>/HAPartition/Default</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">JndiName</emphasis> 是一个可选属性,它指定这个 "
+"<literal>HASessionState</literal> 服务被绑定的 JNDI 名。它的缺省值是 "
+"<literal>/HAPartition/Default</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:106
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BeanCleaningDelay</emphasis> is an optional "
+"attribute to specify the number of miliseconds after which the "
+"<literal>HASessionState</literal> service can clean a state that has not "
+"been modified. If a node, owning a bean, crashes, its brother node will take "
+"ownership of this bean. Nevertheless, the container cache of the brother "
+"node will not know about it (because it has never seen it before) and will "
+"never delete according to the cleaning settings of the bean. That is why the "
+"<literal>HASessionState</literal> service needs to do this cleanup "
+"sometimes. The default value is <literal>30*60*1000</literal> milliseconds "
+"(i.e., 30 minutes)."
+msgstr ""
+"<emphasis role=\"bold\">BeanCleaningDelay</emphasis> 是一个可选属性,它指定了"
+"一个状态在多久没有变化后 <literal>HASessionState</literal> 服务就可以清除它,"
+"它的单位是毫秒。例如,如果拥有某一 bean 的节点崩溃了,它的兄弟节点将接管这个 "
+"bean。但是,这个兄弟节点的容器缓存并不会知道这个信息(因为之前并没有这个信"
+"息),也永远不会按照这个 bean 的清除设置来删除它。这就是为什么 "
+"<literal>HASessionState</literal> 服务需要来做这个清除工作。它的缺省值是 "
+"<literal>30*60*1000</literal> 毫秒(也就是 30 分钟)。"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:117
+#, fuzzy, no-c-format
+msgid "Handling Cluster Restart"
+msgstr "处理群集系统重启"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:118
+#, fuzzy, no-c-format
+msgid ""
+"We have covered the HA smart client architecture in the section called "
+"“Client-side interceptor architecture”. The default HA smart proxy client "
+"can only failover as long as one node in the cluster exists. If there is a "
+"complete cluster shutdown, the proxy becomes orphaned and loses knowledge of "
+"the available nodes in the cluster. There is no way for the proxy to recover "
+"from this. The proxy needs to look up a fresh set of targets out of JNDI/"
+"HAJNDI when the nodes are restarted."
+msgstr ""
+"我们已经在 <xref linkend=\"clustering-intro-arch-proxy\"/> 介绍了 HA smart "
+"client architecture。缺省的 HA smart proxy client 只能在群集里一个节点故障时"
+"进行失效切换(failover)。如果整个群集都关闭了,代理(proxy)将失去所有群集里"
+"可用节点的信息。在这种情况下,代理没有什么办法来恢复系统。当节点重启时,需要"
+"在 JNDI/HAJNDI 之外查找代理。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:121
+#, fuzzy, no-c-format
+msgid ""
+"The 3.2.7+/4.0.2+ releases contain a RetryInterceptor that can be added to "
+"the proxy client side interceptor stack to allow for a transparent recovery "
+"from such a restart failure. To enable it for an EJB, setup an invoker-proxy-"
+"binding that includes the RetryInterceptor. Below is an example jboss.xml "
+"configuration."
+msgstr ""
+"3.2.7+/4.0.2+ 版本包含了 <literal>RetryInterceptor</literal>,它可以加入到代"
+"理客户端拦截器栈里,允许在这样的重启故障后进行透明恢复(transparent "
+"recovery)。为了启用这个机制,你可以设立包含 <literal>RetryInterceptor</"
+"literal> 的 <literal>invoker-proxy-binding</literal>。下面是 <literal>jboss."
+"xml</literal> 配置的一个示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:124
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+" \n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding> ]]>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:128
+#, no-c-format
+msgid "JNDI Lookup Process"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:129
+#, no-c-format
+msgid ""
+"In order to recover the HA proxy, the RetryInterceptor does a lookup in "
+"JNDI. This means that internally it creates a new InitialContext and does a "
+"JNDI lookup. But, for that lookup to succeed, the InitialContext needs to be "
+"configured properly to find your naming server. The RetryInterceptor will go "
+"through the following steps in attempting to determine the proper naming "
+"environment properties:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:133
+#, no-c-format
+msgid ""
+"It will check its own static retryEnv field. This field can be set by client "
+"code via a call to RetryInterceptor.setRetryEnv(Properties). This approach "
+"to configuration has two downsides: first, it reduces portability by "
+"introducing JBoss-specific calls to the client code; and second, since a "
+"static field is used only a single configuration per JVM is possible."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:138
+#, no-c-format
+msgid ""
+"If the retryEnv field is null, it will check for any environment properties "
+"bound to a ThreadLocal by the org.jboss.naming.NamingContextFactory class. "
+"To use this class as your naming context factory, in your jndi.properties "
+"set property java.naming.factory.initial=org.jboss.naming."
+"NamingContextFactory. The advantage of this approach is use of org.jboss."
+"naming.NamingContextFactory is simply a configuration option in your jndi."
+"properties file, and thus your java code is unaffected. The downside is the "
+"naming properties are stored in a ThreadLocal and thus are only visible to "
+"the thread that originally created an InitialContext."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:143
+#, no-c-format
+msgid ""
+"If neither of the above approaches yield a set of naming environment "
+"properties, a default InitialContext is used. If the attempt to contact a "
+"naming server is unsuccessful, by default the InitialContext will attempt to "
+"fall back on multicast discovery to find an HA-JNDI naming server. See the "
+"section on “ClusteredJNDI Services” for more on multicast discovery of HA-"
+"JNDI."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:152
+#, no-c-format
+msgid "SingleRetryInterceptor"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:153
+#, no-c-format
+msgid ""
+"The RetryInterceptor is useful in many use cases, but a disadvantage it has "
+"is that it will continue attempting to re-lookup the HA proxy in JNDI until "
+"it succeeds. If for some reason it cannot succeed, this process could go on "
+"forever, and thus the EJB call that triggered the RetryInterceptor will "
+"never return. For many client applications, this possibility is "
+"unacceptable. As a result, JBoss doesn't make the RetryInterceptor part of "
+"its default client interceptor stacks for clustered EJBs."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:156
+#, no-c-format
+msgid ""
+"In the 4.0.4.RC1 release, a new flavor of retry interceptor was introduced, "
+"the org.jboss.proxy.ejb.SingleRetryInterceptor. This version works like the "
+"RetryInterceptor, but only makes a single attempt to re-lookup the HA proxy "
+"in JNDI. If this attempt fails, the EJB call will fail just as if no retry "
+"interceptor was used. Beginning with 4.0.4.CR2, the SingleRetryInterceptor "
+"is part of the default client interceptor stacks for clustered EJBs."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:159
+#, no-c-format
+msgid ""
+"The downside of the SingleRetryInterceptor is that if the retry attempt is "
+"made during a portion of a cluster restart where no servers are available, "
+"the retry will fail and no further attempts will be made."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:169
+#, no-c-format
+msgid "Stateless Session Bean in EJB 3.0"
+msgstr "EJB 3.0 里的 Stateless Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:170
+#, fuzzy, no-c-format
+msgid ""
+"To cluster a stateless session bean in EJB 3.0, all you need to do is to "
+"annotate the bean class withe the <literal>@Clustered</literal> annotation. "
+"You can pass in the load balance policy and cluster partition as parameters "
+"to the annotation. The default load balance policy is <literal>org.jboss.ha."
+"framework.interfaces.RandomRobin</literal> and the default cluster is "
+"<literal>DefaultPartition</literal>. Below is the definition of the "
+"<literal>@Cluster</literal> annotation."
+msgstr ""
+"要在 EJB 3.0 内群集一个 stateless session bean,你所需要做的就是用 "
+"<literal>@Cluster</literal> 注解来注解(annotate)bean 类。你可以把负载平衡策"
+"略(load balance policy)和群集分区名当作参数传入这个注解。缺省的负载平衡策略"
+"是 <literal>org.jboss.ha.framework.interfaces.RandomRobin</literal>,缺省的群"
+"集是 <literal>DefaultPartition</literal>。下面是 <literal>@Cluster</literal> "
+"注解的定义。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:176
+#, fuzzy, no-c-format
+msgid ""
+"public @interface Clustered {\n"
+" Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
+" String partition() default \"${jboss.partition.name:DefaultPartition}"
+"\";\n"
+"}"
+msgstr ""
+"public @interface Clustered {\n"
+" Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
+" String partition() default \"DefaultPartition\";\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:177
+#, no-c-format
+msgid ""
+"Here is an example of a clustered EJB 3.0 stateless session bean "
+"implementation."
+msgstr "这里是一个群集的 EJB 3.0 stateless session bean 实现的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:178
+#, no-c-format
+msgid ""
+"@Stateless\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" public void test() {\n"
+" // Do something cool\n"
+" }\n"
+"}"
+msgstr ""
+"@Stateless\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" public void test() {\n"
+" // Do something cool\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:179
+#, no-c-format
+msgid ""
+"The <literal>@Clustered</literal> annotation can also be omitted and the "
+"clustering configuration applied in jboss.xml:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:182
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>NonAnnotationStateful</ejb-name>\n"
+" <clustered>true</clustered>\n"
+" <cluster-config>\n"
+" <partition-name>FooPartition</partition-name>\n"
+" <load-balance-policy>\n"
+" org.jboss.ha.framework.interfaces.RandomRobin\n"
+" </load-balance-policy>\n"
+" </cluster-config>\n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss> ]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_EJBs.xml:187
+#, fuzzy, no-c-format
+msgid "Stateful Session Beans in EJB 3.0"
+msgstr "EJB 3.0 里的 Stateful Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:188
+#, fuzzy, no-c-format
+msgid ""
+"To cluster stateful session beans in EJB 3.0, you need to tag the bean "
+"implementation class with the <literal>@Cluster</literal> annotation, just "
+"as we did with the EJB 3.0 stateless session bean earlier. The @org.jboss."
+"ejb3.annotation.cache.tree.CacheConfig annotation can also be applied to the "
+"bean to specify caching behavior. Below is the definition of the "
+"@CacheConfig annotation:"
+msgstr ""
+"为了在 EJB 3.0 里群集 stateful session beans,你需要用 <literal>@Cluster</"
+"literal> 注解来标记 bean 实现类,就和我们之前对 EJB 3.0 stateless session "
+"bean 做的一样。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:193
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"public @interface CacheConfig\n"
+"{\n"
+"String name() default \"jboss.cache:service=EJB3SFSBClusteredCache\";\n"
+"int maxSize() default 10000;\n"
+"long idleTimeoutSeconds() default 300; \n"
+"boolean replicationIsPassivation() default true; \n"
+"long removalTimeoutSeconds() default 0;\n"
+"} ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:196
+#, no-c-format
+msgid ""
+"<literal>name</literal> specifies the object name of the JBoss Cache Mbean "
+"that should be used for caching the bean (see below for more on this Mbean)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:198
+#, no-c-format
+msgid ""
+"<literal>maxSize</literal> specifies the maximum number of beans that can "
+"cached before the cache should start passivating beans, using an LRU "
+"algorithm."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:200
+#, no-c-format
+msgid ""
+"<literal>idleTimeoutSeconds</literal> specifies the max period of time a "
+"bean can go unused before the cache should passivate it (irregardless of "
+"whether maxSize beans are cached.)"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:202
+#, no-c-format
+msgid ""
+"<literal>removalTimeoutSeconds</literal> specifies the max period of time a "
+"bean can go unused before the cache should remove it altogether."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:204
+#, no-c-format
+msgid ""
+"<literal>replicationIsPassivation</literal> specifies whether the cache "
+"should consider a replication as being equivalent to a passivation, and "
+"invoke any @PrePassivate and @PostActivate callbacks on the bean. By default "
+"true, since replication involves serializing the bean, and preparing for and "
+"recovering from serialization is a common reason for implementing the "
+"callback methods."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:209
+#, fuzzy, no-c-format
+msgid ""
+"Here is an example of a clustered EJB 3.0 stateful session bean "
+"implementation."
+msgstr "这里是一个群集的 EJB 3.0 stateless session bean 实现的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:216
+#, fuzzy, no-c-format
+msgid ""
+"@Stateful\n"
+"@Clustered\n"
+"@CacheConfig(maxSize=5000,removalTimeoutSeconds=18000)\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" private int state = 0;\n"
+"\n"
+" public void increment() {\n"
+" System.out.println(\"counter: \" + (state++));\n"
+" }\n"
+"}"
+msgstr ""
+"@Stateful\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" private int state = 0;\n"
+"\n"
+" public void increment() {\n"
+" System.out.println(\"counter: \" + (state++));\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:218
+#, no-c-format
+msgid ""
+"As with stateless beans, the @Clustered annotation can also be omitted and "
+"the clustering configuration applied in jboss.xml; see the example above."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:221
+#, no-c-format
+msgid ""
+"As with EJB 2.0 clustered SFSBs, JBoss provides a mechanism whereby a bean "
+"implementation can expose a method the container can invoke to check whether "
+"the bean's state is not dirty after a request and doesn't need to be "
+"replicated. With EJB3, the mechanism is a little more formal; instead of "
+"just exposing a method with a known signature, an EJB3 SFSB must implement "
+"the org.jboss.ejb3.cache.Optimized interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:224
+#, fuzzy, no-c-format
+msgid ""
+"public interface Optimized {\n"
+"boolean isModified();\n"
+"}"
+msgstr "public boolean isModified ();"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:226
+#, no-c-format
+msgid ""
+"JBoss Cache provides the session state replication service for EJB 3.0 "
+"stateful session beans. The related MBean service is defined in the "
+"<literal>ejb3-clustered-sfsbcache-service.xml</literal> file in the "
+"<literal>deploy</literal> directory. The contents of the file are as follows."
+msgstr ""
+"JBoss Cache 为 EJB 3.0 stateful session beans 提供会话状态复制服务(session "
+"state replication service)。<literal>deploy</literal> 目录下 <literal>ejb3-"
+"clustered-sfsbcache-service.xml</literal> 文件定义了相关的 MBean 服务。文件的"
+"内容如下:"
+
+#. Tag: programlisting
+#: Clustering_Guide_EJBs.xml:229
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server>\n"
+" <mbean code=\"org.jboss..cache.TreeCache\"\n"
+" name=\"jboss.cache:service=EJB3SFSBClusteredCache\">\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" ${jboss.partition.name:DefaultPartition}-SFSBCache\n"
+" </attribute>\n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</"
+"attribute> \n"
+" \n"
+" <!-- We want to activate/inactivate regions as beans "
+"are deployed --> \n"
+" <attribute name=\"UseRegionBasedMarshalling\">true</"
+"attribute> \n"
+" <!-- Must match the value of "
+"\"useRegionBasedMarshalling\" --> \n"
+" <attribute name=\"InactiveOnStartup\">true</"
+"attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute> \n"
+" \n"
+" <!-- The max amount of time (in milliseconds) we "
+"wait until the \n"
+" initial state (ie. the contents of the cache) are "
+"retrieved from \n"
+" existing members. --> \n"
+" <attribute name=\"InitialStateRetrievalTimeout"
+"\">17500</attribute>\n"
+" \n"
+" <!-- Number of milliseconds to wait until all "
+"responses for a\n"
+" synchronous call have been received.\n"
+" -->\n"
+" <attribute name=\"SyncReplTimeout\">17500</"
+"attribute>\n"
+" \n"
+" <!-- Max number of milliseconds to wait for a lock "
+"acquisition -->\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+" \n"
+" <!-- Name of the eviction policy class. -->\n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+" \n"
+" <!-- Specific eviction policy configurations. This "
+"is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <name>statefulClustered</name> \n"
+" <!-- So default region would never timeout --"
+">\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">0</attribute>\n"
+" <attribute name=\"timeToIdleSeconds\">0</"
+"attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute> \n"
+" \n"
+" <!-- Store passivated sessions to the file system --> \n"
+" <attribute name=\"CacheLoaderConfiguration\"> \n"
+" <config> \n"
+" \n"
+" <passivation>true</passivation> \n"
+" <shared>false</shared> \n"
+" \n"
+" <cacheloader> \n"
+" <class>org.jboss.cache.loader.FileCacheLoader</class> \n"
+" <!-- Passivate to the server data dir --> \n"
+" <properties> \n"
+" location=${jboss.server.data.dir}${/}sfsb \n"
+" </properties> \n"
+" <async>false</async> \n"
+" <fetchPersistentState>true</fetchPersistentState> \n"
+" <ignoreModifications>false</ignoreModifications> \n"
+" </cacheloader> \n"
+" \n"
+" </config> \n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:235
+#, fuzzy, no-c-format
+msgid ""
+"The configuration attributes in this MBean are essentially the same as the "
+"attributes in the standard JBoss Cache <literal>TreeCache</literal> MBean "
+"discussed in <xref linkend=\"jbosscache.chapt\"/>. Again, we omitted the "
+"JGroups configurations in the <literal>ClusterConfig</literal> attribute "
+"(see more in <xref linkend=\"jbosscache-jgroups\"/>). Two noteworthy items:"
+msgstr ""
+"<literal>PassivationTreeCache</literal> MBean 里的配置属性基本上和在 <xref "
+"linkend=\"jbosscache.chapt\"/> 里讨论的标准 JBoss Cache <literal>TreeCache</"
+"literal> MBean 一样。我们再一次忽略了 <literal>ClusterConfig</literal> 属性"
+"(详情请参考 <xref linkend=\"jbosscache-jgroups\"/>)的 JGroups 配置。"
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:240
+#, no-c-format
+msgid ""
+"The cache is configured to support eviction. The EJB3 SFSB container uses "
+"the JBoss Cache eviction mechanism to manage SFSB passivation. When beans "
+"are deployed, the EJB container will programatically add eviction regions to "
+"the cache, one region per bean type."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_EJBs.xml:244
+#, no-c-format
+msgid ""
+"A JBoss Cache CacheLoader is also configured; again to support SFSB "
+"passivation. When beans are evicted from the cache, the cache loader "
+"passivates them to a persistent store; in this case to the filesystem in the "
+"$JBOSS_HOME/server/all/data/sfsb directory. JBoss Cache supports a variety "
+"of different CacheLoader implementations that know how to store data to "
+"different persistent store types; see the JBoss Cache documentation for "
+"details. However, if you change the CacheLoaderConfiguration, be sure that "
+"you do not use a shared store (e.g., a single schema in a shared database.) "
+"Each node in the cluster must have its own persistent store, otherwise as "
+"nodes independently passivate and activate clustered beans, they will "
+"corrupt each others data."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Entity_EJBs.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Entity_EJBs.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Entity_EJBs.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,929 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:5
+#, no-c-format
+msgid "Clustered Entity EJBs"
+msgstr "群集的 Entity EJBs"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:6
+#, fuzzy, no-c-format
+msgid ""
+"In a JBoss AS cluster, the entity bean instance caches need to be kept in "
+"sync across all nodes. If an entity bean provides remote services, the "
+"service methods need to be load balanced as well."
+msgstr ""
+"在 JBoss AS 群集系统里,entity bean 实例需要跨节点的复制。如果某个 entity "
+"bean 提供远程服务,那么服务方法(service methods)也需要进行负载平衡。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:8
+#, fuzzy, no-c-format
+msgid ""
+"To use a clustered entity bean, the application does not need to do anything "
+"special, except for looking up EJB 2.x remote bean references from the "
+"clustered HA-JNDI."
+msgstr ""
+"为了使用群集的 entity bean,应用程序不需要做任何特殊的事情,除了从群集的 HA-"
+"JNDI 里查找 bean 的引用。"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:10
+#, no-c-format
+msgid "Entity Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Entity Bean"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:11
+#, fuzzy, no-c-format
+msgid ""
+"First of all, it is worth noting that clustering 2.x entity beans is a bad "
+"thing to do. Its exposes elements that generally are too fine grained for "
+"use as remote objects to clustered remote objects and introduces data "
+"synchronization problems that are non-trivial. Do NOT use EJB 2.x entity "
+"bean clustering unless you fit into the sepecial case situation of read-"
+"only, or one read-write node with read-only nodes synched with the cache "
+"invalidation services."
+msgstr ""
+"首先,值得注意的是群集 2.x 的 entity beans 不是件好事。它向群集的远程对象开放"
+"(exposes)通常过于细颗粒度的元素(elements),导致了严重的数据同步问题。除非"
+"你遇到特殊的情况,如只读或者只写的节点和使用缓存失效服务(cache invalidation "
+"services)的只读节点同步,否则不要使用 EJB 2.x entity bean 的群集。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:13
+#, no-c-format
+msgid ""
+"To cluster EJB 2.x entity beans, you need to add the <literal><"
+"clustered></literal> element to the application's <literal>jboss.xml</"
+"literal> descriptor file. Below is a typical <literal>jboss.xml</literal> "
+"file."
+msgstr ""
+"要群集 EJB 2.x entity beans,你需要把 <literal><clustered></literal> 元"
+"素加入到应用程序的 <literal>jboss.xml</literal> 描述符文件里。下面是一个典型"
+"的 <literal>jboss.xml</literal> 文件。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:16
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:17
+#, no-c-format
+msgid ""
+"The EJB 2.x entity beans are clustered for load balanced remote invocations. "
+"All the bean instances are synchronized to have the same contents on all "
+"nodes."
+msgstr ""
+"为了平衡远程调用的负载,我们群集 EJB 2.x entity beans。所有的 bean 实例都实现"
+"同步,具有所有节点上的相同内容。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:19
+#, no-c-format
+msgid ""
+"However, clustered EJB 2.x Entity Beans do not have a distributed locking "
+"mechanism or a distributed cache. They can only be synchronized by using row-"
+"level locking at the database level (see <literal><row-lock></literal> "
+"in the CMP specification) or by setting the Transaction Isolation Level of "
+"your JDBC driver to be <literal>TRANSACTION_SERIALIZABLE</literal>. Because "
+"there is no supported distributed locking mechanism or distributed cache "
+"Entity Beans use Commit Option \"B\" by default (See <literal>standardjboss."
+"xml</literal> and the container configurations Clustered CMP 2.x EntityBean, "
+"Clustered CMP EntityBean, or Clustered BMP EntityBean). It is not "
+"recommended that you use Commit Option \"A\" unless your Entity Bean is read-"
+"only. (There are some design patterns that allow you to use Commit Option \"A"
+"\" with read-mostly beans. You can also take a look at the Seppuku pattern "
+"<ulink url=\"http://dima.dhs.org/misc/readOnlyUpdates.html\"></ulink>. JBoss "
+"may incorporate this pattern into later versions.)"
+msgstr ""
+"然而,群集的 EJB 2.x Entity Beans 没有分布式的锁定机制或是缓存。它们只能用数"
+"据库层面的行级锁定(请参考 CMP 规范的<literal><row-lock></literal>)或"
+"是把 JDBC 驱动的事务隔离(Transaction Isolation)级别设为 "
+"<literal>TRANSACTION_SERIALIZABLE</literal> 来实现同步。因为缺乏分布式的锁定"
+"机制或是缓存支持,Entity Beans 缺省使用提交选项 \"B\"(请参考 "
+"<literal>standardjboss.xml</literal> 和 the container configurations "
+"Clustered CMP 2.x EntityBean,Clustered CMP EntityBean,或 Clustered BMP "
+"EntityBean)。我们不推荐你使用提交选项 \"A\",除非你的 Entity Bean 是只读的。"
+"(有些设计模式允许你把提交选项\"A\" 用于 read-mostly beans。你也可以看看 "
+"Seppuku 模式:<ulink url=\"http://dima.dhs.org/misc/readOnlyUpdates.html\"></"
+"ulink>。JBoss 有可能把这个模式集成到以后的版本里。)"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:31
+#, no-c-format
+msgid ""
+"If you are using Bean Managed Persistence (BMP), you are going to have to "
+"implement synchronization on your own. The MVCSoft CMP 2.0 persistence "
+"engine (see <ulink url=\"http://www.jboss.org/jbossgroup/partners.jsp\"></"
+"ulink>) provides different kinds of optimistic locking strategies that can "
+"work in a JBoss cluster."
+msgstr ""
+"如果你正在使用 Bean Managed Persistence (BMP),你将不得不实现自己的同步机"
+"制。MVCSoft CMP 2.0 持久化引擎(persistence engine)(请参考 <ulink url="
+"\"http://www.jboss.org/jbossgroup/partners.jsp\"></ulink>)提供可以在 JBoss "
+"群集里使用的各种优化锁定策略。"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:37
+#, no-c-format
+msgid "Entity Bean in EJB 3.0"
+msgstr "EJB 3.0 里的 Entity Bean"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:39
+#, no-c-format
+msgid ""
+"In EJB 3.0, the entity beans primarily serve as a persistence data model. "
+"They do not provide remote services. Hence, the entity bean clustering "
+"service in EJB 3.0 primarily deals with distributed caching and replication, "
+"instead of load balancing."
+msgstr ""
+"在 EJB 3.0 里,entity beans 主要以持久化数据模型出现。它们不提供远程服务。因"
+"此,EJB 3.0 里的 entity bean 群集服务主要处理分布式缓存和复制,而不是负载平"
+"衡。"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:45
+#, no-c-format
+msgid "Configure the distributed cache"
+msgstr "配置分布式缓存"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:46
+#, fuzzy, no-c-format
+msgid ""
+"To avoid round trips to the database, you can use a cache for your entities. "
+"JBoss EJB 3.0 entity beans are implemented by Hibernate, which has support "
+"for a second-level cache. The Hibernate setup used for the JBoss EJB 3.0 "
+"implementation uses JBoss Cache as its underlying second-level cache "
+"implementation. The second-level cache provides the following "
+"functionalities."
+msgstr ""
+"为了避免多次访问数据库,你可以为你的 entities 使用缓存。JBoss EJB 3.0 是用 "
+"Hibernate 实现的,它支持两级缓存。用于 JBoss EJB 3.0 实现的 Hibernate setup "
+"把 JBoss Cache 当作底层缓存实现使用。这个缓存提供了下面的功能:"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:49
+#, no-c-format
+msgid ""
+"If you persist a cache enabled entity bean instance to the database via the "
+"entity manager the entity will inserted into the cache."
+msgstr ""
+"如果你通过 entity manager 来使应用缓存的 entity bean 的实例持久化,这个 "
+"entity 会被储存到缓存里。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:53
+#, no-c-format
+msgid ""
+"If you update an entity bean instance and save the changes to the database "
+"via the entity manager the entity will updated in the cache."
+msgstr ""
+"如果你通过 entity manager 更新 entity bean 实例并把更改保存到数据库里,缓存里"
+"的这个 entity 将被更新。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:57
+#, no-c-format
+msgid ""
+"If you remove an entity bean instance from the database via the entity "
+"manager the entity will removed from the cache."
+msgstr ""
+"如果你通过 entity manager 把 entity bean 实例从数据库里删除,这个 entity 也将"
+"从缓存里删除。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:61
+#, no-c-format
+msgid ""
+"If loading a cached entity from the database via the entity manager, and "
+"that entity does not exist in the database, it will be inserted into the "
+"cache."
+msgstr ""
+"如果你通过 entity manager 从数据库里载入缓存的 entity,而这个这个 entity 并不"
+"在缓存里,这个 entity 会被插入到缓存里。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:65
+#, fuzzy, no-c-format
+msgid ""
+"The JBoss Cache service for EJB 3.0 entity beans is configured in a "
+"<literal>TreeCache</literal> MBean in the <literal>deploy/ejb3-entity-cache-"
+"service.xml</literal> file. The name of the cache MBean service is "
+"<literal>jboss.cache:service=EJB3EntityTreeCache</literal>. Below are the "
+"contents of the <literal>ejb3-entity-cache-service.xml</literal> file in the "
+"standard JBoss distribution. Again, we omitted the JGroups configuration "
+"element <literal>ClusterConfig</literal>."
+msgstr ""
+"JEJB 3.0 entity beans 采用的 Boss Cache 服务在 <literal>deploy/ejb3-entity-"
+"cache-service.xml</literal> 文件里的 <literal>TreeCache</literal> MBean(请参"
+"考<xref linkend=\"jbosscache-cache\"/>) 里被配置。缓存 MBean 服务名是"
+"<literal>jboss.cache:service=EJB3EntityTreeCache</literal>。下面是标准 JBoss "
+"发行版本里的 <literal>ejb3-entity-cache-service.xml</literal> 文件的内容。我"
+"们再次忽略了 JGroups 的配置元素 <literal>ClusterConfig</literal>。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:71
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <server>\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends> \n"
+" \n"
+" <!-- Name of cluster. Needs to be the same on all nodes in the clusters, \n"
+" in order to find each other --> \n"
+" <attribute name=\"ClusterName\">\n"
+" ${jboss.partition.name:DefaultPartition}-EntityCache\n"
+" </attribute>\n"
+" \n"
+" <!-- Configure the TransactionManager -->\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.JBossTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</attribute>\n"
+" <attribute name=\"CacheMode\">REPL_SYNC</attribute> \n"
+" \n"
+" <!-- Must be true if any entity deployment uses a scoped "
+"classloader --> \n"
+" <attribute name=\"UseRegionBasedMarshalling\">true</attribute> \n"
+" <!-- Must match the value of \"useRegionBasedMarshalling\" --> \n"
+" <attribute name=\"InactiveOnStartup\">true</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"InitialStateRetrievalTimeout\">17500</attribute>\n"
+" <attribute name=\"SyncReplTimeout\">17500</attribute>\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</attribute>\n"
+" \n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+" \n"
+" <!-- Specific eviction policy configurations. This is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>\n"
+"]]>"
+msgstr ""
+"<server>\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+"\n"
+" <!-- Configure the TransactionManager -->\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.JBossTransactionManagerLookup\n"
+" </attribute>\n"
+"\n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" <attribute name=\"CacheMode\">REPL_SYNC</attribute>\n"
+"\n"
+" <!--Name of cluster. Needs to be the same for all clusters, \n"
+" in order to find each other -->\n"
+" <attribute name=\"ClusterName\">EJB3-entity-cache</"
+"attribute>\n"
+"\n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"\n"
+" <attribute name=\"InitialStateRetrievalTimeout\">5000</"
+"attribute>\n"
+" <attribute name=\"SyncReplTimeout\">10000</attribute>\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"\n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+"\n"
+" <!-- Specific eviction policy configurations. This is LRU --"
+">\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:73
+#, fuzzy, no-c-format
+msgid ""
+"This is a replicated cache, so, if running within a cluster, and the cache "
+"is updated, changes to the entries in one node will be replicated to the "
+"corresponding entries in the other nodes in the cluster."
+msgstr ""
+"正如我们在 <xref linkend=\"jbosscache-cache\"/> 所讨论的,JBoss Cache 允许你"
+"指定缓存的 entities 的超时时间。在某个时段内没有被访问的 entities 将从缓存里"
+"删除,这样可以节省内存。如果这个缓存是在群集里运行,那么它会被更新。对某个节"
+"点的 entries 的改动都会复制到群集里其他节点的相应条目里。"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:76
+#, no-c-format
+msgid ""
+"JBoss Cache allows you to specify timeouts to cached entities. Entities not "
+"accessed within a certain amount of time are dropped from the cache in order "
+"to save memory. The above configuration sets up a default configuration "
+"region that says that at most the cache will hold 5000 nodes, after which "
+"nodes will start being evicted from memory, least-recently used nodes last. "
+"Also, if any node has not been accessed within the last 1000 seconds, it "
+"will be evicted from memory. In general, a node in the cache represents a "
+"cached item (entity, collection, or query result set), although there are "
+"also a few other node that are used for internal purposes. If the above "
+"values of 5000 maxNodes and 1000 idle seconds are invalid for your "
+"application(s), you can change the cache-wide defaults. You can also add "
+"separate eviction regions for each of your entities; more on this below."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:80
+#, no-c-format
+msgid ""
+"Now, we have JBoss Cache configured to support distributed caching of EJB "
+"3.0 entity beans. We still have to configure individual entity beans to use "
+"the cache service."
+msgstr ""
+"现在,我们配置了 JBoss Cache 来支持 EJB 3.0 entity beans 的分布式缓存。我们仍"
+"不得不配置单个的 entity bean 来使用这个缓存服务。"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:83
+#, no-c-format
+msgid "Configure the entity beans for cache"
+msgstr "配置 entity beans 的缓存"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:84
+#, no-c-format
+msgid ""
+"You define your entity bean classes the normal way. Future versions of JBoss "
+"EJB 3.0 will support annotating entities and their relationship collections "
+"as cached, but for now you have to configure the underlying hibernate engine "
+"directly. Take a look at the <literal>persistence.xml</literal> file, which "
+"configures the caching options for hibernate via its optional "
+"<literal>property</literal> elements. The following element in "
+"<literal>persistence.xml</literal> defines that caching should be enabled:"
+msgstr ""
+"你用正常方式定义你的 entity bean 类。JBoss EJB 3.0 将来的版本将支持 "
+"annotating entities 和所缓存的它们的关系的集合,但是现在你不得不直接配置底层"
+"的 hibernate 引擎。让我们看看通过可选的 <literal>property</literal> 元素配置 "
+"hibernate 缓存选项的 <literal>persistence.xml</literal> 文件。下面 "
+"<literal>persistence.xml</literal> 里的定义缓存的元素应该被启用:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:90
+#, no-c-format
+msgid ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>"
+msgstr ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:91
+#, fuzzy, no-c-format
+msgid ""
+"The following property element defines the object name of the cache to be "
+"used, i.e., the name of the TreeCache MBean shown above."
+msgstr "下面的属性元素定义了所使用的缓存对象名和 MBean 名。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:92
+#, no-c-format
+msgid ""
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
+"</property>"
+msgstr ""
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
+"</property>"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:93
+#, no-c-format
+msgid ""
+"Finally, you should give a “region_prefix” to this configuration. This "
+"ensures that all cached items associated with this persistence.xml are "
+"properly grouped together in JBoss Cache. The jboss.cache:"
+"service=EJB3EntityTreeCache cache is a shared resource, potentially used by "
+"multiple persistence units. The items cached in that shared cache need to be "
+"properly grouped to allow the cache to properly manage classloading. <"
+"property name=\"hibernate.cache.region_prefix\" value=\"myprefix\"/>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:97
+#, no-c-format
+msgid ""
+"If you do not provide a region prefix, JBoss will automatically provide one "
+"for you, building it up from the name of the EAR (if any) and the name of "
+"the JAR that includes the persistence.xml. For example, a persistence.xml "
+"packaged in foo.ear, bar.jar would be given “foo_ear,bar_jar” as its region "
+"prefix. This is not a particularly friendly region prefix if you need to use "
+"it to set up specialized eviction regions (see below), so specifying your "
+"own region prefix is recommended."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:105
+#, fuzzy, no-c-format
+msgid ""
+"Next we need to configure what entities be cached. The default is to not "
+"cache anything, even with the settings shown above. We use the <literal>@org."
+"hibernate.annotations.Cache</literal> annotation to tag entity beans that "
+"needs to be cached."
+msgstr ""
+"下一步我们需要配置 entities 被缓存的内容。就像上面所展示的样,缺省是什么都不"
+"缓存。我们使用 <literal>@Cache</literal> 注解来标记需要缓存的 entity beans。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:106
+#, fuzzy, no-c-format
+msgid ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Account implements Serializable { \n"
+" // ... ... \n"
+"}"
+msgstr ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Customer implements Serializable { \n"
+" // ... ... \n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:107
+#, fuzzy, no-c-format
+msgid ""
+"A very simplified rule of thumb is that you will typically want to do "
+"caching for objects that rarely change, and which are frequently read. You "
+"can fine tune the cache for each entity bean in the <literal>ejb3-entity-"
+"cache-service.xml</literal> configuration file. For instance, you can "
+"specify the size of the cache. If there are too many objects in the cache, "
+"the cache could evict oldest objects (or least used objects, depending on "
+"configuration) to make room for new objects. Assuming the region_prefix "
+"specified in <literal>persistence.xml</literal> was myprefix, the default "
+"name of the cache region for the <literal>com.mycompany.entities.Account</"
+"literal> entity bean <literal>/myprefix/com/mycompany/entities/Account</"
+"literal>."
+msgstr ""
+"一个简单的原则就是,你应该对很少变动和频繁使用的对象进行缓存.你可以在 "
+"<literal>ejb3-entity-cache-service.xml</literal> 配置文件里为每个 entity "
+"bean 微调缓存设置。例如,你可以指定缓存的大小。如果缓存里的对象太多,缓存有可"
+"能挤掉最老的对象(或者最少用的对象,依你的配置而定)来给新对象留出空间。"
+"<literal>mycompany.Customer</literal> entity bean 的缓存区(cache region)是 "
+"<literal>/mycompany/Customer</literal>。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:109
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account entities -->\n"
+" <region name=\"/myprefix/com/mycompany/entities/"
+"Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" <depends>jboss:service=Naming \n"
+" <depends>jboss:service=TransactionManager \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute> \n"
+" </region> \n"
+" <region name=\"/mycompany/Customer\"> \n"
+" <attribute name=\"maxNodes\">10</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:112
+#, fuzzy, no-c-format
+msgid ""
+"If you do not specify a cache region for an entity bean class, all instances "
+"of this class will be cached in the <literal>/_default</literal> region as "
+"defined above. The @Cache annotation exposes an optional attribute “region” "
+"that lets you specify the cache region where an entity is to be stored, "
+"rather than having it be automatically be created from the fully-qualified "
+"class name of the entity class."
+msgstr ""
+"如果你没有为 entity bean 类指定缓存区(cache region),这个类的所有实例将象上"
+"面定义的一样缓存在 <literal>/_default</literal> 区里。EJB3 <literal>Query</"
+"literal> API 提供了让你在指定的缓存区里保存或载入查询结果(就是 entity beans "
+"的集合)的方法。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:115
+#, fuzzy, no-c-format
+msgid ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+"region=”Account”) \n"
+"public class Account implements Serializable { \n"
+"// ... ... \n"
+"}"
+msgstr ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Customer implements Serializable { \n"
+" // ... ... \n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:116
+#, fuzzy, no-c-format
+msgid "The eviction configuration would then become:"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:117
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" <depends>jboss:service=Naming \n"
+" <depends>jboss:service=TransactionManager \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute> \n"
+" </region> \n"
+" <region name=\"/mycompany/Customer\"> \n"
+" <attribute name=\"maxNodes\">10</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: title
+#: Clustering_Guide_Entity_EJBs.xml:122
+#, no-c-format
+msgid "Query result caching"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:123
+#, no-c-format
+msgid ""
+"The EJB3 Query API also provides means for you to save in the second-level "
+"cache the results (i.e., collections of primary keys of entity beans, or "
+"collections of scalar values) of specified queries. Here we show a simple "
+"example of annotating a bean with a named query, also providing the "
+"Hibernate-specific hints that tells Hibernate to cache the query."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:126
+#, no-c-format
+msgid ""
+"First, in persistence.xml you need to tell Hibernate to enable query caching:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Entity_EJBs.xml:129
+#, no-c-format
+msgid ""
+"<property name=\"hibernate.cache.use_query_cache\" value=\"true\"/>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:130
+#, no-c-format
+msgid ""
+"Next, you create a named query associated with an entity, and tell Hibernate "
+"you want to cache the results of that query:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:133
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"@Entity\n"
+"@Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+"region=”Account”)\n"
+"@NamedQueries({\n"
+"@NamedQuery(name=\"account.bybranch\",\n"
+"query=\"select acct from Account as acct where acct.branch = ?1\",\n"
+"hints={@QueryHint(name=\"org.hibernate.cacheable\",value=\"true"
+"\")}) \n"
+"})\n"
+"public class Account implements Serializable { \n"
+"// ... ... \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:135
+#, no-c-format
+msgid ""
+"The @NamedQueries, @NamedQuery and @QueryHint annotations are all in the "
+"javax.persistence package.See the Hibernate and EJB3 documentation for more "
+"on how to use EJB3 queries and on how to instruct EJB3 to cache queries."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:138
+#, no-c-format
+msgid ""
+"By default, Hibernate stores query results in JBoss Cache in a region named "
+"{region_prefix}/org/hibernate/cache/StandardQueryCache. Based on this, you "
+"can set up separate eviction handling for your query results. So, if the "
+"region prefix were set to myprefix in persistence.xml, you could, for "
+"example, create this sort of eviction handling:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:142
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account "
+"entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes"
+"\">10000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region>\n"
+" <!-- Cache queries for 10 minutes -->\n"
+" <region name=\"/myprefix/org/hibernate/"
+"cache/StandardQueryCache\"> \n"
+" <attribute name=\"maxNodes\">100</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">600</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>\n"
+" ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:144
+#, no-c-format
+msgid ""
+"The @NamedQuery.hints attribute shown above takes an array of vendor-"
+"specific @QueryHints as a value. Hibernate accepts the “org.hibernate."
+"cacheRegion” query hint, where the value is the name of a cache region to "
+"use instead ofthe default /org/hibernate/cache/StandardQueryCache. For "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:147
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" @Entity\n"
+" @Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+" region=”Account”)\n"
+" @NamedQueries({\n"
+" @NamedQuery(name=\"account.bybranch\",\n"
+" query=\"select acct from Account as acct where acct.branch = ?1\",\n"
+" hints={@QueryHint(name=\"org.hibernate.cacheable\",value=\"true\"),\n"
+" @QueryHint(name=”org.hibernate.cacheRegion,value=”Queries”)\n"
+" }) \n"
+" })\n"
+" public class Account implements Serializable { \n"
+" // ... ... \n"
+" }]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Entity_EJBs.xml:148
+#, fuzzy, no-c-format
+msgid "The related eviction configuration:"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: Clustering_Guide_Entity_EJBs.xml:151
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account "
+"entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region>\n"
+" <!-- Cache queries for 10 minutes -->\n"
+" <region name=\"/myprefix/Queries\"> \n"
+" <attribute name=\"maxNodes\">100</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">600</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_HTTP.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_HTTP.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_HTTP.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,1737 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:5
+#, no-c-format
+msgid "HTTP Services"
+msgstr "HTTP 服务"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:6
+#, no-c-format
+msgid ""
+"HTTP session replication is used to replicate the state associated with your "
+"web clients on other nodes of a cluster. Thus, in the event one of your node "
+"crashes, another node in the cluster will be able to recover. Two distinct "
+"functions must be performed:"
+msgstr ""
+"HTTP 会话复制(session replication)用来复制和你在群集里其他节点上的 web 客户"
+"相关的状态。因此,如果其中一个节点崩溃了,群集里的其他节点将能够恢复。有两个"
+"不同的功能必须被执行:"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:11
+#, no-c-format
+msgid "Session state replication"
+msgstr "会话状态复制(Session state replication)"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:14
+#, fuzzy, no-c-format
+msgid "Load-balancing of incoming invocations"
+msgstr "传入调用(incoming invocations)的负载平衡"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:17
+#, fuzzy, no-c-format
+msgid ""
+"State replication is directly handled by JBoss. When you run JBoss in the "
+"<literal>all</literal> configuration, session state replication is enabled "
+"by default. Just configure your web application as distributable in its "
+"<filename>web.xml</filename> (see below), deploy it, and its session state "
+"is automtically replicated across all JBoss instances in the cluster."
+msgstr ""
+"状态复制(State replication)由 JBoss 直接处理。当你在 <literal>all</"
+"literal> 配置里运行 JBoss,会话状态复制缺省是启用的。只要部署了你的 web 应用"
+"程序,它的会话状态就已经复制在群集里的所有 JBoss 实例中了。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:19
+#, fuzzy, no-c-format
+msgid ""
+"However, load-balancing is a different story; it is not handled by JBoss "
+"itself and requires an external load balancer. aThis function could be "
+"provided by specialized hardware switches or routers (Cisco LoadDirector for "
+"example) or by specialized software running on commodity hardware. As a very "
+"common scenario, we will demonstrate how to set up a software load balancer "
+"using Apache httpd and mod_jk."
+msgstr ""
+"然而,负载平衡是不一样的。它不是由 JBoss 自己处理的,它需要额外的软件。我们将"
+"演示怎样设立 Apache 和 mod_jk,这是一个很常见的例子。但这需要专门的硬件开关,"
+"路由器(如 Cisco LoadDirector)或其他专门的软件来执行。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:22
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:24
+#, fuzzy, no-c-format
+msgid ""
+"A load-balancer tracks HTTP requests and, depending on the session to which "
+"the request is linked, it dispatches the request to the appropriate node. "
+"This is called load-balancing with sticky-sessions: once a session is "
+"created on a node, every future request will also be processed by that same "
+"node. Using a load-balancer that supports sticky-sessions but not "
+"configuring your web application for session replication allows you to scale "
+"very well by avoiding the cost of session state replication: each query will "
+"always be handled by the same node. But in case a node dies, the state of "
+"all client sessions hosted by this node (the shopping carts, for example) "
+"will be lost and the clients will most probably need to login on another "
+"node and restart with a new session. In many situations, it is acceptable "
+"not to replicate HTTP sessions because all critical state is stored in a "
+"database. In other situations, losing a client session is not acceptable "
+"and, in this case, session state replication is the price one has to pay."
+msgstr ""
+"负载平衡系统跟踪 HTTP 请求,它依据请求所链接的会话把请求分派给合适的节点。一"
+"旦会话在节点上被创建,将来的每个请求都被同一节点所处理:这被称作使用 sticky-"
+"sessions 的负载平衡系统。使用支持不复制会话的 sticky-sessions 的负载平衡系统"
+"允许你不付出复制状态的代价就可以很好地扩充:每个查询将总是由同一节点来处理。"
+"但是,如果某个节点崩溃了,所有以这个节点为宿主的客户会话状态就将全部丢失(如"
+"购物车),客户很有可能需要登录另外一节点来启动新的会话。在大部分情况下,不复"
+"制 HTTP 会话是可以接受的,因为所有关键状态都存储在数据库里。在丢失客户会话是"
+"不能接受的情况下,采用会话状态复制就是必须付出的代价了。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:26
+#, fuzzy, no-c-format
+msgid "Configuring load balancing using Apache and mod_jk"
+msgstr "配置 Apache 来装载 mod_jk"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:28
+#, fuzzy, no-c-format
+msgid ""
+"Apache is a well-known web server which can be extended by plugging in "
+"modules. One of these modules, mod_jk has been specifically designed to "
+"allow the forwarding of requests from Apache to a Servlet container. "
+"Furthermore, it is also able to load-balance HTTP calls to a set of Servlet "
+"containers while maintaining sticky sessions, which is what is most "
+"interesting for us in this section."
+msgstr ""
+"Apache 是一个很有名的 web 服务器,它可以通过插件来扩展。mod_jk(和最新的 "
+"mod_jk2)已经被特别的设计成可以允许从 Apache 转发请求到 Servlet 容器里。而"
+"且,当维护 sticky sessions 时,它也能够对 Servlet 容器的 HTTP 调用的负载进行"
+"平衡,这正是让我们感兴趣的地方。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:33
+#, no-c-format
+msgid "Download the software"
+msgstr "下载软件"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:34
+#, no-c-format
+msgid ""
+"First of all, make sure that you have Apache installed. You can download "
+"Apache directly from Apache web site at <literal>http://httpd.apache.org/</"
+"literal>. Its installation is pretty straightforward and requires no "
+"specific configuration. As several versions of Apache exist, we advise you "
+"to use version 2.0.x. We will consider, for the next sections, that you have "
+"installed Apache in the <literal>APACHE_HOME</literal> directory."
+msgstr ""
+"首先,确保你已经安装了 Apache。你可以直接从 Apache 网站 <literal>http://"
+"httpd.apache.org/</literal> 下载 Apache。它的安装是非常直接的,不需要任何特殊"
+"的配置。Apache 有好几个版本,我们建议你使用 2.0.x 版本。在下面的内容里,我们"
+"假设你已经把 Apache 安装在 <literal>APACHE_HOME</literal> 目录下了。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:39
+#, no-c-format
+msgid ""
+"Next, download mod_jk binaries. Several versions of mod_jk exist as well. We "
+"strongly advise you to use mod_jk 1.2.x, as both mod_jk and mod_jk2 are "
+"deprecated, unsupported and no further developments are going on in the "
+"community. The mod_jk 1.2.x binary can be downloaded from <literal>http://"
+"www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/</literal>. Rename "
+"the downloaded file to <literal>mod_jk.so</literal> and copy it under "
+"<literal>APACHE_HOME/modules/</literal>."
+msgstr ""
+"其次,下载 mod_jk binaries。它也有几个版本。我们强烈建议你使用 mod_jk 1.2.x,"
+"因为 mod_jk 和 mod_jk2 都已经被取消了,在社区里不再会有后续的开发和支持。你可"
+"以从 <literal>http://www.apache.org/dist/jakarta/tomcat-connectors/jk/"
+"binaries/</literal> 下载 mod_jk 1.2.x binary。把下载的文件改名为 "
+"<literal>mod_jk.so</literal> 并拷贝到 <literal>APACHE_HOME/modules/</"
+"literal> 目录下。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:47
+#, no-c-format
+msgid "Configure Apache to load mod_jk"
+msgstr "配置 Apache 来装载 mod_jk"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:48
+#, no-c-format
+msgid ""
+"Modify APACHE_HOME/conf/httpd.conf and add a single line at the end of the "
+"file:"
+msgstr "在 APACHE_HOME/conf/httpd.conf 文件的最后加入一行:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:49
+#, no-c-format
+msgid ""
+"# Include mod_jk's specific configuration file \n"
+"Include conf/mod-jk.conf"
+msgstr ""
+"# Include mod_jk's specific configuration file \n"
+"Include conf/mod-jk.conf"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:50
+#, no-c-format
+msgid ""
+"Next, create a new file named <literal>APACHE_HOME/conf/mod-jk.conf</"
+"literal>:"
+msgstr ""
+"然后,建立一个叫 <literal>APACHE_HOME/conf/mod-jk.conf</literal> 的文件。"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:51
+#, no-c-format
+msgid ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+" \n"
+"# JkOptions indicates to send SSK KEY SIZE\n"
+"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
+" \n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+" \n"
+"# You can use external file for mount points.\n"
+"# It will be checked for updates each 60 seconds.\n"
+"# The format of the file is: /url=worker\n"
+"# /examples/*=loadbalancer\n"
+"JkMountFile conf/uriworkermap.properties \n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+msgstr ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+" \n"
+"# JkOptions indicates to send SSK KEY SIZE\n"
+"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
+" \n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+" \n"
+"# You can use external file for mount points.\n"
+"# It will be checked for updates each 60 seconds.\n"
+"# The format of the file is: /url=worker\n"
+"# /examples/*=loadbalancer\n"
+"JkMountFile conf/uriworkermap.properties \n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:52
+#, no-c-format
+msgid "Please note that two settings are very important:"
+msgstr "请注意有两个设置非常重要:"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:55
+#, no-c-format
+msgid ""
+"The <literal>LoadModule</literal> directive must reference the mod_jk "
+"library you have downloaded in the previous section. You must indicate the "
+"exact same name with the \"modules\" file path prefix."
+msgstr ""
+"<literal>LoadModule</literal> 指令(directive)必须引用你在前面下载的 mod_jk "
+"库。你必须使用有 \"modules\" 前缀的完全一致的名字。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:60
+#, no-c-format
+msgid ""
+"The <literal>JkMount</literal> directive tells Apache which URLs it should "
+"forward to the mod_jk module (and, in turn, to the Servlet containers). In "
+"the above file, all requests with URL path <literal>/application/*</literal> "
+"are sent to the mod_jk load-balancer. This way, you can configure Apache to "
+"server static contents (or PHP contents) directly and only use the "
+"loadbalancer for Java applications. If you only use mod_jk as a "
+"loadbalancer, you can also forward all URLs (i.e., <literal>/*</literal>) to "
+"mod_jk."
+msgstr ""
+"<literal>JkMount</literal> 指令告诉 Apache 应该把 URLs 转发给哪个 mod_jk 模块"
+"(和 Servlet 容器)。在上面的文件里,所有基于 URL 路径 <literal>/application/"
+"*</literal> 的请求都被发送到 mod_jk 负载平衡系统(load-balancer)。这样的"
+"话,你能够使 Apache 直接处理静态内容 (或 PHP 内容)而只对 Java 应用程序使用"
+"负载平衡系统。如果你只把 mod_jk 当作负载平衡系统使用,你也可以把所有的 URLs "
+"(也就是 <literal>/*</literal>)转发给 mod_jk。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:68
+#, no-c-format
+msgid ""
+"In addition to the <literal>JkMount</literal> directive, you can also use "
+"the <literal>JkMountFile</literal> directive to specify a mount points "
+"configuration file, which contains multiple Tomcat forwarding URL mappings. "
+"You just need to create a <literal>uriworkermap.properties</literal> file in "
+"the <literal>APACHE_HOME/conf</literal> directory. The format of the file is "
+"<literal>/url=worker_name</literal>. To get things started, paste the "
+"following example into the file you created:"
+msgstr ""
+"除了 <literal>JkMount</literal> 指令以外,你也能够用 <literal>JkMountFile</"
+"literal> 指令来指定配置文件的挂载点(mount points),它包含了多重的 Tomcat "
+"forwarding URL mappings。你只需要在 <literal>APACHE_HOME/conf</literal> 目录"
+"下建立一个 <literal>uriworkermap.properties</literal> 文件。文件的格式是 "
+"<literal>/url=worker_name</literal>。首先,把下例拷贝到你创建的文件里:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:74
+#, no-c-format
+msgid ""
+"# Simple worker configuration file\n"
+"\n"
+"# Mount the Servlet context to the ajp13 worker\n"
+"/jmx-console=loadbalancer\n"
+"/jmx-console/*=loadbalancer\n"
+"/web-console=loadbalancer\n"
+"/web-console/*=loadbalancer"
+msgstr ""
+"# Simple worker configuration file\n"
+"\n"
+"# Mount the Servlet context to the ajp13 worker\n"
+"/jmx-console=loadbalancer\n"
+"/jmx-console/*=loadbalancer\n"
+"/web-console=loadbalancer\n"
+"/web-console/*=loadbalancer"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:75
+#, no-c-format
+msgid ""
+"This will configure mod_jk to forward requests to <literal>/jmx-console</"
+"literal> and <literal>/web-console</literal> to Tomcat."
+msgstr ""
+"这将使 mod_jk 把发送到 <literal>/jmx-console</literal> 和 <literal>/web-"
+"console</literal> 的请求转发至 Tomcat。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:77
+#, no-c-format
+msgid ""
+"You will most probably not change the other settings in <literal>mod_jk."
+"conf</literal>. They are used to tell mod_jk where to put its logging file, "
+"which logging level to use and so on."
+msgstr ""
+"你很可能不需要修改 <literal>mod_jk.conf</literal> 里的设置,这些设置用来告诉 "
+"mod_jk 日志文件放在什么地方,使用哪个日志级别等等。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:81
+#, no-c-format
+msgid "Configure worker nodes in mod_jk"
+msgstr "配置 mod_jk 里的 worker 节点"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:82
+#, fuzzy, no-c-format
+msgid ""
+"Next, you need to configure mod_jk workers file <literal>conf/workers."
+"properties</literal>. This file specifies where the different Servlet "
+"containers are located and how calls should be load-balanced across them. "
+"The configuration file contains one section for each target servlet "
+"container and one global section. For a two nodes setup, the file could look "
+"like this:"
+msgstr ""
+"然后,你需要配置 mod_jk 的 workers 文件 <literal>conf/workers.properties</"
+"literal>。这个文件指定不同的 Servlet 容器的存放位置和怎样对它们之间的调用进行"
+"负载平衡。这个配置文件包含了一个全局设置部分以及针对每个目标 Servlet 容器的设"
+"置部分。对于两个节点的设立,这个文件如下所示:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:87
+#, no-c-format
+msgid ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+msgstr ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:88
+#, no-c-format
+msgid ""
+"Basically, the above file configures mod_jk to perform weighted round-robin "
+"load balancing with sticky sessions between two servlet containers (JBoss "
+"Tomcat) node1 and node2 listening on port 8009."
+msgstr ""
+"基本上,上面的配置使 mod_jk 对两个 servlet 容器(JBoss Tomcat)(侦听 8009 端"
+"口的节点 1 和节点 2)之间的 sticky sessions 执行重量级的 round-robin 负载平"
+"衡。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:91
+#, fuzzy, no-c-format
+msgid ""
+"In the <literal>works.properties</literal> file, each node is defined using "
+"the <literal>worker.XXX</literal> naming convention where <literal>XXX</"
+"literal> represents an arbitrary name you choose for each of the target "
+"Servlet containers. For each worker, you must specify the host name (or IP "
+"address) and the port number of the AJP13 connector running in the Servlet "
+"container."
+msgstr ""
+"在 <literal>works.properties</literal> 文件里,每个节点都用 <literal>worker."
+"XXX</literal> 命名规则命名,<literal>XXX</literal> 代表你给其中一个目标 "
+"Servlet 容器选取的任意名字。对于每一个 worker,你必须给出在 Servlet 容器运行"
+"的 AJP13 connector 的主机名(或 IP 地址)和端口号。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:96
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>lbfactor</literal> attribute is the load-balancing factor for "
+"this specific worker. It is used to define the priority (or weight) a node "
+"should have over other nodes. The higher this number is for a given worker "
+"relative to the other workers, the more HTTP requests the worker will "
+"receive. This setting can be used to differentiate servers with different "
+"processing power."
+msgstr ""
+"<literal>lbfactor</literal> 属性是对于特定的 worker 的负载平衡因子。它用来定"
+"义一个节点对于其他节点的优先级(或权重)。这个数字越大,就要接收越多的 HTTP "
+"请求。这个设置可以用来调节不同服务器的处理能力。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:98
+#, no-c-format
+msgid ""
+"The <literal>cachesize</literal> attribute defines the size of the thread "
+"pools associated to the Servlet container (i.e. the number of concurrent "
+"requests it will forward to the Servlet container). Make sure this number "
+"does not outnumber the number of threads configured on the AJP13 connector "
+"of the Servlet container. Please review <literal>http://jakarta.apache.org/"
+"tomcat/connectors-doc/config/workers.html</literal> for comments on "
+"<literal>cachesize</literal> for Apache 1.3.x."
+msgstr ""
+"<literal>cachesize</literal> 属性定义与 Servlet 容器相关的线程池的大小(也就"
+"是转发给 Servlet 容器的并发请求的数量)。请确保这个数字不要超过 Servlet 容器"
+"的 AJP13 connector 所配置的线程数。请参考 <literal>http://jakarta.apache.org/"
+"tomcat/connectors-doc/config/workers.html</literal> 里关于 Apache 1.3.x 的 "
+"<literal>cachesize</literal> 的注释。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:104
+#, no-c-format
+msgid ""
+"The last part of the <literal>conf/workers.properties</literal> file defines "
+"the loadbalancer worker. The only thing you must change is the "
+"<literal>worker.loadbalancer.balanced_workers</literal> line: it must list "
+"all workers previously defined in the same file: load-balancing will happen "
+"over these workers."
+msgstr ""
+"<literal>conf/workers.properties</literal> 文件最后一部分定义 loadbalancer "
+"worker。你只需要修改 <literal>worker.loadbalancer.balanced_workers</literal> "
+"行:它列出了之前所有在这个文件里定义的 workers:负载平衡将在这些 workers 上进"
+"行。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:108
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>sticky_session</literal> property specifies the cluster "
+"behavior for HTTP sessions. If you specify <literal>worker.loadbalancer."
+"sticky_session=0</literal>, each request will be load balanced between node1 "
+"and node2; i.e., different requests for the same session will go to "
+"different servers. But when a user opens a session on one server, it is "
+"always necessary to always forward this user's requests to the same server, "
+"as long as that server is available. This is called a \"sticky session\", as "
+"the client is always using the same server he reached on his first request. "
+"To enable session stickiness, you need to set <literal>worker.loadbalancer."
+"sticky_session</literal> to 1."
+msgstr ""
+"<literal>sticky_session</literal> 属性指定 HTTP 会话的群集系统行为。如果你指"
+"定 <literal>worker.loadbalancer.sticky_session=0</literal>,每个请求会在节点 "
+"1 和节点 2 之间进行负载平衡。但是当用户在服务器上开始一个会话,把这个的用户的"
+"请求转发到同一服务器会是个好主意。这被称作 \"sticky session\",因为客户总是使"
+"用处理他第一个请求的服务器。否则用户的会话数据就必须在两个服务器之间同步(即"
+"会话复制,请参考 <xref linkend=\"clustering-http-state\"/>)。为了启用 "
+"session stickiness,你需要把 <literal>worker.loadbalancer.sticky_session</"
+"literal> 设置为 1。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:113
+#, fuzzy, no-c-format
+msgid ""
+"A non-loadbalanced setup with a single node requires a <literal>worker."
+"list=node1</literal> entry."
+msgstr ""
+"单节点的非负载平衡的设立需要设置 <literal>worker.list=node1</literal> 条目,"
+"才能使 mod_jk 正常工作。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:118
+#, fuzzy, no-c-format
+msgid "Configuring JBoss to work with mod_jk"
+msgstr "配置 mod_jk 里的 worker 节点"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:119
+#, no-c-format
+msgid ""
+"Finally, we must configure the JBoss Tomcat instances on all clustered nodes "
+"so that they can expect requests forwarded from the mod_jk loadbalancer."
+msgstr ""
+"最后,我们必须在所有群集节点上配置 JBoss Tomcat 实例,它们才能接收从 mod_jk "
+"负载平衡系统转发的请求。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:121
+#, fuzzy, no-c-format
+msgid ""
+"On each clustered JBoss node, we have to name the node according to the name "
+"specified in <literal>workers.properties</literal>. For instance, on JBoss "
+"instance node1, edit the <literal>JBOSS_HOME/server/all/deploy/jboss-web."
+"deployer/server.xml</literal> file (replace <literal>/all</literal> with "
+"your own server name if necessary). Locate the <literal><Engine></"
+"literal> element and add an attribute <literal>jvmRoute</literal>:"
+msgstr ""
+"在每个群集节点上,我们得按 <literal>workers.properties</literal> 里指定的名字"
+"来命名节点名。例如,在 JBoss 实例节点1上,编辑 <literal>JBOSS_HOME/server/"
+"all/deploy/jbossweb-tomcat50.sar/server.xml</literal> 文件(有必要的话用你自"
+"己的服务器名代替<literal>/all</literal>)。定位 <literal><Engine></"
+"literal> 元素并加入一个 <literal>jvmRoute</literal> 属性:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:126
+#, no-c-format
+msgid ""
+"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
+"\">\n"
+"... ...\n"
+"</Engine>"
+msgstr ""
+"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
+"\">\n"
+"... ...\n"
+"</Engine>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:127
+#, no-c-format
+msgid ""
+"You also need to be sure the AJP connector in server.xml is enabled (i.e., "
+"uncommented). It is enabled by default."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:129
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<!-- Define an AJP 1.3 Connector on port 8009 --> \n"
+"<Connector port=\"8009\" address=\"${jboss.bind.address}\" protocol=\"AJP/1.3"
+"\" \n"
+"emptySessionPath=\"true\" enableLookups=\"false\" redirectPort=\"8443\" /> ]]"
+">"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:131
+#, fuzzy, no-c-format
+msgid ""
+"Then, for each JBoss Tomcat instance in the cluster, we need to tell it that "
+"mod_jk is in use, so it can properly manage the <literal>jvmRoute</literal> "
+"appended to its session cookies so that mod_jk can properly route incoming "
+"requests. Edit the <literal>JBOSS_HOME/server/all/deploy/jbossweb-tomcat50."
+"sar/META-INF/jboss-service.xml</literal> file (replace <literal>/all</"
+"literal> with your own server name). Locate the <literal><attribute></"
+"literal> element with a name of <literal>UseJK</literal>, and set its value "
+"to <literal>true</literal>:"
+msgstr ""
+"然后,对群集里的每个 JBoss Tomcat 实例,我们需要使它们在它们的会话 cookies 里"
+"加入 <literal>jvmRoute</literal> 值,这样 mod_jk 才能指引进来的请求。编辑 "
+"<literal>JBOSS_HOME/server/all/deploy/jbossweb-tomcat50.sar/META-INF/jboss-"
+"service.xml</literal> 文件(有必要的话用你自己的服务器名代替 <literal>/all</"
+"literal>)。用 <literal>UseJK</literal>名来定位<literal><attribute></"
+"literal> 元素,把它的值设置为 <literal>true</literal>:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:136
+#, no-c-format
+msgid "<attribute name=\"UseJK\">true</attribute>"
+msgstr "<attribute name=\"UseJK\">true</attribute>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:137
+#, no-c-format
+msgid ""
+"At this point, you have a fully working Apache+mod_jk load-balancer setup "
+"that will balance call to the Servlet containers of your cluster while "
+"taking care of session stickiness (clients will always use the same Servlet "
+"container)."
+msgstr ""
+"现在,你有了完全工作的 Apache+mod_jk load-balancer 系统,它将平衡对群集里的 "
+"Servlet 容器的调用,同时顾及到 session stickiness(客户将总使用相同的 "
+"Servlet 容器)。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:141
+#, no-c-format
+msgid ""
+"For more updated information on using mod_jk 1.2 with JBoss Tomcat, please "
+"refer to the JBoss wiki page at <literal>http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=UsingMod_jk1.2WithJBoss</literal>."
+msgstr ""
+"对于和 JBoss Tomcat 一起使用 mod_jk 1.2 的更新信息,请参考 <literal>http://"
+"wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss</literal> 的 JBoss "
+"wiki 页。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:149
+#, fuzzy, no-c-format
+msgid "Configuring HTTP session state replication"
+msgstr "配置 HTTP 会话状态复制(session state replication)"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:150
+#, no-c-format
+msgid ""
+"The preceding discussion has been focused on using mod_jk as a load "
+"balancer. The content of the remainder our discussion of clustering HTTP "
+"services in JBoss AS applies no matter what load balancer is used."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:153
+#, fuzzy, no-c-format
+msgid ""
+"In <xref linkend=\"clustering-http-nodes\"/>, we covered how to use sticky "
+"sessions to make sure that a client in a session always hits the same server "
+"node in order to maintain the session state. However, sticky sessions by "
+"themselves are not an ideal solution. If a node goes down, all its session "
+"data is lost. A better and more reliable solution is to replicate session "
+"data across the nodes in the cluster. This way, the client can hit any "
+"server node and obtain the same session state."
+msgstr ""
+"在 <xref linkend=\"clustering-http-nodes\"/> 里,我们涉及了怎样使用 sticky "
+"sessions 来确保会话里的客户总是利用相同的服务器来维护会话状态。然而,这并非一"
+"个理想的解决方案。如果某一节点崩溃了并丢失了所有的会话数据,负载就有可能没有"
+"均衡分布在节点上。一个更好的和可靠的办法就是在群集里的所有节点上复制会话数"
+"据。这样的话,客户可以访问任何节点而获得相同的会话数据。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:155
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>jboss.cache:service=TomcatClusteringCache</literal> MBean makes "
+"use of JBoss Cache to provide HTTP session replication services to the JBoss "
+"Tomcat cluster. This MBean is defined in the <literal>deploy/jboss-web-"
+"cluster.sar/META-INF/jboss-service.xml file</literal>."
+msgstr ""
+"<literal>jboss.cache:service=TomcatClusteringCache</literal> MBean 利用 "
+"JBoss Cache 来为 JBoss Tomcat 群集里的 HTTP 负载平衡系统提供 HTTP 会话复制服"
+"务。<literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</literal> 文件"
+"里定义了这个 MBean。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:158
+#, fuzzy, no-c-format
+msgid ""
+"Before AS 4.2.0, the location of the HTTP session cache configuration file "
+"was <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</literal>. "
+"Prior to AS 4.0.4 CR2, the file was named <literal>deploy/tc5-cluster-"
+"service.xml</literal>."
+msgstr ""
+"在 AS 4.0.4 CR2 之前, HTTP 会话缓存配置文件是 <literal>deploy/tc5-cluster-"
+"service.xml</literal>。请参考 AS 4.0.3 文档来获得更多细节。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:160
+#, fuzzy, no-c-format
+msgid ""
+"Below is a typical <literal>deploy/jbossweb-cluster.sar/META-INF/jboss-"
+"service.xml</literal> file. The configuration attributes in the "
+"<literal>TomcatClusteringCache</literal> MBean are very similar to those in "
+"the JBoss AS cache configuration."
+msgstr ""
+"下面是一个典型的 <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</"
+"literal> 文件。<literal>TomcatClusteringCache</literal> MBean 里的配置属性和 "
+"<xref linkend=\"jbosscache-cache\"/> 里的非常相似。"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:163
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.cache.aop.TreeCacheAop\"\n"
+" name=\"jboss.cache:service=TomcatClusteringCache\">\n"
+"\n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+" <depends>jboss.aop:service=AspectDeployer</depends>\n"
+"\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.BatchModeTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" \n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</attribute>\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" Tomcat-${jboss.partition.name:Cluster}\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"UseMarshalling\">false</attribute>\n"
+" \n"
+" <attribute name=\"InactiveOnStartup\">false</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" \n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+" <attribute name=\"SyncReplTimeout\">20000</attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.cache.aop.TreeCacheAop\"\n"
+" name=\"jboss.cache:service=TomcatClusteringCache\">\n"
+"\n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+" <depends>jboss.aop:service=AspectDeployer</depends>\n"
+"\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.BatchModeTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" \n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</attribute>\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" Tomcat-${jboss.partition.name:Cluster}\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"UseMarshalling\">false</attribute>\n"
+" \n"
+" <attribute name=\"InactiveOnStartup\">false</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:165
+#, no-c-format
+msgid ""
+"Note that the value of the mbean element's code attribute is org.jboss.cache."
+"aop.TreeCacheAop, which is different from the other JBoss Cache Mbeans used "
+"in JBoss AS. This is because FIELD granularity HTTP session replication "
+"(covered below) needs the added features of the <literal>TreeCacheAop</"
+"literal> (a.k.a. <literal>PojoCache</literal>) class."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:168
+#, fuzzy, no-c-format
+msgid ""
+"The details of all the configuration options for a TreeCache MBean are "
+"covered in the JBoss Cache documentation. Below, we will just discuss "
+"several attributes that are most relevant to the HTTP cluster session "
+"replication."
+msgstr ""
+"<xref linkend=\"jbosscache-cache\"/> 里包括了 <literal>TreeCache</literal> "
+"MBean 的详细配置。下面,我们将讨论和 HTTP 群集会话复制(cluster session "
+"replication)最为相关的几个属性。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:171
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TransactionManagerLookupClass</emphasis> sets the "
+"transaction manager factory. The default value is <literal>org.jboss.cache."
+"BatchModeTransactionManagerLookup</literal>. It tells the cache NOT to "
+"participate in JTA-specific transactions. Instead, the cache manages its own "
+"transactions. Please do not change this."
+msgstr ""
+"<emphasis role=\"bold\">TransactionManagerLookupClass</emphasis> 设置 "
+"transaction manager factory。它的缺省值是 <literal>org.jboss.cache."
+"BatchModeTransactionManagerLookup</literal>。它告诉缓存不要参与 JTA 相关的事"
+"务。作为替代,缓存管理自己的事务来支持细颗粒度的复制。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:178
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CacheMode</emphasis> controls how the cache is "
+"replicated. The valid values are <literal>REPL_SYNC</literal> and "
+"<literal>REPL_ASYNC</literal>. With either setting the client request thread "
+"updates the local cache with the current sesssion contents and then sends a "
+"message to the caches on the other members of the cluster, telling them to "
+"make the same change. With REPL_ASYNC (the default) the request thread "
+"returns as soon as the update message has been put on the network. With "
+"REPL_SYNC, the request thread blocks until it gets a reply message from all "
+"cluster members, informing it that the update was successfully applied. "
+"Using synchronous replication makes sure changes are applied aroundthe "
+"cluster before the web request completes. However, synchronous replication "
+"is much slower."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:182
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterName</emphasis> specifies the name of the "
+"cluster that the cache works within. The default cluster name is the the "
+"word \"Tomcat-\" appended by the current JBoss partition name. All the nodes "
+"must use the same cluster name."
+msgstr ""
+"<emphasis role=\"bold\">ClusterName</emphasis> 指定了缓存所服务的群集的名字。"
+"缺省的群集名是 \"Tomcat-\" 后面跟着当前的 JBoss 分区名。所有节点都应该使用相"
+"同的群集名。虽然会话复制能够和 JBoss 的其他群集服务共享同一通道(多点传送地址"
+"和端口),复制还是应该有自己的群集名。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:187
+#, no-c-format
+msgid ""
+"The <emphasis role=\"bold\">UseMarshalling</emphasis> and <emphasis role="
+"\"bold\">InactiveOnStartup</emphasis> attributes must have the same value. "
+"They must be <literal>true</literal> if <literal>FIELD</literal> level "
+"session replication is needed (see later). Otherwise, they are default to "
+"<literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">UseMarshalling</emphasis> 和 <emphasis role=\"bold"
+"\">InactiveOnStartup</emphasis> 属性必须有相同的值。如果需要使用 "
+"<literal>FIELD</literal> 级会话复制(请参考后面的内容),它们的值必须是 "
+"<literal>true</literal>。否则,它们的缺省值是 <literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:192
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterConfig</emphasis> configures the underlying "
+"JGroups stack. Please refer to <xref linkend=\"jbosscache-jgroups\"/> for "
+"more information."
+msgstr ""
+"<emphasis role=\"bold\">ClusterConfig</emphasis> 包含底层 JGroups 栈(参见 "
+"<xref linkend=\"jbosscache-jgroups\"/>)的配置。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:195
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> sets the maximum "
+"number of milliseconds to wait for a lock acquisition when trying to lock a "
+"cache node. The default value is 15000."
+msgstr ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> 设置以毫秒为单位的"
+"等待所锁定捕获(lock acquisition)的最长时间。它的缺省值是 15000。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:199
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SyncReplTimeout</emphasis> sets the maximum number "
+"of milliseconds to wait for a response from all nodes in the cluster when a "
+"synchronous replication message is sent out. The default value is 20000; "
+"should be a few seconds longer than LockAcquisitionTimeout."
+msgstr ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> 设置以毫秒为单位的"
+"等待所锁定捕获(lock acquisition)的最长时间。它的缺省值是 15000。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:207
+#, no-c-format
+msgid "Enabling session replication in your application"
+msgstr "在你的应用程序里启用会话复制"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:208
+#, fuzzy, no-c-format
+msgid ""
+"To enable clustering of your web application you must tag it as "
+"distributable in the <literal>web.xml</literal> descriptor. Here's an "
+"example:"
+msgstr ""
+"为了启用 web 应用程序的群集,你必须在 <literal>web.xml</literal> 描述符里把它"
+"标记为 distributable。下面是一个例子:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:210
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?> \n"
+"<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+"\" \n"
+" version=\"2.4\">\n"
+" <emphasis role=\"bold\"><distributable/></emphasis>\n"
+" <!-- ... -->\n"
+"</web-app>"
+msgstr ""
+"<?xml version=\"1.0\"?> \n"
+"<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+"\" \n"
+" version=\"2.4\">\n"
+" <emphasis role=\"bold\"><distributable/></emphasis>\n"
+" <!-- ... -->\n"
+"</web-app>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:211
+#, no-c-format
+msgid ""
+"You can futher configure session replication using the <literal>replication-"
+"config</literal> element in the <literal>jboss-web.xml</literal> file. Here "
+"is an example:"
+msgstr ""
+"你可以用 <literal>jboss-web.xml</literal> 文件里的 <literal>replication-"
+"config</literal> 元素进一步配置会话复制。下面是一个例子:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:213
+#, no-c-format
+msgid ""
+"<jboss-web>\n"
+" <replication-config>\n"
+" <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-"
+"trigger>\n"
+" <replication-granularity>SESSION</replication-"
+"granularity>\n"
+" <replication-field-batch-mode>true</replication-field-batch-"
+"mode>\n"
+" </replication-config>\n"
+"</jboss-web>"
+msgstr ""
+"<jboss-web>\n"
+" <replication-config>\n"
+" <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-"
+"trigger>\n"
+" <replication-granularity>SESSION</replication-"
+"granularity>\n"
+" <replication-field-batch-mode>true</replication-field-batch-"
+"mode>\n"
+" </replication-config>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:214
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>replication-trigger</literal> element determines what triggers "
+"a session replication (i.e. when is a session is considered <literal>dirty</"
+"literal> and in need of replication). It has 4 options:"
+msgstr ""
+"<literal>replication-trigger</literal> 元素决定用什么触发状态复制(或什么时候"
+"会话被认为是 dirty 的)。它有四个选项:"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:218
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET</emphasis>: With this policy, the session is "
+"considered dirty only when an attribute is set in the session (i.e., "
+"HttpSession.setAttribute() is invoked.) If your application always writes "
+"changed values back into the session, this option will be most optimal in "
+"terms of performance. The downside of SET is that if an object is retrieved "
+"from the session and modified without being written back into the session, "
+"the session manager will not know the attribute is dirty and the change to "
+"that object may not be replicated."
+msgstr ""
+"<emphasis role=\"bold\">SET</emphasis>:在这个选项下,只有在会话里设置了属"
+"性,会话才被认为是 dirty。如果你的应用程序总把改变的写回到会话里,从性能角度"
+"来讲这个选项可能是最优化的。如果只从会话里取出一个对象而不把它写回到会话里,"
+"对这个对象的修改将不会被复制。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:221
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET_AND_GET</emphasis>: With this policy, any "
+"attribute that is get or set will be marked as dirty. If an object is "
+"retrieved from the session and modified without being written back into the "
+"session, the change to that object will be replicated. The downside of "
+"SET_AND_GET is that it can have significant performance implications, since "
+"even reading immutable objects from the session (e.g., strings, numbers) "
+"will mark the read attributes as needing to be replicated."
+msgstr ""
+"<emphasis role=\"bold\">SET_AND_GET</emphasis>:如使用这个策略,所有 get 或 "
+"set 的属性都会被标记为 ditry。如果从会话里取出一个对象并修改它,但没有写回到"
+"这个会话里,这些修改也将被复制。这个选项对性能有比较大的影响。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:224
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET_AND_NON_PRIMITIVE_GET</emphasis>: This policy is "
+"similar to the SET_AND_GET policy except that get operationsthat return "
+"attribute values with primitive types do not mark the attribute as dirty. "
+"Primitive system types (i.e., String, Integer, Long, etc.) are immutable, so "
+"there is no reason to mark an attribute with such a type as dirty just "
+"because it has been read. If a get operation returns a value of a non-"
+"primitive type, the session manager has no simple way to know whether the "
+"object is mutable, so it assumes it is an marks the attribute as dirty. This "
+"setting avoids the downside of SET while reducing the performance impact of "
+"SET_AND_GET. It is the default setting."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:227
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ACCESS</emphasis>: This option causes the session to "
+"be marked as dirty whenever it is accessed. Since a the session is accessed "
+"during each HTTP request, it will be replicated with each request. The "
+"purpose of ACCESS is to ensure session last-access timestamps are kept in "
+"sync around the cluster.. Since with the other replication-trigger options "
+"the time stamp may not be updated in other clustering nodes because of no "
+"replication, the session in other nodes may expire before the active node if "
+"the HTTP request does not retrieve or modify any session attributes. When "
+"this option is set, the session timestamps will be synchronized throughout "
+"the cluster nodes. Note that use of this option can have a significant "
+"performance impact, so use it with caution. With the other replication-"
+"trigger options, if a session has gone 80% of its expiration interval "
+"without being replicated, as a safeguard its timestamp will be replicated no "
+"matter what. So, ACCESS is only useful in special circumstances where the "
+"above safeguard is considered inadequate."
+msgstr ""
+"<emphasis role=\"bold\">ACCESS</emphasis>:这个选项表示:只要会话被访问,就把"
+"会话标记为 ditry。因为在每个 HTTP 请求的过程中,会话都会被访问,所以会话每次"
+"都会被复制。会话实例里的时间戳也会相应地更新。由于复制并没有包括时间戳,其他"
+"群集节点的时间戳可能不会被更新。如果 HTTP 请求没有取出或修改任何会话属性,其"
+"他节点的会话就可能会先于活动节点过期。当设置了这个选项,会话的时间戳将在所有"
+"群集节点中同步。注意采用这个选项对性能影响很大,需要小心行事。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:230
+#, no-c-format
+msgid ""
+"The <literal>replication-granularity</literal> element controls the size of "
+"the replication units. The supported values are:"
+msgstr ""
+"<literal>replication-granularity</literal> 元素控制复制单元的大小。它所支持的"
+"值如下:"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:235
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ATTRIBUTE</emphasis>: Replication is only for the "
+"dirty attributes in the session plus some session data, like the last-"
+"accessed timestamp. For sessions that carry large amounts of data, this "
+"option can increase replication performance. However, attributes will be "
+"separately serialized, so if there are any shared references between objects "
+"stored in the attributes, those shared references may be broken on remote "
+"nodes. For example, say a Person object stored under key “husband” has a "
+"reference to an Address, while another Person object stored under key “wife” "
+"has a reference to that same Address object. When the “husband” and “wife” "
+"attributes are separately deserialized on the remote nodes, each Person "
+"object will now have a reference to its own Address object; the Address "
+"object will no longer be shared."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:238
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SESSION</emphasis>: The entire session object is "
+"replicated if any attribute is dirty. The entire session is serialized in "
+"one unit, so shared object references are maintained on remote nodes. This "
+"is the default setting."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:243
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">FIELD</emphasis>: Replication is only for individual "
+"changed data fields inside session attribute objects. Shared object "
+"references will be preserved across the cluster. Potentially most "
+"performant, but requires changes to your application (this will be discussed "
+"later)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:246
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>replication-field-batch-mode</literal> element indicates "
+"whether you want all replication messages associated with a request to be "
+"batched into one message. Only applicable if replication-granularity is "
+"FIELD. Default is <literal>true</literal>."
+msgstr ""
+"<literal>replication-field-batch-mode</literal> 指出你是否在每个 HTTP 请求之"
+"间进行批量更新。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:247
+#, fuzzy, no-c-format
+msgid ""
+"If your sessions are generally small, SESSION is the better policy. If your "
+"session is larger and some parts are infrequently accessed, ATTRIBUTE "
+"replication will be more effective. If your application has very big data "
+"objects in session attributes and only fields in those objects are "
+"frequently modified, the FIELD policy would be the best. In the next "
+"section, we will discuss exactly how the FIELD level replication works."
+msgstr ""
+"如果你的会话通常很小,使用 SESSION 选项是更好的策略。如果你的会话更大些而且某"
+"些部分并不常被访问,ATTRIBUTE 方式的复制就会更有效。如果你的应用程序在会话属"
+"性里拥有非常大的数据对象,而且只有这些对象里的某些字段被经常修改,采用 FIELD "
+"策略将是最佳选择。在后面的内容里,让我们讨论一下怎样使用 FIELD 级的复制。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:259
+#, fuzzy, no-c-format
+msgid "Using FIELD level replication"
+msgstr "使用字段级(FIELD level)的复制"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:260
+#, fuzzy, no-c-format
+msgid ""
+"FIELD-level replication only replicates modified data fields inside objects "
+"stored in the session. Its use could potentially drastically reduce the data "
+"traffic between clustered nodes, and hence improve the performance of the "
+"whole cluster. To use FIELD-level replication, you have to first prepare (i."
+"e., bytecode enhance) your Java class to allow the session cache to detect "
+"when fields in cached objects have been changed and need to be replicated."
+msgstr ""
+"字段级复制只复制存储在会话里的对象内部的被修改的数据字段。它能够极大地减少群"
+"集节点之间的数据通信,也因此提高了整个群集系统的性能。为了使用字段级复制,你"
+"首先得用 Java 类来指出哪个字段要被复制。它是通过在 JavaDocs 嵌入的 JDK 1.4 风"
+"格的注解(annotations)来完成的。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:262
+#, no-c-format
+msgid ""
+"The first step in doing this is to identify the classes that need to be "
+"prepared. This is done via annotations. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:266
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@org.jboss.cache.aop.AopMarker\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}]]>"
+msgstr ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:268
+#, fuzzy, no-c-format
+msgid ""
+"If you annotate a class with InstanceAopMarker instead, then all of its "
+"subclasses will be automatically annotated as well. Similarly, you can "
+"annotate an interface with InstanceofAopMarker and all of its implementing "
+"classes will be annotated. For example:"
+msgstr ""
+"如果你用 <literal>InstanceAopMarker</literal> 注解类时,它所有的子类都将自动"
+"被注解。例如,"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:271
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@org.jboss.cache.aop.InstanceOfAopMarker\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}\n"
+"then when you have a sub-class like\n"
+"public class Student extends Person\n"
+"{\n"
+"...\n"
+"}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:273
+#, no-c-format
+msgid ""
+"There will be no need to annotate <literal>Student</literal>. It will be "
+"annotated automatically because it is a sub-class of <literal>Person</"
+"literal>. Jboss AS 4.2 requires JDK 5 at runtime, but some users may still "
+"need to build their projects using JDK 1.4. In this case, annotating classes "
+"can be done via JDK 1.4 style annotations embedded in JavaDocs. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:278
+#, no-c-format
+msgid ""
+"/*\n"
+" * My usual comments here first.\n"
+" * @@org.jboss.web.tomcat.tc5.session.AopMarker\n"
+" */\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+"/*\n"
+" * My usual comments here first.\n"
+" * @@org.jboss.web.tomcat.tc5.session.AopMarker\n"
+" */\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:281
+#, no-c-format
+msgid "The anologue for <literal>@InstanceAopMarker</literal> is:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:283
+#, no-c-format
+msgid ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:287
+#, fuzzy, no-c-format
+msgid ""
+"Once you have annotated your classes, you will need to perform a pre-"
+"processing step to bytecode enhance your classes for use by TreeCacheAop. "
+"You need to use the JBoss AOP pre-compiler <literal>annotationc</literal> "
+"and post-compiler <literal>aopc</literal> to process the above source code "
+"before and after they are compiled by the Java compiler. The annotationc "
+"step is only need if the JDK 1.4 style annotations are used; if JDK 5 "
+"annotations are used it is not necessary. Here is an example on how to "
+"invoke those commands from command line."
+msgstr ""
+"然而,既然目前我们只支持 JDK 1.4 风格的注解(由 JBoss Aop 提供),你将需要执"
+"行一个预处理步骤。在 Java 编译器编译之前和之后,你需要用 JBoss AOP pre-"
+"compiler <literal>annotationc</literal> 和 post-compiler <literal>aopc</"
+"literal> 来处理上面的源码。这里是一个怎样从命令行调用这些命令的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:291
+#, no-c-format
+msgid ""
+"$ annotationc [classpath] [source files or directories]\n"
+"$ javac -cp [classpath] [source files or directories]\n"
+"$ aopc [classpath] [class files or directories]"
+msgstr ""
+"$ annotationc [classpath] [source files or directories]\n"
+"$ javac -cp [classpath] [source files or directories]\n"
+"$ aopc [classpath] [class files or directories]"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:293
+#, fuzzy, no-c-format
+msgid ""
+"Please see the JBoss AOP documentation for the usage of the pre- and post-"
+"compiler. The JBoss AOP project also provides easy to use ANT tasks to help "
+"integrate those steps into your application build process."
+msgstr ""
+"请参考 JBoss AOP 文档关于怎样使用 pre- 和 post-compiler。JBoss AOP 项目也提供"
+"使用 ANT 来把上述步骤集成在应用程序的 build 过程中的简单方法。下一个 AS 发布"
+"版本将提供对 JDK 5.0 注解的更透明的支持。但是现在,你还得用 pre- 和 post-"
+"compiler 来编译你的源码。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:297
+#, fuzzy, no-c-format
+msgid ""
+"You can see a complete example on how to build, deploy, and validate a FIELD-"
+"level replicated web application from this page: <ulink url=\"http://wiki."
+"jboss.org/wiki/Wiki.jsp?page=Http_session_field_level_example\"></ulink>. "
+"The example bundles the pre- and post-compile tools so you do not need to "
+"download JBoss AOP separately."
+msgstr ""
+"或者,你也能够在 <literal>http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=Http_session_field_level_example</literal> 里看到一个怎样构建(build),"
+"部署(deploy),和验证(validate)采用字段级复制的 web 应用程序的完整例子。这"
+"个例子捆绑了 pre- 和 post-compile 工具,所以你不需要再下载单独的 JBoss AOP "
+"了。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:301
+#, no-c-format
+msgid ""
+"When you deploy the web application into JBoss AS, make sure that the "
+"following configurations are correct:"
+msgstr "当你把 web 应用程序部署到 JBoss AS 时,请确保下面的配置是正确的:"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:305
+#, fuzzy, no-c-format
+msgid ""
+"In the server's <literal>deploy/jboss-web-cluster.sar/META-INF/jboss-service."
+"xml</literal> file, the <literal>inactiveOnStartup</literal> and "
+"<literal>useMarshalling</literal> attributes must both be <literal>true</"
+"literal>."
+msgstr ""
+"在服务器的 <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</"
+"literal> 文件里,<literal>inactiveOnStartup</literal> 和"
+"<literal>useMarshalling</literal> 属性必须都为 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:310
+#, no-c-format
+msgid ""
+"In the application's <literal>jboss-web.xml</literal> file, the "
+"<literal>replication-granularity</literal> attribute must be <literal>FIELD</"
+"literal>."
+msgstr ""
+"在应用程序的 <literal>jboss-web.xml</literal> 文件里,<literal>replication-"
+"granularity</literal> 属性必须为 <literal>FIELD</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:315
+#, no-c-format
+msgid ""
+"Finally, let's see an example on how to use FIELD-level replication on those "
+"data classes. Notice that there is no need to call <literal>session."
+"setAttribute()</literal> after you make changes to the data object, and all "
+"changes to the fields are automatically replicated across the cluster."
+msgstr ""
+"最后,让我们看一个怎样在哪些数据类上使用字段级(FIELD-level)复制的例子。请注"
+"意你不需要在修改数据对象(data object)后调用 <literal>session.setAttribute"
+"()</literal>,对字段的所有修改都自动跨群集地被复制了。"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:318
+#, no-c-format
+msgid ""
+"// Do this only once. So this can be in init(), e.g.\n"
+"if(firstTime)\n"
+"{\n"
+" Person joe = new Person(\"Joe\", 40);\n"
+" Person mary = new Person(\"Mary\", 30);\n"
+" Address addr = new Address();\n"
+" addr.setZip(94086);\n"
+"\n"
+" joe.setAddress(addr);\n"
+" mary.setAddress(addr); // joe and mary share the same address!\n"
+"\n"
+" session.setAttribute(\"joe\", joe); // that's it.\n"
+" session.setAttribute(\"mary\", mary); // that's it.\n"
+"}\n"
+"\n"
+"Person mary = (Person)session.getAttribute(\"mary\");\n"
+"mary.getAddress().setZip(95123); // this will update and replicate the zip "
+"code."
+msgstr ""
+"// Do this only once. So this can be in init(), e.g.\n"
+"if(firstTime)\n"
+"{\n"
+" Person joe = new Person(\"Joe\", 40);\n"
+" Person mary = new Person(\"Mary\", 30);\n"
+" Address addr = new Address();\n"
+" addr.setZip(94086);\n"
+"\n"
+" joe.setAddress(addr);\n"
+" mary.setAddress(addr); // joe and mary share the same address!\n"
+"\n"
+" session.setAttribute(\"joe\", joe); // that's it.\n"
+" session.setAttribute(\"mary\", mary); // that's it.\n"
+"}\n"
+"\n"
+"Person mary = (Person)session.getAttribute(\"mary\");\n"
+"mary.getAddress().setZip(95123); // this will update and replicate the zip "
+"code."
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:319
+#, no-c-format
+msgid ""
+"Besides plain objects, you can also use regular Java collections of those "
+"objects as session attributes. JBoss cache automatically figures out how to "
+"handle those collections and replicate field changes in their member objects."
+msgstr ""
+"除了简单的对象(plain objects),你还可以使用那些对象的常规 Java 集合(Java "
+"collection)作为会话属性。JBoss cache 会自动地判断怎样处理这些集合和复制它们"
+"的成员对象里的字段的变更。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:324
+#, no-c-format
+msgid "Monitoring session replication"
+msgstr "监控会话复制"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:325
+#, no-c-format
+msgid ""
+"If you have deployed and accessed your application, go to the <literal>jboss."
+"cache:service=TomcatClusteringCache</literal> MBean and invoke the "
+"<literal>printDetails</literal> operation. You should see output resembling "
+"the following."
+msgstr ""
+"如果你已经部署和访问了你的应用程序,你可以使用 <literal>jboss.cache:"
+"service=TomcatClusteringCache</literal> MBean 和调用 <literal>printDetails</"
+"literal> 操作。你应该看到下面的输出结果。"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:328
+#, fuzzy, no-c-format
+msgid ""
+"/JSESSION\n"
+"\n"
+"/localhost\n"
+"\n"
+"/quote\n"
+"\n"
+"/FB04767C454BAB3B2E462A27CB571330\n"
+"VERSION: 6\n"
+"FB04767C454BAB3B2E462A27CB571330: org.jboss.invocation."
+"MarshalledValue at 1f13a81c\n"
+"\n"
+"/AxCI8Ovt5VQTfNyYy9Bomw**\n"
+"VERSION: 4\n"
+"AxCI8Ovt5VQTfNyYy9Bomw**: org.jboss.invocation.MarshalledValue at e076e4c8"
+msgstr ""
+"/JSESSION\n"
+"\n"
+"/quote\n"
+"\n"
+"/FB04767C454BAB3B2E462A27CB571330\n"
+"VERSION: 6\n"
+"FB04767C454BAB3B2E462A27CB571330: org.jboss.invocation."
+"MarshalledValue at 1f13a81c\n"
+"\n"
+"/AxCI8Ovt5VQTfNyYy9Bomw**\n"
+"VERSION: 4\n"
+"AxCI8Ovt5VQTfNyYy9Bomw**: org.jboss.invocation.MarshalledValue at e076e4c8"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:330
+#, fuzzy, no-c-format
+msgid ""
+"This output shows two separate web sessions, in one application named "
+"<emphasis>quote</emphasis>, that are being shared via JBossCache. This "
+"example uses a <literal>replication-granularity</literal> of "
+"<literal>session</literal>. Had <literal>ATTRIBUTE</literal> level "
+"replication been used, there would be additional entries showing each "
+"replicated session attribute. In either case, the replicated values are "
+"stored in an opaque <literal>MarshelledValue</literal> container. There "
+"aren't currently any tools that allow you to inspect the contents of the "
+"replicated session values. If you do not see any output, either the "
+"application was not correctly marked as <literal>distributable</literal> or "
+"you haven't accessed a part of application that places values in the HTTP "
+"session. The <literal>org.jboss.cache</literal> and <literal>org.jboss.web</"
+"literal> logging categories provide additional insight into session "
+"replication useful for debugging purposes."
+msgstr ""
+"这个输出结果展示了在一个叫 <emphasis>quote</emphasis> 应用程序里的两个独立的 "
+"web 会话,它们通过 JBossCache 来共享。这个例子使用了 <literal>session</"
+"literal> 的 <literal>replication-granularity</literal>。如果使用了 "
+"<literal>attribute</literal> 级的复制,应该可以看到展示每个被复制的会话属性的"
+"其他条目。在两种情况下,被复制的值都存储在一个不透明的 "
+"<literal>MarshelledValue</literal> 容器里。目前还没有任何工具可以让你查看这些"
+"被复制的会话值。如果你没有看到任何输出,要么是应用程序没有正确地标记为"
+"<literal>distributable</literal>,要么就是你根本没有访问把值写入 HTTP 会话的"
+"应用程序。<literal>org.jboss.cache</literal> 和 <literal>org.jboss.web</"
+"literal> 日志类别提供了可用于调试目的对会话复制的其他视角。"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:338
+#, fuzzy, no-c-format
+msgid "Using Clustered Single Sign On"
+msgstr "使用单点登录(Single Sign On)"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:340
+#, fuzzy, no-c-format
+msgid ""
+"JBoss supports clustered single sign-on, allowing a user to authenticate to "
+"one web application on a JBoss server and to be recognized on all web "
+"applications, on that same machine or on another node in the cluster, that "
+"are deployed on the same virtual host. Authentication replication is handled "
+"by the same JBoss Cache Mbean that is used by the HTTP session replication "
+"service. Although session replication does not need to be explicitly enabled "
+"for the applications in question, the <literal>jboss-web-cluster.sar</"
+"literal> file needs to be deployed."
+msgstr ""
+"JBoss 支持群集的单点登录(single sign-on),允许用户在一个 JBoss 服务器上验证"
+"应用程序,然后被在同一个主机或群集里的其他节点里的被部署在同一个虚拟主机上的"
+"所有应用程序识别。HTTP 会话复制服务处理复制验证(Authentication "
+"replication)。虽然会话复制不需要显性地为这个应用程序启用,但 <literal>tc5-"
+"cluster-service.xml</literal> 文件必须被部署。 "
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:342
+#, no-c-format
+msgid ""
+"To enable single sign-on, you must add the <literal>ClusteredSingleSignOn</"
+"literal> valve to the appropriate <literal>Host</literal> elements of the "
+"tomcat <literal>server.xml</literal> file. The valve configuration is shown "
+"here:"
+msgstr ""
+"为了启用单点登录,你必须在 <literal>server.xml</literal> 文件的 "
+"<literal>Host</literal> 元素里加入 <literal>ClusteredSingleSignOn</literal> "
+"开关(valve)。这个开关(valve)的配置如下:"
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:345
+#, no-c-format
+msgid ""
+"<Valve className=\"org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn\" /"
+">"
+msgstr ""
+"<Valve className=\"org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn\" /"
+">"
+
+#. Tag: title
+#: Clustering_Guide_HTTP.xml:348
+#, fuzzy, no-c-format
+msgid "Clustered Session Notification Policy"
+msgstr "群集的 Session EJBs"
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:349
+#, no-c-format
+msgid ""
+"This section introduces the concept of a clustered session notification "
+"policy for determining whether the servlet spec notifications related to "
+"session events are allowed to be emitted on the local cluster node. Such "
+"notifications are emitted to implementations of the <package>javax.servlet."
+"http.HttpSessionListener</package>, <package>javax.servlet.http."
+"HttpSessionAttributeListener</package>, and <package>javax.servlet.http."
+"HttpSessionBindingListener interfaces</package>."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:352
+#, no-c-format
+msgid ""
+"This new notification policy concept is defined in the <package>org.jboss."
+"web.tomcat.service.session.notification</package> Java package, and all "
+"classes referenced below are a part of this package."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:354
+#, no-c-format
+msgid ""
+"While it is possible to implement "
+"<classname>ClusteredSessionNotificationPolicy</classname> for case-specific "
+"customization, JBoss provides "
+"<classname>LegacyClusteredSessionNotificationPolicy</classname>, which "
+"implements the behavior in previous JBoss versions (the default), and "
+"<classname>IgnoreUndeployLegacyClusteredSessionNotificationPolicy</"
+"classname>, which implements the same behavior except for undeployment "
+"situations in which no <classname>HttpSessionListener</classname> and "
+"<classname>HttpSessionAttributeListener</classname> notifications are sent."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:357
+#, no-c-format
+msgid ""
+"It is possible to change from the default "
+"<classname>LegacyClusteredSessionNotificationPolicy</classname> to "
+"<classname>IgnoreUndeployLegacyClusteredSessionNotificationPolicy</"
+"classname> or to a custom <classname>ClusteredSessionNotificationPolicy</"
+"classname> implementation by performing one of the following steps:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:362
+#, no-c-format
+msgid ""
+"Using the system property 'jboss.web.clustered.session.notification.policy' "
+"and setting it equal to the class name of the policy you want to choose. "
+"This will change the policy for all web applications deployed in the "
+"application server."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:367
+#, no-c-format
+msgid ""
+"Using jboss-web.xml to set the policy per application using the following "
+"format:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_HTTP.xml:370
+#, no-c-format
+msgid ""
+"<replication-config>\n"
+" <session-notification-policy>\n"
+" CLASS-NAME-HERE\n"
+" </session-notification-policy>\n"
+"</replication-config>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_HTTP.xml:375
+#, no-c-format
+msgid ""
+"The session-notification-policy element shown above is not part of the "
+"official DTD for a JBoss 4.2+ jboss-web.xml (see <ulink url=\"http://www."
+"jboss.org/j2ee/dtd/jboss-web_4_2.dtd\">http://www.jboss.org/j2ee/dtd/jboss-"
+"web_4_2.dtd</ulink>). However, the internal jboss-web.xml parsing logic will "
+"properly handle the element in JBoss AS 4.2.4 and later as well was in EAP "
+"4.2.0.GA_CP05 and 4.3.0.GA_CP03 and later."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Intro.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Intro.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Intro.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,916 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:5
+#, no-c-format
+msgid "Clustering"
+msgstr "群集"
+
+#. Tag: subtitle
+#: Clustering_Guide_Intro.xml:6
+#, no-c-format
+msgid "High Availability Enterprise Services via JBoss Clusters"
+msgstr "用 JBoss 群集实现高可用性企业服务"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:9
+#, no-c-format
+msgid "Introduction"
+msgstr "简介"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:10
+#, fuzzy, no-c-format
+msgid ""
+"Clustering allows us to run an application on several parallel servers (a.k."
+"a cluster nodes) while providing a single view to application clients. Load "
+"is distributed across different servers, and even if one or more of the "
+"servers fails, the application is still accessible via the surviving cluster "
+"nodes. Clustering is crucial for scalable enterprise applications, as you "
+"can improve performance by simply adding more nodes to the cluster. "
+"Clustering is crucial for highly available enterprise applications, as it is "
+"the clustering infrastructure that supports the redundancy needed for high "
+"availability."
+msgstr ""
+"群集系统(Clustering)允许我们在多台平行的服务器(群集节点)上运行一个应用程"
+"序。负载分布在不同的服务器上,即使其中任何一台崩溃,应用程序还是可以在其他群"
+"集节点(cluster nodes)上运行。群集对于可扩展性企业级应用程序是很关键的,因为"
+"你简单地把更多节点加入到群集系统里就可以提高性能。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:14
+#, no-c-format
+msgid ""
+"The JBoss Application Server (AS) comes with clustering support out of the "
+"box. The simplest way to start a JBoss server cluster is to start several "
+"JBoss instances on the same local network, using the <literal>run -c all</"
+"literal> command for each instance. Those server instances, all started in "
+"the <literal>all</literal> configuration, detect each other and "
+"automatically form a cluster."
+msgstr ""
+"JBoss 应用服务器(AS)缺省支持群集系统。最简单的启动 JBoss 服务器群集的方法就"
+"是在同一本地网络里启动多个 JBoss 实例,每个实例都可以用 <literal>run -c all</"
+"literal> 命令来运行。这些按照 <literal>all</literal> 配置文件启动的实例,可以"
+"检测到对方而自动组成一个群集系统。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:17
+#, fuzzy, no-c-format
+msgid ""
+"In the first section of this chapter, we discuss basic concepts behind "
+"JBoss's clustering services. It is important that you understand these "
+"concepts before reading the rest of the chapter. Clustering configurations "
+"for specific types of applications are covered after this section."
+msgstr ""
+"在本章的第一部分,我们将讨论 JBoss 群集服务的基本概念。在阅读本章后面的内容之"
+"前,先理解这些概念是很重要的。在这部分内容之后,我们将介绍怎样为特定类型的应"
+"用程序配置群集系统。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:23
+#, no-c-format
+msgid "Cluster Definition"
+msgstr "群集系统的定义"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:24
+#, no-c-format
+msgid ""
+"A cluster is a set of nodes that communicate with each other and work toward "
+"a common goal. In a JBoss Application Server cluster (also known as a "
+"“partition”), a node is an JBoss Application Server instance. Communication "
+"between the nodes is handled by the JGroups group communication library, "
+"with a JGroups Channel providing the core functionality of tracking who is "
+"in the cluster and reliably exchanging messages between the cluster members. "
+"JGroups channels with the same configuration and name have the ability to "
+"dynamically discover each other and form a group. This is why simply "
+"executing “run -c all” on two AS instances on the same network is enough for "
+"them to form a cluster – each AS starts a Channel (actually, several) with "
+"the same default configuration, so they dynamically discover each other and "
+"form a cluster. Nodes can be dynamically added to or removed from clusters "
+"at any time, simply by starting or stopping a Channel with a configuration "
+"and name that matches the other cluster members. In summary, a JBoss cluster "
+"is a set of AS server instances each of which is running an identically "
+"configured and named JGroups Channel."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:29
+#, no-c-format
+msgid ""
+"On the same AS instance, different services can create their own Channel. In "
+"a default 4.2.x AS, four different services create channels – the web "
+"session replication service, the EJB3 SFSB replication service, the EJB3 "
+"entity caching service, and a core general purpose clustering service known "
+"as HAPartition. In order to differentiate these channels, each must have a "
+"unique name, and its configuration must match its peers yet differ from the "
+"other channels."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:32
+#, no-c-format
+msgid ""
+"So, if you go to two AS 4.2.x instances and execute <literal>run -c all</"
+"literal>, the channels will discover each other and you'll have a conceptual "
+"<literal>cluster</literal>. It's easy to think of this as a two node "
+"cluster, but it's important to understand that you really have 4 channels, "
+"and hence 4 two node clusters."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:36
+#, no-c-format
+msgid ""
+"On the same network, even for the same service, we may have different "
+"clusters. <xref linkend=\"clustering-Partition.fig\"/> shows an example "
+"network of JBoss server instances divided into three clusters, with the "
+"third cluster only having one node. This sort of topology can be set up "
+"simply by configuring the AS instances such that within a set of nodes meant "
+"to form a cluster the Channel configurations and names match while they "
+"differ from any other channels on the same network."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:38
+#, no-c-format
+msgid "Clusters and server nodes"
+msgstr "Clusters and server nodes"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:46
+#, no-c-format
+msgid ""
+"The section on “JGroups Configuration” and on “Isolating JGroups Channels” "
+"covers in detail how to configure Channels such that desired peers find each "
+"other and unwanted peers do not. As mentioned above, by default JBoss AS "
+"uses four separate JGroups Channels. These can be divided into two broad "
+"categories: the Channel used by the general purpose HAPartition service, and "
+"three Channels created by JBoss Cache for special purpose caching and "
+"cluster wide state replication."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:50
+#, no-c-format
+msgid "HAPartition"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:52
+#, no-c-format
+msgid ""
+"HAPartition is a general purpose service used for a variety of tasks in AS "
+"clustering. At its core, it is an abstraction built on top of a JGroups "
+"Channel that provides support for making/receiving RPC invocations on/from "
+"one or more cluster members. HAPartition also supports a distributed "
+"registry of which clustering services are running on which cluster members. "
+"It provides notifications to interested listeners when the cluster "
+"membership changes or the clustered service registry changes. HAPartition "
+"forms the core of many of the clustering services we'll be discussing in the "
+"rest of this guide, including smart client-side clustered proxies, EJB 2 "
+"SFSB replication and entity cache management, farming, HA-JNDI and HA "
+"singletons."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:57
+#, fuzzy, no-c-format
+msgid ""
+"The following example shows the <literal>HAPartition</literal> MBean "
+"definition packaged with the standard JBoss AS distribution. So, if you "
+"simply start JBoss servers with their default clustering settings on a local "
+"network, you would get a default cluster named <literal>DefaultPartition</"
+"literal> that includes all server instances as its nodes."
+msgstr ""
+"下例展示了标准 JBoss AS 发行版本里的 MBean 的定义。如果你在本地网络里用缺省的"
+"群集设定来启动 JBoss 服务器,你将得到一个叫 <literal>DefaultPartition</"
+"literal> 的缺省群集,它包括了所有作为节点的服务器实例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Intro.xml:61
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=DefaultPartition\">\n"
+" \n"
+" <! -- Name of the partition being built -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+"\n"
+" <! -- The address used to determine the node name -->\n"
+" <attribute name=\"NodeAddress\">${jboss.bind.address}</"
+"attribute>\n"
+"\n"
+" <! -- Determine if deadlock detection is enabled -->\n"
+" <attribute name=\"DeadlockDetection\">False</attribute>\n"
+" \n"
+" <! -- Max time (in ms) to wait for state transfer to complete. \n"
+" Increase for large states -->\n"
+" <attribute name=\"StateTransferTimeout\">30000</attribute>\n"
+"\n"
+" <! -- The JGroups protocol configuration -->\n"
+" <attribute name=\"PartitionConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=DefaultPartition\">\n"
+" \n"
+" <! -- Name of the partition being built -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+"\n"
+" <! -- The address used to determine the node name -->\n"
+" <attribute name=\"NodeAddress\">${jboss.bind.address}</"
+"attribute>\n"
+"\n"
+" <! -- Determine if deadlock detection is enabled -->\n"
+" <attribute name=\"DeadlockDetection\">False</attribute>\n"
+" \n"
+" <! -- Max time (in ms) to wait for state transfer to complete. \n"
+" Increase for large states -->\n"
+" <attribute name=\"StateTransferTimeout\">30000</attribute>\n"
+"\n"
+" <! -- The JGroups protocol configuration -->\n"
+" <attribute name=\"PartitionConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:62
+#, fuzzy, no-c-format
+msgid ""
+"Here, we omitted the detailed JGroups protocol configuration for this "
+"channel. JGroups handles the underlying peer-to-peer communication between "
+"nodes, and its configuration is discussed in <xref linkend=\"jbosscache-"
+"jgroups\"/>. The following list shows the available configuration attributes "
+"in the <literal>HAPartition</literal> MBean."
+msgstr ""
+"在这里,我们忽略了这个群集的详细的 JGroups 协议配置(protocal "
+"configuration)。JGroups 处理节点之间底层的点到点通信,我们将在 <xref "
+"linkend=\"jbosscache-jgroups\"/> 里讨论它的配置。下面的列表展示了 "
+"<literal>ClusterPartition</literal> MBean 里可用的配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:67
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PartitionName</emphasis> is an optional attribute to "
+"specify the name of the cluster. Its default value is "
+"<literal>DefaultPartition</literal>. Use the <literal>-g </literal> (a.k.a. "
+"--partition) command line switch to set this value at JBoss startup."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:71
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NodeAddress</emphasis> is an optional attribute used "
+"to help generate a unique name for this node."
+msgstr ""
+"<emphasis role=\"bold\">NodeAddress</emphasis> 是用来指定节点所绑定的 IP 地址"
+"的可选属性。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:74
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DeadlockDetection</emphasis> is an optional boolean "
+"attribute that tells JGroups to run message deadlock detection algorithms "
+"with every request. Its default value is <literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">DeadlockDetection</emphasis> 是用来通知 JGroups 为每"
+"个请求运行消息死锁检测算法(message deadlock detection algorithms)的可选布尔"
+"值属性。它的缺省值是 <literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:79
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StateTransferTimeout</emphasis> is an optional "
+"attribute to specify the timeout for state replication across the cluster "
+"(in milliseconds). State replication refers to the process of obtaining "
+"initial application state from other already-running cluster members at "
+"service startup. Its default value is <literal>30000</literal>."
+msgstr ""
+"<emphasis role=\"bold\">StateTransferTimeout</emphasis> 是用来指定跨群集的状"
+"态复制(state replication)的超时时间(以毫秒为单位)的可选属性。它的缺省值"
+"是 <literal>30000</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:82
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> is an element to specify "
+"JGroup configuration options for this cluster (see <xref linkend="
+"\"jbosscache-jgroups\"/>)."
+msgstr ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> 是一个用来为这个群集(参"
+"看 <xref linkend=\"jbosscache-jgroups\"/>)指定 JGroup 配置选项的元素"
+"(element)。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:86
+#, no-c-format
+msgid ""
+"In order for nodes to form a cluster, they must have the exact same "
+"<literal>PartitionName</literal> and the <literal>ParitionConfig</literal> "
+"elements. Changes in either element on some but not all nodes would cause "
+"the cluster to split."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:89
+#, fuzzy, no-c-format
+msgid ""
+"You can view the current cluster information by pointing your browser to the "
+"JMX console of any JBoss instance in the cluster (i.e., <literal>http://"
+"hostname:8080/jmx-console/</literal>) and then clicking on the "
+"<literal>jboss:service=DefaultPartition</literal> MBean (change the MBean "
+"name to reflect your partitionr name if you use the -g startup switch). A "
+"list of IP addresses for the current cluster members is shown in the "
+"CurrentView field."
+msgstr ""
+"你可以用浏览器访问群集系统里的任何 JBoss 实例的 JMX 控制台来查看当前的群集信"
+"息(如,<literal>http://hostname:8080/jmx-console/</literal>),点击 "
+"<literal>jboss:service=DefaultPartition</literal> MBean(如果这个节点没有加"
+"入 <literal>DefaultPartition</literal>,你可以改变 MBean 名来反映群集名)。"
+"<literal>CurrentView</literal> 字段会显示当前群集的 IP 地址的列表。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:93
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:94
+#, fuzzy, no-c-format
+msgid ""
+"While it is technically possible to put a JBoss server instance into "
+"multiple HAPartitions at the same time, this practice is generally not "
+"recommended, as it increases management complexity."
+msgstr ""
+"从技术上来讲,我们可以在同一时间把 JBoss 服务器实例放到多个群集里,但我们通常"
+"不推荐这么做,因为这增加了管理的复杂性。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:100
+#, fuzzy, no-c-format
+msgid "JBoss Cache channels"
+msgstr "JBoss XMBeans"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:101
+#, fuzzy, no-c-format
+msgid ""
+"JBoss Cache is a fully featured distributed cache framework that can be used "
+"in any application server environment or standalone. JBoss AS integrates "
+"JBoss Cache to provide cache services for HTTP sessions, EJB 3.0 session "
+"beans, and EJB 3.0 entity beans. Each of these cache services is defined in "
+"a separate Mbean, and each cache creates its own JGroups Channel. We will "
+"cover those MBeans when we discuss specific services in the next several "
+"sections."
+msgstr ""
+"JBoss Cache 是个一个能用在任何应用程序和独立服务器环境里的分布式缓存框架。它"
+"逐渐地代替了 <literal>HASessionState</literal> 服务。JBoss AS 集成了 JBoss "
+"Cache 来为 HTTP 会话,EJB 3.0,entity beans 和 Hibernate 持久化对象 "
+"(persistence objects) 提供缓存服务,每个缓存服务都在不同的 MBean 里定义。我"
+"们将在后面讨论特定服务时介绍这些 MBean。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:106
+#, no-c-format
+msgid "Service Architectures"
+msgstr "服务架构"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:107
+#, fuzzy, no-c-format
+msgid ""
+"The clustering topography defined by the <literal>HAPartition</literal> "
+"MBean on each node is of great importance to system administrators. But for "
+"most application developers, you are probably more concerned about the "
+"cluster architecture from a client application's point of view. Two basic "
+"clustering architectures are used with JBoss AS: client-side interceptors (a."
+"k.a smart proxies or stubs) and external load balancers. Which architecture "
+"your application will use will depend on what type of client you have."
+msgstr ""
+"每个节点上的 <literal>ClusterPartition</literal> MBean 定义的群集拓扑结构"
+"(clustering topography)对系统管理员很重要。但是对于大部分的应用程序开发者来"
+"说,你可能更关心从客户应用程序的角度来看的群集架构。JBoss AS 支持两种群集架"
+"构:客户端拦截器(client-side interceptors)(proxies 或 stubs)和负载平衡系"
+"统(load balancers)。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:113 Clustering_Guide_Intro.xml:159
+#, fuzzy, no-c-format
+msgid "Client-side interceptor architecture"
+msgstr "客户端拦截器"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:114
+#, fuzzy, no-c-format
+msgid ""
+"Most remote services provided by the JBoss application server, including "
+"JNDI, EJB, JMS, RMI and JBoss Remoting, require the client to obtain (e.g., "
+"to look up and download) a stub (or proxy) object. The stub object is "
+"generated by the server and it implements the business interface of the "
+"service. The client then makes local method calls against the stub object. "
+"The stub automatically routes the call across the network and where it is "
+"invoked against service objects managed in the server. In a clustering "
+"environment, the server-generated stub object includes an interceptor that "
+"understands how to route calls to multiple nodes in the cluster. The stub "
+"object figures out how to find the appropriate server node, marshal call "
+"parameters, un-marshall call results, and return the result to the caller "
+"client."
+msgstr ""
+"JBoss 应用服务器提供的大部分远程服务,包括 JNDI、EJB、RMI 和 JBoss Remoting,"
+"都要求客户端获得(如,查找和下载)一个 stub(或 proxy)对象。占位对象(stub "
+"object)由服务器生成,它实现服务的商业接口。客户可对占位对象调用本地方法。这"
+"个调用会自动寻找路由,并被服务器管理的服务对象引用。在群集环境里,服务器生成"
+"的占位对象也是一个懂得怎样把调用指引向不同节点的拦截器。占位对象寻找合适的服"
+"务器节点、配置调用参数、解释调用结果,并把结果返回给调用程序。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:119
+#, fuzzy, no-c-format
+msgid ""
+"The stub interceptors maintain up-to-date knowledge about the cluster. For "
+"instance, they know the IP addresses of all available server nodes, the "
+"algorithm to distribute load across nodes (see next section), and how to "
+"failover the request if the target node not available. As part of handling "
+"each service request, if the cluster topology has changed the server node "
+"updates the stub interceptor with the latest changes in the cluster. For "
+"instance, if a node drops out of the cluster, each of client stub "
+"interceptor is updated with the new configuration the next time it connects "
+"to any active node in the cluster. All the manipulations done by the service "
+"stub are transparent to the client application. The client-side interceptor "
+"clustering architecture is illustrated in <xref linkend=\"clustering-"
+"InterceptorArch.fig\"/>."
+msgstr ""
+"stub interceptors 拥有群集系统的更新信息。例如,它们知道所有可用网络节点的 "
+"IP 地址,怎样在节点上分摊负载的算法(请参考下一部分内容),和如果目标节点不可"
+"用时对请求进行失效切换(failover)。对于每个服务请求,服务器节点都用群集里最"
+"新的信息来更新 stub interceptor。例如,如果一个节点退出群集系统后,每个客户 "
+"stub interceptor 在下一次连接活动的节点时,都会用新的配置来更新。在 service "
+"stub 上的所有操作对于客户应用程序都是透明的。<xref linkend=\"clustering-"
+"InterceptorArch.fig\"/> 里说明了客户端拦截器群集架构。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:122
+#, no-c-format
+msgid "The client-side interceptor (proxy) architecture for clustering"
+msgstr "The client-side interceptor (proxy) architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:130
+#, no-c-format
+msgid ""
+"describes how to enable the client proxy to handle the entire cluster "
+"restart."
+msgstr "描述怎样用客户代理(client proxy)来处理整个群集系统的重启。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:135
+#, no-c-format
+msgid "Load balancer"
+msgstr "负载平衡系统"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:136
+#, fuzzy, no-c-format
+msgid ""
+"Other JBoss services, in particular the HTTP-based services, do not require "
+"the client to download anything. The client (e.g., a web browser) sends in "
+"requests and receives responses directly over the wire according to certain "
+"communication protocols (e.g., the HTTP protocol). In this case, an external "
+"load balancer is required to process all requests and dispatch them to "
+"server nodes in the cluster. The client only needs to know about how to "
+"contact the load balancer; it has no knowledge of the JBoss AS instances "
+"behind the load balancer. The load balancer is logically part of the "
+"cluster, but we refer to it as “external” because it is not running in the "
+"same process as either the client or any of the JBoss AS instances. It can "
+"be implemented either in software or hardware. There are many vendors of "
+"hardware load balancers; the mod_jk Apache module is an excellent example of "
+"a software load balancer. An external load balancer implements its own "
+"mechanism for understanding the cluster configuration and provides its own "
+"load balancing and failover policies. The external load balancer clustering "
+"architecture is illustrated in <xref linkend=\"clustering-BalancerArch.fig\"/"
+">."
+msgstr ""
+"其他的 JBoss 服务,特别是 HTTP web 服务,不要求客户下载任何东西。客户端(如,"
+"web 浏览器)按照某种通信协议(如 HTTP 协议)直接发送请求和接收回复。在这种情"
+"况下,负载平衡系统需要处理所有的请求并把它们分配给群集里的服务器节点。负载平"
+"衡系统是群集里的一个典型概念。它理解群集配置和失效切换策略(failover "
+"policies)。客户只需要知道它的存在。<xref linkend=\"clustering-BalancerArch."
+"fig\"/> 说明了负载平衡系统的群集架构。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:140
+#, fuzzy, no-c-format
+msgid "The external load balancer architecture for clustering"
+msgstr "The load balancer architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:147
+#, fuzzy, no-c-format
+msgid ""
+"A potential problem with an external load balancer architecture is that the "
+"load balancer itself may be a single point of failure. It needs to be "
+"monitored closely to ensure high availability of the entire cluster's "
+"services."
+msgstr ""
+"负载平衡系统的一个潜在问题就是它本身就是单一的故障点。它需要被很好地监控来确"
+"保整个群集服务的高可用性。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:154
+#, no-c-format
+msgid "Load-Balancing Policies"
+msgstr "负载平衡策略"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:155
+#, fuzzy, no-c-format
+msgid ""
+"Both the JBoss client-side interceptor (stub) and load balancer use load "
+"balancing policies to determine which server node to which node a new "
+"request should be sent. In this section, let's go over the load balancing "
+"policies available in JBoss AS."
+msgstr ""
+"JBoss 客户端拦截器(stub)和负载平衡系统都使用了负载平衡策略来决定把新请求发"
+"送给哪个节点。让我们来看看 JBoss AS 里的负载平衡策略。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:160
+#, no-c-format
+msgid ""
+"In JBoss 4.2.2, the following load balancing options are available when the "
+"client-side interceptor architecture is used. The client-side stub maintains "
+"a list of all nodes providing the target service; the job of the load "
+"balance policy is to pick a node from this list for each request."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:165
+#, fuzzy, no-c-format
+msgid ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>): each call is dispatched to a new node, proceeding sequentially "
+"through the list of nodes. The first target node is randomly selected from "
+"the list."
+msgstr ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>):每次调用都分派给新节点。第一个目标节点从列表里随机选择。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:171
+#, fuzzy, no-c-format
+msgid ""
+"Random-Robin (<literal>org.jboss.ha.framework.interfaces.RandomRobin</"
+"literal>): for each call the target node is randomly selected from the list."
+msgstr ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>):每次调用都分派给新节点。第一个目标节点从列表里随机选择。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:176
+#, fuzzy, no-c-format
+msgid ""
+"First Available (<literal>org.jboss.ha.framework.interfaces.FirstAvailable</"
+"literal>): one of the available target nodes is elected as the main target "
+"and is thereafter used for every call; this elected member is randomly "
+"chosen from the list of members in the cluster. When the list of target "
+"nodes changes (because a node starts or dies), the policy will choose a new "
+"target node unless the currently elected node is still available. Each "
+"client-side stub elects its own target node independently of the other "
+"stubs, so if a particular client downloads two stubs for the same target "
+"service (e.g., an EJB), each stub will independently pick its target. This "
+"is an example of a policy that provides “session affinity” or “sticky "
+"sessions”, since the target node does not change once established."
+msgstr ""
+"First Available (<literal>org.jboss.ha.framework.interfaces.FirstAvailable</"
+"literal>):选择其中一个可用目标节点作为主目标节点,用于每次调用:这个节点是在"
+"群集里的节点列表里随机选取的。当目标节点的列表改变时(因为有节点启动或退"
+"出),除非当前选用的节点仍然可用,这个策略会重新选择一个目标节点。每个客户端"
+"拦截器或者负载平衡系统都会根据自己的策略独立地选择目标节点。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:183
+#, fuzzy, no-c-format
+msgid ""
+"First Available Identical All Proxies (<literal>org.jboss.ha.framework."
+"interfaces.FirstAvailableIdenticalAllProxies</literal>): has the same "
+"behaviour as the \"First Available\" policy but the elected target node is "
+"shared by all stubs in the same client-side VM that are associated with the "
+"same target service. So if a particular client downloads two stubs for the "
+"same target service (e.g. an EJB), each stub will use the same target."
+msgstr ""
+"JBoss 3.2 里的新的负载平衡选项是 \"First AvailableIdenticalAllProxies"
+"\" (<literal>org.jboss.ha.framework.interfaces."
+"FirstAvailableIdenticalAllProxies</literal>)。它与 \"First Available\" 有相同"
+"的行为,但选取的目标节点由所有同一 \"family\" 的客户端拦截器共享。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:189
+#, no-c-format
+msgid ""
+"Each of the above is an implementation of the org.jboss.ha.framework."
+"interfaces.LoadBalancePolicy interface; users are free to write their own "
+"implementation of this simple interface if they need some special behavior. "
+"In later sections we'll see how to configure the load balance policies used "
+"by different services."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:193
+#, fuzzy, no-c-format
+msgid "External load balancer architecture"
+msgstr "The load balancer architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:195
+#, no-c-format
+msgid ""
+"As noted above, an external load balancer provides its own load balancing "
+"capabilities. What capabilities are supported depends on the provider of the "
+"load balancer. The only JBoss requirement is that the load balancer support "
+"“session affinitiy” (a.k.a. “sticky sessions”). With session affinitiy "
+"enabled, once the load balancer routes a request from a client to node A and "
+"the server initiates a session, all future requests associated with that "
+"session must be routed to node A, so long as node A is available."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:205
+#, no-c-format
+msgid "Farming Deployment"
+msgstr "Farming 部署"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:206
+#, no-c-format
+msgid ""
+"The easiest way to deploy an application into the cluster is to use the "
+"farming service. That is to hot-deploy the application archive file (e.g., "
+"the EAR, WAR or SAR file) in the <code>all/farm/</code> directory of any of "
+"the cluster members and the application will be automatically duplicated "
+"across all nodes in the same cluster. If node joins the cluster later, it "
+"will pull in all farm deployed applications in the cluster and deploy them "
+"locally at start-up time. If you delete the application from one of the "
+"running cluster server node's <literal>farm/</literal> folder, the "
+"application will be undeployed locally and then removed from all other "
+"cluster server nodes farm folder (triggers undeployment.) You should "
+"manually delete the application from the farm folder of any server node not "
+"currently connected to the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:216
+#, no-c-format
+msgid ""
+"Currently, due to an implementation weakness, the farm deployment service "
+"only works for 1) archives located in the farm/ directory of the first node "
+"to join the cluster or 2) hot-deployed archives. If you first put a new "
+"application in the farm/ directory and then start the server to have it join "
+"an already running cluster, the application will not be pushed across the "
+"cluster or deployed. This is because the farm service does not know whether "
+"the application really represents a new deployment or represents an old "
+"deployment that was removed from the rest of the cluster while the newly "
+"starting node was off-line. We are working to resolve this issue."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:219
+#, no-c-format
+msgid ""
+"You can only put zipped archive files, not exploded directories, in the farm "
+"directory. If exploded directories are placed in farm the directory contents "
+"will be replicated around the cluster piecemeal, and it is very likely that "
+"remote nodes will begin trying to deploy things before all the pieces have "
+"arrived, leading to deployment failure."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:222
+#, no-c-format
+msgid ""
+"Farmed deployment is not atomic. A problem deploying, undeploying or "
+"redeploying an application on one node in the cluster will not prevent the "
+"deployment, undeployment or redeployment being done on the other nodes. "
+"There is no rollback capability. Deployment is also not staggered; it is "
+"quite likely, for example, that a redeployment will happen on all nodes in "
+"the cluster simultaneously, briefly leaving no nodes in the cluster "
+"providing service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:226
+#, fuzzy, no-c-format
+msgid ""
+"Farming is enabled by default in the <literal>all</literal> configuration in "
+"JBoss AS distributions, so you will not have to set it up yourself. The "
+"<literal>farm-service.xml</literal> configuration file is located in the "
+"deploy/deploy.last directory. If you want to enable farming in a custom "
+"configuration, simply copy the farm-service.xml file and copy it to the "
+"JBoss deploy directory <literal>$JBOSS_HOME/server/your_own_config/deploy/"
+"deploy.last</literal>. Make sure that your custom configuration has "
+"clustering enabled."
+msgstr ""
+"在 JBoss AS 发行版本里,Farming 在 <literal>all</literal> 配置里是缺省被启用"
+"的,所以你不需要自己来设置它。配置文件放在 <literal>deploy/deploy.last</"
+"literal> 目录下。如果你想在自定义的配置文件里启用 farming,只需要建立如下所示"
+"的 XML 文件(<literal>farm-service.xml</literal>)并把它拷贝到 JBoss 的 "
+"<literal>$JBOSS_HOME/server/your_own_config/deploy</literal> 目录下。请确保你"
+"的自定义配置文件启用了群集系统。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:228
+#, fuzzy, no-c-format
+msgid ""
+"After deploying farm-service.xml you are ready to rumble. The required "
+"FarmMemberService MBean attributes for configuring a farm are listed below."
+msgstr ""
+"在部署了 <literal>farm-service.xml</literal> 之后,下面所列是配置 farm 所需"
+"的 <literal>FarmMemberService</literal> MBean 属性。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Intro.xml:231
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<server> \n"
+" \n"
+" <mbean code=\"org.jboss.ha.framework.server.FarmMemberService\" \n"
+" name=\"jboss:service=FarmMember,partition=DefaultPartition"
+"\"> \n"
+" ... \n"
+" \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <attribute name=\"ScanPeriod\">5000</"
+"attribute> \n"
+" <attribute name=\"URLs\">farm/</attribute> \n"
+" ...\n"
+" </mbean> \n"
+"</server>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<server> \n"
+" \n"
+" <mbean code=\"org.jboss.ha.framework.server.FarmMemberService\" \n"
+" name=\"jboss:service=FarmMember,partition=DefaultPartition"
+"\"> \n"
+" ... \n"
+" <attribute name=\"PartitionName\">DefaultPartition</"
+"attribute> \n"
+" <attribute name=\"ScanPeriod\">5000</attribute> \n"
+" <attribute name=\"URLs\">farm/</attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:236
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterPartition</emphasis> is a required attribute "
+"to inject the HAPartition service that the farm service uses for intra-"
+"cluster communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:239
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">URLs</emphasis> points to the directory where "
+"deployer watches for files to be deployed. This MBean will create this "
+"directory is if does not already exist. If a full URL is not provided, it is "
+"assumed that the value is a filesytem path relative to the configuration "
+"directory (e.g. <literal>$JBOSS_HOME/server/all/</literal>)."
+msgstr ""
+"<emphasis role=\"bold\">URLs</emphasis> 指向部署者(deployer)用来观察文件部"
+"署的目录。如果这个目录不存在,MBean 将创建它。而且,\".\" 指向配置目录(也就"
+"是:<literal>$JBOSS_HOME/server/all/</literal>)。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:244
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis> specifies the interval at "
+"which the folder must be scanned for changes.. Its default value is "
+"<literal>5000</literal>."
+msgstr ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis> 指定了扫描文件夹变化的时间间"
+"隔。它的缺省值是 <literal>5000</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:248
+#, fuzzy, no-c-format
+msgid ""
+"The farming service is an extension of the <literal>URLDeploymentScanner</"
+"literal>, which scans for hot deployments in the <literal>deploy/</literal> "
+"directory. So, you can use all the attributes defined in the "
+"<literal>URLDeploymentScanner</literal> MBean in the "
+"<literal>FarmMemberService</literal> MBean. In fact, the <literal>URLs</"
+"literal> and <literal>ScanPeriod</literal> attributes listed above are "
+"inherited from the <literal>URLDeploymentScanner</literal> MBean."
+msgstr ""
+"Farming 服务是 <literal>URLDeploymentScanner</literal> 的扩展,它扫描 "
+"<literal>deploy/</literal> 目录下的热部署(hot deployment)。所以,你能够使"
+"用 <literal>FarmMemberService</literal> MBean 里的 "
+"<literal>URLDeploymentScanner</literal> MBean 定义的所有属性。实际上,上列 "
+"<literal>URLs</literal> 和 <literal>ScanPeriod</literal> 属性都是从 "
+"<literal>URLDeploymentScanner</literal> MBean 继承过来的。"
+
+#. Tag: title
+#: Clustering_Guide_Intro.xml:257
+#, no-c-format
+msgid "Distributed state replication services"
+msgstr "分布式状态复制服务"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:258
+#, fuzzy, no-c-format
+msgid ""
+"In a clustered server environment, distributed state management is a key "
+"service the cluster must provide. For instance, in a stateful session bean "
+"application, the session state must be synchronized among all bean instances "
+"across all nodes, so that the client application reaches the same session "
+"state no matter which node serves the request. In an entity bean "
+"application, the bean object sometimes needs to be cached across the cluster "
+"to reduce the database load. Currently, the state replication and "
+"distributed cache services in JBoss AS are provided via three ways: the "
+"<literal>HASessionState</literal> Mbean, the <literal>DistributedState</"
+"literal> MBean and the JBoss Cache framework."
+msgstr ""
+"在群集服务器环境里,分布式状态管理(distributed state management)是群集系统"
+"必须提供的一个关键服务。例如,在 stateful session bean 应用程序里,会话状态"
+"(session state)必须在所有节点的 bean 实例中同步,这可以使客户应用程序获得相"
+"同的会话状态,而不用管是哪个节点处理请求。在 entity bean 应用程序里,bean 对"
+"象有时候需要跨群集地缓存来减少数据库负载。目前,JBoss AS 里的状态复制(state "
+"replication)和分布式缓存服务(distributed cache service)由两个途径提供:"
+"<literal>HASessionState</literal> MBean 和 JBoss Cache framework。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:265
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>HASessionState</literal> MBean is a legacy service that "
+"provides session replication and distributed cache services for EJB 2.x "
+"stateful session beans. The MBean is defined in the <literal>all/deploy/"
+"cluster-service.xml</literal> file. We will show its configuration options "
+"in the EJB 2.x stateful session bean section later."
+msgstr ""
+"<literal>HASessionState</literal> MBean 为 EJB 2.x 的 stateful session beans "
+"和 JBoss 3.x 和 4.x 里的 HTTP 负载平衡提供会话复制(session replication)和"
+"分布式缓存服务(distributed cache service)。<literal>all/deploy/cluster-"
+"service.xml</literal> 文件里定义了这个 MBean。我们会在后面的 EJB 2.x "
+"stateful session bean 部分展示它的配置选项。"
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:268
+#, no-c-format
+msgid ""
+"The <literal>DistributedState</literal> Mbean is a legacy service built on "
+"the HAPartition service. It is supported for backwards compatibility "
+"reasons, but new applications should not use it; they should use the much "
+"more sophisticated JBoss Cache instead."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Intro.xml:274
+#, no-c-format
+msgid ""
+"As mentioned above JBoss Cache is used to provide cache services for HTTP "
+"sessions, EJB 3.0 session beans and EJB 3.0 entity beans. It is the primary "
+"distributed state management tool in JBoss AS, and is an excellent choice "
+"for any custom caching requirements your applications may have. We will "
+"cover JBoss Cache in more detail when we discuss specific services in the "
+"next several sections.."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Introduction.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Introduction.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_Introduction.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,9133 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:5
+#, no-c-format
+msgid "Clustering"
+msgstr "群集"
+
+#. Tag: subtitle
+#: Clustering_Guide_Introduction.xml:6
+#, no-c-format
+msgid "High Availability Enterprise Services via JBoss Clusters"
+msgstr "用 JBoss 群集实现高可用性企业服务"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:9
+#, no-c-format
+msgid "Introduction"
+msgstr "简介"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:10
+#, fuzzy, no-c-format
+msgid ""
+"Clustering allows us to run an application on several parallel servers (a.k."
+"a cluster nodes) while providing a single view to application clients. Load "
+"is distributed across different servers, and even if one or more of the "
+"servers fails, the application is still accessible via the surviving cluster "
+"nodes. Clustering is crucial for scalable enterprise applications, as you "
+"can improve performance by simply adding more nodes to the cluster. "
+"Clustering is crucial for highly available enterprise applications, as it is "
+"the clustering infrastructure that supports the redundancy needed for high "
+"availability."
+msgstr ""
+"群集系统(Clustering)允许我们在多台平行的服务器(群集节点)上运行一个应用程"
+"序。负载分布在不同的服务器上,即使其中任何一台崩溃,应用程序还是可以在其他群"
+"集节点(cluster nodes)上运行。群集对于可扩展性企业级应用程序是很关键的,因为"
+"你简单地把更多节点加入到群集系统里就可以提高性能。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:14
+#, no-c-format
+msgid ""
+"The JBoss Application Server (AS) comes with clustering support out of the "
+"box. The simplest way to start a JBoss server cluster is to start several "
+"JBoss instances on the same local network, using the <literal>run -c all</"
+"literal> command for each instance. Those server instances, all started in "
+"the <literal>all</literal> configuration, detect each other and "
+"automatically form a cluster."
+msgstr ""
+"JBoss 应用服务器(AS)缺省支持群集系统。最简单的启动 JBoss 服务器群集的方法就"
+"是在同一本地网络里启动多个 JBoss 实例,每个实例都可以用 <literal>run -c all</"
+"literal> 命令来运行。这些按照 <literal>all</literal> 配置文件启动的实例,可以"
+"检测到对方而自动组成一个群集系统。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:17
+#, fuzzy, no-c-format
+msgid ""
+"In the first section of this chapter, we discuss basic concepts behind "
+"JBoss's clustering services. It is important that you understand these "
+"concepts before reading the rest of the chapter. Clustering configurations "
+"for specific types of applications are covered after this section."
+msgstr ""
+"在本章的第一部分,我们将讨论 JBoss 群集服务的基本概念。在阅读本章后面的内容之"
+"前,先理解这些概念是很重要的。在这部分内容之后,我们将介绍怎样为特定类型的应"
+"用程序配置群集系统。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:23
+#, no-c-format
+msgid "Cluster Definition"
+msgstr "群集系统的定义"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:24
+#, no-c-format
+msgid ""
+"A cluster is a set of nodes that communicate with each other and work toward "
+"a common goal. In a JBoss Application Server cluster (also known as a "
+"“partition”), a node is an JBoss Application Server instance. Communication "
+"between the nodes is handled by the JGroups group communication library, "
+"with a JGroups Channel providing the core functionality of tracking who is "
+"in the cluster and reliably exchanging messages between the cluster members. "
+"JGroups channels with the same configuration and name have the ability to "
+"dynamically discover each other and form a group. This is why simply "
+"executing “run -c all” on two AS instances on the same network is enough for "
+"them to form a cluster – each AS starts a Channel (actually, several) with "
+"the same default configuration, so they dynamically discover each other and "
+"form a cluster. Nodes can be dynamically added to or removed from clusters "
+"at any time, simply by starting or stopping a Channel with a configuration "
+"and name that matches the other cluster members. In summary, a JBoss cluster "
+"is a set of AS server instances each of which is running an identically "
+"configured and named JGroups Channel."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:29
+#, no-c-format
+msgid ""
+"On the same AS instance, different services can create their own Channel. In "
+"a default 5.0.x AS, four different services create channels – the web "
+"session replication service, the EJB3 SFSB replication service, the EJB3 "
+"entity caching service, and a core general purpose clustering service known "
+"as HAPartition. In order to differentiate these channels, each must have a "
+"unique name, and its configuration must match its peers yet differ from the "
+"other channels."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:32
+#, no-c-format
+msgid ""
+"So, if you go to two AS 5.0.x instances and execute <literal>run -c all</"
+"literal>, the channels will discover each other and you'll have a conceptual "
+"<literal>cluster</literal>. It's easy to think of this as a two node "
+"cluster, but it's important to understand that you really have 4 channels, "
+"and hence 4 two node clusters."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:36
+#, no-c-format
+msgid ""
+"On the same network, even for the same service, we may have different "
+"clusters. <xref linkend=\"clustering-Partition.fig\"/> shows an example "
+"network of JBoss server instances divided into three clusters, with the "
+"third cluster only having one node. This sort of topology can be set up "
+"simply by configuring the AS instances such that within a set of nodes meant "
+"to form a cluster the Channel configurations and names match while they "
+"differ from any other channels on the same network."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:38
+#, no-c-format
+msgid "Clusters and server nodes"
+msgstr "Clusters and server nodes"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:46
+#, no-c-format
+msgid ""
+"The section on “JGroups Configuration” and on “Isolating JGroups Channels” "
+"covers in detail how to configure Channels such that desired peers find each "
+"other and unwanted peers do not. As mentioned above, by default JBoss AS "
+"uses four separate JGroups Channels. These can be divided into two broad "
+"categories: the Channel used by the general purpose HAPartition service, and "
+"three Channels created by JBoss Cache for special purpose caching and "
+"cluster wide state replication."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:50
+#, no-c-format
+msgid "HAPartition"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:52
+#, no-c-format
+msgid ""
+"HAPartition is a general purpose service used for a variety of tasks in AS "
+"clustering. At its core, it is an abstraction built on top of a JGroups "
+"Channel that provides support for making/receiving RPC invocations on/from "
+"one or more cluster members. HAPartition also supports a distributed "
+"registry of which clustering services are running on which cluster members. "
+"It provides notifications to interested listeners when the cluster "
+"membership changes or the clustered service registry changes. HAPartition "
+"forms the core of many of the clustering services we'll be discussing in the "
+"rest of this guide, including smart client-side clustered proxies, EJB 2 "
+"SFSB replication and entity cache management, farming, HA-JNDI and HA "
+"singletons."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:58
+#, fuzzy, no-c-format
+msgid ""
+"The following example shows the <literal>HAPartition</literal> MBean "
+"definition packaged with the standard JBoss AS distribution. So, if you "
+"simply start JBoss servers with their default clustering settings on a local "
+"network, you would get a default cluster named <literal>DefaultPartition</"
+"literal> that includes all server instances as its nodes."
+msgstr ""
+"下例展示了标准 JBoss AS 发行版本里的 MBean 的定义。如果你在本地网络里用缺省的"
+"群集设定来启动 JBoss 服务器,你将得到一个叫 <literal>DefaultPartition</"
+"literal> 的缺省群集,它包括了所有作为节点的服务器实例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:62
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=DefaultPartition\">\n"
+" \n"
+" <! -- Name of the partition being built -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+"\n"
+" <! -- The address used to determine the node name -->\n"
+" <attribute name=\"NodeAddress\">${jboss.bind.address}</"
+"attribute>\n"
+"\n"
+" <! -- Determine if deadlock detection is enabled -->\n"
+" <attribute name=\"DeadlockDetection\">False</attribute>\n"
+" \n"
+" <! -- Max time (in ms) to wait for state transfer to complete. \n"
+" Increase for large states -->\n"
+" <attribute name=\"StateTransferTimeout\">30000</attribute>\n"
+"\n"
+" <! -- The JGroups protocol configuration -->\n"
+" <attribute name=\"PartitionConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=DefaultPartition\">\n"
+" \n"
+" <! -- Name of the partition being built -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+"\n"
+" <! -- The address used to determine the node name -->\n"
+" <attribute name=\"NodeAddress\">${jboss.bind.address}</"
+"attribute>\n"
+"\n"
+" <! -- Determine if deadlock detection is enabled -->\n"
+" <attribute name=\"DeadlockDetection\">False</attribute>\n"
+" \n"
+" <! -- Max time (in ms) to wait for state transfer to complete. \n"
+" Increase for large states -->\n"
+" <attribute name=\"StateTransferTimeout\">30000</attribute>\n"
+"\n"
+" <! -- The JGroups protocol configuration -->\n"
+" <attribute name=\"PartitionConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:63
+#, fuzzy, no-c-format
+msgid ""
+"Here, we omitted the detailed JGroups protocol configuration for this "
+"channel. JGroups handles the underlying peer-to-peer communication between "
+"nodes, and its configuration is discussed in <xref linkend=\"jbosscache-"
+"jgroups\"/>. The following list shows the available configuration attributes "
+"in the <literal>HAPartition</literal> MBean."
+msgstr ""
+"在这里,我们忽略了这个群集的详细的 JGroups 协议配置(protocal "
+"configuration)。JGroups 处理节点之间底层的点到点通信,我们将在 <xref "
+"linkend=\"jbosscache-jgroups\"/> 里讨论它的配置。下面的列表展示了 "
+"<literal>ClusterPartition</literal> MBean 里可用的配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:68
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PartitionName</emphasis> is an optional attribute to "
+"specify the name of the cluster. Its default value is "
+"<literal>DefaultPartition</literal>. Use the <literal>-g </literal> (a.k.a. "
+"--partition) command line switch to set this value at JBoss startup."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:72
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NodeAddress</emphasis> is an optional attribute used "
+"to help generate a unique name for this node."
+msgstr ""
+"<emphasis role=\"bold\">NodeAddress</emphasis> 是用来指定节点所绑定的 IP 地址"
+"的可选属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:75
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DeadlockDetection</emphasis> is an optional boolean "
+"attribute that tells JGroups to run message deadlock detection algorithms "
+"with every request. Its default value is <literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">DeadlockDetection</emphasis> 是用来通知 JGroups 为每"
+"个请求运行消息死锁检测算法(message deadlock detection algorithms)的可选布尔"
+"值属性。它的缺省值是 <literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:80
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StateTransferTimeout</emphasis> is an optional "
+"attribute to specify the timeout for state replication across the cluster "
+"(in milliseconds). State replication refers to the process of obtaining "
+"initial application state from other already-running cluster members at "
+"service startup. Its default value is <literal>30000</literal>."
+msgstr ""
+"<emphasis role=\"bold\">StateTransferTimeout</emphasis> 是用来指定跨群集的状"
+"态复制(state replication)的超时时间(以毫秒为单位)的可选属性。它的缺省值"
+"是 <literal>30000</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:83
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> is an element to specify "
+"JGroup configuration options for this cluster (see <xref linkend="
+"\"jbosscache-jgroups\"/>)."
+msgstr ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> 是一个用来为这个群集(参"
+"看 <xref linkend=\"jbosscache-jgroups\"/>)指定 JGroup 配置选项的元素"
+"(element)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:87
+#, no-c-format
+msgid ""
+"In order for nodes to form a cluster, they must have the exact same "
+"<literal>PartitionName</literal> and the <literal>ParitionConfig</literal> "
+"elements. Changes in either element on some but not all nodes would cause "
+"the cluster to split."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:90
+#, fuzzy, no-c-format
+msgid ""
+"You can view the current cluster information by pointing your browser to the "
+"JMX console of any JBoss instance in the cluster (i.e., <literal>http://"
+"hostname:8080/jmx-console/</literal>) and then clicking on the "
+"<literal>jboss:service=DefaultPartition</literal> MBean (change the MBean "
+"name to reflect your partitionr name if you use the -g startup switch). A "
+"list of IP addresses for the current cluster members is shown in the "
+"CurrentView field."
+msgstr ""
+"你可以用浏览器访问群集系统里的任何 JBoss 实例的 JMX 控制台来查看当前的群集信"
+"息(如,<literal>http://hostname:8080/jmx-console/</literal>),点击 "
+"<literal>jboss:service=DefaultPartition</literal> MBean(如果这个节点没有加"
+"入 <literal>DefaultPartition</literal>,你可以改变 MBean 名来反映群集名)。"
+"<literal>CurrentView</literal> 字段会显示当前群集的 IP 地址的列表。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:94 Clustering_Guide_Introduction.xml:398
+#: Clustering_Guide_Introduction.xml:405 Clustering_Guide_Introduction.xml:411
+#: Clustering_Guide_Introduction.xml:1061
+#: Clustering_Guide_Introduction.xml:1486
+#: Clustering_Guide_Introduction.xml:2454
+#: Clustering_Guide_Introduction.xml:2478
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:95
+#, fuzzy, no-c-format
+msgid ""
+"While it is technically possible to put a JBoss server instance into "
+"multiple HAPartitions at the same time, this practice is generally not "
+"recommended, as it increases management complexity."
+msgstr ""
+"从技术上来讲,我们可以在同一时间把 JBoss 服务器实例放到多个群集里,但我们通常"
+"不推荐这么做,因为这增加了管理的复杂性。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:101
+#, fuzzy, no-c-format
+msgid "JBoss Cache channels"
+msgstr "JBoss XMBeans"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:102
+#, fuzzy, no-c-format
+msgid ""
+"JBoss Cache is a fully featured distributed cache framework that can be used "
+"in any application server environment or standalone. JBoss AS integrates "
+"JBoss Cache to provide cache services for HTTP sessions, EJB 3.0 session "
+"beans, and EJB 3.0 entity beans. Each of these cache services is defined in "
+"a separate Mbean, and each cache creates its own JGroups Channel. We will "
+"cover those MBeans when we discuss specific services in the next several "
+"sections."
+msgstr ""
+"JBoss Cache 是个一个能用在任何应用程序和独立服务器环境里的分布式缓存框架。它"
+"逐渐地代替了 <literal>HASessionState</literal> 服务。JBoss AS 集成了 JBoss "
+"Cache 来为 HTTP 会话,EJB 3.0,entity beans 和 Hibernate 持久化对象 "
+"(persistence objects) 提供缓存服务,每个缓存服务都在不同的 MBean 里定义。我"
+"们将在后面讨论特定服务时介绍这些 MBean。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:107
+#, no-c-format
+msgid "Service Architectures"
+msgstr "服务架构"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:108
+#, fuzzy, no-c-format
+msgid ""
+"The clustering topography defined by the <literal>HAPartition</literal> "
+"MBean on each node is of great importance to system administrators. But for "
+"most application developers, you are probably more concerned about the "
+"cluster architecture from a client application's point of view. Two basic "
+"clustering architectures are used with JBoss AS: client-side interceptors (a."
+"k.a smart proxies or stubs) and external load balancers. Which architecture "
+"your application will use will depend on what type of client you have."
+msgstr ""
+"每个节点上的 <literal>ClusterPartition</literal> MBean 定义的群集拓扑结构"
+"(clustering topography)对系统管理员很重要。但是对于大部分的应用程序开发者来"
+"说,你可能更关心从客户应用程序的角度来看的群集架构。JBoss AS 支持两种群集架"
+"构:客户端拦截器(client-side interceptors)(proxies 或 stubs)和负载平衡系"
+"统(load balancers)。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:114 Clustering_Guide_Introduction.xml:160
+#, fuzzy, no-c-format
+msgid "Client-side interceptor architecture"
+msgstr "客户端拦截器"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:115
+#, fuzzy, no-c-format
+msgid ""
+"Most remote services provided by the JBoss application server, including "
+"JNDI, EJB, JMS, RMI and JBoss Remoting, require the client to obtain (e.g., "
+"to look up and download) a stub (or proxy) object. The stub object is "
+"generated by the server and it implements the business interface of the "
+"service. The client then makes local method calls against the stub object. "
+"The stub automatically routes the call across the network and where it is "
+"invoked against service objects managed in the server. In a clustering "
+"environment, the server-generated stub object includes an interceptor that "
+"understands how to route calls to multiple nodes in the cluster. The stub "
+"object figures out how to find the appropriate server node, marshal call "
+"parameters, un-marshall call results, and return the result to the caller "
+"client."
+msgstr ""
+"JBoss 应用服务器提供的大部分远程服务,包括 JNDI、EJB、RMI 和 JBoss Remoting,"
+"都要求客户端获得(如,查找和下载)一个 stub(或 proxy)对象。占位对象(stub "
+"object)由服务器生成,它实现服务的商业接口。客户可对占位对象调用本地方法。这"
+"个调用会自动寻找路由,并被服务器管理的服务对象引用。在群集环境里,服务器生成"
+"的占位对象也是一个懂得怎样把调用指引向不同节点的拦截器。占位对象寻找合适的服"
+"务器节点、配置调用参数、解释调用结果,并把结果返回给调用程序。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:120
+#, fuzzy, no-c-format
+msgid ""
+"The stub interceptors maintain up-to-date knowledge about the cluster. For "
+"instance, they know the IP addresses of all available server nodes, the "
+"algorithm to distribute load across nodes (see next section), and how to "
+"failover the request if the target node not available. As part of handling "
+"each service request, if the cluster topology has changed the server node "
+"updates the stub interceptor with the latest changes in the cluster. For "
+"instance, if a node drops out of the cluster, each of client stub "
+"interceptor is updated with the new configuration the next time it connects "
+"to any active node in the cluster. All the manipulations done by the service "
+"stub are transparent to the client application. The client-side interceptor "
+"clustering architecture is illustrated in <xref linkend=\"clustering-"
+"InterceptorArch.fig\"/>."
+msgstr ""
+"stub interceptors 拥有群集系统的更新信息。例如,它们知道所有可用网络节点的 "
+"IP 地址,怎样在节点上分摊负载的算法(请参考下一部分内容),和如果目标节点不可"
+"用时对请求进行失效切换(failover)。对于每个服务请求,服务器节点都用群集里最"
+"新的信息来更新 stub interceptor。例如,如果一个节点退出群集系统后,每个客户 "
+"stub interceptor 在下一次连接活动的节点时,都会用新的配置来更新。在 service "
+"stub 上的所有操作对于客户应用程序都是透明的。<xref linkend=\"clustering-"
+"InterceptorArch.fig\"/> 里说明了客户端拦截器群集架构。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:123
+#, no-c-format
+msgid "The client-side interceptor (proxy) architecture for clustering"
+msgstr "The client-side interceptor (proxy) architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:131
+#, no-c-format
+msgid ""
+"describes how to enable the client proxy to handle the entire cluster "
+"restart."
+msgstr "描述怎样用客户代理(client proxy)来处理整个群集系统的重启。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:136
+#, no-c-format
+msgid "Load balancer"
+msgstr "负载平衡系统"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:137
+#, fuzzy, no-c-format
+msgid ""
+"Other JBoss services, in particular the HTTP-based services, do not require "
+"the client to download anything. The client (e.g., a web browser) sends in "
+"requests and receives responses directly over the wire according to certain "
+"communication protocols (e.g., the HTTP protocol). In this case, an external "
+"load balancer is required to process all requests and dispatch them to "
+"server nodes in the cluster. The client only needs to know about how to "
+"contact the load balancer; it has no knowledge of the JBoss AS instances "
+"behind the load balancer. The load balancer is logically part of the "
+"cluster, but we refer to it as “external” because it is not running in the "
+"same process as either the client or any of the JBoss AS instances. It can "
+"be implemented either in software or hardware. There are many vendors of "
+"hardware load balancers; the mod_jk Apache module is an excellent example of "
+"a software load balancer. An external load balancer implements its own "
+"mechanism for understanding the cluster configuration and provides its own "
+"load balancing and failover policies. The external load balancer clustering "
+"architecture is illustrated in <xref linkend=\"clustering-BalancerArch.fig\"/"
+">."
+msgstr ""
+"其他的 JBoss 服务,特别是 HTTP web 服务,不要求客户下载任何东西。客户端(如,"
+"web 浏览器)按照某种通信协议(如 HTTP 协议)直接发送请求和接收回复。在这种情"
+"况下,负载平衡系统需要处理所有的请求并把它们分配给群集里的服务器节点。负载平"
+"衡系统是群集里的一个典型概念。它理解群集配置和失效切换策略(failover "
+"policies)。客户只需要知道它的存在。<xref linkend=\"clustering-BalancerArch."
+"fig\"/> 说明了负载平衡系统的群集架构。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:141
+#, fuzzy, no-c-format
+msgid "The external load balancer architecture for clustering"
+msgstr "The load balancer architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:148
+#, fuzzy, no-c-format
+msgid ""
+"A potential problem with an external load balancer architecture is that the "
+"load balancer itself may be a single point of failure. It needs to be "
+"monitored closely to ensure high availability of the entire cluster's "
+"services."
+msgstr ""
+"负载平衡系统的一个潜在问题就是它本身就是单一的故障点。它需要被很好地监控来确"
+"保整个群集服务的高可用性。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:155
+#, no-c-format
+msgid "Load-Balancing Policies"
+msgstr "负载平衡策略"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:156
+#, fuzzy, no-c-format
+msgid ""
+"Both the JBoss client-side interceptor (stub) and load balancer use load "
+"balancing policies to determine which server node to which node a new "
+"request should be sent. In this section, let's go over the load balancing "
+"policies available in JBoss AS."
+msgstr ""
+"JBoss 客户端拦截器(stub)和负载平衡系统都使用了负载平衡策略来决定把新请求发"
+"送给哪个节点。让我们来看看 JBoss AS 里的负载平衡策略。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:161
+#, no-c-format
+msgid ""
+"In JBoss 5.0.0, the following load balancing options are available when the "
+"client-side interceptor architecture is used. The client-side stub maintains "
+"a list of all nodes providing the target service; the job of the load "
+"balance policy is to pick a node from this list for each request."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:166
+#, fuzzy, no-c-format
+msgid ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>): each call is dispatched to a new node, proceeding sequentially "
+"through the list of nodes. The first target node is randomly selected from "
+"the list."
+msgstr ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>):每次调用都分派给新节点。第一个目标节点从列表里随机选择。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:172
+#, fuzzy, no-c-format
+msgid ""
+"Random-Robin (<literal>org.jboss.ha.framework.interfaces.RandomRobin</"
+"literal>): for each call the target node is randomly selected from the list."
+msgstr ""
+"Round-Robin (<literal>org.jboss.ha.framework.interfaces.RoundRobin</"
+"literal>):每次调用都分派给新节点。第一个目标节点从列表里随机选择。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:177
+#, fuzzy, no-c-format
+msgid ""
+"First Available (<literal>org.jboss.ha.framework.interfaces.FirstAvailable</"
+"literal>): one of the available target nodes is elected as the main target "
+"and is thereafter used for every call; this elected member is randomly "
+"chosen from the list of members in the cluster. When the list of target "
+"nodes changes (because a node starts or dies), the policy will choose a new "
+"target node unless the currently elected node is still available. Each "
+"client-side stub elects its own target node independently of the other "
+"stubs, so if a particular client downloads two stubs for the same target "
+"service (e.g., an EJB), each stub will independently pick its target. This "
+"is an example of a policy that provides “session affinity” or “sticky "
+"sessions”, since the target node does not change once established."
+msgstr ""
+"First Available (<literal>org.jboss.ha.framework.interfaces.FirstAvailable</"
+"literal>):选择其中一个可用目标节点作为主目标节点,用于每次调用:这个节点是在"
+"群集里的节点列表里随机选取的。当目标节点的列表改变时(因为有节点启动或退"
+"出),除非当前选用的节点仍然可用,这个策略会重新选择一个目标节点。每个客户端"
+"拦截器或者负载平衡系统都会根据自己的策略独立地选择目标节点。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:184
+#, fuzzy, no-c-format
+msgid ""
+"First Available Identical All Proxies (<literal>org.jboss.ha.framework."
+"interfaces.FirstAvailableIdenticalAllProxies</literal>): has the same "
+"behaviour as the \"First Available\" policy but the elected target node is "
+"shared by all stubs in the same client-side VM that are associated with the "
+"same target service. So if a particular client downloads two stubs for the "
+"same target service (e.g. an EJB), each stub will use the same target."
+msgstr ""
+"JBoss 3.2 里的新的负载平衡选项是 \"First AvailableIdenticalAllProxies"
+"\" (<literal>org.jboss.ha.framework.interfaces."
+"FirstAvailableIdenticalAllProxies</literal>)。它与 \"First Available\" 有相同"
+"的行为,但选取的目标节点由所有同一 \"family\" 的客户端拦截器共享。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:190
+#, no-c-format
+msgid ""
+"Each of the above is an implementation of the org.jboss.ha.framework."
+"interfaces.LoadBalancePolicy interface; users are free to write their own "
+"implementation of this simple interface if they need some special behavior. "
+"In later sections we'll see how to configure the load balance policies used "
+"by different services."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:194
+#, fuzzy, no-c-format
+msgid "External load balancer architecture"
+msgstr "The load balancer architecture for clustering"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:196
+#, no-c-format
+msgid ""
+"As noted above, an external load balancer provides its own load balancing "
+"capabilities. What capabilities are supported depends on the provider of the "
+"load balancer. The only JBoss requirement is that the load balancer support "
+"“session affinitiy” (a.k.a. “sticky sessions”). With session affinitiy "
+"enabled, once the load balancer routes a request from a client to node A and "
+"the server initiates a session, all future requests associated with that "
+"session must be routed to node A, so long as node A is available."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:206
+#, no-c-format
+msgid "Farming Deployment"
+msgstr "Farming 部署"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:207
+#, no-c-format
+msgid ""
+"The easiest way to deploy an application into the cluster is to use the "
+"farming service. That is to hot-deploy the application archive file (e.g., "
+"the EAR, WAR or SAR file) in the <code>all/farm/</code> directory of any of "
+"the cluster members and the application will be automatically duplicated "
+"across all nodes in the same cluster. If node joins the cluster later, it "
+"will pull in all farm deployed applications in the cluster and deploy them "
+"locally at start-up time. If you delete the application from one of the "
+"running cluster server node's <literal>farm/</literal> folder, the "
+"application will be undeployed locally and then removed from all other "
+"cluster server nodes farm folder (triggers undeployment.) You should "
+"manually delete the application from the farm folder of any server node not "
+"currently connected to the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:217
+#, no-c-format
+msgid ""
+"Currently, due to an implementation weakness, the farm deployment service "
+"only works for 1) archives located in the farm/ directory of the first node "
+"to join the cluster or 2) hot-deployed archives. If you first put a new "
+"application in the farm/ directory and then start the server to have it join "
+"an already running cluster, the application will not be pushed across the "
+"cluster or deployed. This is because the farm service does not know whether "
+"the application really represents a new deployment or represents an old "
+"deployment that was removed from the rest of the cluster while the newly "
+"starting node was off-line. We are working to resolve this issue."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:220
+#, no-c-format
+msgid ""
+"You can only put zipped archive files, not exploded directories, in the farm "
+"directory. If exploded directories are placed in farm the directory contents "
+"will be replicated around the cluster piecemeal, and it is very likely that "
+"remote nodes will begin trying to deploy things before all the pieces have "
+"arrived, leading to deployment failure."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:223
+#, no-c-format
+msgid ""
+"Farmed deployment is not atomic. A problem deploying, undeploying or "
+"redeploying an application on one node in the cluster will not prevent the "
+"deployment, undeployment or redeployment being done on the other nodes. "
+"There is no rollback capability. Deployment is also not staggered; it is "
+"quite likely, for example, that a redeployment will happen on all nodes in "
+"the cluster simultaneously, briefly leaving no nodes in the cluster "
+"providing service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:227
+#, fuzzy, no-c-format
+msgid ""
+"Farming is enabled by default in the <literal>all</literal> configuration in "
+"JBoss AS distributions, so you will not have to set it up yourself. The "
+"<literal>farm-service.xml</literal> configuration file is located in the "
+"deploy/deploy.last directory. If you want to enable farming in a custom "
+"configuration, simply copy the farm-service.xml file and copy it to the "
+"JBoss deploy directory <literal>$JBOSS_HOME/server/your_own_config/deploy/"
+"deploy.last</literal>. Make sure that your custom configuration has "
+"clustering enabled."
+msgstr ""
+"在 JBoss AS 发行版本里,Farming 在 <literal>all</literal> 配置里是缺省被启用"
+"的,所以你不需要自己来设置它。配置文件放在 <literal>deploy/deploy.last</"
+"literal> 目录下。如果你想在自定义的配置文件里启用 farming,只需要建立如下所示"
+"的 XML 文件(<literal>farm-service.xml</literal>)并把它拷贝到 JBoss 的 "
+"<literal>$JBOSS_HOME/server/your_own_config/deploy</literal> 目录下。请确保你"
+"的自定义配置文件启用了群集系统。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:229
+#, fuzzy, no-c-format
+msgid ""
+"After deploying farm-service.xml you are ready to rumble. The required "
+"FarmMemberService MBean attributes for configuring a farm are listed below."
+msgstr ""
+"在部署了 <literal>farm-service.xml</literal> 之后,下面所列是配置 farm 所需"
+"的 <literal>FarmMemberService</literal> MBean 属性。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:232
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<server> \n"
+" \n"
+" <mbean code=\"org.jboss.ha.framework.server.FarmMemberService\" \n"
+" name=\"jboss:service=FarmMember,partition=DefaultPartition"
+"\"> \n"
+" ... \n"
+" \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <attribute name=\"ScanPeriod\">5000</"
+"attribute> \n"
+" <attribute name=\"URLs\">farm/</attribute> \n"
+" ...\n"
+" </mbean> \n"
+"</server>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?> \n"
+"<server> \n"
+" \n"
+" <mbean code=\"org.jboss.ha.framework.server.FarmMemberService\" \n"
+" name=\"jboss:service=FarmMember,partition=DefaultPartition"
+"\"> \n"
+" ... \n"
+" <attribute name=\"PartitionName\">DefaultPartition</"
+"attribute> \n"
+" <attribute name=\"ScanPeriod\">5000</attribute> \n"
+" <attribute name=\"URLs\">farm/</attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:237
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterPartition</emphasis> is a required attribute "
+"to inject the HAPartition service that the farm service uses for intra-"
+"cluster communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:240
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">URLs</emphasis> points to the directory where "
+"deployer watches for files to be deployed. This MBean will create this "
+"directory is if does not already exist. If a full URL is not provided, it is "
+"assumed that the value is a filesytem path relative to the configuration "
+"directory (e.g. <literal>$JBOSS_HOME/server/all/</literal>)."
+msgstr ""
+"<emphasis role=\"bold\">URLs</emphasis> 指向部署者(deployer)用来观察文件部"
+"署的目录。如果这个目录不存在,MBean 将创建它。而且,\".\" 指向配置目录(也就"
+"是:<literal>$JBOSS_HOME/server/all/</literal>)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:245
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis> specifies the interval at "
+"which the folder must be scanned for changes.. Its default value is "
+"<literal>5000</literal>."
+msgstr ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis> 指定了扫描文件夹变化的时间间"
+"隔。它的缺省值是 <literal>5000</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:249
+#, fuzzy, no-c-format
+msgid ""
+"The farming service is an extension of the <literal>URLDeploymentScanner</"
+"literal>, which scans for hot deployments in the <literal>deploy/</literal> "
+"directory. So, you can use all the attributes defined in the "
+"<literal>URLDeploymentScanner</literal> MBean in the "
+"<literal>FarmMemberService</literal> MBean. In fact, the <literal>URLs</"
+"literal> and <literal>ScanPeriod</literal> attributes listed above are "
+"inherited from the <literal>URLDeploymentScanner</literal> MBean."
+msgstr ""
+"Farming 服务是 <literal>URLDeploymentScanner</literal> 的扩展,它扫描 "
+"<literal>deploy/</literal> 目录下的热部署(hot deployment)。所以,你能够使"
+"用 <literal>FarmMemberService</literal> MBean 里的 "
+"<literal>URLDeploymentScanner</literal> MBean 定义的所有属性。实际上,上列 "
+"<literal>URLs</literal> 和 <literal>ScanPeriod</literal> 属性都是从 "
+"<literal>URLDeploymentScanner</literal> MBean 继承过来的。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:258
+#, no-c-format
+msgid "Distributed state replication services"
+msgstr "分布式状态复制服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:259
+#, fuzzy, no-c-format
+msgid ""
+"In a clustered server environment, distributed state management is a key "
+"service the cluster must provide. For instance, in a stateful session bean "
+"application, the session state must be synchronized among all bean instances "
+"across all nodes, so that the client application reaches the same session "
+"state no matter which node serves the request. In an entity bean "
+"application, the bean object sometimes needs to be cached across the cluster "
+"to reduce the database load. Currently, the state replication and "
+"distributed cache services in JBoss AS are provided via three ways: the "
+"<literal>HASessionState</literal> Mbean, the <literal>DistributedState</"
+"literal> MBean and the JBoss Cache framework."
+msgstr ""
+"在群集服务器环境里,分布式状态管理(distributed state management)是群集系统"
+"必须提供的一个关键服务。例如,在 stateful session bean 应用程序里,会话状态"
+"(session state)必须在所有节点的 bean 实例中同步,这可以使客户应用程序获得相"
+"同的会话状态,而不用管是哪个节点处理请求。在 entity bean 应用程序里,bean 对"
+"象有时候需要跨群集地缓存来减少数据库负载。目前,JBoss AS 里的状态复制(state "
+"replication)和分布式缓存服务(distributed cache service)由两个途径提供:"
+"<literal>HASessionState</literal> MBean 和 JBoss Cache framework。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:266
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>HASessionState</literal> MBean is a legacy service that "
+"provides session replication and distributed cache services for EJB 2.x "
+"stateful session beans. The MBean is defined in the <literal>all/deploy/"
+"cluster-service.xml</literal> file. We will show its configuration options "
+"in the EJB 2.x stateful session bean section later."
+msgstr ""
+"<literal>HASessionState</literal> MBean 为 EJB 2.x 的 stateful session beans "
+"和 JBoss 3.x 和 4.x 里的 HTTP 负载平衡提供会话复制(session replication)和"
+"分布式缓存服务(distributed cache service)。<literal>all/deploy/cluster-"
+"service.xml</literal> 文件里定义了这个 MBean。我们会在后面的 EJB 2.x "
+"stateful session bean 部分展示它的配置选项。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:269
+#, no-c-format
+msgid ""
+"The <literal>DistributedState</literal> Mbean is a legacy service built on "
+"the HAPartition service. It is supported for backwards compatibility "
+"reasons, but new applications should not use it; they should use the much "
+"more sophisticated JBoss Cache instead."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:275
+#, no-c-format
+msgid ""
+"As mentioned above JBoss Cache is used to provide cache services for HTTP "
+"sessions, EJB 3.0 session beans and EJB 3.0 entity beans. It is the primary "
+"distributed state management tool in JBoss AS, and is an excellent choice "
+"for any custom caching requirements your applications may have. We will "
+"cover JBoss Cache in more detail when we discuss specific services in the "
+"next several sections.."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:286
+#, no-c-format
+msgid "Clustered JNDI Services"
+msgstr "群集的 JNDI 服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:287
+#, no-c-format
+msgid ""
+"JNDI is one of the most important services provided by the application "
+"server. The JBoss HA-JNDI (High Availability JNDI) service brings the "
+"following features to JNDI:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:291
+#, no-c-format
+msgid ""
+"Transparent failover of naming operations. If an HA-JNDI naming Context is "
+"connected to the HA-JNDI service on a particular JBoss AS instance, and that "
+"service fails or is shut down, the HA-JNDI client can transparently fail "
+"over to another AS instance."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:296
+#, no-c-format
+msgid ""
+"Load balancing of naming operations. An HA-JNDI naming Context will "
+"automatically load balance its requests across all the HA-JNDI servers in "
+"the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:301
+#, no-c-format
+msgid "Automatic client discovery of HA-JNDI servers (using multicast)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:306
+#, no-c-format
+msgid ""
+"Unified view of JNDI trees cluster-wide. Client can connect to the HA-JNDI "
+"service running on any node in the cluster and find objects bound in JNDI on "
+"any other node. This is accomplished via two mechanisms:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:314
+#, no-c-format
+msgid ""
+"Cross-cluster lookups. A client can perform a lookup and the server side HA-"
+"JNDI service has the ability to find things bound in regular JNDI on any "
+"node in the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:318
+#, no-c-format
+msgid ""
+"A replicated cluster-wide context tree. An object bound into the HA-JNDI "
+"service will be replicated around the cluster, and a copy of that object "
+"will be available in-VM on each node in the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:327
+#, no-c-format
+msgid ""
+"JNDI is a key component for many other interceptor-based clustering "
+"services: those services register themselves with the JNDI so that the "
+"client can lookup their proxies and make use of their services. HA-JNDI "
+"completes the picture by ensuring that clients have a highly-available means "
+"to look up those proxies. However, it is important to understand that using "
+"HA-JNDI (or not) has no effect whatsoever on the clustering behavior of the "
+"objects that are looked up. To illustrate:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:332
+#, no-c-format
+msgid ""
+"If an EJB is not configured as clustered, looking up the EJB via HA-JNDI "
+"does not somehow result in the addition of clustering capabilities (load "
+"balancing of EJB calls, transparent failover, state replication) to the EJB."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:337
+#, no-c-format
+msgid ""
+"If an EJB is configured as clustered, looking up the EJB via regular JNDI "
+"instead of HA-JNDI does not somehow result in the removal of the bean "
+"proxy's clustering capabilities."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:347
+#, no-c-format
+msgid "How it works"
+msgstr "它怎样工作"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:348
+#, no-c-format
+msgid ""
+"The JBoss client-side HA-JNDI naming Context is based on the client-side "
+"interceptor architecture. The client obtains an HA-JNDI proxy object (via "
+"the InitialContext object) and invokes JNDI lookup services on the remote "
+"server through the proxy. The client specifies that it wants an HA-JNDI "
+"proxy by configuring the naming properties used by the InitialContext "
+"object. This is covered in detail in the “Client Configuration” section. "
+"Other than the need to ensure the appropriate naming properties are provided "
+"to the InitialContext, the fact that the naming Context is using HA-JNDI is "
+"completely transparent to the client."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:351
+#, fuzzy, no-c-format
+msgid ""
+"On the server side, he the HA-JNDI service maintains a cluster-wide context "
+"tree. The cluster wide tree is always available as long as there is one node "
+"left in the cluster. Each node in the cluster also maintains its own local "
+"JNDI context tree. The HA-JNDI service on that node is able to find objects "
+"bound into the local JNDI context tree. An application can bind its objects "
+"to either tree. The design rationale for this architecture is as follows:"
+msgstr ""
+"JBoss HA-JNDI (高可用性 JNDI)服务维护了一个跨群集的上下文树(context "
+"tree)。只要群集里有一个节点,这个树就会存在。群集里的每个 JNDI 节点也维护子"
+"集的本地 JNDI 上下文。服务器端的应用程序可以把它的对象绑定在两者中的任意一个"
+"上。在本部分内容里,你将学习怎样区分这两种树和在应用部署时的最佳做法。这个架"
+"构的合理设计如下:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:356
+#, fuzzy, no-c-format
+msgid ""
+"It avoids migration issues with applications that assume that their JNDI "
+"implementation is local. This allows clustering to work out-of-the-box with "
+"just a few tweaks of configuration files."
+msgstr ""
+"我们不希望在本地实现 JNDI 的应用程序有任何的移植问题。我们希望通过简单的配置"
+"群集系统就可以正常工作。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:362
+#, fuzzy, no-c-format
+msgid ""
+"In a homogeneous cluster, this configuration actually cuts down on the "
+"amount of network traffic. A homogenous cluster is one where the same types "
+"of objects are bound under the same names on each node."
+msgstr "在同样的群集里,这个配置实际上降低了网络的负载。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:367
+#, no-c-format
+msgid ""
+"Designing it in this way makes the HA-JNDI service an optional service since "
+"all underlying cluster code uses a straight new <literal>InitialContext()</"
+"literal> to lookup or create bindings."
+msgstr ""
+"既然所有下面的群集节点都使用一个新的 <literal>InitialContext()</literal> 来查"
+"找或创建绑定,用这个方法来设计可以使 HA-JNDI 服务成为一种可选的服务。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:373
+#, fuzzy, no-c-format
+msgid ""
+"On the server side, a naming <literal>Context</literal> obtained via a call "
+"to new <literal>InitialContext()</literal> will be bound to the local-only, "
+"non-cluster-wide JNDI Context (this is actually basic JNDI). So, all EJB "
+"homes and such will not be bound to the cluster-wide JNDI Context, but "
+"rather, each home will be bound into the local JNDI."
+msgstr ""
+"在服务器端,<literal>new InitialContext()</literal> 将会绑定到一个仅用于本地"
+"的,非跨群集的 JNDI 上下文(实际上是基本 JNDI)。因此,所有 EJB 主接口"
+"(homes)都不会绑定到跨群集的 JNDI 上下文。但是,每个主接口都会绑定到本地 "
+"JNDI 上。当远程的客户通过 HA-JNDI 发起一个查找,HA-JNDI 在全局跨群集上下文找"
+"不到这个对象时会委托给本地 JNDI 上下文。详细的查找规则如下所示。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:376
+#, no-c-format
+msgid ""
+"When a remote client does a lookup through HA-JNDI, HA-JNDI will delegate to "
+"the local JNDI Context when it cannot find the object within the global "
+"cluster-wide Context. The detailed lookup rule is as follows."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:381
+#, fuzzy, no-c-format
+msgid "If the binding is available in the cluster-wide JNDI tree, return it."
+msgstr "如果这个绑定在跨群集的 JNDI 树(JNDI tree)里可用。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:384
+#, fuzzy, no-c-format
+msgid ""
+"If the binding is not in the cluster-wide tree, delegate the lookup query to "
+"the local JNDI service and return the received answer if available."
+msgstr ""
+"如果这个绑定不在跨群集的树里,它会把查找请求委托给本地 JNDI 服务并返回可用的"
+"结果。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:387
+#, fuzzy, no-c-format
+msgid ""
+"If not available, the HA-JNDI services asks all other nodes in the cluster "
+"if their local JNDI service owns such a binding and returns the answer from "
+"the set it receives."
+msgstr ""
+"如果没有可用的结果,HA-JNDI 服务会查找其他群集里的节点,如果它们的本地 JNDI "
+"服务拥有这样的绑定,就会返回相应的结果。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:390
+#, no-c-format
+msgid ""
+"If no local JNDI service owns such a binding, a "
+"<literal>NameNotFoundException</literal> is finally raised."
+msgstr ""
+"如果没有任何本地 JNDI 服务有这样的一个绑定,最后会产生 "
+"<literal>NameNotFoundException</literal> 异常。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:394
+#, no-c-format
+msgid ""
+"In practice, objects are rarely bound in the cluster-wide JNDI tree; rather "
+"they are bound in the local JNDI tree. For example, when EJBs are deployed, "
+"their proxies are always bound in local JNDI, not HA-JNDI. So, an EJB home "
+"lookup done through HA-JNDI will always be delegated to the local JNDI "
+"instance."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:399
+#, fuzzy, no-c-format
+msgid ""
+"If different beans (even of the same type, but participating in different "
+"clusters) use the same JNDI name, this means that each JNDI server will have "
+"a logically different \"target\" bound (JNDI on node 1 will have a binding "
+"for bean A and JNDI on node 2 will have a binding, under the same name, for "
+"bean B). Consequently, if a client performs a HA-JNDI query for this name, "
+"the query will be invoked on any JNDI server of the cluster and will return "
+"the locally bound stub. Nevertheless, it may not be the correct stub that "
+"the client is expecting to receive! So, it is always best practice to ensure "
+"that across the cluster different names are used for logically different "
+"bindings."
+msgstr ""
+"所以,当 EJB home 通过 HA-JNDI 查找,总会委托给本地 JNDI 实例。如果不同的 "
+"beans(即使是相同的类型,但在不同的群集里)使用同一个 JNDI 名称,这意味着每个 "
+"JNDI 服务器将会有一个不同的 \"target\" 绑定(节点 1 上的 JNDI 将有一个用于 "
+"bean A 的绑定,节点 2 会有一个用于 bean B 的相同名字的绑定)。因此,如果客户为"
+"这个名字执行 HA-JNDI 查询,这个查询会在群集里的任何 JNDI 服务器上调用并返回本"
+"地绑定的 stub。而且,它未必是客户所希望的正确的 stub!"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:406
+#, fuzzy, no-c-format
+msgid ""
+"You cannot currently use a non-JNP JNDI implementation (i.e. LDAP) for your "
+"local JNDI implementation if you want to use HA-JNDI. However, you can use "
+"JNDI federation using the ExternalContext MBean to bind non-JBoss JNDI trees "
+"into the JBoss JNDI namespace. Furthermore, nothing prevents you using one "
+"centralized JNDI server for your whole cluster and scrapping HA-JNDI and JNP."
+msgstr ""
+"如果你想使用 HA-JNDI,你不能有一个用于本地 JNDI 实现的 non-JNP JNDI 实现"
+"(如:LDAP)。然而,你可以用 <literal>ExternalContext</literal> MBean 来运用 "
+"JNDI 联合把非 JBoss JNDI trees 绑定到 JBoss JNDI 命名空间里。而且,你也可以对"
+"整个群集使用集中式的 JNDI 服务器,而不用 HA-JNDI 和 JNP。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:412
+#, fuzzy, no-c-format
+msgid ""
+"If a binding is only made available on a few nodes in the cluster (for "
+"example because a bean is only deployed on a small subset of nodes in the "
+"cluster), the probability that a lookup will hit a HA-JNDI server that does "
+"not own this binding is higher and thus the lookup will need to be forwarded "
+"to all nodes in the cluster. Consequently, the query time will be longer "
+"than if the binding would have been available locally. Moral of the story: "
+"as much as possible, cache the result of your JNDI queries in your client."
+msgstr ""
+"如果绑定只在群集(例如,bean 只在群集里某一小的子集里部署)里的一些节点上可"
+"用,查找没有这个绑定 HA-JNDI 服务器的可能性就增高了,而且需要将查找转发给群集"
+"里的所有节点。因此,查询时间会比这个绑定在本地可用的情况更长。这就告诉我们:"
+"尽可能地在客户端缓存你的 JNDI 查询结果。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:420
+#, no-c-format
+msgid ""
+"So, an EJB home lookup through HA-JNDI, will always be delegated to the "
+"local JNDI instance. If different beans (even of the same type, but "
+"participating in different clusters) use the same JNDI name, it means that "
+"each JNDI server will have a different \"target\" bound (JNDI on node 1 will "
+"have a binding for bean A and JNDI on node 2 will have a binding, under the "
+"same name, for bean B). Consequently, if a client performs a HA-JNDI query "
+"for this name, the query will be invoked on any JNDI server of the cluster "
+"and will return the locally bound stub. Nevertheless, it may not be the "
+"correct stub that the client is expecting to receive!"
+msgstr ""
+"所以,当 EJB home 通过 HA-JNDI 查找,总会委托给本地 JNDI 实例。如果不同的 "
+"beans(即使是相同的类型,但在不同的群集里)使用同一个 JNDI 名称,这意味着每个 "
+"JNDI 服务器将会有一个不同的 \"target\" 绑定(节点 1 上的 JNDI 将有一个用于 "
+"bean A 的绑定,节点 2 会有一个用于 bean B 的相同名字的绑定)。因此,如果客户为"
+"这个名字执行 HA-JNDI 查询,这个查询会在群集里的任何 JNDI 服务器上调用并返回本"
+"地绑定的 stub。而且,它未必是客户所希望的正确的 stub!"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:428
+#, no-c-format
+msgid ""
+"You cannot currently use a non-JNP JNDI implementation (i.e. LDAP) for your "
+"local JNDI implementation if you want to use HA-JNDI. However, you can use "
+"JNDI federation using the <literal>ExternalContext</literal> MBean to bind "
+"non-JBoss JNDI trees into the JBoss JNDI namespace. Furthermore, nothing "
+"prevents you though of using one centralized JNDI server for your whole "
+"cluster and scrapping HA-JNDI and JNP."
+msgstr ""
+"如果你想使用 HA-JNDI,你不能有一个用于本地 JNDI 实现的 non-JNP JNDI 实现"
+"(如:LDAP)。然而,你可以用 <literal>ExternalContext</literal> MBean 来运用 "
+"JNDI 联合把非 JBoss JNDI trees 绑定到 JBoss JNDI 命名空间里。而且,你也可以对"
+"整个群集使用集中式的 JNDI 服务器,而不用 HA-JNDI 和 JNP。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:435
+#, no-c-format
+msgid ""
+"If a binding is only made available on a few nodes in the cluster (for "
+"example because a bean is only deployed on a small subset of nodes in the "
+"cluster), the probability to lookup a HA-JNDI server that does not own this "
+"binding is higher and the lookup will need to be forwarded to all nodes in "
+"the cluster. Consequently, the query time will be longer than if the binding "
+"would have been available locally. Moral of the story: as much as possible, "
+"cache the result of your JNDI queries in your client."
+msgstr ""
+"如果绑定只在群集(例如,bean 只在群集里某一小的子集里部署)里的一些节点上可"
+"用,查找没有这个绑定 HA-JNDI 服务器的可能性就增高了,而且需要将查找转发给群集"
+"里的所有节点。因此,查询时间会比这个绑定在本地可用的情况更长。这就告诉我们:"
+"尽可能地在客户端缓存你的 JNDI 查询结果。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:447
+#, no-c-format
+msgid "Client configuration"
+msgstr "客户端配置"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:449
+#, no-c-format
+msgid "For clients running inside the application server"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:450
+#, fuzzy, no-c-format
+msgid ""
+"If you want to access HA-JNDI from inside the application server, you must "
+"explicitly get an InitialContext by passing in JNDI properties. The "
+"following code shows how to create a naming Context bound to HA-JNDI:"
+msgstr ""
+"如果你要从服务器端访问 HA-JNDI,你必须传入 JNDI 属性来显性地得到 "
+"<literal>InitialContext</literal>。下面的代码展示了怎样访问 HA-JNDI。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:453
+#, fuzzy, no-c-format
+msgid ""
+"Properties p = new Properties(); \n"
+" p.put(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jnp.interfaces.NamingContextFactory\"); \n"
+" p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces"
+"\"); \n"
+" p.put(Context.PROVIDER_URL, \"localhost:1100\"); // HA-JNDI port. \n"
+" return new InitialContext(p);"
+msgstr ""
+"Properties p = new Properties(); \n"
+"p.put(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jnp.interfaces.NamingContextFactory\"); \n"
+"p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces\"); \n"
+"p.put(Context.PROVIDER_URL, \"localhost:1100\"); // HA-JNDI port. \n"
+"return new InitialContext(p);"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:454
+#, fuzzy, no-c-format
+msgid ""
+"The Context.PROVIDER_URL property points to the HA-JNDI service configured "
+"in the HANamingService MBean (see the section called “JBoss configuration”)."
+msgstr ""
+"<literal>Context.PROVIDER_URL</literal> 属性指向 <literal>HANamingService</"
+"literal> MBean (参看 <xref linkend=\"clustering-jndi-jboss\"/>)里配置的 HA-"
+"JNDI 服务。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:457
+#, no-c-format
+msgid ""
+"Do not attempt to simplify things by placing a jndi.properties file in your "
+"deployment or by editing the AS's conf/jndi.properties file. Doing either "
+"will almost certainly break things for your application and quite possibly "
+"across the application server. If you want to externalize your client "
+"configuration, one approach is to deploy a properties file not named jndi."
+"properties, and then programatically create a Properties object that loads "
+"that file's contents."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:464
+#, no-c-format
+msgid "For clients running outside the application server"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:466
+#, fuzzy, no-c-format
+msgid ""
+"The JNDI client needs to be aware of the HA-JNDI cluster. You can pass a "
+"list of JNDI servers (i.e., the nodes in the HA-JNDI cluster) to the "
+"<literal>java.naming.provider.url</literal> JNDI setting in the "
+"<literal>jndi.properties</literal> file. Each server node is identified by "
+"its IP address and the JNDI port number. The server nodes are separated by "
+"commas (see <xref linkend=\"clustering-jndi-jboss\"/> for how to configure "
+"the servers and ports)."
+msgstr ""
+"JNDI 客户需要意识到 HA-JNDI 的群集方式。你可以把 JNDI 服务器的列表(HA-JNDI群"
+"集里的节点)写入到 <literal>jndi.properties</literal> 文件里的 <literal>java."
+"naming.provider.url</literal> 设置里。每个服务器节点都用它的 IP 地址和 JNDI "
+"端口号码来识别。服务器节点用逗号来隔开(关于怎么配置服务器和端口,请参看 "
+"<xref linkend=\"clustering-jndi-jboss\"/> )。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:468
+#, no-c-format
+msgid ""
+"java.naming.provier.url=server1:1100,server2:1100,server3:1100,server4:1100"
+msgstr ""
+"java.naming.provier.url=server1:1100,server2:1100,server3:1100,server4:1100"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:469
+#, no-c-format
+msgid ""
+"When initialising, the JNP client code will try to get in touch with each "
+"server node from the list, one after the other, stopping as soon as one "
+"server has been reached. It will then download the HA-JNDI stub from this "
+"node."
+msgstr ""
+"初始化时,JNP 客户代码会试图连接列表里的每个服务器,一个接一个,只要连接到一"
+"个服务器它就会停止尝试。然后它将从这个节点下载 HA-JNDI stub。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:473
+#, fuzzy, no-c-format
+msgid ""
+"There is no load balancing behavior in the JNP client lookup process itself. "
+"It just goes through the provider lists and uses the first available server "
+"to obtain the stub. The HA-JNDI provider list only needs to contain a subset "
+"of HA-JNDI nodes in the cluster."
+msgstr ""
+"JNP 客户的查找过程中没有用到负载平衡。它只是遍历这个列表来使用第一个可用的服"
+"务器。HA-JNDI 提供者列表只需要包含群集里的 HA-JNDI 节点的一个子集。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:476
+#, fuzzy, no-c-format
+msgid ""
+"The downloaded smart proxy contains the list of currently running nodes and "
+"the logic to load balance naming requests and to fail-over to another node "
+"if necessary. Furthermore, each time a JNDI invocation is made to the "
+"server, the list of targets in the proxy interceptor is updated (only if the "
+"list has changed since the last call)."
+msgstr ""
+"下载的 smart stub 包含了必要时失效切换(fail-over)至另一节点的逻辑和更新的当"
+"前运行节点的列表。而且,每次对服务器执行 JNDI 调用后,stub interceptor 里的目"
+"标节点列表都会被更新(只有在上次调用后又有修改的情况下)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:480
+#, fuzzy, no-c-format
+msgid ""
+"If the property string java.naming.provider.url is empty or if all servers "
+"it mentions are not reachable, the JNP client will try to discover a HA-JNDI "
+"server through a multicast call on the network (auto-discovery). See the "
+"section called “JBoss configuration” on how to configure auto-discovery on "
+"the JNDI server nodes. Through auto-discovery, the client might be able to "
+"get a valid HA-JNDI server node without any configuration. Of course, for "
+"auto-discovery to work, the network segment(s) between the client and the "
+"server cluster must be configured to propagate such multicast datagrams."
+msgstr ""
+"如果属性字符串 <literal>java.naming.provider.url</literal> 是空或者它标明的所"
+"有服务器是不可到达的,JNP client 会试图通过网络上的多点传送(multicast)调用"
+"来恢复 HA-JNDI 服务器。请参考 <xref linkend=\"clustering-jndi-jboss\"/>关于怎"
+"样在 JNDI 服务器节点上配置自动恢复(auto-discovery)的内容。通过自动恢复,客"
+"户端不需要任何配置就可以获得一个有效的 HA-JNDI 服务器节点。当然,为了自动恢复"
+"能够工作,客户应用程序必须和服务器节点(使用 EJB 服务器的 web servlets)在同"
+"一局域网里。局域网和广域网也必须配置成可以传送这样的多点传送数据包。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:484
+#, fuzzy, no-c-format
+msgid ""
+"By default the auto-discovery feature uses multicast group address 230.0.0.4 "
+"and port1102."
+msgstr "自动恢复(auto-discovery)特征使用多点传送组地址 230.0.0.4:1102。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:486
+#, fuzzy, no-c-format
+msgid ""
+"In addition to the <literal>java.naming.provider.url</literal> property, you "
+"can specify a set of other properties. The following list shows all "
+"clustering-related client side properties you can specify when creating a "
+"new InitialContext. (All of the standard, non-clustering-related environment "
+"properties used with regular JNDI are also available.)"
+msgstr ""
+"除 <literal>java.naming.provier.url</literal> 属性以外,你还可以指定一系列其"
+"他属性。下面的列表展示了当建立一个新的 <literal>InitialContext</literal> 时,"
+"你可以指定的所有客户端属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:489
+#, fuzzy, no-c-format
+msgid ""
+"<literal>java.naming.provider.url</literal>: Provides a list of IP addresses "
+"and port numbers for HA-JNDI provider nodes in the cluster. The client tries "
+"those providers one by one and uses the first one that responds."
+msgstr ""
+"<literal>java.naming.provier.url</literal>:提供群集里 HA-JNDI 提供者节点的 "
+"IP 地址和端口号的列表。客户端会尝试这些提供者并使用第一个响应的服务器。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:494
+#, no-c-format
+msgid ""
+"<literal>jnp.disableDiscovery</literal>: When set to <literal>true</"
+"literal>, this property disables the automatic discovery feature. Default is "
+"<literal>false</literal>."
+msgstr ""
+"<literal>jnp.disableDiscovery</literal>:当设置为 <literal>true</literal> "
+"时,这个属性关闭了自动恢复(automatic discovery)特征。它的缺省值是 "
+"<literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:499
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.partitionName</literal>: In an environment where multiple HA-"
+"JNDI services bound to distinct clusters (a.k.a. partitions), are running, "
+"this property allows you to ensure that your client only accepts automatic-"
+"discovery responses from servers in the desired partition. If you do not use "
+"the automatic discovery feature (i.e. jnp.disableDiscovery is true), this "
+"property is not used. By default, this property is not set and the automatic "
+"discovery select the first HA-JNDI server that responds, irregardless of the "
+"cluster partition name."
+msgstr ""
+"<literal>jnp.partitionName</literal>:在有多个绑定在不同的群集系统的 HA-JNDI "
+"服务的环境里,这个属性允许你配置当使用自动恢复(automatic discovery)特征时广"
+"播至哪个群集。如果你没有使用自动恢复特征(就是说你可在以在 <literal>java."
+"naming.provider.url</literal> 里显性地提供有效的 JNDI 节点的列表),这个属性"
+"就不会被使用。在缺省情况下,这个属性不会被设置,自动恢复选择第一个响应的 HA-"
+"JNDI 服务器,而不管在哪个群集系统里。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:502
+#, no-c-format
+msgid ""
+"<literal>jnp.discoveryTimeout</literal>: Determines how much time the "
+"context will wait for a response to its automatic discovery packet. Default "
+"is 5000 ms."
+msgstr ""
+"<literal>jnp.discoveryTimeout</literal>:决定上下文(context)等待对它的自动"
+"恢复数据包应答的的时间,它的缺省值是 5000 毫秒。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:506
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.discoveryGroup</literal>: Determines which multicast group "
+"address is used for the automatic discovery. Default is 230.0.0.4. Must "
+"match the value of the AutoDiscoveryAddress configured on the server side HA-"
+"JNDI service."
+msgstr ""
+"<literal>jnp.discoveryGroup</literal>:决定用于自动恢复的多点传送组地址。它的"
+"缺省值是 <literal>230.0.0.4</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:509
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.discoveryPort</literal>: Determines which multicast group port "
+"is used for the automatic discovery. Default is 1102. Must match the value "
+"of the AutoDiscoveryPort configured on the server side HA-JNDI service."
+msgstr ""
+"<literal>jnp.discoveryPort</literal>:决定用于自动恢复的多点传送组端口。它的"
+"缺省值是 <literal>1102</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:512
+#, no-c-format
+msgid ""
+"<literal>jnp.discoveryTTL</literal>: specifies the TTL (time-to-live) for "
+"autodiscovery IP multicast packets. This value represents the number of "
+"network hops a multicast packet can be allowed to propagate before "
+"networking equipment should drop the packet. Despite its name, it does not "
+"represent a unit of time."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:523
+#, no-c-format
+msgid "JBoss configuration"
+msgstr "JBoss 配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:524
+#, no-c-format
+msgid ""
+"The <literal>cluster-service.xml</literal> file in the <literal>all/deploy</"
+"literal> directory includes the following MBean to enable HA-JNDI services."
+msgstr ""
+"<literal>all/deploy</literal> 目录下的 <literal>cluster-service.xml</"
+"literal> 文件包括了下列启用 HA-JNDI 服务的 MBean。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:526
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=${jboss.partition."
+"name:DefaultPartition}</depends> \n"
+" \n"
+"<mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>jboss:service=DefaultPartition</depends> \n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:527
+#, fuzzy, no-c-format
+msgid ""
+"You can see that this MBean depends on the <literal>DefaultPartition</"
+"literal> MBean defined above it (discussed earlier in this chapter). In "
+"other configurations, you can put that element in the <literal>jboss-service."
+"xml</literal> file or any other JBoss configuration files in the <literal>/"
+"deploy</literal> directory to enable HA-JNDI services. The available "
+"attributes for this MBean are listed below."
+msgstr ""
+"你可以看到这个 MBean 依赖于在它之上定义的 <literal>DefaultPartition</"
+"literal> MBean(在本章之前的部分曾讨论过)。在其他配置里,你可以把那个元素"
+"(element)放在 <literal>jboss-services.xml</literal> 或者 <literal>/"
+"deploy</literal> 目录下的其他 JBoss 配置文件里来启用 HA-JNDI 服务。这个 "
+"MBean 的可用属性如下所示。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:533
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Cluster Partition</emphasis> is a required attribute "
+"to inject the HAPartition service that HA-JNDI uses for intra-cluster "
+"communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:536
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BindAddress</emphasis> is an optional attribute to "
+"specify the address to which the HA-JNDI server will bind waiting for JNP "
+"clients. Only useful for multi-homed computers. The default value is the "
+"value of the jboss.bind.address system property, or the host's default "
+"addresss if that property is not set. The jboss.bind.address system property "
+"is set if the -b command line switch is used when JBoss is started."
+msgstr ""
+"<emphasis role=\"bold\">BindAddress</emphasis> 是一个可选属性,它指定 HA-"
+"JNDI 服务器绑定的等待 JNP 客户连接的地址。它只对多宿主主机(multi-homed "
+"computers)有用。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:539
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Port</emphasis> is an optional attribute to specify "
+"the port to which the HA-JNDI server will bind waiting for JNP clients. The "
+"default value is <literal>1100</literal>."
+msgstr ""
+"<emphasis role=\"bold\">Port</emphasis> 是一个可选属性,它指定 HA-JNDI 服务器"
+"等待 JNP 客户连接所绑定的端口。它的缺省值是 <literal>1100</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:544
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Backlog</emphasis> is an optional attribute to "
+"specify the backlog value used for the TCP server socket waiting for JNP "
+"clients. The default value is <literal>50</literal>."
+msgstr ""
+"<emphasis role=\"bold\">Backlog</emphasis> 是一个可选属性,它指定 TCP 服务器"
+"套接字等待 JNP 客户所使用的 backlog 值。它的缺省值是 <literal>50</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:549
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RmiPort</emphasis> determines which port the server "
+"should use to communicate with the downloaded stub. This attribute is "
+"optional. The default value is 1101. If no value is set, the server "
+"automatically assigns a RMI port."
+msgstr ""
+"<emphasis role=\"bold\">RmiPort</emphasis> 决定服务器应与下载的 stub 通信所用"
+"的端口。这个属性是可选的。如果它没有设置,服务器会自动分配一个 RMI 端口。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:552
+#, fuzzy, no-c-format
+msgid ""
+"<literal>DiscoveryDisabled</literal> is a boolean flag that disables "
+"configuration of the auto discovery multicast listener."
+msgstr ""
+"<emphasis role=\"bold\">DiscoveryDisabled</emphasis> 是一个布尔值标记,它可用"
+"来取消自动恢复多点传送侦听者(multicast listener)的配置。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:558
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryAddress</emphasis> is an optional "
+"attribute to specify the multicast address to listen to for JNDI automatic "
+"discovery. The default value is the value of the jboss.partition.udpGroup "
+"system property, or 230.0.0.4 if that is not set. The jboss.partition."
+"udpGroup system property is set if the -u command line switch is used when "
+"JBoss is started."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryAddress</emphasis> 是一个可选属性,它指"
+"定侦听的用于 JNDI 自动恢复的多点传送地址。它的缺省值是 <literal>230.0.0.4</"
+"literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:561
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryGroup</emphasis> is an optional "
+"attribute to specify the multicast group to listen to for JNDI automatic "
+"discovery.. The default value is <literal>1102</literal>."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryGroup</emphasis> 是一个可选属性,它指定"
+"侦听的用于 JNDI 自动恢复的多点传送组。它的缺省值是 <literal>1102</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:567
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryBindAddress</emphasis> sets the "
+"interface on which HA-JNDI should listen for auto-discovery request packets. "
+"If this attribute is not specified and a <literal>BindAddress</literal> is "
+"specified, the <literal>BindAddress</literal> will be used.."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryBindAddress</emphasis> 设置自动恢复引导"
+"程序绑定的地址。如果这个属性没有指定而设置了 <literal>BindAddress</literal>,"
+"<literal>BindAddress</literal> 将被使用。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:570
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryTTL</emphasis> specifies the TTL (time-"
+"to-live) for autodiscovery IP multicast packets. This value represents the "
+"number of network hops a multicast packet can be allowed to propagate before "
+"networking equipment should drop the packet. Despite its name, it does not "
+"represent a unit of time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:573
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis> specifies the class "
+"name of the LoadBalancePolicyimplementation that should be included in the "
+"client proxy. See the earlier section on “Load-Balancing Policies” for "
+"details."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:578
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LookupPool</emphasis> specifies the thread pool "
+"service used to control the bootstrap and auto discovery lookups."
+msgstr ""
+"<emphasis role=\"bold\">LookupPool</emphasis> 指定用于控制引导程序和自动恢复"
+"查找的线程池服务。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:583
+#, no-c-format
+msgid ""
+"The full default configuration of the <literal>HANamingService</literal> "
+"MBean is as follows."
+msgstr "<literal>HANamingService</literal> MBean 的完整缺省配置如下所示。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:584
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+" <mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <!-- We now inject the partition into the HAJNDI service instead \n"
+" of requiring that the partition name be passed --> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=${jboss.partition.name:"
+"DefaultPartition}</depends> \n"
+" <!-- Bind address of bootstrap and HA-JNDI RMI endpoints --> \n"
+" <attribute name=\"BindAddress\">${jboss.bind.address}</attribute> \n"
+" <!-- Port on which the HA-JNDI stub is made available --> \n"
+" <attribute name=\"Port\">1100</attribute> \n"
+" <!-- RmiPort to be used by the HA-JNDI service once bound. 0 => "
+"auto. --> \n"
+" <attribute name=\"RmiPort\">1101</attribute> \n"
+" <!-- Accept backlog of the bootstrap socket --> \n"
+" <attribute name=\"Backlog\">50</attribute> \n"
+" <!-- The thread pool service used to control the bootstrap and auto "
+"discovery lookups --> \n"
+" <depends optional-attribute-name=\"LookupPool\" \n"
+" proxy-type=\"attribute\">jboss.system:service=ThreadPool</"
+"depends> \n"
+" <!-- A flag to disable the auto discovery via multicast --> \n"
+" <attribute name=\"DiscoveryDisabled\">false</attribute> \n"
+" <!-- Set the auto-discovery bootstrap multicast bind address. If "
+"not \n"
+" specified and a BindAddress is specified, the BindAddress will be "
+"used. --> \n"
+" <attribute name=\"AutoDiscoveryBindAddress\">${jboss.bind.address}</"
+"attribute> \n"
+" <!-- Multicast Address and group port used for auto-discovery --> \n"
+" <attribute name=\"AutoDiscoveryAddress\">${jboss.partition."
+"udpGroup:230.0.0.4}</attribute> \n"
+" <attribute name=\"AutoDiscoveryGroup\">1102</attribute> \n"
+" <!-- The TTL (time-to-live) for autodiscovery IP multicast packets "
+"--> \n"
+" <attribute name=\"AutoDiscoveryTTL\">16</attribute> \n"
+" <!-- The load balancing policy for HA-JNDI --> \n"
+" <attribute name=\"LoadBalancePolicy\">org.jboss.ha.framework."
+"interfaces.RoundRobin</attribute> \n"
+" \n"
+" <!-- Client socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ClientSocketFactory\">custom</attribute> \n"
+" --> \n"
+" <!-- Server socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ServerSocketFactory\">custom</attribute> \n"
+" --> \n"
+" </mbean>]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <! -- Name of the partition to which the service is linked --> \n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute> \n"
+" <! -- Bind address of bootstrap and HA-JNDI RMI endpoints --> \n"
+" <attribute name=\"BindAddress\">${jboss.bind.address}</"
+"attribute> \n"
+" <! -- Port on which the HA-JNDI stub is made available --> \n"
+" <attribute name=\"Port\">1100</attribute> \n"
+" <! -- RmiPort to be used by the HA-JNDI service once bound. \n"
+" 0 is for auto. --> \n"
+" <attribute name=\"RmiPort\">1101</attribute> \n"
+" <! -- Accept backlog of the bootstrap socket --> \n"
+" <attribute name=\"Backlog\">50</attribute> \n"
+" <! -- The thread pool service used to control the bootstrap and \n"
+" auto discovery lookups --> \n"
+" <depends optional-attribute-name=\"LookupPool\" \n"
+" proxy-type=\"attribute\">jboss.system:service=ThreadPool</"
+"depends>\n"
+"\n"
+" <! -- A flag to disable the auto discovery via multicast --> \n"
+" <attribute name=\"DiscoveryDisabled\">false</attribute> \n"
+" <! -- Set the auto-discovery bootstrap multicast bind address. --"
+"> \n"
+" <attribute name=\"AutoDiscoveryBindAddress\">\n"
+" ${jboss.bind.address}\n"
+" </attribute> \n"
+" \n"
+" <! -- Multicast Address and group port used for auto-discovery --"
+"> \n"
+" <attribute name=\"AutoDiscoveryAddress\">\n"
+" ${jboss.partition.udpGroup:230.0.0.4}\n"
+" </attribute> \n"
+" <attribute name=\"AutoDiscoveryGroup\">1102</attribute> \n"
+" <! -- The TTL (time-to-live))for autodiscovery IP multicast packets "
+"--> \n"
+" <attribute name=\"AutoDiscoveryTTL\">16</attribute>\n"
+"\n"
+" <! -- Client socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ClientSocketFactory\">custom</attribute> \n"
+" --> \n"
+" <! -- Server socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ServerSocketFactory\">custom</attribute> \n"
+" --> \n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:585
+#, fuzzy, no-c-format
+msgid ""
+"It is possible to start several HA-JNDI services that use different "
+"clusters. This can be used, for example, if a node is part of many clusters. "
+"In this case, make sure that you set a different port or IP address for "
+"eachservices. For instance, if you wanted to hook up HA-JNDI to the example "
+"cluster you set up and change the binding port, the Mbean descriptor would "
+"look as follows."
+msgstr ""
+"你可以启动几个使用不同群集的 HA-JNDI 服务。例如,这可以用在如果某一节点是属于"
+"多个群集系统的情况下。这个时候,你要确保给不同服务设置了不同的端口号或 IP 地"
+"址。例如,如果你想把 HA-JNDI 与 example 群集挂钩并改变绑定的端口,Mbean 描述"
+"会象下面的样子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:588
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+"\n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=MySpecialPartition</depends> \n"
+" <attribute name=\"Port\">56789</attribute> \n"
+"</mbean> ]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>jboss:service=MySpecialPartition</depends> \n"
+" <attribute name=\"PartitionName\">MySpecialPartition</"
+"attribute> \n"
+" <attribute name=\"Port\">56789</attribute> \n"
+"</mbean>"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:595
+#, no-c-format
+msgid "Clustered Session EJBs"
+msgstr "群集的 Session EJBs"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:596
+#, no-c-format
+msgid ""
+"Session EJBs provide remote invocation services. They are clustered based on "
+"the client-side interceptor architecture. The client application for a "
+"clustered session bean is exactly the same as the client for the non-"
+"clustered version of the session bean, except for a minor change to the "
+"<literal>java.naming.provier.url</literal> system property to enable HA-JNDI "
+"lookup (see previous section). No code change or re-compilation is needed on "
+"the client side. Now, let's check out how to configure clustered session "
+"beans in EJB 2.x and EJB 3.0 server applications respectively."
+msgstr ""
+"Session EJBs 提供远程的调用服务。它们按照客户端拦截器架构(client-side "
+"interceptor architecture)组成群集系统。群集的 session bean 的客户应用程序和"
+"非群集的版本是一模一样的,除了对启用 HA-JNDI 查找的 <literal>java.naming."
+"provier.url</literal> 系统属性的少许改动。对于客户端来说,不需要任何的源码改"
+"动或重新编译。现在,让我们看看怎么分别在 EJB 2.x 和 EJB 3.0 服务器应用程序里"
+"配置群集的 session beans。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:603
+#, no-c-format
+msgid "Stateless Session Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Stateless Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:604
+#, no-c-format
+msgid ""
+"Clustering stateless session beans is most probably the easiest case: as no "
+"state is involved, calls can be load-balanced on any participating node (i."
+"e. any node that has this specific bean deployed) of the cluster. To make a "
+"bean clustered, you need to modify its <literal>jboss.xml</literal> "
+"descriptor to contain a <literal><clustered></literal> tag."
+msgstr ""
+"群集的 stateless session beans 有可能是最简单的:因为不涉及到状态,调用可以在"
+"群集里的任何节点(部署有这个 bean 的节点)上进行负载平衡。要群集一个 bean,你"
+"需要修改它的 <literal>jboss.xml</literal> 描述符,使它包含一个 <literal><"
+"clustered></literal> 标签。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:608
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:611
+#, fuzzy, no-c-format
+msgid ""
+"The <literal><clustered>True</clustered></literal> element is "
+"really just an alias for the <literal><configuration-name>Clustered "
+"Stateless SessionBean</configuration-name></literal> element in the "
+"conf/standard-jboss.xml file."
+msgstr ""
+"<literal><clustered>True</clustered></literal> 元素实际上是 "
+"<literal><configuration-name>Clustered Stateless SessionBean</"
+"configuration-name></literal> 元素的一个别名。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:616
+#, fuzzy, no-c-format
+msgid ""
+"In the bean configuration, only the <clustered> element is mandatory. "
+"It indicates that the bean needs to support clustering features. The <"
+"cluster-config> element is optional and the default values of its "
+"attributes are indicated in the sample configuration above. Below is a "
+"description of the attributes in the <cluster-config> element.."
+msgstr ""
+"在 bean 配置里,只有 <literal><clustered></literal> 元素是强制的。它指"
+"出这个 bean 在群集里运行。<literal><cluster-config></literal> 元素是可"
+"选的,我们在上面的配置样本里指出了它的缺省值。下面是关于 <literal><"
+"cluster-config></literal> 元素里属性的描述。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:619
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">partition-name</emphasis> specifies the name of the "
+"cluster the bean participates in. The default value is "
+"<literal>DefaultPartition</literal>. The default partition name can also be "
+"set system-wide using the <literal>jboss.partition.name</literal> system "
+"property."
+msgstr ""
+"<emphasis role=\"bold\">partition-name</emphasis> 指定 bean 所参与的群集名。"
+"它的缺省值是 <literal>DefaultPartition</literal>。缺省的分区名也可以用 "
+"<literal>jboss.partition.name</literal> 系统属性跨系统地被指定。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:625
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">home-load-balance-policy</emphasis> indicates the "
+"class to be used by the home stub to balance calls made on the nodes of the "
+"cluster. By default, the proxy will load-balance calls in a "
+"<literal>RoundRobin</literal> fashion. You can also implement your own load-"
+"balance policy class or use the class <literal>FirstAvailable</literal> that "
+"persists to use the first node available that it meets until it fails."
+msgstr ""
+"<emphasis role=\"bold\">home-load-balance-policy</emphasis> 指出 home stub 所"
+"用来平衡节点上的调用的类。在缺省情况下,代理(proxy)会用 "
+"<literal>RoundRobin</literal> 方式平衡调用负载。你也可以实现自己的负载平衡策"
+"略类或持续使用所遇到的第一个可用节点直至其消亡的 <literal>FirstAvailable</"
+"literal> 类。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:632
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bean-load-balance-policy</emphasis> Indicates the "
+"class to be used by the bean stub to balance calls made on the nodes of the "
+"cluster. Comments made for the <literal>home-load-balance-policy</literal> "
+"attribute also apply."
+msgstr ""
+"<emphasis role=\"bold\">bean-load-balance-policy</emphasis>指出 home stub 所"
+"使用的平衡节点上的调用的类。对于 <literal>home-load-balance-policy</literal> "
+"属性的注释也同样适用。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:641
+#, no-c-format
+msgid "Stateful Session Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Stateful Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:642
+#, no-c-format
+msgid ""
+"Clustering stateful session beans is more complex than clustering their "
+"stateless counterparts since JBoss needs to manage the state information. "
+"The state of all stateful session beans are replicated and synchronized "
+"across the cluster each time the state of a bean changes. The JBoss AS uses "
+"the <literal>HASessionState</literal> MBean to manage distributed session "
+"states for clustered EJB 2.x stateful session beans. In this section, we "
+"cover both the session bean configuration and the <literal>HASessionState</"
+"literal> MBean configuration."
+msgstr ""
+"既然 JBoss 需要管理状态信息,群集 stateful session beans 就比群集 stateles "
+"ssession beans 更为复杂。当 stateful session beans 的状态改变时,所有状态在群"
+"集中复制和同步。JBoss AS 使用 <literal>HASessionState</literal> MBean 来为群"
+"集的 EJB 2.x stateful session beans 管理分布式的会话状态。在这部分内容里,我"
+"们将介绍 session bean 的配置和 <literal>HASessionState</literal> MBean 的配"
+"置。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:649
+#, no-c-format
+msgid "The EJB application configuration"
+msgstr "EJB 应用程序配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:650
+#, no-c-format
+msgid ""
+"In the EJB application, you need to modify the <literal>jboss.xml</literal> "
+"descriptor file for each stateful session bean and add the <literal><"
+"clustered></literal> tag."
+msgstr ""
+"在 EJB 应用程序里,你需要为每个 stateful session bean 修改 <literal>jboss."
+"xml</literal> 描述符文件并加入 <literal><clustered></literal> 标签。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:652
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:653
+#, no-c-format
+msgid ""
+"In the bean configuration, only the <literal><clustered></literal> tag "
+"is mandatory to indicate that the bean works in a cluster. The <literal><"
+"cluster-config></literal> element is optional and its default attribute "
+"values are indicated in the sample configuration above."
+msgstr ""
+"在 bean 的配置文件里,只有 <literal><clustered></literal> 标签是强制"
+"的,它指出 bean 处在群集系统里。<literal><cluster-config></literal> 元"
+"素是可选的,我们在上面的配置文件样本里指出了它的缺省属性值。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:657
+#, no-c-format
+msgid ""
+"The <literal><session-state-manager-jndi-name></literal> tag is used "
+"to give the JNDI name of the <literal>HASessionState</literal> service to be "
+"used by this bean."
+msgstr ""
+"<literal><session-state-manager-jndi-name></literal> 标签用来说明这个 "
+"bean 所用的 <literal>HASessionState</literal> 服务的名字。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:659
+#, no-c-format
+msgid ""
+"The description of the remaining tags is identical to the one for stateless "
+"session bean. Actions on the clustered stateful session bean's home "
+"interface are by default load-balanced, round-robin. Once the bean's remote "
+"stub is available to the client, calls will not be load-balanced round-robin "
+"any more and will stay \"sticky\" to the first node in the list."
+msgstr ""
+"余下的标签的描述和 stateless session bean 的描述是一样的。群集的 stateful "
+"session bean 的主接口上的动作缺省是基于 round-robin 负载平衡策略的。一旦 "
+"bean 的 remote stub 对于客户可用时,调用将不会再进行负载平衡而\"粘"
+"\"(sticky)在列表里的第一个节点上。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:665
+#, no-c-format
+msgid "Optimize state replication"
+msgstr "优化状态复制"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:666
+#, no-c-format
+msgid ""
+"As the replication process is a costly operation, you can optimise this "
+"behaviour by optionally implementing in your bean class a method with the "
+"following signature:"
+msgstr ""
+"因为复制过程是很消耗资源的,为了优化这个过程,你可以选择性地在你的 bean 类里"
+"实现有下面的签名的方法:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:668
+#, no-c-format
+msgid "public boolean isModified ();"
+msgstr "public boolean isModified ();"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:669
+#, no-c-format
+msgid ""
+"Before replicating your bean, the container will detect if your bean "
+"implements this method. If your bean does, the container calls the "
+"<literal>isModified()</literal> method and it only replicates the bean when "
+"the method returns <literal>true</literal>. If the bean has not been "
+"modified (or not enough to require replication, depending on your own "
+"preferences), you can return <literal>false</literal> and the replication "
+"would not occur. This feature is available on JBoss AS 3.0.1+ only."
+msgstr ""
+"在复制你的 bean 之前,容器(container)将检测 bean 是否实现了这个方法。如果"
+"是,容器会调用 <literal>isModified()</literal> 方法并只在方法返回 "
+"<literal>true</literal> 时复制这个 bean。如果 bean 还没被更改(或者还不够来请"
+"求复制,这取决于你的喜好,你可以返回 <literal>false</literal>,这样复制就不会"
+"发生。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:677
+#, no-c-format
+msgid "The HASessionState service configuration"
+msgstr "HASessionState 服务配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:678
+#, no-c-format
+msgid ""
+"The <literal>HASessionState</literal> service MBean is defined in the "
+"<code>all/deploy/cluster-service.xml</code> file."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:680
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
+" name=\"jboss:service=HASessionState\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends> \n"
+" <!-- We now inject the partition into the HAJNDI service instead \n"
+" of requiring that the partition name be passed --> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends>\n"
+" <!-- JNDI name under which the service is bound -->\n"
+" <attribute name=\"JndiName\">/HASessionState/Default</attribute>\n"
+" <!-- Max delay before cleaning unreclaimed state.\n"
+"Defaults to 30*60*1000 => 30 minutes -->\n"
+"<attribute name=\"BeanCleaningDelay\">0</attribute>\n"
+"</mbean> ]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.hasessionstate.server.HASessionStateService\"\n"
+" name=\"jboss:service=HASessionState\">\n"
+" <depends>\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends>\n"
+" <!-- Name of the partition to which the service is linked -->\n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute>\n"
+" <!-- JNDI name under which the service is bound -->\n"
+" <attribute name=\"JndiName\">/HASessionState/Default</"
+"attribute>\n"
+" <!-- Max delay before cleaning unreclaimed state.\n"
+" Defaults to 30*60*1000 => 30 minutes -->\n"
+" <attribute name=\"BeanCleaningDelay\">0</attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:682
+#, no-c-format
+msgid ""
+"The configuration attributes in the <literal>HASessionState</literal> MBean "
+"are listed below."
+msgstr "<literal>HASessionState</literal> MBean 里的配置属性如下所示:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:685
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterPartition</emphasis> is a required attribute "
+"to inject the HAPartition service that HA-JNDI uses for intra-cluster "
+"communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:690
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis> is an optional attribute to "
+"specify the JNDI name under which this <literal>HASessionState</literal> "
+"service is bound. The default value is <literal>/HAPartition/Default</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">JndiName</emphasis> 是一个可选属性,它指定这个 "
+"<literal>HASessionState</literal> 服务被绑定的 JNDI 名。它的缺省值是 "
+"<literal>/HAPartition/Default</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:696
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BeanCleaningDelay</emphasis> is an optional "
+"attribute to specify the number of miliseconds after which the "
+"<literal>HASessionState</literal> service can clean a state that has not "
+"been modified. If a node, owning a bean, crashes, its brother node will take "
+"ownership of this bean. Nevertheless, the container cache of the brother "
+"node will not know about it (because it has never seen it before) and will "
+"never delete according to the cleaning settings of the bean. That is why the "
+"<literal>HASessionState</literal> service needs to do this cleanup "
+"sometimes. The default value is <literal>30*60*1000</literal> milliseconds "
+"(i.e., 30 minutes)."
+msgstr ""
+"<emphasis role=\"bold\">BeanCleaningDelay</emphasis> 是一个可选属性,它指定了"
+"一个状态在多久没有变化后 <literal>HASessionState</literal> 服务就可以清除它,"
+"它的单位是毫秒。例如,如果拥有某一 bean 的节点崩溃了,它的兄弟节点将接管这个 "
+"bean。但是,这个兄弟节点的容器缓存并不会知道这个信息(因为之前并没有这个信"
+"息),也永远不会按照这个 bean 的清除设置来删除它。这就是为什么 "
+"<literal>HASessionState</literal> 服务需要来做这个清除工作。它的缺省值是 "
+"<literal>30*60*1000</literal> 毫秒(也就是 30 分钟)。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:707
+#, fuzzy, no-c-format
+msgid "Handling Cluster Restart"
+msgstr "处理群集系统重启"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:708
+#, fuzzy, no-c-format
+msgid ""
+"We have covered the HA smart client architecture in the section called "
+"“Client-side interceptor architecture”. The default HA smart proxy client "
+"can only failover as long as one node in the cluster exists. If there is a "
+"complete cluster shutdown, the proxy becomes orphaned and loses knowledge of "
+"the available nodes in the cluster. There is no way for the proxy to recover "
+"from this. The proxy needs to look up a fresh set of targets out of JNDI/"
+"HAJNDI when the nodes are restarted."
+msgstr ""
+"我们已经在 <xref linkend=\"clustering-intro-arch-proxy\"/> 介绍了 HA smart "
+"client architecture。缺省的 HA smart proxy client 只能在群集里一个节点故障时"
+"进行失效切换(failover)。如果整个群集都关闭了,代理(proxy)将失去所有群集里"
+"可用节点的信息。在这种情况下,代理没有什么办法来恢复系统。当节点重启时,需要"
+"在 JNDI/HAJNDI 之外查找代理。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:711
+#, fuzzy, no-c-format
+msgid ""
+"The 3.2.7+/4.0.2+ releases contain a RetryInterceptor that can be added to "
+"the proxy client side interceptor stack to allow for a transparent recovery "
+"from such a restart failure. To enable it for an EJB, setup an invoker-proxy-"
+"binding that includes the RetryInterceptor. Below is an example jboss.xml "
+"configuration."
+msgstr ""
+"3.2.7+/4.0.2+ 版本包含了 <literal>RetryInterceptor</literal>,它可以加入到代"
+"理客户端拦截器栈里,允许在这样的重启故障后进行透明恢复(transparent "
+"recovery)。为了启用这个机制,你可以设立包含 <literal>RetryInterceptor</"
+"literal> 的 <literal>invoker-proxy-binding</literal>。下面是 <literal>jboss."
+"xml</literal> 配置的一个示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:714
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+" \n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding> ]]>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:718
+#, no-c-format
+msgid "JNDI Lookup Process"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:719
+#, no-c-format
+msgid ""
+"In order to recover the HA proxy, the RetryInterceptor does a lookup in "
+"JNDI. This means that internally it creates a new InitialContext and does a "
+"JNDI lookup. But, for that lookup to succeed, the InitialContext needs to be "
+"configured properly to find your naming server. The RetryInterceptor will go "
+"through the following steps in attempting to determine the proper naming "
+"environment properties:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:723
+#, no-c-format
+msgid ""
+"It will check its own static retryEnv field. This field can be set by client "
+"code via a call to RetryInterceptor.setRetryEnv(Properties). This approach "
+"to configuration has two downsides: first, it reduces portability by "
+"introducing JBoss-specific calls to the client code; and second, since a "
+"static field is used only a single configuration per JVM is possible."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:728
+#, no-c-format
+msgid ""
+"If the retryEnv field is null, it will check for any environment properties "
+"bound to a ThreadLocal by the org.jboss.naming.NamingContextFactory class. "
+"To use this class as your naming context factory, in your jndi.properties "
+"set property java.naming.factory.initial=org.jboss.naming."
+"NamingContextFactory. The advantage of this approach is use of org.jboss."
+"naming.NamingContextFactory is simply a configuration option in your jndi."
+"properties file, and thus your java code is unaffected. The downside is the "
+"naming properties are stored in a ThreadLocal and thus are only visible to "
+"the thread that originally created an InitialContext."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:733
+#, no-c-format
+msgid ""
+"If neither of the above approaches yield a set of naming environment "
+"properties, a default InitialContext is used. If the attempt to contact a "
+"naming server is unsuccessful, by default the InitialContext will attempt to "
+"fall back on multicast discovery to find an HA-JNDI naming server. See the "
+"section on “ClusteredJNDI Services” for more on multicast discovery of HA-"
+"JNDI."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:742
+#, no-c-format
+msgid "SingleRetryInterceptor"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:743
+#, no-c-format
+msgid ""
+"The RetryInterceptor is useful in many use cases, but a disadvantage it has "
+"is that it will continue attempting to re-lookup the HA proxy in JNDI until "
+"it succeeds. If for some reason it cannot succeed, this process could go on "
+"forever, and thus the EJB call that triggered the RetryInterceptor will "
+"never return. For many client applications, this possibility is "
+"unacceptable. As a result, JBoss doesn't make the RetryInterceptor part of "
+"its default client interceptor stacks for clustered EJBs."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:746
+#, no-c-format
+msgid ""
+"In the 4.0.4.RC1 release, a new flavor of retry interceptor was introduced, "
+"the org.jboss.proxy.ejb.SingleRetryInterceptor. This version works like the "
+"RetryInterceptor, but only makes a single attempt to re-lookup the HA proxy "
+"in JNDI. If this attempt fails, the EJB call will fail just as if no retry "
+"interceptor was used. Beginning with 4.0.4.CR2, the SingleRetryInterceptor "
+"is part of the default client interceptor stacks for clustered EJBs."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:749
+#, no-c-format
+msgid ""
+"The downside of the SingleRetryInterceptor is that if the retry attempt is "
+"made during a portion of a cluster restart where no servers are available, "
+"the retry will fail and no further attempts will be made."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:759
+#, no-c-format
+msgid "Stateless Session Bean in EJB 3.0"
+msgstr "EJB 3.0 里的 Stateless Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:760
+#, fuzzy, no-c-format
+msgid ""
+"To cluster a stateless session bean in EJB 3.0, all you need to do is to "
+"annotate the bean class withe the <literal>@Clustered</literal> annotation. "
+"You can pass in the load balance policy and cluster partition as parameters "
+"to the annotation. The default load balance policy is <literal>org.jboss.ha."
+"framework.interfaces.RandomRobin</literal> and the default cluster is "
+"<literal>DefaultPartition</literal>. Below is the definition of the "
+"<literal>@Cluster</literal> annotation."
+msgstr ""
+"要在 EJB 3.0 内群集一个 stateless session bean,你所需要做的就是用 "
+"<literal>@Cluster</literal> 注解来注解(annotate)bean 类。你可以把负载平衡策"
+"略(load balance policy)和群集分区名当作参数传入这个注解。缺省的负载平衡策略"
+"是 <literal>org.jboss.ha.framework.interfaces.RandomRobin</literal>,缺省的群"
+"集是 <literal>DefaultPartition</literal>。下面是 <literal>@Cluster</literal> "
+"注解的定义。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:766
+#, fuzzy, no-c-format
+msgid ""
+"public @interface Clustered {\n"
+" Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
+" String partition() default \"${jboss.partition.name:DefaultPartition}"
+"\";\n"
+"}"
+msgstr ""
+"public @interface Clustered {\n"
+" Class loadBalancePolicy() default LoadBalancePolicy.class;\n"
+" String partition() default \"DefaultPartition\";\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:767
+#, no-c-format
+msgid ""
+"Here is an example of a clustered EJB 3.0 stateless session bean "
+"implementation."
+msgstr "这里是一个群集的 EJB 3.0 stateless session bean 实现的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:768
+#, no-c-format
+msgid ""
+"@Stateless\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" public void test() {\n"
+" // Do something cool\n"
+" }\n"
+"}"
+msgstr ""
+"@Stateless\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" public void test() {\n"
+" // Do something cool\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:769
+#, no-c-format
+msgid ""
+"The <literal>@Clustered</literal> annotation can also be omitted and the "
+"clustering configuration applied in jboss.xml:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:772
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>NonAnnotationStateful</ejb-name>\n"
+" <clustered>true</clustered>\n"
+" <cluster-config>\n"
+" <partition-name>FooPartition</partition-name>\n"
+" <load-balance-policy>\n"
+" org.jboss.ha.framework.interfaces.RandomRobin\n"
+" </load-balance-policy>\n"
+" </cluster-config>\n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss> ]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:777
+#, fuzzy, no-c-format
+msgid "Stateful Session Beans in EJB 3.0"
+msgstr "EJB 3.0 里的 Stateful Session Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:778
+#, fuzzy, no-c-format
+msgid ""
+"To cluster stateful session beans in EJB 3.0, you need to tag the bean "
+"implementation class with the <literal>@Cluster</literal> annotation, just "
+"as we did with the EJB 3.0 stateless session bean earlier. The @org.jboss."
+"ejb3.annotation.cache.tree.CacheConfig annotation can also be applied to the "
+"bean to specify caching behavior. Below is the definition of the "
+"@CacheConfig annotation:"
+msgstr ""
+"为了在 EJB 3.0 里群集 stateful session beans,你需要用 <literal>@Cluster</"
+"literal> 注解来标记 bean 实现类,就和我们之前对 EJB 3.0 stateless session "
+"bean 做的一样。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:783
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"public @interface CacheConfig\n"
+"{\n"
+"String name() default \"jboss.cache:service=EJB3SFSBClusteredCache\";\n"
+"int maxSize() default 10000;\n"
+"long idleTimeoutSeconds() default 300; \n"
+"boolean replicationIsPassivation() default true; \n"
+"long removalTimeoutSeconds() default 0;\n"
+"} ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:786
+#, no-c-format
+msgid ""
+"<literal>name</literal> specifies the object name of the JBoss Cache Mbean "
+"that should be used for caching the bean (see below for more on this Mbean)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:788
+#, no-c-format
+msgid ""
+"<literal>maxSize</literal> specifies the maximum number of beans that can "
+"cached before the cache should start passivating beans, using an LRU "
+"algorithm."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:790
+#, no-c-format
+msgid ""
+"<literal>idleTimeoutSeconds</literal> specifies the max period of time a "
+"bean can go unused before the cache should passivate it (irregardless of "
+"whether maxSize beans are cached.)"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:792
+#, no-c-format
+msgid ""
+"<literal>removalTimeoutSeconds</literal> specifies the max period of time a "
+"bean can go unused before the cache should remove it altogether."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:794
+#, no-c-format
+msgid ""
+"<literal>replicationIsPassivation</literal> specifies whether the cache "
+"should consider a replication as being equivalent to a passivation, and "
+"invoke any @PrePassivate and @PostActivate callbacks on the bean. By default "
+"true, since replication involves serializing the bean, and preparing for and "
+"recovering from serialization is a common reason for implementing the "
+"callback methods."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:799
+#, fuzzy, no-c-format
+msgid ""
+"Here is an example of a clustered EJB 3.0 stateful session bean "
+"implementation."
+msgstr "这里是一个群集的 EJB 3.0 stateless session bean 实现的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:806
+#, fuzzy, no-c-format
+msgid ""
+"@Stateful\n"
+"@Clustered\n"
+"@CacheConfig(maxSize=5000,removalTimeoutSeconds=18000)\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" private int state = 0;\n"
+"\n"
+" public void increment() {\n"
+" System.out.println(\"counter: \" + (state++));\n"
+" }\n"
+"}"
+msgstr ""
+"@Stateful\n"
+"@Clustered\n"
+"public class MyBean implements MySessionInt {\n"
+" \n"
+" private int state = 0;\n"
+"\n"
+" public void increment() {\n"
+" System.out.println(\"counter: \" + (state++));\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:808
+#, no-c-format
+msgid ""
+"As with stateless beans, the @Clustered annotation can also be omitted and "
+"the clustering configuration applied in jboss.xml; see the example above."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:811
+#, no-c-format
+msgid ""
+"As with EJB 2.0 clustered SFSBs, JBoss provides a mechanism whereby a bean "
+"implementation can expose a method the container can invoke to check whether "
+"the bean's state is not dirty after a request and doesn't need to be "
+"replicated. With EJB3, the mechanism is a little more formal; instead of "
+"just exposing a method with a known signature, an EJB3 SFSB must implement "
+"the org.jboss.ejb3.cache.Optimized interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:814
+#, fuzzy, no-c-format
+msgid ""
+"public interface Optimized {\n"
+"boolean isModified();\n"
+"}"
+msgstr "public boolean isModified ();"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:816
+#, no-c-format
+msgid ""
+"JBoss Cache provides the session state replication service for EJB 3.0 "
+"stateful session beans. The related MBean service is defined in the "
+"<literal>ejb3-clustered-sfsbcache-service.xml</literal> file in the "
+"<literal>deploy</literal> directory. The contents of the file are as follows."
+msgstr ""
+"JBoss Cache 为 EJB 3.0 stateful session beans 提供会话状态复制服务(session "
+"state replication service)。<literal>deploy</literal> 目录下 <literal>ejb3-"
+"clustered-sfsbcache-service.xml</literal> 文件定义了相关的 MBean 服务。文件的"
+"内容如下:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:819
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server>\n"
+" <mbean code=\"org.jboss..cache.TreeCache\"\n"
+" name=\"jboss.cache:service=EJB3SFSBClusteredCache\">\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" ${jboss.partition.name:DefaultPartition}-SFSBCache\n"
+" </attribute>\n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</"
+"attribute> \n"
+" \n"
+" <!-- We want to activate/inactivate regions as beans "
+"are deployed --> \n"
+" <attribute name=\"UseRegionBasedMarshalling\">true</"
+"attribute> \n"
+" <!-- Must match the value of "
+"\"useRegionBasedMarshalling\" --> \n"
+" <attribute name=\"InactiveOnStartup\">true</"
+"attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute> \n"
+" \n"
+" <!-- The max amount of time (in milliseconds) we "
+"wait until the \n"
+" initial state (ie. the contents of the cache) are "
+"retrieved from \n"
+" existing members. --> \n"
+" <attribute name=\"InitialStateRetrievalTimeout"
+"\">17500</attribute>\n"
+" \n"
+" <!-- Number of milliseconds to wait until all "
+"responses for a\n"
+" synchronous call have been received.\n"
+" -->\n"
+" <attribute name=\"SyncReplTimeout\">17500</"
+"attribute>\n"
+" \n"
+" <!-- Max number of milliseconds to wait for a lock "
+"acquisition -->\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+" \n"
+" <!-- Name of the eviction policy class. -->\n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+" \n"
+" <!-- Specific eviction policy configurations. This "
+"is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <name>statefulClustered</name> \n"
+" <!-- So default region would never timeout --"
+">\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">0</attribute>\n"
+" <attribute name=\"timeToIdleSeconds\">0</"
+"attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute> \n"
+" \n"
+" <!-- Store passivated sessions to the file system --> \n"
+" <attribute name=\"CacheLoaderConfiguration\"> \n"
+" <config> \n"
+" \n"
+" <passivation>true</passivation> \n"
+" <shared>false</shared> \n"
+" \n"
+" <cacheloader> \n"
+" <class>org.jboss.cache.loader.FileCacheLoader</class> \n"
+" <!-- Passivate to the server data dir --> \n"
+" <properties> \n"
+" location=${jboss.server.data.dir}${/}sfsb \n"
+" </properties> \n"
+" <async>false</async> \n"
+" <fetchPersistentState>true</fetchPersistentState> \n"
+" <ignoreModifications>false</ignoreModifications> \n"
+" </cacheloader> \n"
+" \n"
+" </config> \n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:846
+#, fuzzy, no-c-format
+msgid ""
+"The configuration attributes in this MBean are essentially the same as the "
+"attributes in the standard JBoss Cache <literal>TreeCache</literal> MBean "
+"discussed in <xref linkend=\"jbosscache.chapt\"/>. Again, we omitted the "
+"JGroups configurations in the <literal>ClusterConfig</literal> attribute "
+"(see more in <xref linkend=\"jbosscache-jgroups\"/>). Two noteworthy items:"
+msgstr ""
+"<literal>PassivationTreeCache</literal> MBean 里的配置属性基本上和在 <xref "
+"linkend=\"jbosscache.chapt\"/> 里讨论的标准 JBoss Cache <literal>TreeCache</"
+"literal> MBean 一样。我们再一次忽略了 <literal>ClusterConfig</literal> 属性"
+"(详情请参考 <xref linkend=\"jbosscache-jgroups\"/>)的 JGroups 配置。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:851
+#, no-c-format
+msgid ""
+"The cache is configured to support eviction. The EJB3 SFSB container uses "
+"the JBoss Cache eviction mechanism to manage SFSB passivation. When beans "
+"are deployed, the EJB container will programatically add eviction regions to "
+"the cache, one region per bean type."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:855
+#, no-c-format
+msgid ""
+"A JBoss Cache CacheLoader is also configured; again to support SFSB "
+"passivation. When beans are evicted from the cache, the cache loader "
+"passivates them to a persistent store; in this case to the filesystem in the "
+"$JBOSS_HOME/server/all/data/sfsb directory. JBoss Cache supports a variety "
+"of different CacheLoader implementations that know how to store data to "
+"different persistent store types; see the JBoss Cache documentation for "
+"details. However, if you change the CacheLoaderConfiguration, be sure that "
+"you do not use a shared store (e.g., a single schema in a shared database.) "
+"Each node in the cluster must have its own persistent store, otherwise as "
+"nodes independently passivate and activate clustered beans, they will "
+"corrupt each others data."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:865
+#, no-c-format
+msgid "Clustered Entity EJBs"
+msgstr "群集的 Entity EJBs"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:866
+#, fuzzy, no-c-format
+msgid ""
+"In a JBoss AS cluster, the entity bean instance caches need to be kept in "
+"sync across all nodes. If an entity bean provides remote services, the "
+"service methods need to be load balanced as well."
+msgstr ""
+"在 JBoss AS 群集系统里,entity bean 实例需要跨节点的复制。如果某个 entity "
+"bean 提供远程服务,那么服务方法(service methods)也需要进行负载平衡。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:868
+#, fuzzy, no-c-format
+msgid ""
+"To use a clustered entity bean, the application does not need to do anything "
+"special, except for looking up EJB 2.x remote bean references from the "
+"clustered HA-JNDI."
+msgstr ""
+"为了使用群集的 entity bean,应用程序不需要做任何特殊的事情,除了从群集的 HA-"
+"JNDI 里查找 bean 的引用。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:870
+#, no-c-format
+msgid "Entity Bean in EJB 2.x"
+msgstr "EJB 2.x 里的 Entity Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:871
+#, fuzzy, no-c-format
+msgid ""
+"First of all, it is worth noting that clustering 2.x entity beans is a bad "
+"thing to do. Its exposes elements that generally are too fine grained for "
+"use as remote objects to clustered remote objects and introduces data "
+"synchronization problems that are non-trivial. Do NOT use EJB 2.x entity "
+"bean clustering unless you fit into the sepecial case situation of read-"
+"only, or one read-write node with read-only nodes synched with the cache "
+"invalidation services."
+msgstr ""
+"首先,值得注意的是群集 2.x 的 entity beans 不是件好事。它向群集的远程对象开放"
+"(exposes)通常过于细颗粒度的元素(elements),导致了严重的数据同步问题。除非"
+"你遇到特殊的情况,如只读或者只写的节点和使用缓存失效服务(cache invalidation "
+"services)的只读节点同步,否则不要使用 EJB 2.x entity bean 的群集。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:873
+#, no-c-format
+msgid ""
+"To cluster EJB 2.x entity beans, you need to add the <literal><"
+"clustered></literal> element to the application's <literal>jboss.xml</"
+"literal> descriptor file. Below is a typical <literal>jboss.xml</literal> "
+"file."
+msgstr ""
+"要群集 EJB 2.x entity beans,你需要把 <literal><clustered></literal> 元"
+"素加入到应用程序的 <literal>jboss.xml</literal> 描述符文件里。下面是一个典型"
+"的 <literal>jboss.xml</literal> 文件。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:876
+#, no-c-format
+msgid ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:877
+#, no-c-format
+msgid ""
+"The EJB 2.x entity beans are clustered for load balanced remote invocations. "
+"All the bean instances are synchronized to have the same contents on all "
+"nodes."
+msgstr ""
+"为了平衡远程调用的负载,我们群集 EJB 2.x entity beans。所有的 bean 实例都实现"
+"同步,具有所有节点上的相同内容。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:879
+#, no-c-format
+msgid ""
+"However, clustered EJB 2.x Entity Beans do not have a distributed locking "
+"mechanism or a distributed cache. They can only be synchronized by using row-"
+"level locking at the database level (see <literal><row-lock></literal> "
+"in the CMP specification) or by setting the Transaction Isolation Level of "
+"your JDBC driver to be <literal>TRANSACTION_SERIALIZABLE</literal>. Because "
+"there is no supported distributed locking mechanism or distributed cache "
+"Entity Beans use Commit Option \"B\" by default (See <literal>standardjboss."
+"xml</literal> and the container configurations Clustered CMP 2.x EntityBean, "
+"Clustered CMP EntityBean, or Clustered BMP EntityBean). It is not "
+"recommended that you use Commit Option \"A\" unless your Entity Bean is read-"
+"only. (There are some design patterns that allow you to use Commit Option \"A"
+"\" with read-mostly beans. You can also take a look at the Seppuku pattern "
+"<ulink url=\"http://dima.dhs.org/misc/readOnlyUpdates.html\"></ulink>. JBoss "
+"may incorporate this pattern into later versions.)"
+msgstr ""
+"然而,群集的 EJB 2.x Entity Beans 没有分布式的锁定机制或是缓存。它们只能用数"
+"据库层面的行级锁定(请参考 CMP 规范的<literal><row-lock></literal>)或"
+"是把 JDBC 驱动的事务隔离(Transaction Isolation)级别设为 "
+"<literal>TRANSACTION_SERIALIZABLE</literal> 来实现同步。因为缺乏分布式的锁定"
+"机制或是缓存支持,Entity Beans 缺省使用提交选项 \"B\"(请参考 "
+"<literal>standardjboss.xml</literal> 和 the container configurations "
+"Clustered CMP 2.x EntityBean,Clustered CMP EntityBean,或 Clustered BMP "
+"EntityBean)。我们不推荐你使用提交选项 \"A\",除非你的 Entity Bean 是只读的。"
+"(有些设计模式允许你把提交选项\"A\" 用于 read-mostly beans。你也可以看看 "
+"Seppuku 模式:<ulink url=\"http://dima.dhs.org/misc/readOnlyUpdates.html\"></"
+"ulink>。JBoss 有可能把这个模式集成到以后的版本里。)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:891
+#, no-c-format
+msgid ""
+"If you are using Bean Managed Persistence (BMP), you are going to have to "
+"implement synchronization on your own. The MVCSoft CMP 2.0 persistence "
+"engine (see <ulink url=\"http://www.jboss.org/jbossgroup/partners.jsp\"></"
+"ulink>) provides different kinds of optimistic locking strategies that can "
+"work in a JBoss cluster."
+msgstr ""
+"如果你正在使用 Bean Managed Persistence (BMP),你将不得不实现自己的同步机"
+"制。MVCSoft CMP 2.0 持久化引擎(persistence engine)(请参考 <ulink url="
+"\"http://www.jboss.org/jbossgroup/partners.jsp\"></ulink>)提供可以在 JBoss "
+"群集里使用的各种优化锁定策略。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:897
+#, no-c-format
+msgid "Entity Bean in EJB 3.0"
+msgstr "EJB 3.0 里的 Entity Bean"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:899
+#, no-c-format
+msgid ""
+"In EJB 3.0, the entity beans primarily serve as a persistence data model. "
+"They do not provide remote services. Hence, the entity bean clustering "
+"service in EJB 3.0 primarily deals with distributed caching and replication, "
+"instead of load balancing."
+msgstr ""
+"在 EJB 3.0 里,entity beans 主要以持久化数据模型出现。它们不提供远程服务。因"
+"此,EJB 3.0 里的 entity bean 群集服务主要处理分布式缓存和复制,而不是负载平"
+"衡。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:905
+#, no-c-format
+msgid "Configure the distributed cache"
+msgstr "配置分布式缓存"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:906
+#, fuzzy, no-c-format
+msgid ""
+"To avoid round trips to the database, you can use a cache for your entities. "
+"JBoss EJB 3.0 entity beans are implemented by Hibernate, which has support "
+"for a second-level cache. The Hibernate setup used for the JBoss EJB 3.0 "
+"implementation uses JBoss Cache as its underlying second-level cache "
+"implementation. The second-level cache provides the following "
+"functionalities."
+msgstr ""
+"为了避免多次访问数据库,你可以为你的 entities 使用缓存。JBoss EJB 3.0 是用 "
+"Hibernate 实现的,它支持两级缓存。用于 JBoss EJB 3.0 实现的 Hibernate setup "
+"把 JBoss Cache 当作底层缓存实现使用。这个缓存提供了下面的功能:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:909
+#, no-c-format
+msgid ""
+"If you persist a cache enabled entity bean instance to the database via the "
+"entity manager the entity will inserted into the cache."
+msgstr ""
+"如果你通过 entity manager 来使应用缓存的 entity bean 的实例持久化,这个 "
+"entity 会被储存到缓存里。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:913
+#, no-c-format
+msgid ""
+"If you update an entity bean instance and save the changes to the database "
+"via the entity manager the entity will updated in the cache."
+msgstr ""
+"如果你通过 entity manager 更新 entity bean 实例并把更改保存到数据库里,缓存里"
+"的这个 entity 将被更新。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:917
+#, no-c-format
+msgid ""
+"If you remove an entity bean instance from the database via the entity "
+"manager the entity will removed from the cache."
+msgstr ""
+"如果你通过 entity manager 把 entity bean 实例从数据库里删除,这个 entity 也将"
+"从缓存里删除。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:921
+#, no-c-format
+msgid ""
+"If loading a cached entity from the database via the entity manager, and "
+"that entity does not exist in the database, it will be inserted into the "
+"cache."
+msgstr ""
+"如果你通过 entity manager 从数据库里载入缓存的 entity,而这个这个 entity 并不"
+"在缓存里,这个 entity 会被插入到缓存里。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:925
+#, fuzzy, no-c-format
+msgid ""
+"The JBoss Cache service for EJB 3.0 entity beans is configured in a "
+"<literal>TreeCache</literal> MBean in the <literal>deploy/ejb3-entity-cache-"
+"service.xml</literal> file. The name of the cache MBean service is "
+"<literal>jboss.cache:service=EJB3EntityTreeCache</literal>. Below are the "
+"contents of the <literal>ejb3-entity-cache-service.xml</literal> file in the "
+"standard JBoss distribution. Again, we omitted the JGroups configuration "
+"element <literal>ClusterConfig</literal>."
+msgstr ""
+"JEJB 3.0 entity beans 采用的 Boss Cache 服务在 <literal>deploy/ejb3-entity-"
+"cache-service.xml</literal> 文件里的 <literal>TreeCache</literal> MBean(请参"
+"考<xref linkend=\"jbosscache-cache\"/>) 里被配置。缓存 MBean 服务名是"
+"<literal>jboss.cache:service=EJB3EntityTreeCache</literal>。下面是标准 JBoss "
+"发行版本里的 <literal>ejb3-entity-cache-service.xml</literal> 文件的内容。我"
+"们再次忽略了 JGroups 的配置元素 <literal>ClusterConfig</literal>。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:931
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <server>\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends> \n"
+" \n"
+" <!-- Name of cluster. Needs to be the same on all nodes in the clusters, \n"
+" in order to find each other --> \n"
+" <attribute name=\"ClusterName\">\n"
+" ${jboss.partition.name:DefaultPartition}-EntityCache\n"
+" </attribute>\n"
+" \n"
+" <!-- Configure the TransactionManager -->\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.JBossTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</attribute>\n"
+" <attribute name=\"CacheMode\">REPL_SYNC</attribute> \n"
+" \n"
+" <!-- Must be true if any entity deployment uses a scoped "
+"classloader --> \n"
+" <attribute name=\"UseRegionBasedMarshalling\">true</attribute> \n"
+" <!-- Must match the value of \"useRegionBasedMarshalling\" --> \n"
+" <attribute name=\"InactiveOnStartup\">true</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"InitialStateRetrievalTimeout\">17500</attribute>\n"
+" <attribute name=\"SyncReplTimeout\">17500</attribute>\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</attribute>\n"
+" \n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+" \n"
+" <!-- Specific eviction policy configurations. This is LRU -->\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>\n"
+"]]>"
+msgstr ""
+"<server>\n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" \n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+"\n"
+" <!-- Configure the TransactionManager -->\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.JBossTransactionManagerLookup\n"
+" </attribute>\n"
+"\n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" <attribute name=\"CacheMode\">REPL_SYNC</attribute>\n"
+"\n"
+" <!--Name of cluster. Needs to be the same for all clusters, \n"
+" in order to find each other -->\n"
+" <attribute name=\"ClusterName\">EJB3-entity-cache</"
+"attribute>\n"
+"\n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+"\n"
+" <attribute name=\"InitialStateRetrievalTimeout\">5000</"
+"attribute>\n"
+" <attribute name=\"SyncReplTimeout\">10000</attribute>\n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"\n"
+" <attribute name=\"EvictionPolicyClass\">\n"
+" org.jboss.cache.eviction.LRUPolicy\n"
+" </attribute>\n"
+"\n"
+" <!-- Specific eviction policy configurations. This is LRU --"
+">\n"
+" <attribute name=\"EvictionPolicyConfig\">\n"
+" <config>\n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute>\n"
+" <!-- Cache wide default -->\n"
+" <region name=\"/_default_\">\n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute>\n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute>\n"
+" </region>\n"
+" </config>\n"
+" </attribute>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:933
+#, fuzzy, no-c-format
+msgid ""
+"This is a replicated cache, so, if running within a cluster, and the cache "
+"is updated, changes to the entries in one node will be replicated to the "
+"corresponding entries in the other nodes in the cluster."
+msgstr ""
+"正如我们在 <xref linkend=\"jbosscache-cache\"/> 所讨论的,JBoss Cache 允许你"
+"指定缓存的 entities 的超时时间。在某个时段内没有被访问的 entities 将从缓存里"
+"删除,这样可以节省内存。如果这个缓存是在群集里运行,那么它会被更新。对某个节"
+"点的 entries 的改动都会复制到群集里其他节点的相应条目里。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:936
+#, no-c-format
+msgid ""
+"JBoss Cache allows you to specify timeouts to cached entities. Entities not "
+"accessed within a certain amount of time are dropped from the cache in order "
+"to save memory. The above configuration sets up a default configuration "
+"region that says that at most the cache will hold 5000 nodes, after which "
+"nodes will start being evicted from memory, least-recently used nodes last. "
+"Also, if any node has not been accessed within the last 1000 seconds, it "
+"will be evicted from memory. In general, a node in the cache represents a "
+"cached item (entity, collection, or query result set), although there are "
+"also a few other node that are used for internal purposes. If the above "
+"values of 5000 maxNodes and 1000 idle seconds are invalid for your "
+"application(s), you can change the cache-wide defaults. You can also add "
+"separate eviction regions for each of your entities; more on this below."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:940
+#, no-c-format
+msgid ""
+"Now, we have JBoss Cache configured to support distributed caching of EJB "
+"3.0 entity beans. We still have to configure individual entity beans to use "
+"the cache service."
+msgstr ""
+"现在,我们配置了 JBoss Cache 来支持 EJB 3.0 entity beans 的分布式缓存。我们仍"
+"不得不配置单个的 entity bean 来使用这个缓存服务。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:943
+#, no-c-format
+msgid "Configure the entity beans for cache"
+msgstr "配置 entity beans 的缓存"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:944
+#, no-c-format
+msgid ""
+"You define your entity bean classes the normal way. Future versions of JBoss "
+"EJB 3.0 will support annotating entities and their relationship collections "
+"as cached, but for now you have to configure the underlying hibernate engine "
+"directly. Take a look at the <literal>persistence.xml</literal> file, which "
+"configures the caching options for hibernate via its optional "
+"<literal>property</literal> elements. The following element in "
+"<literal>persistence.xml</literal> defines that caching should be enabled:"
+msgstr ""
+"你用正常方式定义你的 entity bean 类。JBoss EJB 3.0 将来的版本将支持 "
+"annotating entities 和所缓存的它们的关系的集合,但是现在你不得不直接配置底层"
+"的 hibernate 引擎。让我们看看通过可选的 <literal>property</literal> 元素配置 "
+"hibernate 缓存选项的 <literal>persistence.xml</literal> 文件。下面 "
+"<literal>persistence.xml</literal> 里的定义缓存的元素应该被启用:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:950
+#, no-c-format
+msgid ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>"
+msgstr ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:951
+#, fuzzy, no-c-format
+msgid ""
+"The following property element defines the object name of the cache to be "
+"used, i.e., the name of the TreeCache MBean shown above."
+msgstr "下面的属性元素定义了所使用的缓存对象名和 MBean 名。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:952
+#, no-c-format
+msgid ""
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
+"</property>"
+msgstr ""
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
+"</property>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:953
+#, no-c-format
+msgid ""
+"Finally, you should give a “region_prefix” to this configuration. This "
+"ensures that all cached items associated with this persistence.xml are "
+"properly grouped together in JBoss Cache. The jboss.cache:"
+"service=EJB3EntityTreeCache cache is a shared resource, potentially used by "
+"multiple persistence units. The items cached in that shared cache need to be "
+"properly grouped to allow the cache to properly manage classloading. <"
+"property name=\"hibernate.cache.region_prefix\" value=\"myprefix\"/>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:957
+#, no-c-format
+msgid ""
+"If you do not provide a region prefix, JBoss will automatically provide one "
+"for you, building it up from the name of the EAR (if any) and the name of "
+"the JAR that includes the persistence.xml. For example, a persistence.xml "
+"packaged in foo.ear, bar.jar would be given “foo_ear,bar_jar” as its region "
+"prefix. This is not a particularly friendly region prefix if you need to use "
+"it to set up specialized eviction regions (see below), so specifying your "
+"own region prefix is recommended."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:965
+#, fuzzy, no-c-format
+msgid ""
+"Next we need to configure what entities be cached. The default is to not "
+"cache anything, even with the settings shown above. We use the <literal>@org."
+"hibernate.annotations.Cache</literal> annotation to tag entity beans that "
+"needs to be cached."
+msgstr ""
+"下一步我们需要配置 entities 被缓存的内容。就像上面所展示的样,缺省是什么都不"
+"缓存。我们使用 <literal>@Cache</literal> 注解来标记需要缓存的 entity beans。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:966
+#, fuzzy, no-c-format
+msgid ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Account implements Serializable { \n"
+" // ... ... \n"
+"}"
+msgstr ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Customer implements Serializable { \n"
+" // ... ... \n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:967
+#, fuzzy, no-c-format
+msgid ""
+"A very simplified rule of thumb is that you will typically want to do "
+"caching for objects that rarely change, and which are frequently read. You "
+"can fine tune the cache for each entity bean in the <literal>ejb3-entity-"
+"cache-service.xml</literal> configuration file. For instance, you can "
+"specify the size of the cache. If there are too many objects in the cache, "
+"the cache could evict oldest objects (or least used objects, depending on "
+"configuration) to make room for new objects. Assuming the region_prefix "
+"specified in <literal>persistence.xml</literal> was myprefix, the default "
+"name of the cache region for the <literal>com.mycompany.entities.Account</"
+"literal> entity bean <literal>/myprefix/com/mycompany/entities/Account</"
+"literal>."
+msgstr ""
+"一个简单的原则就是,你应该对很少变动和频繁使用的对象进行缓存.你可以在 "
+"<literal>ejb3-entity-cache-service.xml</literal> 配置文件里为每个 entity "
+"bean 微调缓存设置。例如,你可以指定缓存的大小。如果缓存里的对象太多,缓存有可"
+"能挤掉最老的对象(或者最少用的对象,依你的配置而定)来给新对象留出空间。"
+"<literal>mycompany.Customer</literal> entity bean 的缓存区(cache region)是 "
+"<literal>/mycompany/Customer</literal>。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:969
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account entities -->\n"
+" <region name=\"/myprefix/com/mycompany/entities/"
+"Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" <depends>jboss:service=Naming \n"
+" <depends>jboss:service=TransactionManager \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute> \n"
+" </region> \n"
+" <region name=\"/mycompany/Customer\"> \n"
+" <attribute name=\"maxNodes\">10</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:972
+#, fuzzy, no-c-format
+msgid ""
+"If you do not specify a cache region for an entity bean class, all instances "
+"of this class will be cached in the <literal>/_default</literal> region as "
+"defined above. The @Cache annotation exposes an optional attribute “region” "
+"that lets you specify the cache region where an entity is to be stored, "
+"rather than having it be automatically be created from the fully-qualified "
+"class name of the entity class."
+msgstr ""
+"如果你没有为 entity bean 类指定缓存区(cache region),这个类的所有实例将象上"
+"面定义的一样缓存在 <literal>/_default</literal> 区里。EJB3 <literal>Query</"
+"literal> API 提供了让你在指定的缓存区里保存或载入查询结果(就是 entity beans "
+"的集合)的方法。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:975
+#, fuzzy, no-c-format
+msgid ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+"region=”Account”) \n"
+"public class Account implements Serializable { \n"
+"// ... ... \n"
+"}"
+msgstr ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Customer implements Serializable { \n"
+" // ... ... \n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:976
+#, fuzzy, no-c-format
+msgid "The eviction configuration would then become:"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:977
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\"> \n"
+" <depends>jboss:service=Naming \n"
+" <depends>jboss:service=TransactionManager \n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">1000</"
+"attribute> \n"
+" </region> \n"
+" <region name=\"/mycompany/Customer\"> \n"
+" <attribute name=\"maxNodes\">10</attribute> \n"
+" <attribute name=\"timeToLiveSeconds\">5000</"
+"attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:982
+#, no-c-format
+msgid "Query result caching"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:983
+#, no-c-format
+msgid ""
+"The EJB3 Query API also provides means for you to save in the second-level "
+"cache the results (i.e., collections of primary keys of entity beans, or "
+"collections of scalar values) of specified queries. Here we show a simple "
+"example of annotating a bean with a named query, also providing the "
+"Hibernate-specific hints that tells Hibernate to cache the query."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:986
+#, no-c-format
+msgid ""
+"First, in persistence.xml you need to tell Hibernate to enable query caching:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:989
+#, no-c-format
+msgid ""
+"<property name=\"hibernate.cache.use_query_cache\" value=\"true\"/>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:990
+#, no-c-format
+msgid ""
+"Next, you create a named query associated with an entity, and tell Hibernate "
+"you want to cache the results of that query:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:993
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"@Entity\n"
+"@Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+"region=”Account”)\n"
+"@NamedQueries({\n"
+"@NamedQuery(name=\"account.bybranch\",\n"
+"query=\"select acct from Account as acct where acct.branch = ?1\",\n"
+"hints={@QueryHint(name=\"org.hibernate.cacheable\",value=\"true"
+"\")}) \n"
+"})\n"
+"public class Account implements Serializable { \n"
+"// ... ... \n"
+"}]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:995
+#, no-c-format
+msgid ""
+"The @NamedQueries, @NamedQuery and @QueryHint annotations are all in the "
+"javax.persistence package.See the Hibernate and EJB3 documentation for more "
+"on how to use EJB3 queries and on how to instruct EJB3 to cache queries."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:998
+#, no-c-format
+msgid ""
+"By default, Hibernate stores query results in JBoss Cache in a region named "
+"{region_prefix}/org/hibernate/cache/StandardQueryCache. Based on this, you "
+"can set up separate eviction handling for your query results. So, if the "
+"region prefix were set to myprefix in persistence.xml, you could, for "
+"example, create this sort of eviction handling:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1002
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account "
+"entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes"
+"\">10000</attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region>\n"
+" <!-- Cache queries for 10 minutes -->\n"
+" <region name=\"/myprefix/org/hibernate/"
+"cache/StandardQueryCache\"> \n"
+" <attribute name=\"maxNodes\">100</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">600</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>\n"
+" ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1004
+#, no-c-format
+msgid ""
+"The @NamedQuery.hints attribute shown above takes an array of vendor-"
+"specific @QueryHints as a value. Hibernate accepts the “org.hibernate."
+"cacheRegion” query hint, where the value is the name of a cache region to "
+"use instead ofthe default /org/hibernate/cache/StandardQueryCache. For "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1007
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" @Entity\n"
+" @Cache (usage=CacheConcurrencyStrategy.TRANSACTIONAL,\n"
+" region=”Account”)\n"
+" @NamedQueries({\n"
+" @NamedQuery(name=\"account.bybranch\",\n"
+" query=\"select acct from Account as acct where acct.branch = ?1\",\n"
+" hints={@QueryHint(name=\"org.hibernate.cacheable\",value=\"true\"),\n"
+" @QueryHint(name=”org.hibernate.cacheRegion,value=”Queries”)\n"
+" }) \n"
+" })\n"
+" public class Account implements Serializable { \n"
+" // ... ... \n"
+" }]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1008
+#, fuzzy, no-c-format
+msgid "The related eviction configuration:"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1011
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<server> \n"
+" <mbean code=\"org.jboss.cache.TreeCache\" \n"
+" name=\"jboss.cache:service=EJB3EntityTreeCache\">\n"
+" ... ... \n"
+" <attribute name=\"EvictionPolicyConfig\"> \n"
+" <config> \n"
+" <attribute name=\"wakeUpIntervalSeconds\">5</"
+"attribute> \n"
+" <region name=\"/_default_\"> \n"
+" <attribute name=\"maxNodes\">5000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">1000</attribute> \n"
+" </region> \n"
+" <!-- Separate eviction rules for Account "
+"entities -->\n"
+" <region name=\"/myprefix/Account\"> \n"
+" <attribute name=\"maxNodes\">10000</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">5000</attribute> \n"
+" </region>\n"
+" <!-- Cache queries for 10 minutes -->\n"
+" <region name=\"/myprefix/Queries\"> \n"
+" <attribute name=\"maxNodes\">100</"
+"attribute> \n"
+" <attribute name=\"timeToLiveSeconds"
+"\">600</attribute> \n"
+" </region> \n"
+" ... ... \n"
+" </config> \n"
+" </attribute> \n"
+" </mbean> \n"
+"</server>]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1044
+#, no-c-format
+msgid "HTTP Services"
+msgstr "HTTP 服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1045
+#, no-c-format
+msgid ""
+"HTTP session replication is used to replicate the state associated with your "
+"web clients on other nodes of a cluster. Thus, in the event one of your node "
+"crashes, another node in the cluster will be able to recover. Two distinct "
+"functions must be performed:"
+msgstr ""
+"HTTP 会话复制(session replication)用来复制和你在群集里其他节点上的 web 客户"
+"相关的状态。因此,如果其中一个节点崩溃了,群集里的其他节点将能够恢复。有两个"
+"不同的功能必须被执行:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1050
+#, no-c-format
+msgid "Session state replication"
+msgstr "会话状态复制(Session state replication)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1053
+#, fuzzy, no-c-format
+msgid "Load-balancing of incoming invocations"
+msgstr "传入调用(incoming invocations)的负载平衡"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1056
+#, fuzzy, no-c-format
+msgid ""
+"State replication is directly handled by JBoss. When you run JBoss in the "
+"<literal>all</literal> configuration, session state replication is enabled "
+"by default. Just configure your web application as distributable in its "
+"<filename>web.xml</filename> (see below), deploy it, and its session state "
+"is automtically replicated across all JBoss instances in the cluster."
+msgstr ""
+"状态复制(State replication)由 JBoss 直接处理。当你在 <literal>all</"
+"literal> 配置里运行 JBoss,会话状态复制缺省是启用的。只要部署了你的 web 应用"
+"程序,它的会话状态就已经复制在群集里的所有 JBoss 实例中了。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1058
+#, fuzzy, no-c-format
+msgid ""
+"However, load-balancing is a different story; it is not handled by JBoss "
+"itself and requires an external load balancer. aThis function could be "
+"provided by specialized hardware switches or routers (Cisco LoadDirector for "
+"example) or by specialized software running on commodity hardware. As a very "
+"common scenario, we will demonstrate how to set up a software load balancer "
+"using Apache httpd and mod_jk."
+msgstr ""
+"然而,负载平衡是不一样的。它不是由 JBoss 自己处理的,它需要额外的软件。我们将"
+"演示怎样设立 Apache 和 mod_jk,这是一个很常见的例子。但这需要专门的硬件开关,"
+"路由器(如 Cisco LoadDirector)或其他专门的软件来执行。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1063
+#, fuzzy, no-c-format
+msgid ""
+"A load-balancer tracks HTTP requests and, depending on the session to which "
+"the request is linked, it dispatches the request to the appropriate node. "
+"This is called load-balancing with sticky-sessions: once a session is "
+"created on a node, every future request will also be processed by that same "
+"node. Using a load-balancer that supports sticky-sessions but not "
+"configuring your web application for session replication allows you to scale "
+"very well by avoiding the cost of session state replication: each query will "
+"always be handled by the same node. But in case a node dies, the state of "
+"all client sessions hosted by this node (the shopping carts, for example) "
+"will be lost and the clients will most probably need to login on another "
+"node and restart with a new session. In many situations, it is acceptable "
+"not to replicate HTTP sessions because all critical state is stored in a "
+"database. In other situations, losing a client session is not acceptable "
+"and, in this case, session state replication is the price one has to pay."
+msgstr ""
+"负载平衡系统跟踪 HTTP 请求,它依据请求所链接的会话把请求分派给合适的节点。一"
+"旦会话在节点上被创建,将来的每个请求都被同一节点所处理:这被称作使用 sticky-"
+"sessions 的负载平衡系统。使用支持不复制会话的 sticky-sessions 的负载平衡系统"
+"允许你不付出复制状态的代价就可以很好地扩充:每个查询将总是由同一节点来处理。"
+"但是,如果某个节点崩溃了,所有以这个节点为宿主的客户会话状态就将全部丢失(如"
+"购物车),客户很有可能需要登录另外一节点来启动新的会话。在大部分情况下,不复"
+"制 HTTP 会话是可以接受的,因为所有关键状态都存储在数据库里。在丢失客户会话是"
+"不能接受的情况下,采用会话状态复制就是必须付出的代价了。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1065
+#, fuzzy, no-c-format
+msgid "Configuring load balancing using Apache and mod_jk"
+msgstr "配置 Apache 来装载 mod_jk"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1067
+#, fuzzy, no-c-format
+msgid ""
+"Apache is a well-known web server which can be extended by plugging in "
+"modules. One of these modules, mod_jk has been specifically designed to "
+"allow the forwarding of requests from Apache to a Servlet container. "
+"Furthermore, it is also able to load-balance HTTP calls to a set of Servlet "
+"containers while maintaining sticky sessions, which is what is most "
+"interesting for us in this section."
+msgstr ""
+"Apache 是一个很有名的 web 服务器,它可以通过插件来扩展。mod_jk(和最新的 "
+"mod_jk2)已经被特别的设计成可以允许从 Apache 转发请求到 Servlet 容器里。而"
+"且,当维护 sticky sessions 时,它也能够对 Servlet 容器的 HTTP 调用的负载进行"
+"平衡,这正是让我们感兴趣的地方。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1072
+#, no-c-format
+msgid "Download the software"
+msgstr "下载软件"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1073
+#, no-c-format
+msgid ""
+"First of all, make sure that you have Apache installed. You can download "
+"Apache directly from Apache web site at <literal>http://httpd.apache.org/</"
+"literal>. Its installation is pretty straightforward and requires no "
+"specific configuration. As several versions of Apache exist, we advise you "
+"to use version 2.0.x. We will consider, for the next sections, that you have "
+"installed Apache in the <literal>APACHE_HOME</literal> directory."
+msgstr ""
+"首先,确保你已经安装了 Apache。你可以直接从 Apache 网站 <literal>http://"
+"httpd.apache.org/</literal> 下载 Apache。它的安装是非常直接的,不需要任何特殊"
+"的配置。Apache 有好几个版本,我们建议你使用 2.0.x 版本。在下面的内容里,我们"
+"假设你已经把 Apache 安装在 <literal>APACHE_HOME</literal> 目录下了。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1078
+#, no-c-format
+msgid ""
+"Next, download mod_jk binaries. Several versions of mod_jk exist as well. We "
+"strongly advise you to use mod_jk 1.2.x, as both mod_jk and mod_jk2 are "
+"deprecated, unsupported and no further developments are going on in the "
+"community. The mod_jk 1.2.x binary can be downloaded from <literal>http://"
+"www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/</literal>. Rename "
+"the downloaded file to <literal>mod_jk.so</literal> and copy it under "
+"<literal>APACHE_HOME/modules/</literal>."
+msgstr ""
+"其次,下载 mod_jk binaries。它也有几个版本。我们强烈建议你使用 mod_jk 1.2.x,"
+"因为 mod_jk 和 mod_jk2 都已经被取消了,在社区里不再会有后续的开发和支持。你可"
+"以从 <literal>http://www.apache.org/dist/jakarta/tomcat-connectors/jk/"
+"binaries/</literal> 下载 mod_jk 1.2.x binary。把下载的文件改名为 "
+"<literal>mod_jk.so</literal> 并拷贝到 <literal>APACHE_HOME/modules/</"
+"literal> 目录下。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1086
+#, no-c-format
+msgid "Configure Apache to load mod_jk"
+msgstr "配置 Apache 来装载 mod_jk"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1087
+#, no-c-format
+msgid ""
+"Modify APACHE_HOME/conf/httpd.conf and add a single line at the end of the "
+"file:"
+msgstr "在 APACHE_HOME/conf/httpd.conf 文件的最后加入一行:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1088
+#, no-c-format
+msgid ""
+"# Include mod_jk's specific configuration file \n"
+"Include conf/mod-jk.conf"
+msgstr ""
+"# Include mod_jk's specific configuration file \n"
+"Include conf/mod-jk.conf"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1089
+#, no-c-format
+msgid ""
+"Next, create a new file named <literal>APACHE_HOME/conf/mod-jk.conf</"
+"literal>:"
+msgstr ""
+"然后,建立一个叫 <literal>APACHE_HOME/conf/mod-jk.conf</literal> 的文件。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1090
+#, no-c-format
+msgid ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+" \n"
+"# JkOptions indicates to send SSK KEY SIZE\n"
+"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
+" \n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+" \n"
+"# You can use external file for mount points.\n"
+"# It will be checked for updates each 60 seconds.\n"
+"# The format of the file is: /url=worker\n"
+"# /examples/*=loadbalancer\n"
+"JkMountFile conf/uriworkermap.properties \n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+msgstr ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+" \n"
+"# JkOptions indicates to send SSK KEY SIZE\n"
+"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
+" \n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+" \n"
+"# You can use external file for mount points.\n"
+"# It will be checked for updates each 60 seconds.\n"
+"# The format of the file is: /url=worker\n"
+"# /examples/*=loadbalancer\n"
+"JkMountFile conf/uriworkermap.properties \n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1091
+#, no-c-format
+msgid "Please note that two settings are very important:"
+msgstr "请注意有两个设置非常重要:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1094
+#, no-c-format
+msgid ""
+"The <literal>LoadModule</literal> directive must reference the mod_jk "
+"library you have downloaded in the previous section. You must indicate the "
+"exact same name with the \"modules\" file path prefix."
+msgstr ""
+"<literal>LoadModule</literal> 指令(directive)必须引用你在前面下载的 mod_jk "
+"库。你必须使用有 \"modules\" 前缀的完全一致的名字。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1099
+#, no-c-format
+msgid ""
+"The <literal>JkMount</literal> directive tells Apache which URLs it should "
+"forward to the mod_jk module (and, in turn, to the Servlet containers). In "
+"the above file, all requests with URL path <literal>/application/*</literal> "
+"are sent to the mod_jk load-balancer. This way, you can configure Apache to "
+"server static contents (or PHP contents) directly and only use the "
+"loadbalancer for Java applications. If you only use mod_jk as a "
+"loadbalancer, you can also forward all URLs (i.e., <literal>/*</literal>) to "
+"mod_jk."
+msgstr ""
+"<literal>JkMount</literal> 指令告诉 Apache 应该把 URLs 转发给哪个 mod_jk 模块"
+"(和 Servlet 容器)。在上面的文件里,所有基于 URL 路径 <literal>/application/"
+"*</literal> 的请求都被发送到 mod_jk 负载平衡系统(load-balancer)。这样的"
+"话,你能够使 Apache 直接处理静态内容 (或 PHP 内容)而只对 Java 应用程序使用"
+"负载平衡系统。如果你只把 mod_jk 当作负载平衡系统使用,你也可以把所有的 URLs "
+"(也就是 <literal>/*</literal>)转发给 mod_jk。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1107
+#, no-c-format
+msgid ""
+"In addition to the <literal>JkMount</literal> directive, you can also use "
+"the <literal>JkMountFile</literal> directive to specify a mount points "
+"configuration file, which contains multiple Tomcat forwarding URL mappings. "
+"You just need to create a <literal>uriworkermap.properties</literal> file in "
+"the <literal>APACHE_HOME/conf</literal> directory. The format of the file is "
+"<literal>/url=worker_name</literal>. To get things started, paste the "
+"following example into the file you created:"
+msgstr ""
+"除了 <literal>JkMount</literal> 指令以外,你也能够用 <literal>JkMountFile</"
+"literal> 指令来指定配置文件的挂载点(mount points),它包含了多重的 Tomcat "
+"forwarding URL mappings。你只需要在 <literal>APACHE_HOME/conf</literal> 目录"
+"下建立一个 <literal>uriworkermap.properties</literal> 文件。文件的格式是 "
+"<literal>/url=worker_name</literal>。首先,把下例拷贝到你创建的文件里:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1113
+#, no-c-format
+msgid ""
+"# Simple worker configuration file\n"
+"\n"
+"# Mount the Servlet context to the ajp13 worker\n"
+"/jmx-console=loadbalancer\n"
+"/jmx-console/*=loadbalancer\n"
+"/web-console=loadbalancer\n"
+"/web-console/*=loadbalancer"
+msgstr ""
+"# Simple worker configuration file\n"
+"\n"
+"# Mount the Servlet context to the ajp13 worker\n"
+"/jmx-console=loadbalancer\n"
+"/jmx-console/*=loadbalancer\n"
+"/web-console=loadbalancer\n"
+"/web-console/*=loadbalancer"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1114
+#, no-c-format
+msgid ""
+"This will configure mod_jk to forward requests to <literal>/jmx-console</"
+"literal> and <literal>/web-console</literal> to Tomcat."
+msgstr ""
+"这将使 mod_jk 把发送到 <literal>/jmx-console</literal> 和 <literal>/web-"
+"console</literal> 的请求转发至 Tomcat。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1116
+#, no-c-format
+msgid ""
+"You will most probably not change the other settings in <literal>mod_jk."
+"conf</literal>. They are used to tell mod_jk where to put its logging file, "
+"which logging level to use and so on."
+msgstr ""
+"你很可能不需要修改 <literal>mod_jk.conf</literal> 里的设置,这些设置用来告诉 "
+"mod_jk 日志文件放在什么地方,使用哪个日志级别等等。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1120
+#, no-c-format
+msgid "Configure worker nodes in mod_jk"
+msgstr "配置 mod_jk 里的 worker 节点"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1121
+#, fuzzy, no-c-format
+msgid ""
+"Next, you need to configure mod_jk workers file <literal>conf/workers."
+"properties</literal>. This file specifies where the different Servlet "
+"containers are located and how calls should be load-balanced across them. "
+"The configuration file contains one section for each target servlet "
+"container and one global section. For a two nodes setup, the file could look "
+"like this:"
+msgstr ""
+"然后,你需要配置 mod_jk 的 workers 文件 <literal>conf/workers.properties</"
+"literal>。这个文件指定不同的 Servlet 容器的存放位置和怎样对它们之间的调用进行"
+"负载平衡。这个配置文件包含了一个全局设置部分以及针对每个目标 Servlet 容器的设"
+"置部分。对于两个节点的设立,这个文件如下所示:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1126
+#, no-c-format
+msgid ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+msgstr ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1127
+#, no-c-format
+msgid ""
+"Basically, the above file configures mod_jk to perform weighted round-robin "
+"load balancing with sticky sessions between two servlet containers (JBoss "
+"Tomcat) node1 and node2 listening on port 8009."
+msgstr ""
+"基本上,上面的配置使 mod_jk 对两个 servlet 容器(JBoss Tomcat)(侦听 8009 端"
+"口的节点 1 和节点 2)之间的 sticky sessions 执行重量级的 round-robin 负载平"
+"衡。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1130
+#, fuzzy, no-c-format
+msgid ""
+"In the <literal>works.properties</literal> file, each node is defined using "
+"the <literal>worker.XXX</literal> naming convention where <literal>XXX</"
+"literal> represents an arbitrary name you choose for each of the target "
+"Servlet containers. For each worker, you must specify the host name (or IP "
+"address) and the port number of the AJP13 connector running in the Servlet "
+"container."
+msgstr ""
+"在 <literal>works.properties</literal> 文件里,每个节点都用 <literal>worker."
+"XXX</literal> 命名规则命名,<literal>XXX</literal> 代表你给其中一个目标 "
+"Servlet 容器选取的任意名字。对于每一个 worker,你必须给出在 Servlet 容器运行"
+"的 AJP13 connector 的主机名(或 IP 地址)和端口号。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1135
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>lbfactor</literal> attribute is the load-balancing factor for "
+"this specific worker. It is used to define the priority (or weight) a node "
+"should have over other nodes. The higher this number is for a given worker "
+"relative to the other workers, the more HTTP requests the worker will "
+"receive. This setting can be used to differentiate servers with different "
+"processing power."
+msgstr ""
+"<literal>lbfactor</literal> 属性是对于特定的 worker 的负载平衡因子。它用来定"
+"义一个节点对于其他节点的优先级(或权重)。这个数字越大,就要接收越多的 HTTP "
+"请求。这个设置可以用来调节不同服务器的处理能力。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1137
+#, no-c-format
+msgid ""
+"The <literal>cachesize</literal> attribute defines the size of the thread "
+"pools associated to the Servlet container (i.e. the number of concurrent "
+"requests it will forward to the Servlet container). Make sure this number "
+"does not outnumber the number of threads configured on the AJP13 connector "
+"of the Servlet container. Please review <literal>http://jakarta.apache.org/"
+"tomcat/connectors-doc/config/workers.html</literal> for comments on "
+"<literal>cachesize</literal> for Apache 1.3.x."
+msgstr ""
+"<literal>cachesize</literal> 属性定义与 Servlet 容器相关的线程池的大小(也就"
+"是转发给 Servlet 容器的并发请求的数量)。请确保这个数字不要超过 Servlet 容器"
+"的 AJP13 connector 所配置的线程数。请参考 <literal>http://jakarta.apache.org/"
+"tomcat/connectors-doc/config/workers.html</literal> 里关于 Apache 1.3.x 的 "
+"<literal>cachesize</literal> 的注释。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1143
+#, no-c-format
+msgid ""
+"The last part of the <literal>conf/workers.properties</literal> file defines "
+"the loadbalancer worker. The only thing you must change is the "
+"<literal>worker.loadbalancer.balanced_workers</literal> line: it must list "
+"all workers previously defined in the same file: load-balancing will happen "
+"over these workers."
+msgstr ""
+"<literal>conf/workers.properties</literal> 文件最后一部分定义 loadbalancer "
+"worker。你只需要修改 <literal>worker.loadbalancer.balanced_workers</literal> "
+"行:它列出了之前所有在这个文件里定义的 workers:负载平衡将在这些 workers 上进"
+"行。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1147
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>sticky_session</literal> property specifies the cluster "
+"behavior for HTTP sessions. If you specify <literal>worker.loadbalancer."
+"sticky_session=0</literal>, each request will be load balanced between node1 "
+"and node2; i.e., different requests for the same session will go to "
+"different servers. But when a user opens a session on one server, it is "
+"always necessary to always forward this user's requests to the same server, "
+"as long as that server is available. This is called a \"sticky session\", as "
+"the client is always using the same server he reached on his first request. "
+"To enable session stickiness, you need to set <literal>worker.loadbalancer."
+"sticky_session</literal> to 1."
+msgstr ""
+"<literal>sticky_session</literal> 属性指定 HTTP 会话的群集系统行为。如果你指"
+"定 <literal>worker.loadbalancer.sticky_session=0</literal>,每个请求会在节点 "
+"1 和节点 2 之间进行负载平衡。但是当用户在服务器上开始一个会话,把这个的用户的"
+"请求转发到同一服务器会是个好主意。这被称作 \"sticky session\",因为客户总是使"
+"用处理他第一个请求的服务器。否则用户的会话数据就必须在两个服务器之间同步(即"
+"会话复制,请参考 <xref linkend=\"clustering-http-state\"/>)。为了启用 "
+"session stickiness,你需要把 <literal>worker.loadbalancer.sticky_session</"
+"literal> 设置为 1。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1152
+#, fuzzy, no-c-format
+msgid ""
+"A non-loadbalanced setup with a single node requires a <literal>worker."
+"list=node1</literal> entry."
+msgstr ""
+"单节点的非负载平衡的设立需要设置 <literal>worker.list=node1</literal> 条目,"
+"才能使 mod_jk 正常工作。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1157
+#, fuzzy, no-c-format
+msgid "Configuring JBoss to work with mod_jk"
+msgstr "配置 mod_jk 里的 worker 节点"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1158
+#, no-c-format
+msgid ""
+"Finally, we must configure the JBoss Tomcat instances on all clustered nodes "
+"so that they can expect requests forwarded from the mod_jk loadbalancer."
+msgstr ""
+"最后,我们必须在所有群集节点上配置 JBoss Tomcat 实例,它们才能接收从 mod_jk "
+"负载平衡系统转发的请求。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1160
+#, fuzzy, no-c-format
+msgid ""
+"On each clustered JBoss node, we have to name the node according to the name "
+"specified in <literal>workers.properties</literal>. For instance, on JBoss "
+"instance node1, edit the <literal>JBOSS_HOME/server/all/deploy/jboss-web."
+"deployer/server.xml</literal> file (replace <literal>/all</literal> with "
+"your own server name if necessary). Locate the <literal><Engine></"
+"literal> element and add an attribute <literal>jvmRoute</literal>:"
+msgstr ""
+"在每个群集节点上,我们得按 <literal>workers.properties</literal> 里指定的名字"
+"来命名节点名。例如,在 JBoss 实例节点1上,编辑 <literal>JBOSS_HOME/server/"
+"all/deploy/jbossweb-tomcat50.sar/server.xml</literal> 文件(有必要的话用你自"
+"己的服务器名代替<literal>/all</literal>)。定位 <literal><Engine></"
+"literal> 元素并加入一个 <literal>jvmRoute</literal> 属性:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1165
+#, no-c-format
+msgid ""
+"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
+"\">\n"
+"... ...\n"
+"</Engine>"
+msgstr ""
+"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
+"\">\n"
+"... ...\n"
+"</Engine>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1166
+#, no-c-format
+msgid ""
+"You also need to be sure the AJP connector in server.xml is enabled (i.e., "
+"uncommented). It is enabled by default."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1168
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<!-- Define an AJP 1.3 Connector on port 8009 --> \n"
+"<Connector port=\"8009\" address=\"${jboss.bind.address}\" protocol=\"AJP/1.3"
+"\" \n"
+"emptySessionPath=\"true\" enableLookups=\"false\" redirectPort=\"8443\" /> ]]"
+">"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1170
+#, fuzzy, no-c-format
+msgid ""
+"Then, for each JBoss Tomcat instance in the cluster, we need to tell it that "
+"mod_jk is in use, so it can properly manage the <literal>jvmRoute</literal> "
+"appended to its session cookies so that mod_jk can properly route incoming "
+"requests. Edit the <literal>JBOSS_HOME/server/all/deploy/jbossweb-tomcat50."
+"sar/META-INF/jboss-service.xml</literal> file (replace <literal>/all</"
+"literal> with your own server name). Locate the <literal><attribute></"
+"literal> element with a name of <literal>UseJK</literal>, and set its value "
+"to <literal>true</literal>:"
+msgstr ""
+"然后,对群集里的每个 JBoss Tomcat 实例,我们需要使它们在它们的会话 cookies 里"
+"加入 <literal>jvmRoute</literal> 值,这样 mod_jk 才能指引进来的请求。编辑 "
+"<literal>JBOSS_HOME/server/all/deploy/jbossweb-tomcat50.sar/META-INF/jboss-"
+"service.xml</literal> 文件(有必要的话用你自己的服务器名代替 <literal>/all</"
+"literal>)。用 <literal>UseJK</literal>名来定位<literal><attribute></"
+"literal> 元素,把它的值设置为 <literal>true</literal>:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1175
+#, no-c-format
+msgid "<attribute name=\"UseJK\">true</attribute>"
+msgstr "<attribute name=\"UseJK\">true</attribute>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1176
+#, no-c-format
+msgid ""
+"At this point, you have a fully working Apache+mod_jk load-balancer setup "
+"that will balance call to the Servlet containers of your cluster while "
+"taking care of session stickiness (clients will always use the same Servlet "
+"container)."
+msgstr ""
+"现在,你有了完全工作的 Apache+mod_jk load-balancer 系统,它将平衡对群集里的 "
+"Servlet 容器的调用,同时顾及到 session stickiness(客户将总使用相同的 "
+"Servlet 容器)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1180
+#, no-c-format
+msgid ""
+"For more updated information on using mod_jk 1.2 with JBoss Tomcat, please "
+"refer to the JBoss wiki page at <literal>http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=UsingMod_jk1.2WithJBoss</literal>."
+msgstr ""
+"对于和 JBoss Tomcat 一起使用 mod_jk 1.2 的更新信息,请参考 <literal>http://"
+"wiki.jboss.org/wiki/Wiki.jsp?page=UsingMod_jk1.2WithJBoss</literal> 的 JBoss "
+"wiki 页。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1188
+#, fuzzy, no-c-format
+msgid "Configuring HTTP session state replication"
+msgstr "配置 HTTP 会话状态复制(session state replication)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1189
+#, no-c-format
+msgid ""
+"The preceding discussion has been focused on using mod_jk as a load "
+"balancer. The content of the remainder our discussion of clustering HTTP "
+"services in JBoss AS applies no matter what load balancer is used."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1192
+#, fuzzy, no-c-format
+msgid ""
+"In <xref linkend=\"clustering-http-nodes\"/>, we covered how to use sticky "
+"sessions to make sure that a client in a session always hits the same server "
+"node in order to maintain the session state. However, sticky sessions by "
+"themselves are not an ideal solution. If a node goes down, all its session "
+"data is lost. A better and more reliable solution is to replicate session "
+"data across the nodes in the cluster. This way, the client can hit any "
+"server node and obtain the same session state."
+msgstr ""
+"在 <xref linkend=\"clustering-http-nodes\"/> 里,我们涉及了怎样使用 sticky "
+"sessions 来确保会话里的客户总是利用相同的服务器来维护会话状态。然而,这并非一"
+"个理想的解决方案。如果某一节点崩溃了并丢失了所有的会话数据,负载就有可能没有"
+"均衡分布在节点上。一个更好的和可靠的办法就是在群集里的所有节点上复制会话数"
+"据。这样的话,客户可以访问任何节点而获得相同的会话数据。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1194
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>jboss.cache:service=TomcatClusteringCache</literal> MBean makes "
+"use of JBoss Cache to provide HTTP session replication services to the JBoss "
+"Tomcat cluster. This MBean is defined in the <literal>deploy/jboss-web-"
+"cluster.sar/META-INF/jboss-service.xml file</literal>."
+msgstr ""
+"<literal>jboss.cache:service=TomcatClusteringCache</literal> MBean 利用 "
+"JBoss Cache 来为 JBoss Tomcat 群集里的 HTTP 负载平衡系统提供 HTTP 会话复制服"
+"务。<literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</literal> 文件"
+"里定义了这个 MBean。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1197
+#, fuzzy, no-c-format
+msgid ""
+"Before AS 4.2.0, the location of the HTTP session cache configuration file "
+"was <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</literal>. "
+"Prior to AS 4.0.4 CR2, the file was named <literal>deploy/tc5-cluster-"
+"service.xml</literal>."
+msgstr ""
+"在 AS 4.0.4 CR2 之前, HTTP 会话缓存配置文件是 <literal>deploy/tc5-cluster-"
+"service.xml</literal>。请参考 AS 4.0.3 文档来获得更多细节。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1199
+#, fuzzy, no-c-format
+msgid ""
+"Below is a typical <literal>deploy/jbossweb-cluster.sar/META-INF/jboss-"
+"service.xml</literal> file. The configuration attributes in the "
+"<literal>TomcatClusteringCache</literal> MBean are very similar to those in "
+"the JBoss AS cache configuration."
+msgstr ""
+"下面是一个典型的 <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</"
+"literal> 文件。<literal>TomcatClusteringCache</literal> MBean 里的配置属性和 "
+"<xref linkend=\"jbosscache-cache\"/> 里的非常相似。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1202
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.cache.aop.TreeCacheAop\"\n"
+" name=\"jboss.cache:service=TomcatClusteringCache\">\n"
+"\n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+" <depends>jboss.aop:service=AspectDeployer</depends>\n"
+"\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.BatchModeTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" \n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</attribute>\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" Tomcat-${jboss.partition.name:Cluster}\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"UseMarshalling\">false</attribute>\n"
+" \n"
+" <attribute name=\"InactiveOnStartup\">false</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" \n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+" <attribute name=\"SyncReplTimeout\">20000</attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.cache.aop.TreeCacheAop\"\n"
+" name=\"jboss.cache:service=TomcatClusteringCache\">\n"
+"\n"
+" <depends>jboss:service=Naming</depends>\n"
+" <depends>jboss:service=TransactionManager</depends>\n"
+" <depends>jboss.aop:service=AspectDeployer</depends>\n"
+"\n"
+" <attribute name=\"TransactionManagerLookupClass\">\n"
+" org.jboss.cache.BatchModeTransactionManagerLookup\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"IsolationLevel\">REPEATABLE_READ</"
+"attribute>\n"
+" \n"
+" <attribute name=\"CacheMode\">REPL_ASYNC</attribute>\n"
+" \n"
+" <attribute name=\"ClusterName\">\n"
+" Tomcat-${jboss.partition.name:Cluster}\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"UseMarshalling\">false</attribute>\n"
+" \n"
+" <attribute name=\"InactiveOnStartup\">false</attribute>\n"
+" \n"
+" <attribute name=\"ClusterConfig\">\n"
+" ... ...\n"
+" </attribute>\n"
+" \n"
+" <attribute name=\"LockAcquisitionTimeout\">15000</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1204
+#, no-c-format
+msgid ""
+"Note that the value of the mbean element's code attribute is org.jboss.cache."
+"aop.TreeCacheAop, which is different from the other JBoss Cache Mbeans used "
+"in JBoss AS. This is because FIELD granularity HTTP session replication "
+"(covered below) needs the added features of the <literal>TreeCacheAop</"
+"literal> (a.k.a. <literal>PojoCache</literal>) class."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1207
+#, fuzzy, no-c-format
+msgid ""
+"The details of all the configuration options for a TreeCache MBean are "
+"covered in the JBoss Cache documentation. Below, we will just discuss "
+"several attributes that are most relevant to the HTTP cluster session "
+"replication."
+msgstr ""
+"<xref linkend=\"jbosscache-cache\"/> 里包括了 <literal>TreeCache</literal> "
+"MBean 的详细配置。下面,我们将讨论和 HTTP 群集会话复制(cluster session "
+"replication)最为相关的几个属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1210
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TransactionManagerLookupClass</emphasis> sets the "
+"transaction manager factory. The default value is <literal>org.jboss.cache."
+"BatchModeTransactionManagerLookup</literal>. It tells the cache NOT to "
+"participate in JTA-specific transactions. Instead, the cache manages its own "
+"transactions. Please do not change this."
+msgstr ""
+"<emphasis role=\"bold\">TransactionManagerLookupClass</emphasis> 设置 "
+"transaction manager factory。它的缺省值是 <literal>org.jboss.cache."
+"BatchModeTransactionManagerLookup</literal>。它告诉缓存不要参与 JTA 相关的事"
+"务。作为替代,缓存管理自己的事务来支持细颗粒度的复制。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1217
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CacheMode</emphasis> controls how the cache is "
+"replicated. The valid values are <literal>REPL_SYNC</literal> and "
+"<literal>REPL_ASYNC</literal>. With either setting the client request thread "
+"updates the local cache with the current sesssion contents and then sends a "
+"message to the caches on the other members of the cluster, telling them to "
+"make the same change. With REPL_ASYNC (the default) the request thread "
+"returns as soon as the update message has been put on the network. With "
+"REPL_SYNC, the request thread blocks until it gets a reply message from all "
+"cluster members, informing it that the update was successfully applied. "
+"Using synchronous replication makes sure changes are applied aroundthe "
+"cluster before the web request completes. However, synchronous replication "
+"is much slower."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1221
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterName</emphasis> specifies the name of the "
+"cluster that the cache works within. The default cluster name is the the "
+"word \"Tomcat-\" appended by the current JBoss partition name. All the nodes "
+"must use the same cluster name."
+msgstr ""
+"<emphasis role=\"bold\">ClusterName</emphasis> 指定了缓存所服务的群集的名字。"
+"缺省的群集名是 \"Tomcat-\" 后面跟着当前的 JBoss 分区名。所有节点都应该使用相"
+"同的群集名。虽然会话复制能够和 JBoss 的其他群集服务共享同一通道(多点传送地址"
+"和端口),复制还是应该有自己的群集名。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1226
+#, no-c-format
+msgid ""
+"The <emphasis role=\"bold\">UseMarshalling</emphasis> and <emphasis role="
+"\"bold\">InactiveOnStartup</emphasis> attributes must have the same value. "
+"They must be <literal>true</literal> if <literal>FIELD</literal> level "
+"session replication is needed (see later). Otherwise, they are default to "
+"<literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">UseMarshalling</emphasis> 和 <emphasis role=\"bold"
+"\">InactiveOnStartup</emphasis> 属性必须有相同的值。如果需要使用 "
+"<literal>FIELD</literal> 级会话复制(请参考后面的内容),它们的值必须是 "
+"<literal>true</literal>。否则,它们的缺省值是 <literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1231
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClusterConfig</emphasis> configures the underlying "
+"JGroups stack. Please refer to <xref linkend=\"jbosscache-jgroups\"/> for "
+"more information."
+msgstr ""
+"<emphasis role=\"bold\">ClusterConfig</emphasis> 包含底层 JGroups 栈(参见 "
+"<xref linkend=\"jbosscache-jgroups\"/>)的配置。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1234
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> sets the maximum "
+"number of milliseconds to wait for a lock acquisition when trying to lock a "
+"cache node. The default value is 15000."
+msgstr ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> 设置以毫秒为单位的"
+"等待所锁定捕获(lock acquisition)的最长时间。它的缺省值是 15000。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1238
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SyncReplTimeout</emphasis> sets the maximum number "
+"of milliseconds to wait for a response from all nodes in the cluster when a "
+"synchronous replication message is sent out. The default value is 20000; "
+"should be a few seconds longer than LockAcquisitionTimeout."
+msgstr ""
+"<emphasis role=\"bold\">LockAcquisitionTimeout</emphasis> 设置以毫秒为单位的"
+"等待所锁定捕获(lock acquisition)的最长时间。它的缺省值是 15000。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1246
+#, no-c-format
+msgid "Enabling session replication in your application"
+msgstr "在你的应用程序里启用会话复制"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1247
+#, fuzzy, no-c-format
+msgid ""
+"To enable clustering of your web application you must tag it as "
+"distributable in the <literal>web.xml</literal> descriptor. Here's an "
+"example:"
+msgstr ""
+"为了启用 web 应用程序的群集,你必须在 <literal>web.xml</literal> 描述符里把它"
+"标记为 distributable。下面是一个例子:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1249
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?> \n"
+"<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+"\" \n"
+" version=\"2.4\">\n"
+" <emphasis role=\"bold\"><distributable/></emphasis>\n"
+" <!-- ... -->\n"
+"</web-app>"
+msgstr ""
+"<?xml version=\"1.0\"?> \n"
+"<web-app xmlns=\"http://java.sun.com/xml/ns/j2ee\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\" \n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
+"\" \n"
+" version=\"2.4\">\n"
+" <emphasis role=\"bold\"><distributable/></emphasis>\n"
+" <!-- ... -->\n"
+"</web-app>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1250
+#, no-c-format
+msgid ""
+"You can futher configure session replication using the <literal>replication-"
+"config</literal> element in the <literal>jboss-web.xml</literal> file. Here "
+"is an example:"
+msgstr ""
+"你可以用 <literal>jboss-web.xml</literal> 文件里的 <literal>replication-"
+"config</literal> 元素进一步配置会话复制。下面是一个例子:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1252
+#, no-c-format
+msgid ""
+"<jboss-web>\n"
+" <replication-config>\n"
+" <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-"
+"trigger>\n"
+" <replication-granularity>SESSION</replication-"
+"granularity>\n"
+" <replication-field-batch-mode>true</replication-field-batch-"
+"mode>\n"
+" </replication-config>\n"
+"</jboss-web>"
+msgstr ""
+"<jboss-web>\n"
+" <replication-config>\n"
+" <replication-trigger>SET_AND_NON_PRIMITIVE_GET</replication-"
+"trigger>\n"
+" <replication-granularity>SESSION</replication-"
+"granularity>\n"
+" <replication-field-batch-mode>true</replication-field-batch-"
+"mode>\n"
+" </replication-config>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1253
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>replication-trigger</literal> element determines what triggers "
+"a session replication (i.e. when is a session is considered <literal>dirty</"
+"literal> and in need of replication). It has 4 options:"
+msgstr ""
+"<literal>replication-trigger</literal> 元素决定用什么触发状态复制(或什么时候"
+"会话被认为是 dirty 的)。它有四个选项:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1257
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET</emphasis>: With this policy, the session is "
+"considered dirty only when an attribute is set in the session (i.e., "
+"HttpSession.setAttribute() is invoked.) If your application always writes "
+"changed values back into the session, this option will be most optimal in "
+"terms of performance. The downside of SET is that if an object is retrieved "
+"from the session and modified without being written back into the session, "
+"the session manager will not know the attribute is dirty and the change to "
+"that object may not be replicated."
+msgstr ""
+"<emphasis role=\"bold\">SET</emphasis>:在这个选项下,只有在会话里设置了属"
+"性,会话才被认为是 dirty。如果你的应用程序总把改变的写回到会话里,从性能角度"
+"来讲这个选项可能是最优化的。如果只从会话里取出一个对象而不把它写回到会话里,"
+"对这个对象的修改将不会被复制。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1260
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET_AND_GET</emphasis>: With this policy, any "
+"attribute that is get or set will be marked as dirty. If an object is "
+"retrieved from the session and modified without being written back into the "
+"session, the change to that object will be replicated. The downside of "
+"SET_AND_GET is that it can have significant performance implications, since "
+"even reading immutable objects from the session (e.g., strings, numbers) "
+"will mark the read attributes as needing to be replicated."
+msgstr ""
+"<emphasis role=\"bold\">SET_AND_GET</emphasis>:如使用这个策略,所有 get 或 "
+"set 的属性都会被标记为 ditry。如果从会话里取出一个对象并修改它,但没有写回到"
+"这个会话里,这些修改也将被复制。这个选项对性能有比较大的影响。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1263
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SET_AND_NON_PRIMITIVE_GET</emphasis>: This policy is "
+"similar to the SET_AND_GET policy except that get operationsthat return "
+"attribute values with primitive types do not mark the attribute as dirty. "
+"Primitive system types (i.e., String, Integer, Long, etc.) are immutable, so "
+"there is no reason to mark an attribute with such a type as dirty just "
+"because it has been read. If a get operation returns a value of a non-"
+"primitive type, the session manager has no simple way to know whether the "
+"object is mutable, so it assumes it is an marks the attribute as dirty. This "
+"setting avoids the downside of SET while reducing the performance impact of "
+"SET_AND_GET. It is the default setting."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1266
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ACCESS</emphasis>: This option causes the session to "
+"be marked as dirty whenever it is accessed. Since a the session is accessed "
+"during each HTTP request, it will be replicated with each request. The "
+"purpose of ACCESS is to ensure session last-access timestamps are kept in "
+"sync around the cluster.. Since with the other replication-trigger options "
+"the time stamp may not be updated in other clustering nodes because of no "
+"replication, the session in other nodes may expire before the active node if "
+"the HTTP request does not retrieve or modify any session attributes. When "
+"this option is set, the session timestamps will be synchronized throughout "
+"the cluster nodes. Note that use of this option can have a significant "
+"performance impact, so use it with caution. With the other replication-"
+"trigger options, if a session has gone 80% of its expiration interval "
+"without being replicated, as a safeguard its timestamp will be replicated no "
+"matter what. So, ACCESS is only useful in special circumstances where the "
+"above safeguard is considered inadequate."
+msgstr ""
+"<emphasis role=\"bold\">ACCESS</emphasis>:这个选项表示:只要会话被访问,就把"
+"会话标记为 ditry。因为在每个 HTTP 请求的过程中,会话都会被访问,所以会话每次"
+"都会被复制。会话实例里的时间戳也会相应地更新。由于复制并没有包括时间戳,其他"
+"群集节点的时间戳可能不会被更新。如果 HTTP 请求没有取出或修改任何会话属性,其"
+"他节点的会话就可能会先于活动节点过期。当设置了这个选项,会话的时间戳将在所有"
+"群集节点中同步。注意采用这个选项对性能影响很大,需要小心行事。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1269
+#, no-c-format
+msgid ""
+"The <literal>replication-granularity</literal> element controls the size of "
+"the replication units. The supported values are:"
+msgstr ""
+"<literal>replication-granularity</literal> 元素控制复制单元的大小。它所支持的"
+"值如下:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1274
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ATTRIBUTE</emphasis>: Replication is only for the "
+"dirty attributes in the session plus some session data, like the last-"
+"accessed timestamp. For sessions that carry large amounts of data, this "
+"option can increase replication performance. However, attributes will be "
+"separately serialized, so if there are any shared references between objects "
+"stored in the attributes, those shared references may be broken on remote "
+"nodes. For example, say a Person object stored under key “husband” has a "
+"reference to an Address, while another Person object stored under key “wife” "
+"has a reference to that same Address object. When the “husband” and “wife” "
+"attributes are separately deserialized on the remote nodes, each Person "
+"object will now have a reference to its own Address object; the Address "
+"object will no longer be shared."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1277
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SESSION</emphasis>: The entire session object is "
+"replicated if any attribute is dirty. The entire session is serialized in "
+"one unit, so shared object references are maintained on remote nodes. This "
+"is the default setting."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1282
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">FIELD</emphasis>: Replication is only for individual "
+"changed data fields inside session attribute objects. Shared object "
+"references will be preserved across the cluster. Potentially most "
+"performant, but requires changes to your application (this will be discussed "
+"later)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1285
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>replication-field-batch-mode</literal> element indicates "
+"whether you want all replication messages associated with a request to be "
+"batched into one message. Only applicable if replication-granularity is "
+"FIELD. Default is <literal>true</literal>."
+msgstr ""
+"<literal>replication-field-batch-mode</literal> 指出你是否在每个 HTTP 请求之"
+"间进行批量更新。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1286
+#, fuzzy, no-c-format
+msgid ""
+"If your sessions are generally small, SESSION is the better policy. If your "
+"session is larger and some parts are infrequently accessed, ATTRIBUTE "
+"replication will be more effective. If your application has very big data "
+"objects in session attributes and only fields in those objects are "
+"frequently modified, the FIELD policy would be the best. In the next "
+"section, we will discuss exactly how the FIELD level replication works."
+msgstr ""
+"如果你的会话通常很小,使用 SESSION 选项是更好的策略。如果你的会话更大些而且某"
+"些部分并不常被访问,ATTRIBUTE 方式的复制就会更有效。如果你的应用程序在会话属"
+"性里拥有非常大的数据对象,而且只有这些对象里的某些字段被经常修改,采用 FIELD "
+"策略将是最佳选择。在后面的内容里,让我们讨论一下怎样使用 FIELD 级的复制。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1298
+#, fuzzy, no-c-format
+msgid "Using FIELD level replication"
+msgstr "使用字段级(FIELD level)的复制"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1299
+#, fuzzy, no-c-format
+msgid ""
+"FIELD-level replication only replicates modified data fields inside objects "
+"stored in the session. Its use could potentially drastically reduce the data "
+"traffic between clustered nodes, and hence improve the performance of the "
+"whole cluster. To use FIELD-level replication, you have to first prepare (i."
+"e., bytecode enhance) your Java class to allow the session cache to detect "
+"when fields in cached objects have been changed and need to be replicated."
+msgstr ""
+"字段级复制只复制存储在会话里的对象内部的被修改的数据字段。它能够极大地减少群"
+"集节点之间的数据通信,也因此提高了整个群集系统的性能。为了使用字段级复制,你"
+"首先得用 Java 类来指出哪个字段要被复制。它是通过在 JavaDocs 嵌入的 JDK 1.4 风"
+"格的注解(annotations)来完成的。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1301
+#, no-c-format
+msgid ""
+"The first step in doing this is to identify the classes that need to be "
+"prepared. This is done via annotations. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1305
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@org.jboss.cache.aop.AopMarker\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}]]>"
+msgstr ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1307
+#, fuzzy, no-c-format
+msgid ""
+"If you annotate a class with InstanceAopMarker instead, then all of its "
+"subclasses will be automatically annotated as well. Similarly, you can "
+"annotate an interface with InstanceofAopMarker and all of its implementing "
+"classes will be annotated. For example:"
+msgstr ""
+"如果你用 <literal>InstanceAopMarker</literal> 注解类时,它所有的子类都将自动"
+"被注解。例如,"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1310
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@org.jboss.cache.aop.InstanceOfAopMarker\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}\n"
+"then when you have a sub-class like\n"
+"public class Student extends Person\n"
+"{\n"
+"...\n"
+"}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1312
+#, no-c-format
+msgid ""
+"There will be no need to annotate <literal>Student</literal>. It will be "
+"annotated automatically because it is a sub-class of <literal>Person</"
+"literal>. Jboss AS 5.0 requires JDK 5 at runtime, but some users may still "
+"need to build their projects using JDK 1.4. In this case, annotating classes "
+"can be done via JDK 1.4 style annotations embedded in JavaDocs. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1317
+#, no-c-format
+msgid ""
+"/*\n"
+" * My usual comments here first.\n"
+" * @@org.jboss.web.tomcat.tc5.session.AopMarker\n"
+" */\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+"/*\n"
+" * My usual comments here first.\n"
+" * @@org.jboss.web.tomcat.tc5.session.AopMarker\n"
+" */\n"
+"public class Address \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1320
+#, no-c-format
+msgid "The anologue for <literal>@InstanceAopMarker</literal> is:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1322
+#, no-c-format
+msgid ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+"/*\n"
+" *\n"
+" * @@org.jboss.web.tomcat.tc5.session.InstanceOfAopMarker\n"
+" */\n"
+"public class Person \n"
+"{\n"
+"...\n"
+"}"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1326
+#, fuzzy, no-c-format
+msgid ""
+"Once you have annotated your classes, you will need to perform a pre-"
+"processing step to bytecode enhance your classes for use by TreeCacheAop. "
+"You need to use the JBoss AOP pre-compiler <literal>annotationc</literal> "
+"and post-compiler <literal>aopc</literal> to process the above source code "
+"before and after they are compiled by the Java compiler. The annotationc "
+"step is only need if the JDK 1.4 style annotations are used; if JDK 5 "
+"annotations are used it is not necessary. Here is an example on how to "
+"invoke those commands from command line."
+msgstr ""
+"然而,既然目前我们只支持 JDK 1.4 风格的注解(由 JBoss Aop 提供),你将需要执"
+"行一个预处理步骤。在 Java 编译器编译之前和之后,你需要用 JBoss AOP pre-"
+"compiler <literal>annotationc</literal> 和 post-compiler <literal>aopc</"
+"literal> 来处理上面的源码。这里是一个怎样从命令行调用这些命令的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1330
+#, no-c-format
+msgid ""
+"$ annotationc [classpath] [source files or directories]\n"
+"$ javac -cp [classpath] [source files or directories]\n"
+"$ aopc [classpath] [class files or directories]"
+msgstr ""
+"$ annotationc [classpath] [source files or directories]\n"
+"$ javac -cp [classpath] [source files or directories]\n"
+"$ aopc [classpath] [class files or directories]"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1332
+#, fuzzy, no-c-format
+msgid ""
+"Please see the JBoss AOP documentation for the usage of the pre- and post-"
+"compiler. The JBoss AOP project also provides easy to use ANT tasks to help "
+"integrate those steps into your application build process."
+msgstr ""
+"请参考 JBoss AOP 文档关于怎样使用 pre- 和 post-compiler。JBoss AOP 项目也提供"
+"使用 ANT 来把上述步骤集成在应用程序的 build 过程中的简单方法。下一个 AS 发布"
+"版本将提供对 JDK 5.0 注解的更透明的支持。但是现在,你还得用 pre- 和 post-"
+"compiler 来编译你的源码。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1336
+#, fuzzy, no-c-format
+msgid ""
+"You can see a complete example on how to build, deploy, and validate a FIELD-"
+"level replicated web application from this page: <ulink url=\"http://wiki."
+"jboss.org/wiki/Wiki.jsp?page=Http_session_field_level_example\"></ulink>. "
+"The example bundles the pre- and post-compile tools so you do not need to "
+"download JBoss AOP separately."
+msgstr ""
+"或者,你也能够在 <literal>http://wiki.jboss.org/wiki/Wiki.jsp?"
+"page=Http_session_field_level_example</literal> 里看到一个怎样构建(build),"
+"部署(deploy),和验证(validate)采用字段级复制的 web 应用程序的完整例子。这"
+"个例子捆绑了 pre- 和 post-compile 工具,所以你不需要再下载单独的 JBoss AOP "
+"了。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1340
+#, no-c-format
+msgid ""
+"When you deploy the web application into JBoss AS, make sure that the "
+"following configurations are correct:"
+msgstr "当你把 web 应用程序部署到 JBoss AS 时,请确保下面的配置是正确的:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1344
+#, fuzzy, no-c-format
+msgid ""
+"In the server's <literal>deploy/jboss-web-cluster.sar/META-INF/jboss-service."
+"xml</literal> file, the <literal>inactiveOnStartup</literal> and "
+"<literal>useMarshalling</literal> attributes must both be <literal>true</"
+"literal>."
+msgstr ""
+"在服务器的 <literal>deploy/tc5-cluster.sar/META-INF/jboss-service.xml</"
+"literal> 文件里,<literal>inactiveOnStartup</literal> 和"
+"<literal>useMarshalling</literal> 属性必须都为 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1349
+#, no-c-format
+msgid ""
+"In the application's <literal>jboss-web.xml</literal> file, the "
+"<literal>replication-granularity</literal> attribute must be <literal>FIELD</"
+"literal>."
+msgstr ""
+"在应用程序的 <literal>jboss-web.xml</literal> 文件里,<literal>replication-"
+"granularity</literal> 属性必须为 <literal>FIELD</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1354
+#, no-c-format
+msgid ""
+"Finally, let's see an example on how to use FIELD-level replication on those "
+"data classes. Notice that there is no need to call <literal>session."
+"setAttribute()</literal> after you make changes to the data object, and all "
+"changes to the fields are automatically replicated across the cluster."
+msgstr ""
+"最后,让我们看一个怎样在哪些数据类上使用字段级(FIELD-level)复制的例子。请注"
+"意你不需要在修改数据对象(data object)后调用 <literal>session.setAttribute"
+"()</literal>,对字段的所有修改都自动跨群集地被复制了。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1357
+#, no-c-format
+msgid ""
+"// Do this only once. So this can be in init(), e.g.\n"
+"if(firstTime)\n"
+"{\n"
+" Person joe = new Person(\"Joe\", 40);\n"
+" Person mary = new Person(\"Mary\", 30);\n"
+" Address addr = new Address();\n"
+" addr.setZip(94086);\n"
+"\n"
+" joe.setAddress(addr);\n"
+" mary.setAddress(addr); // joe and mary share the same address!\n"
+"\n"
+" session.setAttribute(\"joe\", joe); // that's it.\n"
+" session.setAttribute(\"mary\", mary); // that's it.\n"
+"}\n"
+"\n"
+"Person mary = (Person)session.getAttribute(\"mary\");\n"
+"mary.getAddress().setZip(95123); // this will update and replicate the zip "
+"code."
+msgstr ""
+"// Do this only once. So this can be in init(), e.g.\n"
+"if(firstTime)\n"
+"{\n"
+" Person joe = new Person(\"Joe\", 40);\n"
+" Person mary = new Person(\"Mary\", 30);\n"
+" Address addr = new Address();\n"
+" addr.setZip(94086);\n"
+"\n"
+" joe.setAddress(addr);\n"
+" mary.setAddress(addr); // joe and mary share the same address!\n"
+"\n"
+" session.setAttribute(\"joe\", joe); // that's it.\n"
+" session.setAttribute(\"mary\", mary); // that's it.\n"
+"}\n"
+"\n"
+"Person mary = (Person)session.getAttribute(\"mary\");\n"
+"mary.getAddress().setZip(95123); // this will update and replicate the zip "
+"code."
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1358
+#, no-c-format
+msgid ""
+"Besides plain objects, you can also use regular Java collections of those "
+"objects as session attributes. JBoss cache automatically figures out how to "
+"handle those collections and replicate field changes in their member objects."
+msgstr ""
+"除了简单的对象(plain objects),你还可以使用那些对象的常规 Java 集合(Java "
+"collection)作为会话属性。JBoss cache 会自动地判断怎样处理这些集合和复制它们"
+"的成员对象里的字段的变更。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1363
+#, no-c-format
+msgid "Monitoring session replication"
+msgstr "监控会话复制"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1364
+#, no-c-format
+msgid ""
+"If you have deployed and accessed your application, go to the <literal>jboss."
+"cache:service=TomcatClusteringCache</literal> MBean and invoke the "
+"<literal>printDetails</literal> operation. You should see output resembling "
+"the following."
+msgstr ""
+"如果你已经部署和访问了你的应用程序,你可以使用 <literal>jboss.cache:"
+"service=TomcatClusteringCache</literal> MBean 和调用 <literal>printDetails</"
+"literal> 操作。你应该看到下面的输出结果。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1367
+#, fuzzy, no-c-format
+msgid ""
+"/JSESSION\n"
+"\n"
+"/localhost\n"
+"\n"
+"/quote\n"
+"\n"
+"/FB04767C454BAB3B2E462A27CB571330\n"
+"VERSION: 6\n"
+"FB04767C454BAB3B2E462A27CB571330: org.jboss.invocation."
+"MarshalledValue at 1f13a81c\n"
+"\n"
+"/AxCI8Ovt5VQTfNyYy9Bomw**\n"
+"VERSION: 4\n"
+"AxCI8Ovt5VQTfNyYy9Bomw**: org.jboss.invocation.MarshalledValue at e076e4c8"
+msgstr ""
+"/JSESSION\n"
+"\n"
+"/quote\n"
+"\n"
+"/FB04767C454BAB3B2E462A27CB571330\n"
+"VERSION: 6\n"
+"FB04767C454BAB3B2E462A27CB571330: org.jboss.invocation."
+"MarshalledValue at 1f13a81c\n"
+"\n"
+"/AxCI8Ovt5VQTfNyYy9Bomw**\n"
+"VERSION: 4\n"
+"AxCI8Ovt5VQTfNyYy9Bomw**: org.jboss.invocation.MarshalledValue at e076e4c8"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1369
+#, fuzzy, no-c-format
+msgid ""
+"This output shows two separate web sessions, in one application named "
+"<emphasis>quote</emphasis>, that are being shared via JBossCache. This "
+"example uses a <literal>replication-granularity</literal> of "
+"<literal>session</literal>. Had <literal>ATTRIBUTE</literal> level "
+"replication been used, there would be additional entries showing each "
+"replicated session attribute. In either case, the replicated values are "
+"stored in an opaque <literal>MarshelledValue</literal> container. There "
+"aren't currently any tools that allow you to inspect the contents of the "
+"replicated session values. If you do not see any output, either the "
+"application was not correctly marked as <literal>distributable</literal> or "
+"you haven't accessed a part of application that places values in the HTTP "
+"session. The <literal>org.jboss.cache</literal> and <literal>org.jboss.web</"
+"literal> logging categories provide additional insight into session "
+"replication useful for debugging purposes."
+msgstr ""
+"这个输出结果展示了在一个叫 <emphasis>quote</emphasis> 应用程序里的两个独立的 "
+"web 会话,它们通过 JBossCache 来共享。这个例子使用了 <literal>session</"
+"literal> 的 <literal>replication-granularity</literal>。如果使用了 "
+"<literal>attribute</literal> 级的复制,应该可以看到展示每个被复制的会话属性的"
+"其他条目。在两种情况下,被复制的值都存储在一个不透明的 "
+"<literal>MarshelledValue</literal> 容器里。目前还没有任何工具可以让你查看这些"
+"被复制的会话值。如果你没有看到任何输出,要么是应用程序没有正确地标记为"
+"<literal>distributable</literal>,要么就是你根本没有访问把值写入 HTTP 会话的"
+"应用程序。<literal>org.jboss.cache</literal> 和 <literal>org.jboss.web</"
+"literal> 日志类别提供了可用于调试目的对会话复制的其他视角。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1377
+#, fuzzy, no-c-format
+msgid "Using Clustered Single Sign On"
+msgstr "使用单点登录(Single Sign On)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1379
+#, fuzzy, no-c-format
+msgid ""
+"JBoss supports clustered single sign-on, allowing a user to authenticate to "
+"one web application on a JBoss server and to be recognized on all web "
+"applications, on that same machine or on another node in the cluster, that "
+"are deployed on the same virtual host. Authentication replication is handled "
+"by the same JBoss Cache Mbean that is used by the HTTP session replication "
+"service. Although session replication does not need to be explicitly enabled "
+"for the applications in question, the <literal>jboss-web-cluster.sar</"
+"literal> file needs to be deployed."
+msgstr ""
+"JBoss 支持群集的单点登录(single sign-on),允许用户在一个 JBoss 服务器上验证"
+"应用程序,然后被在同一个主机或群集里的其他节点里的被部署在同一个虚拟主机上的"
+"所有应用程序识别。HTTP 会话复制服务处理复制验证(Authentication "
+"replication)。虽然会话复制不需要显性地为这个应用程序启用,但 <literal>tc5-"
+"cluster-service.xml</literal> 文件必须被部署。 "
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1381
+#, no-c-format
+msgid ""
+"To enable single sign-on, you must add the <literal>ClusteredSingleSignOn</"
+"literal> valve to the appropriate <literal>Host</literal> elements of the "
+"tomcat <literal>server.xml</literal> file. The valve configuration is shown "
+"here:"
+msgstr ""
+"为了启用单点登录,你必须在 <literal>server.xml</literal> 文件的 "
+"<literal>Host</literal> 元素里加入 <literal>ClusteredSingleSignOn</literal> "
+"开关(valve)。这个开关(valve)的配置如下:"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1384
+#, no-c-format
+msgid ""
+"<Valve className=\"org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn\" /"
+">"
+msgstr ""
+"<Valve className=\"org.jboss.web.tomcat.tc5.sso.ClusteredSingleSignOn\" /"
+">"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1387
+#, fuzzy, no-c-format
+msgid "Clustered Singleton Services"
+msgstr "群集的 JMS 服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1388
+#, no-c-format
+msgid ""
+"A clustered singleton service (also known as an HA singleton) is a service "
+"that is deployed on multiple nodes in a cluster, but is providing its "
+"service on only one of the nodes. The node running the singleton service is "
+"typically called the master node. When the master fails or is shut down, "
+"another master is selected from the remaining nodes and the service is "
+"restarted on the new master. Thus, other than a brief interval when one "
+"master has stopped and another has yet to take over, the service is always "
+"being provided by one but only one node."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1391
+#, no-c-format
+msgid "Topology after the Master Node fails"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1399
+#, no-c-format
+msgid ""
+"The JBoss Application Server (AS) provides support for a number of "
+"strategies for helping you deploy clustered singleton services. In this "
+"section we will explore the different strategies. All of the strategies are "
+"built on top of the HAPartition service described in the introduction. They "
+"rely on the <literal>HAPartition</literal> to provide notifications when "
+"different nodes in the cluster start and stop; based on those notifications "
+"each node in the cluster can independently (but consistently) determine if "
+"it is now the master node and needs to begin providing a service."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1404
+#, fuzzy, no-c-format
+msgid "HASingletonDeployer service"
+msgstr "client-deployer-service.xml"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1405
+#, no-c-format
+msgid ""
+"The simplest and most commonly used strategy for deploying an HA singleton "
+"is to take an ordinary deployment (war, ear, jar, whatever you would "
+"normally put in deploy) and deploy it in the <literal>$JBOSS_HOME/server/all/"
+"deploy-hasingleton</literal> directory instead of in <literal>deploy</"
+"literal>. The <literal>deploy-hasingleton</literal> directory does not lie "
+"under deploy or farm, so its contents are not automatically deployed when an "
+"AS instance starts. Instead, deploying the contents of this directory is the "
+"responsibility of a special service, the <literal>jboss.ha:"
+"service=HASingletonDeployer</literal> MBean (which itself is deployed via "
+"the deploy/deploy-hasingleton-service.xml file.) The HASingletonDeployer "
+"service is itself an HA Singleton, one whose provided service when it "
+"becomes master is to deploy the contents of deploy-hasingleton and whose "
+"service when it stops being the master (typically at server shutdown) is to "
+"undeploy the contents of <literal>deploy-hasingleton</literal>."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1408
+#, no-c-format
+msgid ""
+"So, by placing your deployments in <literal>deploy-hasingleton</literal> you "
+"know that they will be deployed only on the master node in the cluster. If "
+"the master node cleanly shuts down, they will be cleanly undeployed as part "
+"of shutdown. If the master node fails or is shut down, they will be deployed "
+"on whatever node takes over as master."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1411
+#, no-c-format
+msgid ""
+"Using deploy-hasingleton is very simple, but it does have two drawbacks:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1415
+#, no-c-format
+msgid ""
+"There is no hot-deployment feature for services in <literal>deploy-"
+"hasingleton</literal>. Redeploying a service that has been deployed to "
+"<literal>deploy-hasingleton</literal> requires a server restart."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1420
+#, no-c-format
+msgid ""
+"If the master node fails and another node takes over as master, your "
+"singleton service needs to go through the entire deployment process before "
+"it will be providing services. Depending on how complex the deployment of "
+"your service is and what sorts of startup activities it engages in, this "
+"could take a while, during which time the service is not being provided."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1432
+#, no-c-format
+msgid "Mbean deployments using HASingletonController"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1433
+#, no-c-format
+msgid ""
+"If your service is an Mbean (i.e., not a J2EE deployment like an ear or war "
+"or jar), you can deploy it along with a service called an "
+"HASingletonController in order to turn it into an HA singleton. It is the "
+"job of the HASingletonController to work with the HAPartition service to "
+"monitor the cluster and determine if it is now the master node for its "
+"service. If it determines it has become the master node, it invokes a method "
+"on your service telling it to begin providing service. If it determines it "
+"is no longer the master node, it invokes a method on your service telling it "
+"to stop providing service. Let's walk through an illustration."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1436
+#, no-c-format
+msgid ""
+"First, we have an MBean service that we want to make an HA singleton. The "
+"only thing special about it is it needs to expose in its MBean interface a "
+"method that can be called when it should begin providing service, and "
+"another that can be called when it should stop providing service:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1439
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"public class HASingletonExample\n"
+"implements HASingletonExampleMBean { \n"
+" \n"
+"private boolean isMasterNode = false; \n"
+" \n"
+"public void startSingleton() { \n"
+"isMasterNode = true; \n"
+"} \n"
+". \n"
+"public boolean isMasterNode() { \n"
+"return isMasterNode; \n"
+" } \n"
+" \n"
+" public void stopSingleton() { \n"
+" isMasterNode = false; \n"
+" } \n"
+"} ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1441
+#, no-c-format
+msgid ""
+"We used “startSingleton” and “stopSingleton” in the above example, but you "
+"could name the methods anything."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1444
+#, no-c-format
+msgid ""
+"Next, we deploy our service, along with an HASingletonController to control "
+"it, most likely packaged in a .sar file, with the following <literal>META-"
+"INF/jboss-service.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1447
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" <server> \n"
+" <!-- This MBean is an example of a clustered singleton --> \n"
+" <mbean code=\"org.jboss.ha.examples.HASingletonExample\" \n"
+" name=“jboss:service=HASingletonExample\"/> \n"
+" \n"
+" <!-- This HASingletonController manages the cluster Singleton --> \n"
+" <mbean code=\"org.jboss.ha.singleton.HASingletonController\" \n"
+" name=\"jboss:service=ExampleHASingletonController\"> \n"
+" \n"
+" <!-- Inject a ref to the HAPartition -->\n"
+" <depends optional-attribute-name=\"ClusterPartition\" proxy-"
+"type=\"attribute\">\n"
+" jboss:service=${jboss.partition.name:"
+"DefaultPartition}\n"
+" </depends> \n"
+" <!-- Inject a ref to the service being controlled -->\n"
+" <depends optional-attribute-name=\"TargetName\">\n"
+" jboss:service=HASingletonExample\n"
+" </depends>\n"
+" <!-- Methods to invoke when become master / stop being "
+"master -->\n"
+" <attribute name=\"TargetStartMethod\">startSingleton</"
+"attribute> \n"
+" <attribute name=\"TargetStopMethod\">stopSingleton</"
+"attribute> \n"
+" </mbean> \n"
+"</server> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1449
+#, no-c-format
+msgid "Voila! A clustered singleton service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1451
+#, no-c-format
+msgid ""
+"The obvious downside to this approach is it only works for MBeans. Upsides "
+"are that the above example can be placed in <literal>deploy</literal> or "
+"<literal>farm</literal> and thus can be hot deployed and farmed deployed. "
+"Also, if our example service had complex, time-consuming startup "
+"requirements, those could potentially be implemented in create() or start() "
+"methods. JBoss will invoke create() and start() as soon as the service is "
+"deployed; it doesn't wait until the node becomes the master node. So, the "
+"service could be primed and ready to go, just waiting for the controller to "
+"implement startSingleton() at which point it can immediately provide service."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1454
+#, no-c-format
+msgid ""
+"The jboss.ha:service=HASingletonDeployer service discussed above is itself "
+"an interesting example of using an HASingletonController. Here is its "
+"deployment descriptor (extracted from the <literal>deploy/deploy-hasingleton-"
+"service.xml</literal> file):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1457
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<mbean code=\"org.jboss.ha.singleton.HASingletonController\" \n"
+"name=\"jboss.ha:service=HASingletonDeployer\"> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" proxy-type=\"attribute"
+"\">\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <depends optional-attributeame=\"TargetName\">\n"
+" jboss.system:service=MainDeployer\n"
+" </depends> \n"
+" <attribute name=\"TargetStartMethod\">deploy</attribute> \n"
+" <attribute name=\"TargetStartMethodArgument\">\n"
+" ${jboss.server.home.url}/deploy-hasingleton\n"
+" </attribute> \n"
+" <attribute name=\"TargetStopMethod\">undeploy</attribute> \n"
+" <attribute name=\"TargetStopMethodArgument\">\n"
+" ${jboss.server.home.url}/deploy-hasingleton\n"
+" </attribute> \n"
+"</mbean> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1459
+#, no-c-format
+msgid ""
+"A few interesting things here. First the service being controlled is the "
+"<literal>MainDeployer</literal> service, which is the core deployment "
+"service in JBoss. That is, it's a service that wasn't written with an intent "
+"that it be controlled by an <literal>HASingletonController</literal>. But it "
+"still works! Second, the target start and stop methods are “deploy” and "
+"“undeploy”. No requirement that they have particular names, or even that "
+"they logically have “start” and “stop” functionality. Here the functionality "
+"of the invoked methods is more like “do” and “undo”. Finally, note the "
+"“<literal>TargetStart(Stop)MethodArgument</literal>” attributes. Your "
+"singleton service's start/stop methods can take an argument, in this case "
+"the location of the directory the <literal>MainDeployer</literal> should "
+"deploy/undeploy."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1467
+#, no-c-format
+msgid "HASingleton deployments using a Barrier"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1468
+#, no-c-format
+msgid ""
+"Services deployed normally inside deploy or farm that want to be started/"
+"stopped whenever the content of deploy-hasingleton gets deployed/undeployed, "
+"(i.e., whenever the current node becomes the master), need only specify a "
+"dependency on the Barrier mbean:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1470
+#, no-c-format
+msgid ""
+"<![CDATA[<depends>jboss.ha:service=HASingletonDeployer,type=Barrier</"
+"depends>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1472
+#, no-c-format
+msgid ""
+"The way it works is that a BarrierController is deployed along with the "
+"jboss.ha:service=HASingletonDeployer MBean and listens for JMX notifications "
+"from it. A BarrierController is a relatively simple Mbean that can subscribe "
+"to receive any JMX notification in the system. It uses the received "
+"notifications to control the lifecycle of a dynamically created Mbean called "
+"the Barrier.The Barrier is instantiated, registered and brought to the "
+"CREATE state when the BarrierController is deployed. After that, the "
+"BarrierController starts and stops the Barrier when matching JMX "
+"notifications are received. Thus, other services need only depend on the "
+"Barrier MBean using the usual <depends> tag, and they will be started "
+"and stopped in tandem with the Barrier. When the BarrierController is "
+"undeployed the Barrier is destroyed too."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1476
+#, no-c-format
+msgid ""
+"This provides an alternative to the deploy-hasingleton approach in that we "
+"can use farming to distribute the service, while content in deploy-"
+"hasingleton must be copied manually on all nodes."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1479
+#, no-c-format
+msgid ""
+"On the other hand, the barrier-dependent service will be instantiated/"
+"created (i.e., any create() method invoked) on all nodes, but only started "
+"on the master node. This is different with the deploy-hasingleton approach "
+"that will only deploy (instantiate/create/start) the contents of the deploy-"
+"hasingleton directory on one of the nodes."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1483
+#, no-c-format
+msgid ""
+"So services depending on the barrier will need to make sure they do minimal "
+"or no work inside their create() step, rather they should use start() to do "
+"the work."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1487
+#, no-c-format
+msgid ""
+"The Barrier controls the start/stop of dependent services, but not their "
+"destruction, which happens only when the <literal>BarrierController</"
+"literal> is itself destroyed/undeployed. Thus using the <literal>Barrier</"
+"literal> to control services that need to be \"destroyed\" as part of their "
+"normal “undeploy” operation (like, for example, an <literal>EJBContainer</"
+"literal>) will not have the desired effect."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1496
+#, no-c-format
+msgid "Determining the master node"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1497
+#, no-c-format
+msgid ""
+"The various clustered singleton management strategies all depend on the fact "
+"that each node in the cluster can independently react to changes in cluster "
+"membership and correctly decide whether it is now the “master node”. How is "
+"this done?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1500
+#, no-c-format
+msgid ""
+"Prior to JBoss AS 4.2.0, the methodology for this was fixed and simple. For "
+"each member of the cluster, the HAPartition mbean maintains an attribute "
+"called the CurrentView, which is basically an ordered list of the current "
+"members of the cluster. As nodes join and leave the cluster, JGroups ensures "
+"that each surviving member of the cluster gets an updated view. You can see "
+"the current view by going into the JMX console, and looking at the "
+"CurrentView attribute in the <literal>jboss:service=DefaultPartition</"
+"literal> mbean. Every member of the cluster will have the same view, with "
+"the members in the same order."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1503
+#, no-c-format
+msgid ""
+"Let's say, for example, that we have a 4 node cluster, nodes A through D, "
+"and the current view can be expressed as {A, B, C, D}. Generally speaking, "
+"the order of nodes in the view will reflect the order in which they joined "
+"the cluster (although this is not always the case, and should not be assumed "
+"to be the case.)"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1506
+#, no-c-format
+msgid ""
+"To further our example, let's say there is a singleton service (i.e., an "
+"<literal>HASingletonController</literal>) named Foo that's deployed around "
+"the cluster, except, for whatever reason, on B. The <literal>HAPartition</"
+"literal> service maintains across the cluster a registry of what services "
+"are deployed where, in view order. So, on every node in the cluster, the "
+"<literal>HAPartition</literal> service knows that the view with respect to "
+"the Foo service is {A, C, D} (no B)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1510
+#, no-c-format
+msgid ""
+"Whenever there is a change in the cluster topology of the Foo service, the "
+"<literal>HAPartition</literal> service invokes a callback on Foo notifying "
+"it of the new topology. So, for example, when Foo started on D, the Foo "
+"service running on A, C and D all got callbacks telling them the new view "
+"for Foo was {A, C, D}. That callback gives each node enough information to "
+"independently decide if it is now the master. The Foo service on each node "
+"does this by checking if they are the first member of the view – if they "
+"are, they are the master; if not, they're not. Simple as that."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1514
+#, no-c-format
+msgid ""
+"If A were to fail or shutdown, Foo on C and D would get a callback with a "
+"new view for Foo of {C, D}. C would then become the master. If A restarted, "
+"A, C and D would get a callback with a new view for Foo of {C, D, A}. C "
+"would remain the master – there's nothing magic about A that would cause it "
+"to become the master again just because it was before."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1534
+#, no-c-format
+msgid "Clustered JMS Services"
+msgstr "群集的 JMS 服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1536
+#, no-c-format
+msgid ""
+"JBoss AS 3.2.4 and above support high availability JMS (HA-JMS) services in "
+"the <literal>all</literal> server configuration. In the current production "
+"release of JBoss AS, the HA-JMS service is implemented as a clustered "
+"singleton fail-over service."
+msgstr ""
+"JBoss AS 3.2.4 和更高的版本支持高可用性的 <literal>all</literal> 服务器配置里"
+"的 JMS(HA-JMS)服务。在 JBoss AS 当前的发布版本里,HA-JMS 服务用一个群集的 "
+"singleton fail-over 服务来实现。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1541
+#, no-c-format
+msgid ""
+"If you are willing to configure HA-JMS yourself, you can get it to work with "
+"earlier versions of JBoss AS. We have a customer who uses HA-JMS "
+"successfully in JBoss AS 3.0.7. Please contact JBoss support for more "
+"questions."
+msgstr ""
+"如果你希望自己来配置 HA-JMS,你可以在以前的 JBoss AS 版本里让它运行。我们有一"
+"个客户成功地在 JBoss AS 3.0.7 里使用 HA-JMS。如果你有更多问题的话,请联系 "
+"JBoss 支持部门。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1545
+#, no-c-format
+msgid ""
+"The HA-JMS in JBoss AS 4.2.2 and earlier was based on the JBoss MQ messaging "
+"product. In later releases of the AS, JBoss MQ was replaced by the newer "
+"JBoss Messaging project. JBoss Messaging's clustering implementation is "
+"considerably different from HA-JMS based on JBoss MQ; most notably it is not "
+"based on a singleton service only running on one node in the cluster."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1554
+#, no-c-format
+msgid "High Availability Singleton Fail-over"
+msgstr "高可用性的 Singleton Fail-over"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1555
+#, fuzzy, no-c-format
+msgid ""
+"The JBoss HA-JMS service (i.e., message queues topics and supporting "
+"services) only runs on a single node (i.e., the master node) in the cluster "
+"at any given time. If that node fails, the cluster simply elects another "
+"node to run the JMS service, and the queues, topics and supporting services "
+"are deployed on that server (fail-over). This setup provides redundancy "
+"against server failures but does not reduce the work load on the JMS server "
+"node."
+msgstr ""
+"JBoss HA-JMS 服务(也就是消息队列和主题)任何给定时间都只在群集里的单节点运行"
+"(主节点)。如果这个节点崩溃了,群集系统简单地选取另外一节点来运行 JMS 服务"
+"(fail-over)。这种设置提供了针对服务器瘫痪的冗余措施,但并没有降低 JMS 服务"
+"器节点的负载。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1557
+#, no-c-format
+msgid ""
+"While you cannot load balance HA-JMS queues (there is only one master node "
+"that runs the queues), you can load balance the MDBs that process messages "
+"from those queues (see <xref linkend=\"clustering-jms-loadbalanced\"/>)."
+msgstr ""
+"虽然你不能够对 HA-JMS 队列进行负载平衡(只有一个运行这个队列的主节点),但是"
+"你可以平衡处理队列里信息的 MDBs 的负载(请参考 <xref linkend=\"clustering-"
+"jms-loadbalanced\"/>)。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1562
+#, no-c-format
+msgid "Server Side Configuration"
+msgstr "服务端配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1564
+#, no-c-format
+msgid ""
+"The biggest configuration difference between HA-JMS in the all configuration "
+"and the non-HA version found in the default configuration is the location of "
+"most configuration files. For HA-JMS, most configuration files are found in "
+"the deploy-hasingleton/jms directory, not in deploy/jms. Your queues and "
+"topics must be deployed in deploy-hasingleton (or a subdirectory of it like "
+"deploy-hasingleton/jms.) Application components that act as clients to HA-"
+"JMS (e.g., MDBs and other JMS clients) do not need to be deployed in deploy-"
+"hasingleton. They should only be deployed there if you only want them "
+"running on one node in the cluster at a time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1567
+#, fuzzy, no-c-format
+msgid ""
+"To use the singleton fail-over HA-JMS service, you must configure JMS "
+"services identically on all nodes in the cluster. That includes all JMS "
+"related service MBeans and all deployed queues and topics. However, "
+"applications that use JMS (e.g., MDBs and other JMS clients) do not need to "
+"be deployed identically across the cluster."
+msgstr ""
+"为了使用 singleton fail-over HA-JMS 服务,你必须在群集里的所有节点上配置相同"
+"的 JMS 服务。这包括所有和 JMS 相关的 MBeans 以及部署的 JMS 应用程序。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1573
+#, fuzzy, no-c-format
+msgid ""
+"The JMS server is configured to persist its data in the <literal>DefaultDS</"
+"literal>. By default, that is the embedded HSQLDB. However, for the HA-JMS "
+"service fail-over to work, the newly started HA-JMS server needs to be able "
+"to find the data persisted by the old server. That's not likely to happen if "
+"the data is persisted in files written by the old servers' HSQLDB. In almost "
+"any cluster environments, all nodes need to persist data against a shared "
+"database. So, the first thing to do before you start clustered JMS is to "
+"setup a shared database for JMS. You need to do the following:"
+msgstr ""
+"JMS 服务器被设置成在 <literal>DefaultDS</literal> 里持久化它的数据。在缺省的"
+"情况下,那就是内含的 HSQLDB。然而,在大部分群集环境里,所有节点都需要把数据持"
+"久化到一个共享数据库里。因此,在你启动群集 JMS 之前要做的第一件事就是建立一个"
+"共享数据库。你需要做如下的事情:"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1579
+#, no-c-format
+msgid ""
+"Configure <literal>DefaultDS</literal> to point to the database server of "
+"your choice. That is to replace the <literal>deploy/hsqlsb-ds.xml</literal> "
+"file with the <literal>xxx-ds.xml</literal> file in the <literal>docs/"
+"examples/jca</literal> directory, where <literal>xxx</literal> is the name "
+"of the target shared database (e.g., <literal>mysql-ds.xml</literal>)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1586
+#, no-c-format
+msgid ""
+"Replace the <literal>hsqldb-jdbc2-service.xml</literal> file under the "
+"<literal>server/all/deploy-hasingleton/jms</literal> directory with one "
+"tuned to the specific database. For example if you use MySQL the file is "
+"<literal>mysql-jdbc2-service.xml</literal>. Configuration files for a number "
+"of RDBMS are bundled with the JBoss AS distribution. They can be found under "
+"<literal>docs/examples/jms</literal>."
+msgstr ""
+"把 <literal>server/all/deploy-hasingleton/jms</literal> 目录下的 "
+"<literal>hsqldb-jdbc2-service.xml</literal>文件用特定数据库的文件代替。例如,"
+"MySQL 的文件就是 <literal>mysql-jdbc2-service.xml</literal>。JBoss AS 发行版"
+"本捆绑了一些 RDBMS 的配置文件。它们可以在 <literal>docs/examples/jms</"
+"literal> 下找到。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1595
+#, fuzzy, no-c-format
+msgid ""
+"There is no need to replace the <literal>hsqldb-jdbc-state-service.xml</"
+"literal> file under the <literal>server/all/deploy-hasingleton/jms</literal> "
+"directory. Despite the <literal>hsql</literal> in its name, it works with "
+"all SQL92 compliant databases, including HSQL, MySQL, SQL Server, and more. "
+"It automatically uses the <literal>DefaultDS</literal> for storage, which we "
+"configured above."
+msgstr ""
+"你不需要替换 <literal>server/all/deploy-hasingleton/jms</literal> 目录下的 "
+"<literal>hsqldb-jdbc-state-service.xml</literal> 文件。尽管它的名字里包含 "
+"<literal>hsql</literal>,它适用于所有兼容 SQL92 的数据库,包括 HSQL,MySQL,"
+"SQL Server 和更多数据库。象我们上面配置的那样,它自动使用 "
+"<literal>DefaultDS</literal> 来存放数据。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1606
+#, fuzzy, no-c-format
+msgid "Non-MDB HA-JMS Clients"
+msgstr "HA-JMS 客户"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1608
+#, no-c-format
+msgid ""
+"The HA-JMS client is different from regular JMS clients in two important "
+"aspects."
+msgstr "HA-JMS 客户和常规的 JMS 客户在两个方面有所不同。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1612
+#, no-c-format
+msgid ""
+"The HA-JMS client must look up JMS connection factories as well as queues "
+"and topicsusing HA-JNDI (the default port is 1100). This ensures the factory/"
+"queue/topic can be found no matter which cluster node is running the HA-JMS "
+"server."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1620
+#, no-c-format
+msgid ""
+"If the client is a J2EE component (session bean or web application) running "
+"inside the AS, the lookup via HA-JNDI can be configured using the "
+"component's deployment descriptors: In the standard deployment descriptor "
+"(ejb-jar.xml or web.xml):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1628
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<resource-ref>\n"
+" <res-ref-name>jms/ConnectionFactory</res-ref-name>\n"
+" <res-type>javax.jms.QueueConnectionFactory</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+"</resource-ref>\n"
+" \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/Queue</res-ref-name>\n"
+" <res-type>javax.jms.Queue</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+"</resource-ref>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1630
+#, no-c-format
+msgid "And in the JBoss-specific descriptor (jboss.xml or jboss-web.xml):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1634
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/ConnectionFactory</res-ref-name>\n"
+" <!-- Use the JMS Resource Adapter, let it deal\n"
+" with knowing where the JMS server is -->\n"
+" <jndi-name>java:/JmsXA</jndi-name>\n"
+" </resource-ref>\n"
+" \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/Queue</res-ref-name>\n"
+" <!-- Use HA-JNDI so we can find the queue on any node -->\n"
+" <jndi-name>jnp://localhost:1100/queue/A</jndi-name>\n"
+"</resource-ref>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1639
+#, no-c-format
+msgid ""
+"The HA-JMS client must deal with exceptions that will occur on the JMS "
+"connection if server failover occurs. Unlike, for example, clustered EJB "
+"proxies, the JMS connection object does not include automatic failover "
+"logic. If the HA-JMS service fails over to a different master node, all "
+"client operations on the current connection will fail with a JMSException. "
+"To deal with this:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1647
+#, no-c-format
+msgid ""
+"If the client is running inside the application server, the client should "
+"obtain the ConnectionFactory by looking up java:/JmsXAin JNDI. This will "
+"find the JBoss JMS Resource Adapter; the resource adapter will handle the "
+"task of detecting server failover and reconnecting to the new server when it "
+"starts."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1651
+#, no-c-format
+msgid ""
+"For clients outside the application server, the best approach is to register "
+"an ExceptionListener with the connection; the listener will get a callback "
+"if there is an exception on the connection. The callback should then handle "
+"the task of closing the old connection and reconnecting. Following is a "
+"example application that continuously sends messages to a queue, handling "
+"any exceptions that occur:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1657
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"package com.test.hajms.client;\n"
+"\n"
+"import javax.naming.InitialContext;\n"
+"import javax.jms.ConnectionFactory;\n"
+"import javax.jms.Destination;\n"
+"import javax.jms.Connection;\n"
+"import javax.jms.Session;\n"
+"import javax.jms.MessageProducer;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.ExceptionListener;\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.DeliveryMode;\n"
+"\n"
+"import org.apache.commons.logging.Log;\n"
+"import org.apache.commons.logging.LogFactory;\n"
+" \n"
+"public class FailoverJMSClient\n"
+"{\n"
+"private static final Log log = LogFactory.getLog(FailoverJMSClient.class);\n"
+"\n"
+"public static final int NUM_RETRIES = 3;\n"
+"\n"
+"volatile boolean doSend = true;\n"
+"ConnectionFactory connectionFactory;\n"
+"Destination queue;\n"
+"Connection connection;\n"
+"Session session;\n"
+"MessageProducer producer;\n"
+"\n"
+"\n"
+"public static void main(String[] args) throws Exception\n"
+"{\n"
+"FailoverJMSClient jmsClient = new FailoverJMSClient();\n"
+"jmsClient.setUpJMS();\n"
+"jmsClient.sendMessages();\n"
+"}\n"
+"\n"
+"\n"
+"public boolean setUpJMS()\n"
+"{\n"
+"InitialContext ic;\n"
+"try\n"
+"{\n"
+"// assume jndi.properties is configured for HA-JNDI\n"
+"ic = new InitialContext();\n"
+"connectionFactory = (ConnectionFactory)ic.lookup(\"ConnectionFactory\");\n"
+"queue = (Destination)ic.lookup(\"queue/FailoverTestQueue\");\n"
+"connection = connectionFactory.createConnection();\n"
+"try\n"
+"{\n"
+"log.debug(\"Connection created ...\");\n"
+"\n"
+"// KEY - register for exception callbacks\n"
+"connection.setExceptionListener(new ExceptionListenerImpl());\n"
+"\n"
+"session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n"
+"log.debug(\"Session created ...\");\n"
+"producer = session.createProducer(queue);\n"
+"\n"
+"producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);\n"
+"log.debug(\"Producer created ...\");\n"
+"\n"
+"return true;\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"// We failed so close the connection\n"
+"try\n"
+"{\n"
+"connection.close();\n"
+"}\n"
+"catch (JMSException ignored)\n"
+"{\n"
+"// Pointless\n"
+"}\n"
+"// Rethrow the initial problem to where we will log it\n"
+"throw e;\n"
+"} \n"
+"finally\n"
+"{\n"
+"// And close the initial context\n"
+"// We don't want to wait for the garbage collector to close it\n"
+"// otherwise we'll have useless hanging network connections\n"
+"ic.close();\n"
+"}\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"log.error(\"Error setting up JMS\", e);\n"
+"return false;\n"
+"}\n"
+"}\n"
+"\n"
+"public void sendMessages()\n"
+"{\n"
+"int cnt = 0;\n"
+"while(doSend)\n"
+"{\n"
+"try\n"
+"{\n"
+"Thread.sleep(100);\n"
+"\n"
+"Message m = session.createObjectMessage(new Integer(cnt++));\n"
+"producer.send(m);\n"
+"\n"
+"log.trace(\"message \" + cnt + \" sent\");\n"
+"\n"
+"}\n"
+"catch(Exception e)\n"
+"{\n"
+"cnt--;\n"
+"log.error(e.getMessage());\n"
+"}\n"
+"}\n"
+"}\n"
+"\n"
+"\n"
+"\n"
+"private class ExceptionListenerImpl implements ExceptionListener\n"
+"{\n"
+"public void onException(JMSException e)\n"
+"{\n"
+" \n"
+"for(int i = 0; i < NUM_RETRIES; i++)\n"
+" {\n"
+" log.warn(\"Connection has problems, trying to re-create it, "
+"attempt \" +\n"
+" (i + 1) + \" ...\");\n"
+" \n"
+" try \n"
+" {\n"
+" connection.close(); // unregisters the ExceptionListener\n"
+" }\n"
+" catch(Exception e2) {\n"
+" // I will get an Exception anyway, since the connection to "
+"the \n"
+" //server is broken, but close() frees up resources associated \n"
+" // with the connection\n"
+" }\n"
+" \n"
+" boolean setupOK = setUpJMS();\n"
+" \n"
+" if (setupOK)\n"
+" {\n"
+" log.info(\"Connection re-established\");\n"
+" return;\n"
+" }\n"
+" else\n"
+" {\n"
+" log.warn(\"Re-creating connection failed, retrying ...\");\n"
+" }\n"
+" }\n"
+" \n"
+" log.error(\"Cannot re-establish connection, giving up ...\");\n"
+" doSend = false;\n"
+" }\n"
+" }\n"
+"}\n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1661
+#, no-c-format
+msgid "MDBs and HA-JMS Failover"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1662
+#, no-c-format
+msgid ""
+"When you deploy an MDB in JBoss, JBoss' MDB container handles for you all "
+"issues associated with finding the cluster singleton HA-JMS server and with "
+"reconnecting to it if it fails over."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1672
+#, no-c-format
+msgid "Load Balanced HA-JMS MDBs"
+msgstr "负载平衡的 HA-JMS MDBs "
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1673
+#, no-c-format
+msgid ""
+"While the HA-JMS queues and topics only run on a single node at a time, MDBs "
+"on multiple nodes can receive and process messages from the HA-JMS master "
+"node. The contested queues and topics result in load balancing behavior for "
+"MDBs. To enable loading balancing for MDBs, you can specify a receiver for "
+"the queue. The receiver records which node is waiting for a message and in "
+"which order the messages should be processed. JBoss provides three receiver "
+"implementations."
+msgstr ""
+"虽然 HA-JMS 队列(queues)和主题(topics)在同一时间只在单节点上运行,但其他"
+"节点上的 MDBs 也能够接收和处理 HA-JMS 主节点上的信息。这种竞争的情况导致 "
+"MDBs 的平衡负载行为。为了启用 MDBs 的平衡负载,你可以指定队列的 receiver。这"
+"个 receiver 记录哪个节点正在等待信息和信息该按什么样的顺序来处理。JBoss 提供"
+"三个 receiver 的实现(implementations)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1680
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImpl</literal> is the default "
+"implementation using a <literal>HashSet</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImpl</literal> 是 <literal>HashSet</"
+"literal> 的缺省实现(implementation)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1684
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImplArrayList</literal> is the "
+"implementation using an <literal>ArrayList</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImplArrayList</literal> 是 "
+"<literal>ArrayList</literal> 的实现。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1688
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImplLinkedList</literal> is the "
+"implementation using a <literal>LinkedList</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImplLinkedList</literal> 是 "
+"<literal>LinkedList</literal> 的实现。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1692
+#, no-c-format
+msgid ""
+"You can specify the receiver implementation class name as an attribute in "
+"the MBean that defines the permanent JMS <literal>Queue</literal> or "
+"<literal>DestinationManager</literal> on each node. For best load balancing "
+"performance, we suggest you to use the <literal>ReceiversImplArrayList</"
+"literal> or <literal>ReceiversImplLinkedList</literal> implementations due "
+"to an undesirable implementation detail of <literal>HashSet</literal> in the "
+"JVM."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1704
+#, no-c-format
+msgid "JBossCache and JGroups Services"
+msgstr "JBossCache 和 JGroups 服务"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1705
+#, fuzzy, no-c-format
+msgid ""
+"JGroups and JBossCache provide the underlying communication, node "
+"replication and caching services, for JBoss AS clusters. Those services are "
+"configured as MBeans. There is a set of JBossCache and JGroups MBeans for "
+"each type of clustering applications (e.g., the Stateful Session EJBs, HTTP "
+"session replication etc.)."
+msgstr ""
+"JGroups 和 JBossCache 为 JBoss AS 群集提供底层的通信,节点复制和缓存服务。这"
+"些服务都配置成 MBeans。对于每一个类型的群集应用程序(如 Stateful Session "
+"EJBs, distributed entity EJBs 等),都有一个 JBossCache 和 JGroups 的 "
+"MBeans 的集合。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1709
+#, no-c-format
+msgid ""
+"The JBoss AS ships with a reasonable set of default JGroups and JBossCache "
+"MBean configurations. Most applications just work out of the box with the "
+"default MBean configurations. You only need to tweak them when you are "
+"deploying an application that has special network or performance "
+"requirements."
+msgstr ""
+"JBoss AS 带有缺省的 JGroups 和 JBossCache 的配置集。大部分应用程序使用这些缺"
+"省的配置就够了。只是在部署有特殊网络或性能要求的应用程序时,你才需要做更多的"
+"配置。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1714
+#, no-c-format
+msgid "JGroups Configuration"
+msgstr "JGroups Configuration"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1715
+#, no-c-format
+msgid ""
+"The JGroups framework provides services to enable peer-to-peer "
+"communications between nodes in a cluster. It is built on top a stack of "
+"network communication protocols that provide transport, discovery, "
+"reliability and failure detection, and cluster membership management "
+"services. <xref linkend=\"jbosscache-JGroupsStack.fig\"/> shows the protocol "
+"stack in JGroups."
+msgstr ""
+"JGroups 框架提供了启用群集系统里节点间到对点通信的服务。它建立在网络通信协议"
+"栈的顶层,它提供传输,发现(discovery),可靠性(reliability)和故障"
+"(failure)检测,以及群集成员资格管理服务。<xref linkend=\"jbosscache-"
+"JGroupsStack.fig\"/> 展示了 JGroups 的协议栈。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1719
+#, no-c-format
+msgid "Protocol stack in JGroups"
+msgstr "Protocol stack in JGroups"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1726
+#, no-c-format
+msgid ""
+"JGroups configurations often appear as a nested attribute in cluster related "
+"MBean services, such as the <literal>PartitionConfig</literal> attribute in "
+"the <literal>ClusterPartition</literal> MBean or the <literal>ClusterConfig</"
+"literal> attribute in the <literal>TreeCache</literal> MBean. You can "
+"configure the behavior and properties of each protocol in JGroups via those "
+"MBean attributes. Below is an example JGroups configuration in the "
+"<literal>ClusterPartition</literal> MBean."
+msgstr ""
+"JGroups 配置经常以和群集相关的 MBean 服务的嵌套属性的面目出现,例如 "
+"<literal>ClusterPartition</literal> MBean 的<literal>PartitionConfig</"
+"literal> 属性或 <literal>TreeCache</literal> MBean 的 "
+"<literal>ClusterConfig</literal> 属性。你可以通过这些 MBean 属性来配置 "
+"JGroups 每一个协议的行为和属性(properties)。下面是一个 "
+"<literal>ClusterPartition</literal> MBean 里的 JGroups 配置的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1731
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=${jboss.partition.name:DefaultPartition}\">\n"
+" \n"
+" ... ...\n"
+" \n"
+" <attribute name=\"PartitionConfig\">\n"
+" <Config>\n"
+" \n"
+" <UDP mcast_addr=\"${jboss.partition."
+"udpGroup:228.1.2.3}\" \n"
+" mcast_port=\"${jboss.hapartition."
+"mcast_port:45566}\"\n"
+" tos=\"8\"\n"
+" ucast_recv_buf_size=\"20000000\"\n"
+" ucast_send_buf_size=\"640000\"\n"
+" mcast_recv_buf_size=\"25000000\"\n"
+" mcast_send_buf_size=\"640000\"\n"
+" loopback=\"false\"\n"
+" discard_incompatible_packets=\"true\"\n"
+" enable_bundling=\"false\"\n"
+" max_bundle_size=\"64000\"\n"
+" max_bundle_timeout=\"30\"\n"
+" use_incoming_packet_handler=\"true\"\n"
+" use_outgoing_packet_handler=\"false\"\n"
+" ip_ttl=\"${jgroups.udp.ip_ttl:2}\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>\n"
+" \n"
+" <PING timeout=\"2000\"\n"
+" down_thread=\"false\" up_thread=\"false\" "
+"num_initial_members=\"3\"/>\n"
+" \n"
+" <MERGE2 max_interval=\"100000\"\n"
+" down_thread=\"false\" up_thread=\"false\" "
+"min_interval=\"20000\"/>\n"
+" <FD_SOCK down_thread=\"false\" up_thread=\"false\"/"
+">\n"
+" \n"
+" <FD timeout=\"10000\" max_tries=\"5\" \n"
+" down_thread=\"false\" up_thread=\"false\" shun="
+"\"true\"/>\n"
+" <VERIFY_SUSPECT timeout=\"1500\" down_thread=\"false"
+"\" up_thread=\"false\"/>\n"
+" <pbcast.NAKACK max_xmit_size=\"60000\"\n"
+" use_mcast_xmit=\"false\" gc_lag=\"0"
+"\"\n"
+" retransmit_timeout="
+"\"300,600,1200,2400,4800\"\n"
+" down_thread=\"false\" up_thread="
+"\"false\"\n"
+" discard_delivered_msgs=\"true\"/>\n"
+" <UNICAST timeout=\"300,600,1200,2400,3600\"\n"
+" down_thread=\"false\" up_thread=\"false\"/"
+">\n"
+" <pbcast.STABLE stability_delay=\"1000\" "
+"desired_avg_gossip=\"50000\"\n"
+" down_thread=\"false\" up_thread="
+"\"false\"\n"
+" max_bytes=\"400000\"/>\n"
+" <pbcast.GMS print_local_addr=\"true\" join_timeout="
+"\"3000\"\n"
+" down_thread=\"false\" up_thread=\"false"
+"\"\n"
+" join_retry_timeout=\"2000\" shun=\"true"
+"\"\n"
+" view_bundling=\"true\"/>\n"
+" <FRAG2 frag_size=\"60000\" down_thread=\"false\" "
+"up_thread=\"false\"/>\n"
+" <pbcast.STATE_TRANSFER down_thread=\"false\" \n"
+" up_thread=\"false\" "
+"use_flush=\"false\"/>\n"
+" </Config>\n"
+" </attribute>\n"
+"</mbean> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1732
+#, no-c-format
+msgid ""
+"All the JGroups configuration data is contained in the <Config> "
+"element under the JGroups config MBean attribute. This information is used "
+"to configure a JGroups Channel; the Channel is conceptually similar to a "
+"socket, and manages communication between peers in a cluster. Each element "
+"inside the <Config> element defines a particular JGroups Protocol; "
+"each Protocol performs one function, and the combination of those functions "
+"is what defines the characteristics of the overall Channel. In the next "
+"several sections, we will dig into the commonly used protocols and their "
+"options and explain exactly what they mean."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1737
+#, fuzzy, no-c-format
+msgid "Common Configuration Properties"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1738
+#, no-c-format
+msgid ""
+"The following common properties are exposed by all of the JGroups protocols "
+"discussed below:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1742
+#, no-c-format
+msgid ""
+"<literal>down_thread</literal> whether the protocol should create an "
+"internal queue and a queue processing thread (aka the down_thread) for "
+"messages passed down from higher layers. The higher layer could be another "
+"protocol higher in the stack, or the application itself, if the protocol is "
+"the top one on the stack. If true (the default), when a message is passed "
+"down from a higher layer, the calling thread places the message in the "
+"protocol's queue, and then returns immediately. The protocol's down_thread "
+"is responsible for reading messages off the queue, doing whatever protocol-"
+"specific processing is required, and passing the message on to the next "
+"protocol in the stack."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1746
+#, no-c-format
+msgid ""
+"<literal>up_thread</literal> is conceptually similar to down_thread, but "
+"here the queue and thread are for messages received from lower layers in the "
+"protocol stack."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1750
+#, no-c-format
+msgid ""
+"Generally speaking, <literal>up_thread</literal> and <literal>down_thread</"
+"literal> should be set to false."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1756
+#, no-c-format
+msgid "Transport Protocols"
+msgstr "传输协议"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1757
+#, no-c-format
+msgid ""
+"The transport protocols send messages from one cluster node to another "
+"(unicast) or from cluster node to all other nodes in the cluster (mcast). "
+"JGroups supports UDP, TCP, and TUNNEL as transport protocols."
+msgstr ""
+"传输协议(transport protocols)从一个群集节点发送信息到另外一个节点(单播 "
+"unicast)或发送到群集里所有其他节点(mcast)。JGroups 支持 UDP,TCP 和 "
+"TUNNEL 等传输协议。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1761
+#, no-c-format
+msgid ""
+"The <literal>UDP</literal>, <literal>TCP</literal>, and <literal>TUNNEL</"
+"literal> elements are mutually exclusive. You can only have one transport "
+"protocol in each JGroups <literal>Config</literal> element"
+msgstr ""
+"<literal>UDP</literal>,<literal>TCP</literal> 和 <literal>TUNNEL</literal> "
+"元素是相互排斥的。你只能在每个 JGroups <literal>Config</literal> 元素里使用一"
+"个传输协议。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1766
+#, no-c-format
+msgid "UDP configuration"
+msgstr "UDP 配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1767
+#, no-c-format
+msgid ""
+"UDP is the preferred protocol for JGroups. UDP uses multicast or multiple "
+"unicasts to send and receive messages. If you choose UDP as the transport "
+"protocol for your cluster service, you need to configure it in the "
+"<literal>UDP</literal> sub-element in the JGroups <literal>Config</literal> "
+"element. Here is an example."
+msgstr ""
+"UDP 是 JGroups 的首选协议。UDP 使用多点传送(multicast )或多个单播"
+"(unicast)来发送和接收信息。如果你选择 UDP 作为你的群集服务的传输协议,你需"
+"要在 JGroups <literal>Config</literal> 元素的 <literal>UDP</literal> 子元素里"
+"配置它。下面是一个示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1771
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<UDP mcast_addr=\"${jboss.partition.udpGroup:228.1.2.3}\" \n"
+" mcast_port=\"${jboss.hapartition.mcast_port:45566}\"\n"
+" tos=\"8\"\n"
+" ucast_recv_buf_size=\"20000000\"\n"
+" ucast_send_buf_size=\"640000\"\n"
+" mcast_recv_buf_size=\"25000000\"\n"
+" mcast_send_buf_size=\"640000\"\n"
+" loopback=\"false\"\n"
+" discard_incompatible_packets=\"true\"\n"
+" enable_bundling=\"false\"\n"
+" max_bundle_size=\"64000\"\n"
+" max_bundle_timeout=\"30\"\n"
+" use_incoming_packet_handler=\"true\"\n"
+" use_outgoing_packet_handler=\"false\"\n"
+" ip_ttl=\"${jgroups.udp.ip_ttl:2}\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1774
+#, no-c-format
+msgid ""
+"The available attributes in the above JGroups configuration are listed below."
+msgstr "下列是在上述 JGroups 配置里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1777
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> specifies whether or not to use "
+"IP multicasting. The default is <literal>true</literal>. If set to false, it "
+"will send n unicast packets rather than 1 multicast packet. Either way, "
+"packets are UDP datagrams."
+msgstr ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> 指定是否使用 IP 多点传送"
+"(multicasting)。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1782
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_addr</emphasis> specifies the multicast "
+"address (class D) for joining a group (i.e., the cluster). If omitted, the "
+"default is <literal>228.8.8.8 </literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_addr</emphasis> 指定加入到组(就是群集)里的多"
+"点传送地址(class D)。它的缺省值是 <literal>228.8.8.8</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1787
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_port</emphasis> specifies the multicast port "
+"number. If omitted, the default is <literal>45566</literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_port</emphasis> 指定多点传送端口号码。它的缺省"
+"值是 <literal>45566</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1791
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface on "
+"which to receive and send multicasts (uses the <literal>-Djgroups."
+"bind_address</literal> system property, if present). If you have a "
+"multihomed machine, set the <literal>bind_addr</literal> attribute or system "
+"property to the appropriate NIC IP address. By default, system property "
+"setting takes priority over XML attribute unless -Djgroups.ignore.bind_addr "
+"system property is set."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定接收和发送多点传送的接口(如"
+"果可用,使用 <literal>bind.address</literal> 系统属性)。如果你有一个多宿主主"
+"机,把 <literal>bind_addr</literal> 属性设置为合适的 NIC IP 地址。如果 "
+"<literal>ignore.bind.address</literal> 属性为真(true)的话,这个属性将被忽"
+"略。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1794
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">receive_on_all_interfaces </emphasis> specifies "
+"whether this node should listen on all interfaces for multicasts. The "
+"default is <literal>false</literal>. It overrides the <literal>bind_addr</"
+"literal> property for receiving multicasts. However, <literal>bind_addr</"
+"literal> (if set) is still used to send multicasts."
+msgstr ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> 指定是否这个节点应"
+"该为多点传送侦听所有的接口。它的缺省值是 <literal>false</literal>。它覆盖了接"
+"收多点传送的 <literal>bind_addr</literal> 属性。然而,<literal>bind_addr</"
+"literal>(如果设置了)仍会用来发送多点传送信息。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1799
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">send_on_all_interfaces</emphasis> specifies whether "
+"this node send UDP packets via all the NICs if you have a multi NIC machine. "
+"This means that the same multicast message is sent N times, so use with care."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1804
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">receive_interfaces</emphasis> specifies a list of of "
+"interfaces to receive multicasts on. The multicast receive socket will "
+"listen on all of these interfaces. This is a comma-separated list of IP "
+"addresses or interface names. E.g. \"<literal>192.168.5.1,eth1,127.0.0.1</"
+"literal>\"."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1810
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ip_ttl</emphasis> specifies time-to-live for IP "
+"Multicast packets. TTL is the commonly used term in multicast networking, "
+"but is actually something of a misnomer, since the value here refers to how "
+"many network hops a packet will be allowed to travel before networking "
+"equipment will drop it."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1814
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_incoming_packet_handler</emphasis> specifies "
+"whether to use a separate thread to process incoming messages. Sometimes "
+"receivers are overloaded (they have to handle de-serialization etc). Packet "
+"handler is a separate thread taking care of de-serialization, receiver thread"
+"(s) simply put packet in queue and return immediately. Setting this to true "
+"adds one more thread. The default is <literal>true</literal>."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1817
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_outgoing_packet_handler</emphasis> specifies "
+"whether to use a separate thread to process outgoing messages. The default "
+"is false."
+msgstr ""
+"<emphasis role=\"bold\">use_outgoing_packet_handler</emphasis> 指定是否使用单"
+"独的线程来处理输出的(outgoing)信息。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1820
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">enable_bundling</emphasis> specifies whether to "
+"enable message bundling. If it is <literal>true</literal>, the node would "
+"queue outgoing messages until <literal>max_bundle_size</literal> bytes have "
+"accumulated, or <literal>max_bundle_time</literal> milliseconds have "
+"elapsed, whichever occurs first. Then bundle queued messages into a large "
+"message and send it. The messages are unbundled at the receiver. The default "
+"is <literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">enable_bundling</emphasis> 指定是否启用捆绑"
+"(bundling)。如果它设为<literal>true</literal>,节点将会把输出的信息排队,一"
+"直到积累了 <literal>max_bundle_size</literal> 个字节,或者是 "
+"<literal>max_bundle_time</literal> 毫秒后,依哪个先发生而定。然后把排队的信息"
+"捆绑成一个大的信息发送出去。这个信息在接收端再解开。它的缺省值是 "
+"<literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1828
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"outgoing message back up the stack. In <literal>unicast</literal> mode, the "
+"messages are sent to self. In <literal>mcast</literal> mode, a copy of the "
+"mcast message is sent. The default is <literal>false</literal>"
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 指定是否在堆栈里回送(loop back)"
+"输出信息。在单播 <literal>unicast</literal> 模式下,信息都会发送给自己。如果"
+"是 <literal>mcast</literal> 模式,多点传送信息的备份将被发送。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1833
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">discard_incompatibe_packets</emphasis> specifies "
+"whether to discard packets from different JGroups versions. Each message in "
+"the cluster is tagged with a JGroups version. When a message from a "
+"different version of JGroups is received, it will be discarded if set to "
+"true, otherwise a warning will be logged. The default is <literal>false</"
+"literal>"
+msgstr ""
+"<emphasis role=\"bold\">discard_incompatibe_packets</emphasis> 指定是否丢弃从"
+"不同版本的 JGroups 过来的数据包。群集里的每个数据包都用 JGroups 版本号来标"
+"记。如果它设置为 true,当接收到一个不同 JGroups 版本的信息时,这个信息将被丢"
+"弃; 否则,将记录一个警告。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1839
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_send_buf_size, mcast_recv_buf_size, "
+"ucast_send_buf_size, ucast_recv_buf_size</emphasis> define receive and send "
+"buffer sizes. It is good to have a large receiver buffer size, so packets "
+"are less likely to get dropped due to buffer overflow."
+msgstr ""
+"<emphasis role=\"bold\">mcast_send_buf_size,mcast_recv_buf_size,"
+"ucast_send_buf_size,ucast_recv_buf_size</emphasis> 定义接收和发送的缓冲区大"
+"小。设置大的接收缓冲区会比较好,这样数据包就不会因为缓冲区溢出而被丢弃。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1845
+#, no-c-format
+msgid ""
+"<literal>tos</literal> specifies traffic class for sending unicast and "
+"multicast datagrams."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1851
+#, no-c-format
+msgid ""
+"On Windows 2000 machines, because of the media sense feature being broken "
+"with multicast (even after disabling media sense), you need to set the UDP "
+"protocol's <literal>loopback</literal> attribute to <literal>true</literal>."
+msgstr ""
+"在安装 Windows 2000 的机器里,由于 media sense 特征与多点传送冲突(即使你关闭"
+"了 media sense),你需要把 UDP 协议的 <literal>loopback</literal> 属性设为 "
+"<literal>true</literal>。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1859
+#, no-c-format
+msgid "TCP configuration"
+msgstr "TCP 配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1860
+#, fuzzy, no-c-format
+msgid ""
+"Alternatively, a JGroups-based cluster can also work over TCP connections. "
+"Compared with UDP, TCP generates more network traffic when the cluster size "
+"increases. TCP is fundamentally a unicast protocol. To send multicast "
+"messages, JGroups uses multiple TCP unicasts. To use TCP as a transport "
+"protocol, you should define a <literal>TCP</literal> element in the JGroups "
+"<literal>Config</literal> element. Here is an example of the <literal>TCP</"
+"literal> element."
+msgstr ""
+"另外,基于 JGroups 的群集系统也可以使用 TCP 连接。和 UDP 相比,当群集规模扩大"
+"时 TCP 会产生更多的网络流量,但是 TCP 更加可靠。TCP 从根本来说是一个单播"
+"(unicast)的协议。为了发送多点传送的信息,JGroups 使用多个 TCP 单播。如要把 "
+"TCP 作为一个传输协议来使用,你应该定义 JGroups <literal>Config</literal> 元素"
+"里的 <literal>TCP</literal> 元素。这是一个 <literal>TCP</literal> 元素的例"
+"子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1866
+#, fuzzy, no-c-format
+msgid ""
+"<TCP start_port=\"7800\"\n"
+" bind_addr=\"192.168.5.1\"\n"
+" loopback=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<TCP start_port=\"7800\"\n"
+" bind_addr=\"192.168.5.1\"\n"
+" loopback=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1867
+#, no-c-format
+msgid ""
+"Below are the attributes available in the <literal>TCP</literal> element."
+msgstr "下列是 <literal>TCP</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1870
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the binding address. "
+"It can also be set with the <literal>-Djgroups.bind_address</literal> "
+"command line option at server startup."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定了绑定的地址。它也可以在服务"
+"器启动时用 <literal>-Dbind.address</literal> 命令行选项来设定。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1875
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">start_port, end_port</emphasis> define the range of "
+"TCP ports the server should bind to. The server socket is bound to the first "
+"available port from <literal>start_port</literal>. If no available port is "
+"found (e.g., because of a firewall) before the <literal>end_port</literal>, "
+"the server throws an exception. If no <literal>end_port</literal> is "
+"provided or <literal>end_port < start_port</literal> then there is no "
+"upper limit on the port range. If <literal>start_port == end_port</literal>, "
+"then we force JGroups to use the given port (start fails if port is not "
+"available). The default is 7800. If set to 0, then the operating system will "
+"pick a port. Please, bear in mind that setting it to 0 will work only if we "
+"use MPING or TCPGOSSIP as discovery protocol because <literal>TCCPING</"
+"literal> requires listing the nodes and their corresponding ports."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1881
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"outgoing message back up the stack. In <literal>unicast</literal> mode, the "
+"messages are sent to self. In <literal>mcast</literal> mode, a copy of the "
+"mcast message is sent. The default is false."
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 指定是否在堆栈里回送(loop back)"
+"输出信息。在单播 <literal>unicast</literal> 模式下,信息都会发送给自己。如果"
+"是 <literal>mcast</literal> 模式,多点传送信息的备份将被发送。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1886
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">recv_buf_size, send_buf_size</emphasis> define "
+"receive and send buffer sizes. It is good to have a large receiver buffer "
+"size, so packets are less likely to get dropped due to buffer overflow."
+msgstr ""
+"<emphasis role=\"bold\">mcast_send_buf_size,mcast_recv_buf_size,"
+"ucast_send_buf_size,ucast_recv_buf_size</emphasis> 定义接收和发送的缓冲区大"
+"小。设置大的接收缓冲区会比较好,这样数据包就不会因为缓冲区溢出而被丢弃。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1889
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">conn_expire_time</emphasis> specifies the time (in "
+"milliseconds) after which a connection can be closed by the reaper if no "
+"traffic has been received."
+msgstr ""
+"<emphasis role=\"bold\">conn_expire_time</emphasis> 指定在多久(毫秒数)没有"
+"网络流量后,reaper 可以关闭这个连接。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1894
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">reaper_interval</emphasis> specifies interval (in "
+"milliseconds) to run the reaper. If both values are 0, no reaping will be "
+"done. If either value is > 0, reaping will be enabled. By default, "
+"reaper_interval is 0, which means no reaper."
+msgstr ""
+"<emphasis role=\"bold\">reaper_interval</emphasis> 指定运行 reaper 的时间(毫"
+"秒)。如果两个值都是 0,reaper 将不会运行。如果其中一个是 > 0,reaper 将被"
+"启用。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1899
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sock_conn_timeout</emphasis> specifies max time in "
+"millis for a socket creation. When doing the initial discovery, and a peer "
+"hangs, don't wait forever but go on after the timeout to ping other members. "
+"Reduces chances of *not* finding any members at all. The default is 2000."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1902
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_send_queues</emphasis> specifies whether to use "
+"separate send queues for each connection. This prevents blocking on write if "
+"the peer hangs. The default is true."
+msgstr ""
+"<emphasis role=\"bold\">use_incoming_packet_handler</emphasis> 指定是否使用单"
+"独的线程来处理输入的信息。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1905
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">external_addr</emphasis> specifies external IP "
+"address to broadcast to other group members (if different to local address). "
+"This is useful when you have use (Network Address Translation) NAT, e.g. a "
+"node on a private network, behind a firewall, but you can only route to it "
+"via an externally visible address, which is different from the local address "
+"it is bound to. Therefore, the node can be configured to broadcast its "
+"external address, while still able to bind to the local one. This avoids "
+"having to use the TUNNEL protocol, (and hence a requirement for a central "
+"gossip router) because nodes outside the firewall can still route to the "
+"node inside the firewall, but only on its external address. Without setting "
+"the external_addr, the node behind the firewall will broadcast its private "
+"address to the other nodes which will not be able to route to it."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1908
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">skip_suspected_members</emphasis> specifies whether "
+"unicast messages should not be sent to suspected members. The default is "
+"true."
+msgstr ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> 指定是否使用 IP 多点传送"
+"(multicasting)。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1911
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">tcp_nodelay</emphasis> specifies TCP_NODELAY. TCP by "
+"default nagles messages, that is, conceptually, smaller messages are bundled "
+"into larger ones. If we want to invoke synchronous cluster method calls, "
+"then we need to disable nagling in addition to disabling message bundling "
+"(by setting <literal>enable_bundling</literal> to false). Nagling is "
+"disabled by setting <literal>tcp_nodelay</literal> to true. The default is "
+"false."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1923
+#, no-c-format
+msgid "TUNNEL configuration"
+msgstr "TUNNEL 配置"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1924
+#, fuzzy, no-c-format
+msgid ""
+"The TUNNEL protocol uses an external router to send messages. The external "
+"router is known as a <literal>GossipRouter</literal>. Each node has to "
+"register with the router. All messages are sent to the router and forwarded "
+"on to their destinations. The TUNNEL approach can be used to setup "
+"communication with nodes behind firewalls. A node can establish a TCP "
+"connection to the GossipRouter through the firewall (you can use port 80). "
+"The same connection is used by the router to send messages to nodes behind "
+"the firewall as most firewalls do not permit outside hosts to initiate a TCP "
+"connection to a host inside the firewall. The TUNNEL configuration is "
+"defined in the TUNNEL element in the JGroups Config element. Here is an "
+"example.."
+msgstr ""
+"TUNNEL 协议使用外部的路由器来发送信息。这个外部路由器是 "
+"<literal>GossipRouter</literal>。每个节点都得在这个路由器上注册。所有信息都被"
+"发送到这个路由器并被转发到目的地。TUNNEL 方法可以用来设置与防火墙后面的节点通"
+"信。节点可以穿过防火墙(你可以用 80 端口)和 GossipRouter 建立一个 TCP 连接。"
+"路由器使用同一个连接来发送信息到防火墙后面的节点。TUNNEL 配置在 JGroups "
+"<literal>Config</literal> 元素里的 <literal>TUNNEL</literal> 元素里被定义。下"
+"面是一个例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1929
+#, fuzzy, no-c-format
+msgid ""
+"<TUNNEL router_port=\"12001\"\n"
+" router_host=\"192.168.5.1\"\n"
+" down_thread=\"false\" up_thread=\"false/>"
+msgstr ""
+"<TUNNEL router_port=\"12001\"\n"
+" router_host=\"192.168.5.1\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1932
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TUNNEL</literal> element are listed "
+"below."
+msgstr "下列是 <literal>TUNNEL</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1935
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">router_host</emphasis> specifies the host on which "
+"the GossipRouter is running."
+msgstr ""
+"<emphasis role=\"bold\">router_host</emphasis> 指定 GossipRouter 运行在哪个主"
+"机上。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1939
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">router_port</emphasis> specifies the port on which "
+"the GossipRouter is listening."
+msgstr ""
+"<emphasis role=\"bold\">router_port</emphasis> 指定 GossipRouter 侦听的端口。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1943
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"messages back up the stack. The default is <literal>true</literal>."
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 是否在堆栈里回送信息。它的缺省值"
+"是 <literal>true</literal>。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1954
+#, no-c-format
+msgid "Discovery Protocols"
+msgstr "发现协议(Discovery Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1955
+#, fuzzy, no-c-format
+msgid ""
+"The cluster needs to maintain a list of current member nodes at all times so "
+"that the load balancer and client interceptor know how to route their "
+"requests. Discovery protocols are used to discover active nodes in the "
+"cluster and detect the oldest member of the cluster, which is the "
+"coordinator. All initial nodes are discovered when the cluster starts up. "
+"When a new node joins the cluster later, it is only discovered after the "
+"group membership protocol (GMS, see <xref linkend=\"jbosscache-jgroups-other-"
+"gms\"/>) admits it into the group."
+msgstr ""
+"群集系统需要一直维护当前成员节点的列表,这样负载平衡系统(load balancer)和客"
+"户端拦截器(client interceptor)就知道怎样去指引它们的请求。发现协议"
+"(discovery protocols)用来在群集系统里探索活动节点。当群集系统启动时将检测到"
+"所有的初始节点。之后如果有新的节点加入,它只有在组成员协议(group membership "
+"protocol)(GMS,参见 <xref linkend=\"jbosscache-jgroups-other-gms\"/>)批准"
+"后才能被探索(discovered)到。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1959
+#, fuzzy, no-c-format
+msgid ""
+"Since the discovery protocols sit on top of the transport protocol, you can "
+"choose to use different discovery protocols based on your transport "
+"protocol. These are also configured as sub-elements in the JGroups MBean "
+"<literal>Config</literal> element."
+msgstr ""
+"既然发现协议(discovery protocols)处于传输协议之上,你可以根据你的传输协议选"
+"择不同的发现协议。发现协议在 JGroups MBean <literal>Config</literal> 元素里也"
+"被配置成子元素(sub-elements)。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:1965
+#, no-c-format
+msgid "PING"
+msgstr "PING"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1966
+#, no-c-format
+msgid ""
+"PING is a discovery protocol that works by either multicasting PING requests "
+"to an IP multicast address or connecting to a gossip router. As such, PING "
+"normally sits on top of the UDP or TUNNEL transport protocols. Each node "
+"responds with a packet {C, A}, where C=coordinator's address and A=own "
+"address. After timeout milliseconds or num_initial_members replies, the "
+"joiner determines the coordinator from the responses, and sends a JOIN "
+"request to it (handled by). If nobody responds, we assume we are the first "
+"member of a group."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1969
+#, no-c-format
+msgid "Here is an example PING configuration for IP multicast."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1973
+#, fuzzy, no-c-format
+msgid ""
+"<PING timeout=\"2000\"\n"
+" num_initial_members=\"2\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<PING timeout=\"2000\"\n"
+" num_initial_members=\"2\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1974
+#, no-c-format
+msgid ""
+"Here is another example PING configuration for contacting a Gossip Router."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:1976
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<PING gossip_host=\"localhost\"\n"
+" gossip_port=\"1234\"\n"
+" timeout=\"3000\" \n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1981
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>PING</literal> element are listed "
+"below."
+msgstr "下列是 <literal>PING</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1984
+#: Clustering_Guide_Introduction.xml:2032
+#: Clustering_Guide_Introduction.xml:2061
+#: Clustering_Guide_Introduction.xml:2095
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the maximum number of "
+"milliseconds to wait for any responses. The default is 3000."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定等待应答的最长时间(毫秒数)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1988
+#: Clustering_Guide_Introduction.xml:2036
+#: Clustering_Guide_Introduction.xml:2065
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> specifies the maximum "
+"number of responses to wait for unless timeout has expired. The default is 2."
+msgstr ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> 指定等待的最大的应答数"
+"量。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1992
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_host</emphasis> specifies the host on which "
+"the GossipRouter is running."
+msgstr ""
+"<emphasis role=\"bold\">gossip_host</emphasis> 指定 GossipRouter 在哪个主机上"
+"运行。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:1996
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_port</emphasis> specifies the port on which "
+"the GossipRouter is listening on."
+msgstr ""
+"<emphasis role=\"bold\">gossip_port</emphasis> 指定 GossipRouter 所侦听的端"
+"口。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2000
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_refresh</emphasis> specifies the interval (in "
+"milliseconds) for the lease from the GossipRouter. The default is 20000."
+msgstr ""
+"<emphasis role=\"bold\">gossip_refresh</emphasis> 指定 GossipRouter 的租约"
+"(lease)的时间间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2004
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>), which are "
+"pinged for discovery."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个用逗号隔开的地址列表"
+"(如:<literal>host1[12345],host2[23456]</literal>),群集系统会 ping 这个列"
+"表来进行探索(discovery)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2009
+#, no-c-format
+msgid ""
+"If both <literal>gossip_host</literal> and <literal>gossip_port</literal> "
+"are defined, the cluster uses the GossipRouter for the initial discovery. If "
+"the <literal>initial_hosts</literal> is specified, the cluster pings that "
+"static list of addresses for discovery. Otherwise, the cluster uses IP "
+"multicasting for discovery."
+msgstr ""
+"如果<literal>gossip_host</literal> 和 <literal>gossip_port</literal> 都被定义"
+"了,群集系统会使用 GossipRouter 作初始探索(initial discovery)。如果指定了 "
+"<literal>initial_hosts</literal>,群集系统会 ping 这个静态地址列表来进行探"
+"索。否则,群集系统用 IP 多点传送来进行探索。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2014
+#, no-c-format
+msgid ""
+"The discovery phase returns when the <literal>timeout</literal> ms have "
+"elapsed or the <literal>num_initial_members</literal> responses have been "
+"received."
+msgstr ""
+"当已经过了 <literal>timeout</literal> 毫秒后或者已经接收到 "
+"<literal>num_initial_members</literal> 应答后,探索阶段就会返回。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2022
+#, no-c-format
+msgid "TCPGOSSIP"
+msgstr "TCPGOSSIP"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2023
+#, no-c-format
+msgid ""
+"The TCPGOSSIP protocol only works with a GossipRouter. It works essentially "
+"the same way as the PING protocol configuration with valid "
+"<literal>gossip_host</literal> and <literal>gossip_port</literal> "
+"attributes. It works on top of both UDP and TCP transport protocols. Here is "
+"an example."
+msgstr ""
+"TCPGOSSIP 协议只用于 GossipRouter。它和 PING 协议配置基本上一样,有着有效的 "
+"<literal>gossip_host</literal> 和 <literal>gossip_port</literal> 属性。它处"
+"于 UDP 和 TCP 协议的上面。下面是一个例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2026
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<TCPGOSSIP timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[12000],192.168.0.2[12000]\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+"<PING timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[12000],192.168.0.2[12000]\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2029
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TCPGOSSIP</literal> element are "
+"listed below."
+msgstr "下列是 <literal>TCPGOSSIP</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2040
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>) for "
+"GossipRouters to register with."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个 GossipRouters 用来注"
+"册的用逗号隔开的地址列表(如:<literal>host1[12345],host2[23456]</"
+"literal>)。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2050
+#, no-c-format
+msgid "TCPPING"
+msgstr "TCPPING"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2051
+#, no-c-format
+msgid ""
+"The TCPPING protocol takes a set of known members and ping them for "
+"discovery. This is essentially a static configuration. It works on top of "
+"TCP. Here is an example of the <literal>TCPPING</literal> configuration "
+"element in the JGroups <literal>Config</literal> element."
+msgstr ""
+"TCPPING 协议使用一套知名成员并 ping 它们来进行探索。它基本上是一个静态的配"
+"置。它工作于 TCP 协议的上面。这里是一个 JGroups <literal>Config</literal> 元"
+"素里的 <literal>TCPPING</literal> 配置元素的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2055
+#, fuzzy, no-c-format
+msgid ""
+"<TCPPING timeout=\"2000\"\n"
+" initial_hosts=\"hosta[2300],hostb[3400],hostc[4500]\"\n"
+" port_range=\"3\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<TCPPING timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[7800],192.168.0.2[7800]\"\n"
+" port_range=\"2\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2058
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TCPPING</literal> element are "
+"listed below."
+msgstr "下列是 <literal>TCPPING</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2069
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>) for "
+"pinging."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个用来 pinging 的用逗号"
+"隔开的地址列表(如:<literal>host1[12345],host2[23456]</literal>)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2073
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">port_range</emphasis> specifies the number of "
+"consecutive ports to be probed when getting the initial membership, starting "
+"with the port specified in the initial_hosts parameter. Given the current "
+"values of port_range and initial_hosts above, the TCPPING layer will try to "
+"connect to hosta:2300, hosta:2301, hosta:2302, hostb:3400, hostb:3401, "
+"hostb:3402, hostc:4500, hostc:4501, hostc:4502. The configuration options "
+"allows for multiple nodes on the same host to be pinged."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2084
+#, no-c-format
+msgid "MPING"
+msgstr "MPING"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2085
+#, no-c-format
+msgid ""
+"MPING uses IP multicast to discover the initial membership. It can be used "
+"with all transports, but usually this is used in combination with TCP. TCP "
+"usually requires TCPPING, which has to list all group members explicitly, "
+"but MPING doesn't have this requirement. The typical use case for this is "
+"when we want TCP as transport, but multicasting for discovery so we don't "
+"have to define a static list of initial hosts in TCPPING or require external "
+"Gossip Router."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2089
+#, fuzzy, no-c-format
+msgid ""
+"<MPING timeout=\"2000\"\n"
+" bind_to_all_interfaces=\"true\"\n"
+" mcast_addr=\"228.8.8.8\"\n"
+" mcast_port=\"7500\"\n"
+" ip_ttl=\"8\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<MPING timeout=\"2000\"\n"
+" bind_to_all_interfaces=\"true\"\n"
+" mcast_addr=\"228.8.8.8\"\n"
+" mcast_port=\"7500\"\n"
+" ip_ttl=\"8\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2092
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>MPING</literal> element are listed "
+"below."
+msgstr "下列是 <literal>MPING</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2099
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> specifies the maximum "
+"number of responses to wait for unless timeout has expired. The default is "
+"2.."
+msgstr ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> 指定等待的最大的应答数"
+"量。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2103
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface on "
+"which to send and receive multicast packets."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定在哪个接口上发送和接收多点传"
+"送数据包。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2107
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> overrides the "
+"<literal>bind_addr</literal> and uses all interfaces in multihome nodes."
+msgstr ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> 覆盖了 "
+"<literal>bind_addr</literal> 并使用多宿主节点上的所有接口。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2111
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_addr, mcast_port, ip_ttl</emphasis> attributes "
+"are the same as related attributes in the UDP protocol configuration."
+msgstr ""
+"<emphasis role=\"bold\">mcast_addr,mcast_port,ip_ttl</emphasis> 属性和 UDP "
+"协议配置的相关属性相同。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2121
+#, no-c-format
+msgid "Failure Detection Protocols"
+msgstr "故障检测协议(Failure Detection Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2122
+#, fuzzy, no-c-format
+msgid ""
+"The failure detection protocols are used to detect failed nodes. Once a "
+"failed node is detected, a suspect verification phase can occur after which, "
+"if the node is still considered dead, the cluster updates its view so that "
+"the load balancer and client interceptors know to avoid the dead node. The "
+"failure detection protocols are configured as sub-elements in the JGroups "
+"MBean <literal>Config</literal> element."
+msgstr ""
+"故障检测协议(failure detection protocols)用来检测发生故障的节点。一旦检测到"
+"了一个发生故障的节点,群集系统会更新它的视图,使负载平衡系统(load balancer)"
+"和客户拦截器(client interceptors)避开死节点。故障检测协议被配置为 JGroups "
+"MBean <literal>Config</literal> 元素里的子元素。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2128
+#, no-c-format
+msgid "<title>FD</title>"
+msgstr "<title>FD</title>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2129
+#, fuzzy, no-c-format
+msgid ""
+"FD is a failure detection protocol based on heartbeat messages. This "
+"protocol requires each node to periodically send are-you-alive messages to "
+"its neighbour. If the neighbour fails to respond, the calling node sends a "
+"SUSPECT message to the cluster. The current group coordinator can optionally "
+"double check whether the suspected node is indeed dead after which, if the "
+"node is still considered dead, updates the cluster's view. Here is an "
+"example FD configuration."
+msgstr ""
+"FD 发现协议(FD discovery protocol)要求每个节点定期地发送 are-you-alive 信息"
+"给它的邻居节点。如果这个邻居没有应答,呼叫节点将给群集系统发送一个 SUSPECT 信"
+"息。当前的 group coordinator 会复核这个可能有问题的节点是否真的已经崩溃了,并"
+"更新群集系统的视图。这里是一个 FD 配置的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2133
+#, fuzzy, no-c-format
+msgid ""
+"<FD timeout=\"2000\"\n"
+" max_tries=\"3\"\n"
+" shun=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<FD timeout=\"2000\"\n"
+" max_tries=\"3\"\n"
+" shun=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2136
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>FD</literal> element are listed "
+"below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2139
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the maximum number of "
+"milliseconds to wait for the responses to the are-you-alive messages. The "
+"default is 3000."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定对 are-you-alive 信息的应答的"
+"最长等待时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2143
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_tries</emphasis> specifies the number of missed "
+"are-you-alive messages from a node before the node is suspected. The default "
+"is 2."
+msgstr ""
+"<emphasis role=\"bold\">max_tries</emphasis> 指定在一个节点被怀疑为崩溃前,所"
+"丢失的 are-you-alive 信息的次数。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2147
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">shun</emphasis> specifies whether a failed node will "
+"be shunned. Once shunned, the node will be expelled from the cluster even if "
+"it comes back later. The shunned node would have to re-join the cluster "
+"through the discovery process. JGroups allows to configure itself such that "
+"shunning leads to automatic rejoins and state transfer, which is the default "
+"behaivour within JBoss Application Server."
+msgstr ""
+"<emphasis role=\"bold\">shun</emphasis> 指定崩溃的节点是否该被剔除"
+"(shunned)。一旦被剔除,这个节点将从群集里开除,即使之后它又恢复了。被剔除的"
+"节点可以通过探索过程(discovery process)重新加入到群集系统里来。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2153
+#, no-c-format
+msgid ""
+"Regular traffic from a node counts as if it is a live. So, the are-you-alive "
+"messages are only sent when there is no regular traffic to the node for "
+"sometime."
+msgstr ""
+"从某个节点的有规律的网络流量可以判定它是否正常工作。所以,are-you-alive 信息"
+"只是在节点有一段时间没有有规律的网络流量时才发送。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2162
+#, no-c-format
+msgid "FD_SOCK"
+msgstr "FD_SOCK"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2163
+#, no-c-format
+msgid ""
+"FD_SOCK is a failure detection protocol based on a ring of TCP sockets "
+"created between group members. Each member in a group connects to its "
+"neighbor (last member connects to first) thus forming a ring. Member B is "
+"suspected when its neighbor A detects abnormally closed TCP socket "
+"(presumably due to a node B crash). However, if a member B is about to leave "
+"gracefully, it lets its neighbor A know, so that it does not become "
+"suspected. The simplest FD_SOCK configuration does not take any attribute. "
+"You can just declare an empty <literal>FD_SOCK</literal> element in "
+"JGroups's <literal>Config</literal> element."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2167
+#, fuzzy, no-c-format
+msgid "<FD_SOCK_down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.STATE_TRANSFER \n"
+" down_thread=\"false\"\n"
+" up_thread=\"false\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2169
+#, fuzzy, no-c-format
+msgid ""
+"There available attributes in the <literal>FD_SOCK</literal> element are "
+"listed below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2172
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface to "
+"which the server socket should bind to. If -Djgroups.bind_address system "
+"property is defined, XML value will be ignore. This behaivour can be "
+"reversed setting -Djgroups.ignore.bind_addr=true system property."
+msgstr ""
+"<emphasis role=\"bold\">srv_sock_bind_addr</emphasis> 指定服务器套接字应该绑"
+"定的接口。如果它被忽略,服务器启动时命令行里的 <literal>-D bind.address</"
+"literal> 属性将被使用。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2180
+#, no-c-format
+msgid "VERIFY_SUSPECT"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2181
+#, no-c-format
+msgid ""
+"This protocol verifies whether a suspected member is really dead by pinging "
+"that member once again. This verification is performed by the coordinator of "
+"the cluster. The suspected member is dropped from the cluster group if "
+"confirmed to be dead. The aim of this protocol is to minimize false "
+"suspicions. Here's an example."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2185
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<VERIFY_SUSPECT timeout=\"1500\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2187
+#, fuzzy, no-c-format
+msgid "The available attributes in the FD_SOCK element are listed below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2192
+#, no-c-format
+msgid ""
+"timeout specifies how long to wait for a response from the suspected member "
+"before considering it dead."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2203
+#, no-c-format
+msgid "FD versus FD_SOCK"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2204
+#, no-c-format
+msgid ""
+"FD and FD_SOCK, each taken individually, do not provide a solid failure "
+"detection layer. Let's look at the the differences between these failure "
+"detection protocols to understand how they complement each other:"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_Introduction.xml:2208
+#, no-c-format
+msgid "<emphasis>FD</emphasis>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2213
+#, no-c-format
+msgid "An overloaded machine might be slow in sending are-you-alive responses."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2218
+#, no-c-format
+msgid "A member will be suspected when suspended in a debugger/profiler."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2223
+#, no-c-format
+msgid ""
+"Low timeouts lead to higher probability of false suspicions and higher "
+"network traffic."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2228
+#, no-c-format
+msgid "High timeouts will not detect and remove crashed members for some time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2235
+#, no-c-format
+msgid "<emphasis>FD_SOCK</emphasis>:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2241
+#, no-c-format
+msgid ""
+"Suspended in a debugger is no problem because the TCP connection is still "
+"open."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2246
+#, no-c-format
+msgid "High load no problem either for the same reason."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2251
+#, no-c-format
+msgid "Members will only be suspected when TCP connection breaks"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2260
+#, no-c-format
+msgid "So hung members will not be detected."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2265
+#, no-c-format
+msgid ""
+"Also, a crashed switch will not be detected until the connection runs into "
+"the TCP timeout (between 2-20 minutes, depending on TCP/IP stack "
+"implementation)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2272
+#, no-c-format
+msgid ""
+"The aim of a failure detection layer is to report real failures and "
+"therefore avoid false suspicions. There are two solutions:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2277
+#, no-c-format
+msgid ""
+"By default, JGroups configures the FD_SOCK socket with KEEP_ALIVE, which "
+"means that TCP sends a heartbeat on socket on which no traffic has been "
+"received in 2 hours. If a host crashed (or an intermediate switch or router "
+"crashed) without closing the TCP connection properly, we would detect this "
+"after 2 hours (plus a few minutes). This is of course better than never "
+"closing the connection (if KEEP_ALIVE is off), but may not be of much help. "
+"So, the first solution would be to lower the timeout value for KEEP_ALIVE. "
+"This can only be done for the entire kernel in most operating systems, so if "
+"this is lowered to 15 minutes, this will affect all TCP sockets."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2282
+#, no-c-format
+msgid ""
+"The second solution is to combine FD_SOCK and FD; the timeout in FD can be "
+"set such that it is much lower than the TCP timeout, and this can be "
+"configured individually per process. FD_SOCK will already generate a suspect "
+"message if the socket was closed abnormally. However, in the case of a "
+"crashed switch or host, FD will make sure the socket is eventually closed "
+"and the suspect message generated. Example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2287
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<FD_SOCK down_thread=\"false\" up_thread=\"false\"/>\n"
+"<FD timeout=\"10000\" max_tries=\"5\" shun=\"true\" \n"
+"down_thread=\"false\" up_thread=\"false\" /> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2289
+#, no-c-format
+msgid ""
+"This suspects a member when the socket to the neighbor has been closed "
+"abonormally (e.g. process crash, because the OS closes all sockets). "
+"However, f a host or switch crashes, then the sockets won't be closed, "
+"therefore, as a seond line of defense, FD will suspect the neighbor after 50 "
+"seconds. Note that with this example, if you have your system stopped in a "
+"breakpoint in the debugger, the node you're debugging will be suspected "
+"after ca 50 seconds."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2292
+#, no-c-format
+msgid ""
+"A combination of FD and FD_SOCK provides a solid failure detection layer and "
+"for this reason, such technique is used accross JGroups configurations "
+"included within JBoss Application Server."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2301
+#, no-c-format
+msgid "Reliable Delivery Protocols"
+msgstr "可靠传输协议(Reliable Delivery Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2302
+#, fuzzy, no-c-format
+msgid ""
+"Reliable delivery protocols within the JGroups stack ensure that data "
+"pockets are actually delivered in the right order (FIFO) to the destination "
+"node. The basis for reliable message delivery is positive and negative "
+"delivery acknowledgments (ACK and NAK). In the ACK mode, the sender resends "
+"the message until the acknowledgment is received from the receiver. In the "
+"NAK mode, the receiver requests retransmission when it discovers a gap."
+msgstr ""
+"JGroups 栈里的可靠传输协议(reliable delivery protocols)确保数据包按正确的顺"
+"序(FIFO)正确地递送到目的节点。可靠的信息递送的基础是肯定和否定的递送确认"
+"(delivery acknowledgments)(ACK 和 NAK)。在 ACK 模式下,发送者重新发送信息"
+"直到收到接收者的确认。在 NAK 模式下,当接收者发现一个间断时,它会请求重新传"
+"送。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2309
+#, no-c-format
+msgid "UNICAST"
+msgstr "UNICAST"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2310
+#, fuzzy, no-c-format
+msgid ""
+"The UNICAST protocol is used for unicast messages. It uses ACK. It is "
+"configured as a sub-element under the JGroups Config element. If the JGroups "
+"stack is configured with TCP transport protocol, UNICAST is not necessary "
+"because TCP itself guarantees FIFO delivery of unicast messages. Here is an "
+"example configuration for the <literal>UNICAST</literal> protocol."
+msgstr ""
+"UNICAST 协议用于单播信息。它使用 ACK。它被配置成 JGroups <literal>Config</"
+"literal> 元素下的一个子元素。这里有一个配置 <literal>UNICAST</literal> 协议的"
+"例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2313
+#, fuzzy, no-c-format
+msgid ""
+"<UNICAST timeout=\"100,200,400,800\"\n"
+"down_thread=\"false\" up_thread=\"false\"/>"
+msgstr "<UNICAST timeout=\"100,200,400,800\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2315
+#, no-c-format
+msgid ""
+"There is only one configurable attribute in the <literal>UNICAST</literal> "
+"element."
+msgstr "<literal>UNICAST</literal> 元素里只有一个可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2318
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the retransmission "
+"timeout (in milliseconds). For instance, if the timeout is \"100,200,400,800"
+"\", the sender resends the message if it hasn't received an ACK after 100 ms "
+"the first time, and the second time it waits for 200 ms before resending, "
+"and so on."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定重新传送的超时时间(毫秒数)。"
+"例如,如果这个超时时间是 \"100,200,400,800\",如果发送者在 100 毫秒后还没有接"
+"到 ACK,它会重新发送信息,第二此重发会在 200 毫秒后,以此类推。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2328
+#, no-c-format
+msgid "NAKACK"
+msgstr "NAKACK"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2329
+#, no-c-format
+msgid ""
+"The NAKACK protocol is used for multicast messages. It uses NAK. Under this "
+"protocol, each message is tagged with a sequence number. The receiver keeps "
+"track of the sequence numbers and deliver the messages in order. When a gap "
+"in the sequence number is detected, the receiver asks the sender to "
+"retransmit the missing message. The NAKACK protocol is configured as the "
+"<literal>pbcast.NAKACK</literal> sub-element under the JGroups "
+"<literal>Config</literal> element. Here is an example configuration."
+msgstr ""
+"NAKACK 协议用于多点传送信息。它使用 NAK。在这个协议下,每个信息用一个序列号标"
+"识。接收者根据这个序列号来按顺序递送信息。当检测到序列号存在一个间断时,接收"
+"者会要求发送者重新传送丢失的信息。NAKACK 协议被配置为 JGroups "
+"<literal>Config</literal> 元素下的 <literal>pbcast.NAKACK</literal> 子元素。"
+"这里有一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2336
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.NAKACK max_xmit_size=\"60000\" use_mcast_xmit=\"false\" \n"
+" \n"
+" retransmit_timeout=\"300,600,1200,2400,4800\" gc_lag=\"0\"\n"
+" discard_delivered_msgs=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.NAKACK\n"
+" max_xmit_size=\"8192\"\n"
+" use_mcast_xmit=\"true\" \n"
+" retransmit_timeout=\"600,1200,2400,4800\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2339
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.NAKACK</literal> element "
+"are as follows."
+msgstr "下列是 <literal>pbcast.NAKACK</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2342
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">retransmit_timeout</emphasis> specifies the "
+"retransmission timeout (in milliseconds). It is the same as the "
+"<literal>timeout</literal> attribute in the UNICAST protocol."
+msgstr ""
+"<emphasis role=\"bold\">retransmit_timeout</emphasis> 指定重发的超时时间(毫"
+"秒数)。它和 UNICAST 协议里的 <literal>timeout</literal> 属性是一样的。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2347
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_mcast_xmit</emphasis> determines whether the "
+"sender should send the retransmission to the entire cluster rather than just "
+"the node requesting it. This is useful when the sender drops the pocket -- "
+"so we do not need to retransmit for each node."
+msgstr ""
+"<emphasis role=\"bold\">use_mcast_xmit</emphasis> 决定发送者是否应该重发给整"
+"个群集而不只是请求的节点。这在发送者取消数据包时很有用 - 我们不需要对每个节点"
+"都重发。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2353
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_xmit_size</emphasis> specifies maximum size for "
+"a bundled retransmission, if multiple packets are reported missing."
+msgstr ""
+"<emphasis role=\"bold\">max_xmit_size</emphasis> 指定当多个数据包丢失时,捆绑"
+"在一起的重发的最大规模。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2357
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">discard_delivered_msgs</emphasis> specifies whether "
+"to discard delivery messages on the receiver nodes. By default, we save all "
+"delivered messages. However, if we only ask the sender to resend their "
+"messages, we can enable this option and discard delivered messages."
+msgstr ""
+"<emphasis role=\"bold\">discard_delivered_msgs</emphasis> 指定是否丢弃接收节"
+"点上的递送信息。在缺省情况下,我们保存所有的递送的信息。然而,如果我们只需要"
+"发送者重发信息,我们就可以启用这个选项来丢弃递送的信息。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2364
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gc_lag specifies</emphasis> the number of messages "
+"garbage collection lags behind."
+msgstr ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>:用来接受客户联接的线程的"
+"数量。它的缺省值是 1。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2375
+#, no-c-format
+msgid "Other Configuration Options"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2376
+#, no-c-format
+msgid ""
+"In addition to the protocol stacks, you can also configure JGroups network "
+"services in the <literal>Config</literal> element."
+msgstr ""
+"除了协议栈以外,你也可以在 <literal>Config</literal> 元素里配置 JGroups 网络"
+"服务。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2380
+#, no-c-format
+msgid "Group Membership"
+msgstr "组成员资格(Group Membership)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2381
+#, no-c-format
+msgid ""
+"The group membership service in the JGroups stack maintains a list of active "
+"nodes. It handles the requests to join and leave the cluster. It also "
+"handles the SUSPECT messages sent by failure detection protocols. All nodes "
+"in the cluster, as well as the load balancer and client side interceptors, "
+"are notified if the group membership changes. The group membership service "
+"is configured in the <literal>pbcast.GMS</literal> sub-element under the "
+"JGroups <literal>Config</literal> element. Here is an example configuration."
+msgstr ""
+"JGroups 栈里的组成员资格(group membership)服务维护一个活动节点的列表。它处"
+"理加入和离开群集系统的请求。它也处理故障检测协议(failure detection "
+"protocols)发送的 SUSPECT 信息。当组成员资格有变动时,它通知群集系统里的所有"
+"节点,负载平衡系统(load balancer)和客户端拦截器(client side "
+"interceptors)。组成员资格(group membership)服务可以在 JGroups "
+"<literal>Config</literal> 元素下的 <literal>pbcast.GMS</literal> 子元素里配"
+"置。这里是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2387
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.GMS print_local_addr=\"true\"\n"
+" join_timeout=\"3000\"\n"
+" down_thread=\"false\" up_thread=\"false\"\n"
+" join_retry_timeout=\"2000\"\n"
+" shun=\"true\"\n"
+" view_bundling=\"true\"/>"
+msgstr ""
+"<pbcast.GMS print_local_addr=\"true\"\n"
+" join_timeout=\"3000\"\n"
+" down_thread=\"false\" \n"
+" join_retry_timeout=\"2000\"\n"
+" shun=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2391
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.GMS</literal> element are "
+"as follows."
+msgstr "下列是 <literal>pbcast.GMS</literal> 元素里的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2394
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">join_timeout</emphasis> specifies the maximum number "
+"of milliseconds to wait for a new node JOIN request to succeed. Retry "
+"afterwards."
+msgstr ""
+"<emphasis role=\"bold\">join_timeout</emphasis> 指定了等待新节点 JOIN 请求成"
+"功的最长时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2398
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">join_retry_timeout</emphasis> specifies the maximum "
+"number of milliseconds to wait after a failed JOIN to re-submit it."
+msgstr ""
+"<emphasis role=\"bold\">join_retry_timeout</emphasis> 指定 JOIN 失败后重新递"
+"交前所等待的时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2402
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">print_local_addr</emphasis> specifies whether to "
+"dump the node's own address to the output when started."
+msgstr ""
+"<emphasis role=\"bold\">print_local_addr</emphasis> 指定是否在启动时输出节点"
+"自己的地址。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2406
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">shun</emphasis> specifies whether a node should shun "
+"itself if it receives a cluster view that it is not a member node."
+msgstr ""
+"<emphasis role=\"bold\">shun</emphasis> 指定如果收到指明自己并非成员节点的群"
+"集视图,节点是否剔除(shun)自己。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2410
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">disable_initial_coord</emphasis> specifies whether "
+"to prevent this node as the cluster coordinator."
+msgstr ""
+"<emphasis role=\"bold\">disable_initial_coord</emphasis> 指定是否阻止这个节点"
+"成为群集控制点(cluster coordinator)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2414
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">view_bundling</emphasis> specifies whether multiple "
+"JOIN or LEAVE request arriving at the same time are bundled and handled "
+"together at the same time, only sending out 1 new view / bundle. This is is "
+"more efficient than handling each request separately."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2423
+#, no-c-format
+msgid "Flow Control"
+msgstr "流量控制(Flow Control)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2424
+#, no-c-format
+msgid ""
+"The flow control service tries to adapt the sending data rate and the "
+"receiving data among nodes. If a sender node is too fast, it might overwhelm "
+"the receiver node and result in dropped packets that have to be "
+"retransmitted. In JGroups, the flow control is implemented via a credit-"
+"based system. The sender and receiver nodes have the same number of credits "
+"(bytes) to start with. The sender subtracts credits by the number of bytes "
+"in messages it sends. The receiver accumulates credits for the bytes in the "
+"messages it receives. When the sender's credit drops to a threshold, the "
+"receivers sends some credit to the sender. If the sender's credit is used "
+"up, the sender blocks until it receives credits from the receiver. The flow "
+"control service is configured in the <literal>FC</literal> sub-element under "
+"the JGroups <literal>Config</literal> element. Here is an example "
+"configuration."
+msgstr ""
+"流量控制(flow control)服务试图在节点间控制发送和接收数据传输率。如果一个节"
+"点发送的过快,它可能会使接收节点难以负荷,导致数据包的丢失而且不得不重新发"
+"送。在 JGroups 里,流量控制通过基于信用值(credit-based)的系统来实现。发送和"
+"接收节点具有相同的初始信用值(credits)(字节数)。发送者减去所发送信息的字节"
+"数,而接收者积累它接收到的信息的字节数。当发送者的信用值减少至某一极限时,接"
+"收者将把一些信用值发送给发送者。如果发送者的信用值被用光了,发送者将暂停,直"
+"到它收到接收者的信用值为止。流量控制服务在 JGroups <literal>Config</literal> "
+"元素下的 <literal>FC</literal> 子元素里配置。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2435
+#, fuzzy, no-c-format
+msgid ""
+"<FC max_credits=\"1000000\"\n"
+"down_thread=\"false\" up_thread=\"false\" \n"
+" min_threshold=\"0.10\"/>"
+msgstr ""
+"<FC max_credits=\"1000000\"\n"
+" down_thread=\"false\" \n"
+" min_threshold=\"0.10\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2438
+#: Clustering_Guide_Introduction.xml:2539
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>FC</literal> element are as "
+"follows."
+msgstr "下列是 <literal>FC</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2441
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_credits</emphasis> specifies the maximum number "
+"of credits (in bytes). This value should be smaller than the JVM heap size."
+msgstr ""
+"<emphasis role=\"bold\">max_credits</emphasis> 指定最大的信用值(字节数)。这"
+"个值应该小于 JVM 的 heap size。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2445
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_credits</emphasis> specifies the threshold "
+"credit on the sender, below which the receiver should send in more credits."
+msgstr ""
+"<emphasis role=\"bold\">min_credits</emphasis> 指定发送者的极限信用值,如果低"
+"于这个值,接收者就应该发送更多的信用值给发送者。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2449
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_threshold</emphasis> specifies percentage value "
+"of the threshold. It overrides the <literal>min_credits</literal> attribute."
+msgstr ""
+"<emphasis role=\"bold\">min_threshold</emphasis> 指定极限值的百分比。它可以覆"
+"盖 <literal>min_credits</literal> 属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2455
+#, no-c-format
+msgid ""
+"Applications that use synchronous group RPC calls primarily do not require "
+"FC protocol in their JGroups protocol stack because synchronous "
+"communication, where the hread that makes the call blocks waiting for "
+"responses from all the members of the group, already slows overall rate of "
+"calls. Even though TCP provides flow control by itself, FC is still required "
+"in TCP based JGroups stacks because of group communication, where we "
+"essentially have to send group messages at the highest speed the slowest "
+"receiver can keep up with. TCP flow control only takes into account "
+"individual node communications and has not a notion of who's the slowest in "
+"the group, which is why FC is required."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2464
+#, no-c-format
+msgid "Fragmentation"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2465
+#, no-c-format
+msgid ""
+"This protocol fragments messages larger than certain size. Unfragments at "
+"the receiver's side. It works for both unicast and multicast messages. It is "
+"configured in the FRAG2 sub-element under the JGroups Config element. Here "
+"is an example configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2468
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <FRAG2 frag_size=\"60000\" down_thread=\"false\" up_thread="
+"\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2470
+#, fuzzy, no-c-format
+msgid "The configurable attributes in the FRAG2 element are as follows."
+msgstr "下列是 <literal>FC</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2475
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">frag_size</emphasis> specifies the max frag size in "
+"bytes. Messages larger than that are fragmented."
+msgstr ""
+"<emphasis role=\"bold\">max_credits</emphasis> 指定最大的信用值(字节数)。这"
+"个值应该小于 JVM 的 heap size。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2479
+#, no-c-format
+msgid ""
+"TCP protocol already provides fragmentation but a fragmentation JGroups "
+"protocol is still needed if FC is used. The reason for this is that if you "
+"send a message larger than FC.max_bytes, FC protocol would block. So, "
+"frag_size within FRAG2 needs to be set to always be less than FC.max_bytes."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2490
+#, no-c-format
+msgid "State Transfer"
+msgstr "状态传输(State Transfer)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2491
+#, no-c-format
+msgid ""
+"The state transfer service transfers the state from an existing node (i.e., "
+"the cluster coordinator) to a newly joining node. It is configured in the "
+"<literal>pbcast.STATE_TRANSFER</literal> sub-element under the JGroups "
+"<literal>Config</literal> element. It does not have any configurable "
+"attribute. Here is an example configuration."
+msgstr ""
+"状态传输服务(state transfer service)把状态从一个现存的节点(就是群集控制"
+"点)传输到新加入的节点上。它可以在 JGroups <literal>Config</literal> 元素下"
+"的 <literal>pbcast.STATE_TRANSFER</literal> 子元素里配置。它没有任何可配置属"
+"性。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2495
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.STATE_TRANSFER down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.STATE_TRANSFER \n"
+" down_thread=\"false\"\n"
+" up_thread=\"false\"/>"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2502
+#, no-c-format
+msgid "Distributed Garbage Collection"
+msgstr "分布式垃圾收集(Distributed Garbage Collection)"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2503
+#, no-c-format
+msgid ""
+"In a JGroups cluster, all nodes have to store all messages received for "
+"potential retransmission in case of a failure. However, if we store all "
+"messages forever, we will run out of memory. So, the distributed garbage "
+"collection service in JGroups periodically purges messages that have seen by "
+"all nodes from the memory in each node. The distributed garbage collection "
+"service is configured in the <literal>pbcast.STABLE</literal> sub-element "
+"under the JGroups <literal>Config</literal> element. Here is an example "
+"configuration."
+msgstr ""
+"在 JGroups 群集系统里,在失败的情况下,所有的节点都得保存所有接收到的信息,用"
+"于可能发生的重新传送。然而,如果我们一直保存这些信息,就会用光所有的内存。所"
+"以,JGroups 的分布式垃圾收集(distributed garbage collection )服务定期地从每"
+"个节点的内存里清理所有节点都已经看过的信息。我们在 JGroups <literal>Config</"
+"literal> 元素下的 <literal>pbcast.STABLE</literal> 子元素里配置分布式垃圾收集"
+"(distributed garbage collection )服务。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2507
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.STABLE stability_delay=\"1000\"\n"
+" desired_avg_gossip=\"5000\" \n"
+" down_thread=\"false\" up_thread=\"false\"\n"
+" max_bytes=\"400000\"/>"
+msgstr ""
+"<pbcast.STABLE stability_delay=\"1000\"\n"
+" desired_avg_gossip=\"5000\" \n"
+" down_thread=\"false\"\n"
+" max_bytes=\"250000\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2509
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.STABLE</literal> element "
+"are as follows."
+msgstr "下列是 <literal>pbcast.STABLE</literal> 元素里的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2512
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">desired_avg_gossip</emphasis> specifies intervals "
+"(in milliseconds) of garbage collection runs. Value <literal>0</literal> "
+"disables this service."
+msgstr ""
+"<emphasis role=\"bold\">desired_avg_gossip</emphasis> 指定垃圾收集(garbage "
+"collection)服务运行的时间间隔(毫秒数)。它如果为 0,这个服务将不会运行。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2517
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_bytes</emphasis> specifies the maximum number of "
+"bytes received before the cluster triggers a garbage collection run. Value "
+"<literal>0</literal> disables this service."
+msgstr ""
+"<emphasis role=\"bold\">max_bytes</emphasis> 指定了在群集系统触发垃圾收集"
+"(garbage collection)服务之前,能接收的最多字节数。它如果为 0,这个服务将不"
+"会运行。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2522
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">stability_delay</emphasis> specifies delay before we "
+"send STABILITY msg (give others a change to send first). If used together "
+"with max_bytes, this attribute should be set to a small number."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2526
+#, no-c-format
+msgid ""
+"Set the <literal>max_bytes</literal> attribute when you have a high traffic "
+"cluster."
+msgstr "当你有一个大流量的群集系统时,设置 <literal>max_bytes</literal> 属性。"
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2531
+#, no-c-format
+msgid "Merging"
+msgstr "Merging"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2532
+#, no-c-format
+msgid ""
+"When a network error occurs, the cluster might be partitioned into several "
+"different partitions. JGroups has a MERGE service that allows the "
+"coordinators in partitions to communicate with each other and form a single "
+"cluster back again. The flow control service is configured in the "
+"<literal>MERGE2</literal> sub-element under the JGroups <literal>Config</"
+"literal> element. Here is an example configuration."
+msgstr ""
+"当有网络错误发生时,群集系统可能分为己个不同的子分区(partitions)。JGroups "
+"有一个 MERGE 服务,它允许分区里的控制点(coordinators)相互通信且再次组成单一"
+"群集系统。流量控制服务可以在 JGroups <literal>Config</literal> 元素下的 "
+"<literal>MERGE2</literal> 子元素里配置。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2536
+#, fuzzy, no-c-format
+msgid ""
+"<MERGE2 max_interval=\"10000\"\n"
+" min_interval=\"2000\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<MERGE2 max_interval=\"10000\"\n"
+" min_interval=\"2000\"/>"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2542
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_interval</emphasis> specifies the maximum number "
+"of milliseconds to send out a MERGE message."
+msgstr ""
+"<emphasis role=\"bold\">max_interval</emphasis> 指定发送 MERGE 信息的最大时间"
+"间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2546
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_interval</emphasis> specifies the minimum number "
+"of milliseconds to send out a MERGE message."
+msgstr ""
+"<emphasis role=\"bold\">min_interval</emphasis> 指定发送 MERGE 信息的最小时间"
+"间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2550
+#, no-c-format
+msgid ""
+"JGroups chooses a random value between <literal>min_interval</literal> and "
+"<literal>max_interval</literal> to send out the MERGE message."
+msgstr ""
+"JGroups 在 <literal>min_interval</literal> 之间 <literal>max_interval</"
+"literal> 选取一个随机值来发送 MERGE 信息。"
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2553
+#, no-c-format
+msgid ""
+"The cluster states are not merged in a merger. This has to be done by the "
+"application. If <literal>MERGE2</literal> is used in conjunction with "
+"TCPPING, the <literal>initial_hosts</literal> attribute must contain all the "
+"nodes that could potentially be merged back, in order for the merge process "
+"to work properly. Otherwise, the merge process would not merge all the nodes "
+"even though shunning is disabled. Alternatively use MPING, which is commonly "
+"used with TCP to provide multicast member discovery capabilities, instead of "
+"TCPPING to avoid having to specify all the nodes."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2559
+#, no-c-format
+msgid "Binding JGroups Channels to a particular interface"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2560
+#, no-c-format
+msgid ""
+"In the Transport Protocols section above, we briefly touched on how the "
+"interface to which JGroups will bind sockets is configured. Let's get into "
+"this topic in more depth:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2563
+#, no-c-format
+msgid ""
+"First, it's important to understand that the value set in any bind_addr "
+"element in an XML configuration file will be ignored by JGroups if it finds "
+"that system property jgroups.bind_addr (or a deprecated earlier name for the "
+"same thing, <literal>bind.address</literal>) has been set. The system "
+"property trumps XML. If JBoss AS is started with the -b (a.k.a. --host) "
+"switch, the AS will set <literal>jgroups.bind_addr</literal> to the "
+"specified value."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2566
+#, no-c-format
+msgid ""
+"Beginning with AS 4.2.0, for security reasons the JBoss Application Server "
+"binds most services to localhost if -b is not set. The effect of this is "
+"that in most cases users are going to be setting -b and thus jgroups."
+"bind_addr is going to be set and any XML setting will be ignored."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2569
+#, no-c-format
+msgid ""
+"So, what are <emphasis>best practices</emphasis> for managing how JGroups "
+"binds to interfaces?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2574
+#, no-c-format
+msgid ""
+"Binding JGroups to the same interface as other services. Simple, just use -b:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:2576
+#, no-c-format
+msgid "./run.sh -b 192.168.1.100 -c all"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2580
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to one interface, but use a different one "
+"for JGroups: <screen>./run.sh -b 10.0.0.100 -Djgroups."
+"bind_addr=192.168.1.100 -c all</screen> Specifically setting the system "
+"property overrides the -b value. This is a common usage pattern; put client "
+"traffic on one network, with intra-cluster traffic on another."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2588
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to all interfaces. This can be done like "
+"this: <screen>./run.sh -b 0.0.0.0 -c all</screen> However, doing this will "
+"not cause JGroups to bind to all interfaces! Instead , JGroups will bind to "
+"the machine's default interface. See the Transport Protocols section for how "
+"to tell JGroups to receive or send on all interfaces, if that is what you "
+"really want."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2596
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to all interfaces, but specify the "
+"JGroups interface: <screen>./run.sh -b 0.0.0.0 -Djgroups."
+"bind_addr=192.168.1.100 -c all</screen> Again, specifically setting the "
+"system property overrides the -b value."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2604
+#, no-c-format
+msgid "Using different interfaces for different channels:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:2606
+#, no-c-format
+msgid "./run.sh -b 10.0.0.100 -Djgroups.ignore.bind_addr=true -c all"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2611
+#, no-c-format
+msgid ""
+"This setting tells JGroups to ignore the <literal>jgroups.bind_addr</"
+"literal> system property, and instead use whatever is specfied in XML. You "
+"would need to edit the various XML configuration files to set the "
+"<literal>bind_addr</literal> to the desired interfaces."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2616
+#, no-c-format
+msgid "Isolating JGroups Channels"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2617
+#, no-c-format
+msgid ""
+"Within JBoss AS, there are a number of services that independently create "
+"JGroups channels -- 3 different JBoss Cache services (used for HttpSession "
+"replication, EJB3 SFSB replication and EJB3 entity replication) along with "
+"the general purpose clustering service called HAPartition that underlies "
+"most other JBossHA services."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2620
+#, no-c-format
+msgid ""
+"It is critical that these channels only communicate with their intended "
+"peers; not with the channels used by other services and not with channels "
+"for the same service opened on machines not meant to be part of the group. "
+"Nodes improperly communicating with each other is one of the most common "
+"issues users have with JBoss AS clustering."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2623
+#, no-c-format
+msgid ""
+"Whom a JGroups channel will communicate with is defined by its group name, "
+"multicast address, and multicast port, so isolating JGroups channels comes "
+"down to ensuring different channels use different values for the group name, "
+"multicast address and multicast port."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2626
+#, no-c-format
+msgid ""
+"To isolate JGroups channels for different services on the same set of AS "
+"instances from each other, you MUST change the group name and the multicast "
+"port. In other words, each channel must have its own set of values."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2629
+#, no-c-format
+msgid ""
+"For example, say we have a production cluster of 3 machines, each of which "
+"has an HAPartition deployed along with a JBoss Cache used for web session "
+"clustering. The HAPartition channels should not communicate with the JBoss "
+"Cache channels. They should use a different group name and multicast port. "
+"They can use the same multicast address, although they don't need to."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2632
+#, no-c-format
+msgid ""
+"To isolate JGroups channels for the same service from other instances of the "
+"service on the network, you MUST change ALL three values. Each channel must "
+"have its own group name, multicast address, and multicast port."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2635
+#, no-c-format
+msgid ""
+"For example, say we have a production cluster of 3 machines, each of which "
+"has an HAPartition deployed. On the same network there is also a QA cluster "
+"of 3 machines, which also has an HAPartition deployed. The HAPartition group "
+"name, multicast address, and multicast port for the production machines must "
+"be different from those used on the QA machines."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2641
+#, no-c-format
+msgid "Changing the Group Name"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2642
+#, no-c-format
+msgid ""
+"The group name for a JGroups channel is configured via the service that "
+"starts the channel. Unfortunately, different services use different "
+"attribute names for configuring this. For HAPartition and related services "
+"configured in the deploy/cluster-service.xml file, this is configured via a "
+"PartitionName attribute. For JBoss Cache services, the name of the attribute "
+"is ClusterName."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2645
+#, no-c-format
+msgid ""
+"Starting with JBoss AS 4.0.4, for the HAPartition and all the standard JBoss "
+"Cache services, we make it easy for you to create unique groups names simply "
+"by using the -g (a.k.a. –partition) switch when starting JBoss: <screen>./"
+"run.sh -g QAPartition -b 192.168.1.100 -c all</screen> This switch sets the "
+"jboss.partition.name system property, which is used as a component in the "
+"configuration of the group name in all the standard clustering configuration "
+"files. For example,"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:2649
+#, no-c-format
+msgid ""
+"<![CDATA[<attribute name=\"ClusterName\">Tomcat-${jboss.partition.name:"
+"Cluster}</attribute>]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2655
+#, no-c-format
+msgid "Changing the multicast address and port"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2656
+#, no-c-format
+msgid ""
+"The -u (a.k.a. --udp) command line switch may be used to control the "
+"multicast address used by the JGroups channels opened by all standard AS "
+"services. <screen><![CDATA[/run.sh -u 230.1.2.3 -g QAPartition -b "
+"192.168.1.100 -c all]]></screen> This switch sets the jboss.partition."
+"udpGroup system property, which you can see referenced in all of the "
+"standard protocol stack configs in JBoss AS:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2662
+#, no-c-format
+msgid ""
+"<![CDATA[<Config>\n"
+"<UDP mcast_addr=\"${jboss.partition.udpGroup:228.1.2.3}\"\n"
+" ....]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2663
+#, no-c-format
+msgid ""
+"Unfortunately, setting the multicast ports is not so simple. As described "
+"above, by default there are four separate JGroups channels in the standard "
+"JBoss AS all configuration, and each should be given a unique port. There "
+"are no command line switches to set these, but the standard configuration "
+"files do use system properties to set them. So, they can be configured from "
+"the command line by using -D. For example,"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_Introduction.xml:2666
+#, no-c-format
+msgid ""
+"/run.sh -u 230.1.2.3 -g QAPartition -Djboss.hapartition.mcast_port=12345 -"
+"Djboss.webpartition.mcast_port=23456 -Djboss.ejb3entitypartition."
+"mcast_port=34567 -Djboss.ejb3sfsbpartition.mcast_port=45678 -b 192.168.1.100 "
+"-c all"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_Introduction.xml:2668
+#, no-c-format
+msgid "Why isn't it sufficient to change the group name?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2669
+#, no-c-format
+msgid ""
+"If channels with different group names share the same multicast address and "
+"port, the lower level JGroups protocols in each channel will see, process "
+"and eventually discard messages intended for the other group. This will at a "
+"minimum hurt performance and can lead to anomalous behavior."
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_Introduction.xml:2673
+#, no-c-format
+msgid "Why do I need to change the multicast port if I change the address?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2674
+#, no-c-format
+msgid ""
+"It should be sufficient to just change the address, but there is a problem "
+"on several operating systems whereby packets addressed to a particular "
+"multicast port are delivered to all listeners on that port, regardless of "
+"the multicast address they are listening on. So the recommendation is to "
+"change both the address and the port."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2680
+#, no-c-format
+msgid "JGroups Troubleshooting"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_Introduction.xml:2681
+#, no-c-format
+msgid "Nodes do not form a cluster"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2683
+#, no-c-format
+msgid ""
+"Make sure your machine is set up correctly for IP multicast. There are 2 "
+"test programs that can be used to detect this: McastReceiverTest and "
+"McastSenderTest. Go to the <literal>$JBOSS_HOME/server/all/lib</literal> "
+"directory and start McastReceiverTest, for example:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:2685
+#, no-c-format
+msgid ""
+"java -cp jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr "
+"224.10.10.10 -port 5555"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2688
+#, no-c-format
+msgid "Then in another window start <literal>McastSenderTest</literal>:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_Introduction.xml:2690
+#, no-c-format
+msgid ""
+"java -cp jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr "
+"224.10.10.10 -port 5555"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2693
+#, no-c-format
+msgid ""
+"If you want to bind to a specific network interface card (NIC), use "
+"<literal>-bind_addr 192.168.0.2</literal>, where 192.168.0.2 is the IP "
+"address of the NIC to which you want to bind. Use this parameter in both the "
+"sender and the receiver."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2696
+#, no-c-format
+msgid ""
+"You should be able to type in the <literal>McastSenderTest</literal> window "
+"and see the output in the <literal>McastReceiverTest</literal> window. If "
+"not, try to use -ttl 32 in the sender. If this still fails, consult a system "
+"administrator to help you setup IP multicast correctly, and ask the admin to "
+"make sure that multicast will work on the interface you have chosen or, if "
+"the machines have multiple interfaces, ask to be told the correct interface. "
+"Once you know multicast is working properly on each machine in your cluster, "
+"you can repeat the above test to test the network, putting the sender on one "
+"machine and the receiver on another."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_Introduction.xml:2708
+#, no-c-format
+msgid "Causes of missing heartbeats in FD"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2709
+#, no-c-format
+msgid ""
+"Sometimes a member is suspected by FD because a heartbeat ack has not been "
+"received for some time T (defined by timeout and max_tries). This can have "
+"multiple reasons, e.g. in a cluster of A,B,C,D; C can be suspected if (note "
+"that A pings B, B pings C, C pings D and D pings A):"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2715
+#, no-c-format
+msgid ""
+"B or C are running at 100% CPU for more than T seconds. So even if C sends a "
+"heartbeat ack to B, B may not be able to process it because it is at 100%"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2720
+#, no-c-format
+msgid "B or C are garbage collecting, same as above."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2725
+#, no-c-format
+msgid "A combination of the 2 cases above"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2730
+#, no-c-format
+msgid ""
+"The network loses packets. This usually happens when there is a lot of "
+"traffic on the network, and the switch starts dropping packets (usually "
+"broadcasts first, then IP multicasts, TCP packets last)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_Introduction.xml:2735
+#, no-c-format
+msgid ""
+"B or C are processing a callback. Let's say C received a remote method call "
+"over its channel and takes T+1 seconds to process it. During this time, C "
+"will not process any other messages, including heartbeats, and therefore B "
+"will not receive the heartbeat ack and will suspect C."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JBoss_Cache_JGroups.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JBoss_Cache_JGroups.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JBoss_Cache_JGroups.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,2770 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:5
+#, no-c-format
+msgid "JBossCache and JGroups Services"
+msgstr "JBossCache 和 JGroups 服务"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:6
+#, fuzzy, no-c-format
+msgid ""
+"JGroups and JBossCache provide the underlying communication, node "
+"replication and caching services, for JBoss AS clusters. Those services are "
+"configured as MBeans. There is a set of JBossCache and JGroups MBeans for "
+"each type of clustering applications (e.g., the Stateful Session EJBs, HTTP "
+"session replication etc.)."
+msgstr ""
+"JGroups 和 JBossCache 为 JBoss AS 群集提供底层的通信,节点复制和缓存服务。这"
+"些服务都配置成 MBeans。对于每一个类型的群集应用程序(如 Stateful Session "
+"EJBs, distributed entity EJBs 等),都有一个 JBossCache 和 JGroups 的 "
+"MBeans 的集合。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:10
+#, no-c-format
+msgid ""
+"The JBoss AS ships with a reasonable set of default JGroups and JBossCache "
+"MBean configurations. Most applications just work out of the box with the "
+"default MBean configurations. You only need to tweak them when you are "
+"deploying an application that has special network or performance "
+"requirements."
+msgstr ""
+"JBoss AS 带有缺省的 JGroups 和 JBossCache 的配置集。大部分应用程序使用这些缺"
+"省的配置就够了。只是在部署有特殊网络或性能要求的应用程序时,你才需要做更多的"
+"配置。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:15
+#, no-c-format
+msgid "JGroups Configuration"
+msgstr "JGroups Configuration"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:16
+#, no-c-format
+msgid ""
+"The JGroups framework provides services to enable peer-to-peer "
+"communications between nodes in a cluster. It is built on top a stack of "
+"network communication protocols that provide transport, discovery, "
+"reliability and failure detection, and cluster membership management "
+"services. <xref linkend=\"jbosscache-JGroupsStack.fig\"/> shows the protocol "
+"stack in JGroups."
+msgstr ""
+"JGroups 框架提供了启用群集系统里节点间到对点通信的服务。它建立在网络通信协议"
+"栈的顶层,它提供传输,发现(discovery),可靠性(reliability)和故障"
+"(failure)检测,以及群集成员资格管理服务。<xref linkend=\"jbosscache-"
+"JGroupsStack.fig\"/> 展示了 JGroups 的协议栈。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:20
+#, no-c-format
+msgid "Protocol stack in JGroups"
+msgstr "Protocol stack in JGroups"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:27
+#, no-c-format
+msgid ""
+"JGroups configurations often appear as a nested attribute in cluster related "
+"MBean services, such as the <literal>PartitionConfig</literal> attribute in "
+"the <literal>ClusterPartition</literal> MBean or the <literal>ClusterConfig</"
+"literal> attribute in the <literal>TreeCache</literal> MBean. You can "
+"configure the behavior and properties of each protocol in JGroups via those "
+"MBean attributes. Below is an example JGroups configuration in the "
+"<literal>ClusterPartition</literal> MBean."
+msgstr ""
+"JGroups 配置经常以和群集相关的 MBean 服务的嵌套属性的面目出现,例如 "
+"<literal>ClusterPartition</literal> MBean 的<literal>PartitionConfig</"
+"literal> 属性或 <literal>TreeCache</literal> MBean 的 "
+"<literal>ClusterConfig</literal> 属性。你可以通过这些 MBean 属性来配置 "
+"JGroups 每一个协议的行为和属性(properties)。下面是一个 "
+"<literal>ClusterPartition</literal> MBean 里的 JGroups 配置的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:32
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<mbean code=\"org.jboss.ha.framework.server.ClusterPartition\"\n"
+" name=\"jboss:service=${jboss.partition.name:DefaultPartition}\">\n"
+" \n"
+" ... ...\n"
+" \n"
+" <attribute name=\"PartitionConfig\">\n"
+" <Config>\n"
+" \n"
+" <UDP mcast_addr=\"${jboss.partition."
+"udpGroup:228.1.2.3}\" \n"
+" mcast_port=\"${jboss.hapartition."
+"mcast_port:45566}\"\n"
+" tos=\"8\"\n"
+" ucast_recv_buf_size=\"20000000\"\n"
+" ucast_send_buf_size=\"640000\"\n"
+" mcast_recv_buf_size=\"25000000\"\n"
+" mcast_send_buf_size=\"640000\"\n"
+" loopback=\"false\"\n"
+" discard_incompatible_packets=\"true\"\n"
+" enable_bundling=\"false\"\n"
+" max_bundle_size=\"64000\"\n"
+" max_bundle_timeout=\"30\"\n"
+" use_incoming_packet_handler=\"true\"\n"
+" use_outgoing_packet_handler=\"false\"\n"
+" ip_ttl=\"${jgroups.udp.ip_ttl:2}\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>\n"
+" \n"
+" <PING timeout=\"2000\"\n"
+" down_thread=\"false\" up_thread=\"false\" "
+"num_initial_members=\"3\"/>\n"
+" \n"
+" <MERGE2 max_interval=\"100000\"\n"
+" down_thread=\"false\" up_thread=\"false\" "
+"min_interval=\"20000\"/>\n"
+" <FD_SOCK down_thread=\"false\" up_thread=\"false\"/"
+">\n"
+" \n"
+" <FD timeout=\"10000\" max_tries=\"5\" \n"
+" down_thread=\"false\" up_thread=\"false\" shun="
+"\"true\"/>\n"
+" <VERIFY_SUSPECT timeout=\"1500\" down_thread=\"false"
+"\" up_thread=\"false\"/>\n"
+" <pbcast.NAKACK max_xmit_size=\"60000\"\n"
+" use_mcast_xmit=\"false\" gc_lag=\"0"
+"\"\n"
+" retransmit_timeout="
+"\"300,600,1200,2400,4800\"\n"
+" down_thread=\"false\" up_thread="
+"\"false\"\n"
+" discard_delivered_msgs=\"true\"/>\n"
+" <UNICAST timeout=\"300,600,1200,2400,3600\"\n"
+" down_thread=\"false\" up_thread=\"false\"/"
+">\n"
+" <pbcast.STABLE stability_delay=\"1000\" "
+"desired_avg_gossip=\"50000\"\n"
+" down_thread=\"false\" up_thread="
+"\"false\"\n"
+" max_bytes=\"400000\"/>\n"
+" <pbcast.GMS print_local_addr=\"true\" join_timeout="
+"\"3000\"\n"
+" down_thread=\"false\" up_thread=\"false"
+"\"\n"
+" join_retry_timeout=\"2000\" shun=\"true"
+"\"\n"
+" view_bundling=\"true\"/>\n"
+" <FRAG2 frag_size=\"60000\" down_thread=\"false\" "
+"up_thread=\"false\"/>\n"
+" <pbcast.STATE_TRANSFER down_thread=\"false\" \n"
+" up_thread=\"false\" "
+"use_flush=\"false\"/>\n"
+" </Config>\n"
+" </attribute>\n"
+"</mbean> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:33
+#, no-c-format
+msgid ""
+"All the JGroups configuration data is contained in the <Config> "
+"element under the JGroups config MBean attribute. This information is used "
+"to configure a JGroups Channel; the Channel is conceptually similar to a "
+"socket, and manages communication between peers in a cluster. Each element "
+"inside the <Config> element defines a particular JGroups Protocol; "
+"each Protocol performs one function, and the combination of those functions "
+"is what defines the characteristics of the overall Channel. In the next "
+"several sections, we will dig into the commonly used protocols and their "
+"options and explain exactly what they mean."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:38
+#, fuzzy, no-c-format
+msgid "Common Configuration Properties"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:39
+#, no-c-format
+msgid ""
+"The following common properties are exposed by all of the JGroups protocols "
+"discussed below:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:43
+#, no-c-format
+msgid ""
+"<literal>down_thread</literal> whether the protocol should create an "
+"internal queue and a queue processing thread (aka the down_thread) for "
+"messages passed down from higher layers. The higher layer could be another "
+"protocol higher in the stack, or the application itself, if the protocol is "
+"the top one on the stack. If true (the default), when a message is passed "
+"down from a higher layer, the calling thread places the message in the "
+"protocol's queue, and then returns immediately. The protocol's down_thread "
+"is responsible for reading messages off the queue, doing whatever protocol-"
+"specific processing is required, and passing the message on to the next "
+"protocol in the stack."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:47
+#, no-c-format
+msgid ""
+"<literal>up_thread</literal> is conceptually similar to down_thread, but "
+"here the queue and thread are for messages received from lower layers in the "
+"protocol stack."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:51
+#, no-c-format
+msgid ""
+"Generally speaking, <literal>up_thread</literal> and <literal>down_thread</"
+"literal> should be set to false."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:57
+#, no-c-format
+msgid "Transport Protocols"
+msgstr "传输协议"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:58
+#, no-c-format
+msgid ""
+"The transport protocols send messages from one cluster node to another "
+"(unicast) or from cluster node to all other nodes in the cluster (mcast). "
+"JGroups supports UDP, TCP, and TUNNEL as transport protocols."
+msgstr ""
+"传输协议(transport protocols)从一个群集节点发送信息到另外一个节点(单播 "
+"unicast)或发送到群集里所有其他节点(mcast)。JGroups 支持 UDP,TCP 和 "
+"TUNNEL 等传输协议。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:62
+#, no-c-format
+msgid ""
+"The <literal>UDP</literal>, <literal>TCP</literal>, and <literal>TUNNEL</"
+"literal> elements are mutually exclusive. You can only have one transport "
+"protocol in each JGroups <literal>Config</literal> element"
+msgstr ""
+"<literal>UDP</literal>,<literal>TCP</literal> 和 <literal>TUNNEL</literal> "
+"元素是相互排斥的。你只能在每个 JGroups <literal>Config</literal> 元素里使用一"
+"个传输协议。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:67
+#, no-c-format
+msgid "UDP configuration"
+msgstr "UDP 配置"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:68
+#, no-c-format
+msgid ""
+"UDP is the preferred protocol for JGroups. UDP uses multicast or multiple "
+"unicasts to send and receive messages. If you choose UDP as the transport "
+"protocol for your cluster service, you need to configure it in the "
+"<literal>UDP</literal> sub-element in the JGroups <literal>Config</literal> "
+"element. Here is an example."
+msgstr ""
+"UDP 是 JGroups 的首选协议。UDP 使用多点传送(multicast )或多个单播"
+"(unicast)来发送和接收信息。如果你选择 UDP 作为你的群集服务的传输协议,你需"
+"要在 JGroups <literal>Config</literal> 元素的 <literal>UDP</literal> 子元素里"
+"配置它。下面是一个示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:72
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<UDP mcast_addr=\"${jboss.partition.udpGroup:228.1.2.3}\" \n"
+" mcast_port=\"${jboss.hapartition.mcast_port:45566}\"\n"
+" tos=\"8\"\n"
+" ucast_recv_buf_size=\"20000000\"\n"
+" ucast_send_buf_size=\"640000\"\n"
+" mcast_recv_buf_size=\"25000000\"\n"
+" mcast_send_buf_size=\"640000\"\n"
+" loopback=\"false\"\n"
+" discard_incompatible_packets=\"true\"\n"
+" enable_bundling=\"false\"\n"
+" max_bundle_size=\"64000\"\n"
+" max_bundle_timeout=\"30\"\n"
+" use_incoming_packet_handler=\"true\"\n"
+" use_outgoing_packet_handler=\"false\"\n"
+" ip_ttl=\"${jgroups.udp.ip_ttl:2}\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:75
+#, no-c-format
+msgid ""
+"The available attributes in the above JGroups configuration are listed below."
+msgstr "下列是在上述 JGroups 配置里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:78
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> specifies whether or not to use "
+"IP multicasting. The default is <literal>true</literal>. If set to false, it "
+"will send n unicast packets rather than 1 multicast packet. Either way, "
+"packets are UDP datagrams."
+msgstr ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> 指定是否使用 IP 多点传送"
+"(multicasting)。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:83
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_addr</emphasis> specifies the multicast "
+"address (class D) for joining a group (i.e., the cluster). If omitted, the "
+"default is <literal>228.8.8.8 </literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_addr</emphasis> 指定加入到组(就是群集)里的多"
+"点传送地址(class D)。它的缺省值是 <literal>228.8.8.8</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:88
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_port</emphasis> specifies the multicast port "
+"number. If omitted, the default is <literal>45566</literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_port</emphasis> 指定多点传送端口号码。它的缺省"
+"值是 <literal>45566</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:92
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface on "
+"which to receive and send multicasts (uses the <literal>-Djgroups."
+"bind_address</literal> system property, if present). If you have a "
+"multihomed machine, set the <literal>bind_addr</literal> attribute or system "
+"property to the appropriate NIC IP address. By default, system property "
+"setting takes priority over XML attribute unless -Djgroups.ignore.bind_addr "
+"system property is set."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定接收和发送多点传送的接口(如"
+"果可用,使用 <literal>bind.address</literal> 系统属性)。如果你有一个多宿主主"
+"机,把 <literal>bind_addr</literal> 属性设置为合适的 NIC IP 地址。如果 "
+"<literal>ignore.bind.address</literal> 属性为真(true)的话,这个属性将被忽"
+"略。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:95
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">receive_on_all_interfaces </emphasis> specifies "
+"whether this node should listen on all interfaces for multicasts. The "
+"default is <literal>false</literal>. It overrides the <literal>bind_addr</"
+"literal> property for receiving multicasts. However, <literal>bind_addr</"
+"literal> (if set) is still used to send multicasts."
+msgstr ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> 指定是否这个节点应"
+"该为多点传送侦听所有的接口。它的缺省值是 <literal>false</literal>。它覆盖了接"
+"收多点传送的 <literal>bind_addr</literal> 属性。然而,<literal>bind_addr</"
+"literal>(如果设置了)仍会用来发送多点传送信息。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:100
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">send_on_all_interfaces</emphasis> specifies whether "
+"this node send UDP packets via all the NICs if you have a multi NIC machine. "
+"This means that the same multicast message is sent N times, so use with care."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:105
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">receive_interfaces</emphasis> specifies a list of of "
+"interfaces to receive multicasts on. The multicast receive socket will "
+"listen on all of these interfaces. This is a comma-separated list of IP "
+"addresses or interface names. E.g. \"<literal>192.168.5.1,eth1,127.0.0.1</"
+"literal>\"."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:111
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ip_ttl</emphasis> specifies time-to-live for IP "
+"Multicast packets. TTL is the commonly used term in multicast networking, "
+"but is actually something of a misnomer, since the value here refers to how "
+"many network hops a packet will be allowed to travel before networking "
+"equipment will drop it."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:115
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_incoming_packet_handler</emphasis> specifies "
+"whether to use a separate thread to process incoming messages. Sometimes "
+"receivers are overloaded (they have to handle de-serialization etc). Packet "
+"handler is a separate thread taking care of de-serialization, receiver thread"
+"(s) simply put packet in queue and return immediately. Setting this to true "
+"adds one more thread. The default is <literal>true</literal>."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:118
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_outgoing_packet_handler</emphasis> specifies "
+"whether to use a separate thread to process outgoing messages. The default "
+"is false."
+msgstr ""
+"<emphasis role=\"bold\">use_outgoing_packet_handler</emphasis> 指定是否使用单"
+"独的线程来处理输出的(outgoing)信息。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:121
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">enable_bundling</emphasis> specifies whether to "
+"enable message bundling. If it is <literal>true</literal>, the node would "
+"queue outgoing messages until <literal>max_bundle_size</literal> bytes have "
+"accumulated, or <literal>max_bundle_time</literal> milliseconds have "
+"elapsed, whichever occurs first. Then bundle queued messages into a large "
+"message and send it. The messages are unbundled at the receiver. The default "
+"is <literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">enable_bundling</emphasis> 指定是否启用捆绑"
+"(bundling)。如果它设为<literal>true</literal>,节点将会把输出的信息排队,一"
+"直到积累了 <literal>max_bundle_size</literal> 个字节,或者是 "
+"<literal>max_bundle_time</literal> 毫秒后,依哪个先发生而定。然后把排队的信息"
+"捆绑成一个大的信息发送出去。这个信息在接收端再解开。它的缺省值是 "
+"<literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:129
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"outgoing message back up the stack. In <literal>unicast</literal> mode, the "
+"messages are sent to self. In <literal>mcast</literal> mode, a copy of the "
+"mcast message is sent. The default is <literal>false</literal>"
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 指定是否在堆栈里回送(loop back)"
+"输出信息。在单播 <literal>unicast</literal> 模式下,信息都会发送给自己。如果"
+"是 <literal>mcast</literal> 模式,多点传送信息的备份将被发送。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:134
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">discard_incompatibe_packets</emphasis> specifies "
+"whether to discard packets from different JGroups versions. Each message in "
+"the cluster is tagged with a JGroups version. When a message from a "
+"different version of JGroups is received, it will be discarded if set to "
+"true, otherwise a warning will be logged. The default is <literal>false</"
+"literal>"
+msgstr ""
+"<emphasis role=\"bold\">discard_incompatibe_packets</emphasis> 指定是否丢弃从"
+"不同版本的 JGroups 过来的数据包。群集里的每个数据包都用 JGroups 版本号来标"
+"记。如果它设置为 true,当接收到一个不同 JGroups 版本的信息时,这个信息将被丢"
+"弃; 否则,将记录一个警告。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:140
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_send_buf_size, mcast_recv_buf_size, "
+"ucast_send_buf_size, ucast_recv_buf_size</emphasis> define receive and send "
+"buffer sizes. It is good to have a large receiver buffer size, so packets "
+"are less likely to get dropped due to buffer overflow."
+msgstr ""
+"<emphasis role=\"bold\">mcast_send_buf_size,mcast_recv_buf_size,"
+"ucast_send_buf_size,ucast_recv_buf_size</emphasis> 定义接收和发送的缓冲区大"
+"小。设置大的接收缓冲区会比较好,这样数据包就不会因为缓冲区溢出而被丢弃。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:146
+#, no-c-format
+msgid ""
+"<literal>tos</literal> specifies traffic class for sending unicast and "
+"multicast datagrams."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:152
+#, no-c-format
+msgid ""
+"On Windows 2000 machines, because of the media sense feature being broken "
+"with multicast (even after disabling media sense), you need to set the UDP "
+"protocol's <literal>loopback</literal> attribute to <literal>true</literal>."
+msgstr ""
+"在安装 Windows 2000 的机器里,由于 media sense 特征与多点传送冲突(即使你关闭"
+"了 media sense),你需要把 UDP 协议的 <literal>loopback</literal> 属性设为 "
+"<literal>true</literal>。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:160
+#, no-c-format
+msgid "TCP configuration"
+msgstr "TCP 配置"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:161
+#, fuzzy, no-c-format
+msgid ""
+"Alternatively, a JGroups-based cluster can also work over TCP connections. "
+"Compared with UDP, TCP generates more network traffic when the cluster size "
+"increases. TCP is fundamentally a unicast protocol. To send multicast "
+"messages, JGroups uses multiple TCP unicasts. To use TCP as a transport "
+"protocol, you should define a <literal>TCP</literal> element in the JGroups "
+"<literal>Config</literal> element. Here is an example of the <literal>TCP</"
+"literal> element."
+msgstr ""
+"另外,基于 JGroups 的群集系统也可以使用 TCP 连接。和 UDP 相比,当群集规模扩大"
+"时 TCP 会产生更多的网络流量,但是 TCP 更加可靠。TCP 从根本来说是一个单播"
+"(unicast)的协议。为了发送多点传送的信息,JGroups 使用多个 TCP 单播。如要把 "
+"TCP 作为一个传输协议来使用,你应该定义 JGroups <literal>Config</literal> 元素"
+"里的 <literal>TCP</literal> 元素。这是一个 <literal>TCP</literal> 元素的例"
+"子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:167
+#, fuzzy, no-c-format
+msgid ""
+"<TCP start_port=\"7800\"\n"
+" bind_addr=\"192.168.5.1\"\n"
+" loopback=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<TCP start_port=\"7800\"\n"
+" bind_addr=\"192.168.5.1\"\n"
+" loopback=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:168
+#, no-c-format
+msgid ""
+"Below are the attributes available in the <literal>TCP</literal> element."
+msgstr "下列是 <literal>TCP</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:171
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the binding address. "
+"It can also be set with the <literal>-Djgroups.bind_address</literal> "
+"command line option at server startup."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定了绑定的地址。它也可以在服务"
+"器启动时用 <literal>-Dbind.address</literal> 命令行选项来设定。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:176
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">start_port, end_port</emphasis> define the range of "
+"TCP ports the server should bind to. The server socket is bound to the first "
+"available port from <literal>start_port</literal>. If no available port is "
+"found (e.g., because of a firewall) before the <literal>end_port</literal>, "
+"the server throws an exception. If no <literal>end_port</literal> is "
+"provided or <literal>end_port < start_port</literal> then there is no "
+"upper limit on the port range. If <literal>start_port == end_port</literal>, "
+"then we force JGroups to use the given port (start fails if port is not "
+"available). The default is 7800. If set to 0, then the operating system will "
+"pick a port. Please, bear in mind that setting it to 0 will work only if we "
+"use MPING or TCPGOSSIP as discovery protocol because <literal>TCCPING</"
+"literal> requires listing the nodes and their corresponding ports."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:182
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"outgoing message back up the stack. In <literal>unicast</literal> mode, the "
+"messages are sent to self. In <literal>mcast</literal> mode, a copy of the "
+"mcast message is sent. The default is false."
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 指定是否在堆栈里回送(loop back)"
+"输出信息。在单播 <literal>unicast</literal> 模式下,信息都会发送给自己。如果"
+"是 <literal>mcast</literal> 模式,多点传送信息的备份将被发送。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:187
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">recv_buf_size, send_buf_size</emphasis> define "
+"receive and send buffer sizes. It is good to have a large receiver buffer "
+"size, so packets are less likely to get dropped due to buffer overflow."
+msgstr ""
+"<emphasis role=\"bold\">mcast_send_buf_size,mcast_recv_buf_size,"
+"ucast_send_buf_size,ucast_recv_buf_size</emphasis> 定义接收和发送的缓冲区大"
+"小。设置大的接收缓冲区会比较好,这样数据包就不会因为缓冲区溢出而被丢弃。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:190
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">conn_expire_time</emphasis> specifies the time (in "
+"milliseconds) after which a connection can be closed by the reaper if no "
+"traffic has been received."
+msgstr ""
+"<emphasis role=\"bold\">conn_expire_time</emphasis> 指定在多久(毫秒数)没有"
+"网络流量后,reaper 可以关闭这个连接。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:195
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">reaper_interval</emphasis> specifies interval (in "
+"milliseconds) to run the reaper. If both values are 0, no reaping will be "
+"done. If either value is > 0, reaping will be enabled. By default, "
+"reaper_interval is 0, which means no reaper."
+msgstr ""
+"<emphasis role=\"bold\">reaper_interval</emphasis> 指定运行 reaper 的时间(毫"
+"秒)。如果两个值都是 0,reaper 将不会运行。如果其中一个是 > 0,reaper 将被"
+"启用。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:200
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sock_conn_timeout</emphasis> specifies max time in "
+"millis for a socket creation. When doing the initial discovery, and a peer "
+"hangs, don't wait forever but go on after the timeout to ping other members. "
+"Reduces chances of *not* finding any members at all. The default is 2000."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:203
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_send_queues</emphasis> specifies whether to use "
+"separate send queues for each connection. This prevents blocking on write if "
+"the peer hangs. The default is true."
+msgstr ""
+"<emphasis role=\"bold\">use_incoming_packet_handler</emphasis> 指定是否使用单"
+"独的线程来处理输入的信息。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:206
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">external_addr</emphasis> specifies external IP "
+"address to broadcast to other group members (if different to local address). "
+"This is useful when you have use (Network Address Translation) NAT, e.g. a "
+"node on a private network, behind a firewall, but you can only route to it "
+"via an externally visible address, which is different from the local address "
+"it is bound to. Therefore, the node can be configured to broadcast its "
+"external address, while still able to bind to the local one. This avoids "
+"having to use the TUNNEL protocol, (and hence a requirement for a central "
+"gossip router) because nodes outside the firewall can still route to the "
+"node inside the firewall, but only on its external address. Without setting "
+"the external_addr, the node behind the firewall will broadcast its private "
+"address to the other nodes which will not be able to route to it."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:209
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">skip_suspected_members</emphasis> specifies whether "
+"unicast messages should not be sent to suspected members. The default is "
+"true."
+msgstr ""
+"<emphasis role=\"bold\">ip_mcast</emphasis> 指定是否使用 IP 多点传送"
+"(multicasting)。它的缺省值是 <literal>true</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:212
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">tcp_nodelay</emphasis> specifies TCP_NODELAY. TCP by "
+"default nagles messages, that is, conceptually, smaller messages are bundled "
+"into larger ones. If we want to invoke synchronous cluster method calls, "
+"then we need to disable nagling in addition to disabling message bundling "
+"(by setting <literal>enable_bundling</literal> to false). Nagling is "
+"disabled by setting <literal>tcp_nodelay</literal> to true. The default is "
+"false."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:220
+#, no-c-format
+msgid "TUNNEL configuration"
+msgstr "TUNNEL 配置"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:221
+#, fuzzy, no-c-format
+msgid ""
+"The TUNNEL protocol uses an external router to send messages. The external "
+"router is known as a <literal>GossipRouter</literal>. Each node has to "
+"register with the router. All messages are sent to the router and forwarded "
+"on to their destinations. The TUNNEL approach can be used to setup "
+"communication with nodes behind firewalls. A node can establish a TCP "
+"connection to the GossipRouter through the firewall (you can use port 80). "
+"The same connection is used by the router to send messages to nodes behind "
+"the firewall as most firewalls do not permit outside hosts to initiate a TCP "
+"connection to a host inside the firewall. The TUNNEL configuration is "
+"defined in the TUNNEL element in the JGroups Config element. Here is an "
+"example.."
+msgstr ""
+"TUNNEL 协议使用外部的路由器来发送信息。这个外部路由器是 "
+"<literal>GossipRouter</literal>。每个节点都得在这个路由器上注册。所有信息都被"
+"发送到这个路由器并被转发到目的地。TUNNEL 方法可以用来设置与防火墙后面的节点通"
+"信。节点可以穿过防火墙(你可以用 80 端口)和 GossipRouter 建立一个 TCP 连接。"
+"路由器使用同一个连接来发送信息到防火墙后面的节点。TUNNEL 配置在 JGroups "
+"<literal>Config</literal> 元素里的 <literal>TUNNEL</literal> 元素里被定义。下"
+"面是一个例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:226
+#, fuzzy, no-c-format
+msgid ""
+"<TUNNEL router_port=\"12001\"\n"
+" router_host=\"192.168.5.1\"\n"
+" down_thread=\"false\" up_thread=\"false/>"
+msgstr ""
+"<TUNNEL router_port=\"12001\"\n"
+" router_host=\"192.168.5.1\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:229
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TUNNEL</literal> element are listed "
+"below."
+msgstr "下列是 <literal>TUNNEL</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:232
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">router_host</emphasis> specifies the host on which "
+"the GossipRouter is running."
+msgstr ""
+"<emphasis role=\"bold\">router_host</emphasis> 指定 GossipRouter 运行在哪个主"
+"机上。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:236
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">router_port</emphasis> specifies the port on which "
+"the GossipRouter is listening."
+msgstr ""
+"<emphasis role=\"bold\">router_port</emphasis> 指定 GossipRouter 侦听的端口。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:240
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loopback</emphasis> specifies whether to loop "
+"messages back up the stack. The default is <literal>true</literal>."
+msgstr ""
+"<emphasis role=\"bold\">loopback</emphasis> 是否在堆栈里回送信息。它的缺省值"
+"是 <literal>true</literal>。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:251
+#, no-c-format
+msgid "Discovery Protocols"
+msgstr "发现协议(Discovery Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:252
+#, fuzzy, no-c-format
+msgid ""
+"The cluster needs to maintain a list of current member nodes at all times so "
+"that the load balancer and client interceptor know how to route their "
+"requests. Discovery protocols are used to discover active nodes in the "
+"cluster and detect the oldest member of the cluster, which is the "
+"coordinator. All initial nodes are discovered when the cluster starts up. "
+"When a new node joins the cluster later, it is only discovered after the "
+"group membership protocol (GMS, see <xref linkend=\"jbosscache-jgroups-other-"
+"gms\"/>) admits it into the group."
+msgstr ""
+"群集系统需要一直维护当前成员节点的列表,这样负载平衡系统(load balancer)和客"
+"户端拦截器(client interceptor)就知道怎样去指引它们的请求。发现协议"
+"(discovery protocols)用来在群集系统里探索活动节点。当群集系统启动时将检测到"
+"所有的初始节点。之后如果有新的节点加入,它只有在组成员协议(group membership "
+"protocol)(GMS,参见 <xref linkend=\"jbosscache-jgroups-other-gms\"/>)批准"
+"后才能被探索(discovered)到。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:256
+#, fuzzy, no-c-format
+msgid ""
+"Since the discovery protocols sit on top of the transport protocol, you can "
+"choose to use different discovery protocols based on your transport "
+"protocol. These are also configured as sub-elements in the JGroups MBean "
+"<literal>Config</literal> element."
+msgstr ""
+"既然发现协议(discovery protocols)处于传输协议之上,你可以根据你的传输协议选"
+"择不同的发现协议。发现协议在 JGroups MBean <literal>Config</literal> 元素里也"
+"被配置成子元素(sub-elements)。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:262
+#, no-c-format
+msgid "PING"
+msgstr "PING"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:263
+#, no-c-format
+msgid ""
+"PING is a discovery protocol that works by either multicasting PING requests "
+"to an IP multicast address or connecting to a gossip router. As such, PING "
+"normally sits on top of the UDP or TUNNEL transport protocols. Each node "
+"responds with a packet {C, A}, where C=coordinator's address and A=own "
+"address. After timeout milliseconds or num_initial_members replies, the "
+"joiner determines the coordinator from the responses, and sends a JOIN "
+"request to it (handled by). If nobody responds, we assume we are the first "
+"member of a group."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:266
+#, no-c-format
+msgid "Here is an example PING configuration for IP multicast."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:270
+#, fuzzy, no-c-format
+msgid ""
+"<PING timeout=\"2000\"\n"
+" num_initial_members=\"2\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<PING timeout=\"2000\"\n"
+" num_initial_members=\"2\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:271
+#, no-c-format
+msgid ""
+"Here is another example PING configuration for contacting a Gossip Router."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:273
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<PING gossip_host=\"localhost\"\n"
+" gossip_port=\"1234\"\n"
+" timeout=\"3000\" \n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:278
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>PING</literal> element are listed "
+"below."
+msgstr "下列是 <literal>PING</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:281
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:329
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:358
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:392
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the maximum number of "
+"milliseconds to wait for any responses. The default is 3000."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定等待应答的最长时间(毫秒数)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:285
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:333
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:362
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> specifies the maximum "
+"number of responses to wait for unless timeout has expired. The default is 2."
+msgstr ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> 指定等待的最大的应答数"
+"量。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:289
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_host</emphasis> specifies the host on which "
+"the GossipRouter is running."
+msgstr ""
+"<emphasis role=\"bold\">gossip_host</emphasis> 指定 GossipRouter 在哪个主机上"
+"运行。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:293
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_port</emphasis> specifies the port on which "
+"the GossipRouter is listening on."
+msgstr ""
+"<emphasis role=\"bold\">gossip_port</emphasis> 指定 GossipRouter 所侦听的端"
+"口。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:297
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gossip_refresh</emphasis> specifies the interval (in "
+"milliseconds) for the lease from the GossipRouter. The default is 20000."
+msgstr ""
+"<emphasis role=\"bold\">gossip_refresh</emphasis> 指定 GossipRouter 的租约"
+"(lease)的时间间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:301
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>), which are "
+"pinged for discovery."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个用逗号隔开的地址列表"
+"(如:<literal>host1[12345],host2[23456]</literal>),群集系统会 ping 这个列"
+"表来进行探索(discovery)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:306
+#, no-c-format
+msgid ""
+"If both <literal>gossip_host</literal> and <literal>gossip_port</literal> "
+"are defined, the cluster uses the GossipRouter for the initial discovery. If "
+"the <literal>initial_hosts</literal> is specified, the cluster pings that "
+"static list of addresses for discovery. Otherwise, the cluster uses IP "
+"multicasting for discovery."
+msgstr ""
+"如果<literal>gossip_host</literal> 和 <literal>gossip_port</literal> 都被定义"
+"了,群集系统会使用 GossipRouter 作初始探索(initial discovery)。如果指定了 "
+"<literal>initial_hosts</literal>,群集系统会 ping 这个静态地址列表来进行探"
+"索。否则,群集系统用 IP 多点传送来进行探索。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:311
+#, no-c-format
+msgid ""
+"The discovery phase returns when the <literal>timeout</literal> ms have "
+"elapsed or the <literal>num_initial_members</literal> responses have been "
+"received."
+msgstr ""
+"当已经过了 <literal>timeout</literal> 毫秒后或者已经接收到 "
+"<literal>num_initial_members</literal> 应答后,探索阶段就会返回。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:319
+#, no-c-format
+msgid "TCPGOSSIP"
+msgstr "TCPGOSSIP"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:320
+#, no-c-format
+msgid ""
+"The TCPGOSSIP protocol only works with a GossipRouter. It works essentially "
+"the same way as the PING protocol configuration with valid "
+"<literal>gossip_host</literal> and <literal>gossip_port</literal> "
+"attributes. It works on top of both UDP and TCP transport protocols. Here is "
+"an example."
+msgstr ""
+"TCPGOSSIP 协议只用于 GossipRouter。它和 PING 协议配置基本上一样,有着有效的 "
+"<literal>gossip_host</literal> 和 <literal>gossip_port</literal> 属性。它处"
+"于 UDP 和 TCP 协议的上面。下面是一个例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:323
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<TCPGOSSIP timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[12000],192.168.0.2[12000]\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+"<PING timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[12000],192.168.0.2[12000]\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:326
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TCPGOSSIP</literal> element are "
+"listed below."
+msgstr "下列是 <literal>TCPGOSSIP</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:337
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>) for "
+"GossipRouters to register with."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个 GossipRouters 用来注"
+"册的用逗号隔开的地址列表(如:<literal>host1[12345],host2[23456]</"
+"literal>)。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:347
+#, no-c-format
+msgid "TCPPING"
+msgstr "TCPPING"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:348
+#, no-c-format
+msgid ""
+"The TCPPING protocol takes a set of known members and ping them for "
+"discovery. This is essentially a static configuration. It works on top of "
+"TCP. Here is an example of the <literal>TCPPING</literal> configuration "
+"element in the JGroups <literal>Config</literal> element."
+msgstr ""
+"TCPPING 协议使用一套知名成员并 ping 它们来进行探索。它基本上是一个静态的配"
+"置。它工作于 TCP 协议的上面。这里是一个 JGroups <literal>Config</literal> 元"
+"素里的 <literal>TCPPING</literal> 配置元素的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:352
+#, fuzzy, no-c-format
+msgid ""
+"<TCPPING timeout=\"2000\"\n"
+" initial_hosts=\"hosta[2300],hostb[3400],hostc[4500]\"\n"
+" port_range=\"3\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<TCPPING timeout=\"2000\"\n"
+" initial_hosts=\"192.168.5.1[7800],192.168.0.2[7800]\"\n"
+" port_range=\"2\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:355
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>TCPPING</literal> element are "
+"listed below."
+msgstr "下列是 <literal>TCPPING</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:366
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> is a comma-seperated list "
+"of addresses (e.g., <literal>host1[12345],host2[23456]</literal>) for "
+"pinging."
+msgstr ""
+"<emphasis role=\"bold\">initial_hosts</emphasis> 是一个用来 pinging 的用逗号"
+"隔开的地址列表(如:<literal>host1[12345],host2[23456]</literal>)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:370
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">port_range</emphasis> specifies the number of "
+"consecutive ports to be probed when getting the initial membership, starting "
+"with the port specified in the initial_hosts parameter. Given the current "
+"values of port_range and initial_hosts above, the TCPPING layer will try to "
+"connect to hosta:2300, hosta:2301, hosta:2302, hostb:3400, hostb:3401, "
+"hostb:3402, hostc:4500, hostc:4501, hostc:4502. The configuration options "
+"allows for multiple nodes on the same host to be pinged."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:381
+#, no-c-format
+msgid "MPING"
+msgstr "MPING"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:382
+#, no-c-format
+msgid ""
+"MPING uses IP multicast to discover the initial membership. It can be used "
+"with all transports, but usually this is used in combination with TCP. TCP "
+"usually requires TCPPING, which has to list all group members explicitly, "
+"but MPING doesn't have this requirement. The typical use case for this is "
+"when we want TCP as transport, but multicasting for discovery so we don't "
+"have to define a static list of initial hosts in TCPPING or require external "
+"Gossip Router."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:386
+#, fuzzy, no-c-format
+msgid ""
+"<MPING timeout=\"2000\"\n"
+" bind_to_all_interfaces=\"true\"\n"
+" mcast_addr=\"228.8.8.8\"\n"
+" mcast_port=\"7500\"\n"
+" ip_ttl=\"8\"\n"
+" num_initial_members=\"3\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<MPING timeout=\"2000\"\n"
+" bind_to_all_interfaces=\"true\"\n"
+" mcast_addr=\"228.8.8.8\"\n"
+" mcast_port=\"7500\"\n"
+" ip_ttl=\"8\"\n"
+" num_initial_members=\"3\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:389
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>MPING</literal> element are listed "
+"below."
+msgstr "下列是 <literal>MPING</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:396
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> specifies the maximum "
+"number of responses to wait for unless timeout has expired. The default is "
+"2.."
+msgstr ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> 指定等待的最大的应答数"
+"量。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:400
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface on "
+"which to send and receive multicast packets."
+msgstr ""
+"<emphasis role=\"bold\">bind_addr</emphasis> 指定在哪个接口上发送和接收多点传"
+"送数据包。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:404
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> overrides the "
+"<literal>bind_addr</literal> and uses all interfaces in multihome nodes."
+msgstr ""
+"<emphasis role=\"bold\">bind_to_all_interfaces</emphasis> 覆盖了 "
+"<literal>bind_addr</literal> 并使用多宿主节点上的所有接口。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:408
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mcast_addr, mcast_port, ip_ttl</emphasis> attributes "
+"are the same as related attributes in the UDP protocol configuration."
+msgstr ""
+"<emphasis role=\"bold\">mcast_addr,mcast_port,ip_ttl</emphasis> 属性和 UDP "
+"协议配置的相关属性相同。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:418
+#, no-c-format
+msgid "Failure Detection Protocols"
+msgstr "故障检测协议(Failure Detection Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:419
+#, fuzzy, no-c-format
+msgid ""
+"The failure detection protocols are used to detect failed nodes. Once a "
+"failed node is detected, a suspect verification phase can occur after which, "
+"if the node is still considered dead, the cluster updates its view so that "
+"the load balancer and client interceptors know to avoid the dead node. The "
+"failure detection protocols are configured as sub-elements in the JGroups "
+"MBean <literal>Config</literal> element."
+msgstr ""
+"故障检测协议(failure detection protocols)用来检测发生故障的节点。一旦检测到"
+"了一个发生故障的节点,群集系统会更新它的视图,使负载平衡系统(load balancer)"
+"和客户拦截器(client interceptors)避开死节点。故障检测协议被配置为 JGroups "
+"MBean <literal>Config</literal> 元素里的子元素。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:425
+#, no-c-format
+msgid "<title>FD</title>"
+msgstr "<title>FD</title>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:426
+#, fuzzy, no-c-format
+msgid ""
+"FD is a failure detection protocol based on heartbeat messages. This "
+"protocol requires each node to periodically send are-you-alive messages to "
+"its neighbour. If the neighbour fails to respond, the calling node sends a "
+"SUSPECT message to the cluster. The current group coordinator can optionally "
+"double check whether the suspected node is indeed dead after which, if the "
+"node is still considered dead, updates the cluster's view. Here is an "
+"example FD configuration."
+msgstr ""
+"FD 发现协议(FD discovery protocol)要求每个节点定期地发送 are-you-alive 信息"
+"给它的邻居节点。如果这个邻居没有应答,呼叫节点将给群集系统发送一个 SUSPECT 信"
+"息。当前的 group coordinator 会复核这个可能有问题的节点是否真的已经崩溃了,并"
+"更新群集系统的视图。这里是一个 FD 配置的例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:430
+#, fuzzy, no-c-format
+msgid ""
+"<FD timeout=\"2000\"\n"
+" max_tries=\"3\"\n"
+" shun=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<FD timeout=\"2000\"\n"
+" max_tries=\"3\"\n"
+" shun=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:433
+#, no-c-format
+msgid ""
+"The available attributes in the <literal>FD</literal> element are listed "
+"below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:436
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the maximum number of "
+"milliseconds to wait for the responses to the are-you-alive messages. The "
+"default is 3000."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定对 are-you-alive 信息的应答的"
+"最长等待时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:440
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_tries</emphasis> specifies the number of missed "
+"are-you-alive messages from a node before the node is suspected. The default "
+"is 2."
+msgstr ""
+"<emphasis role=\"bold\">max_tries</emphasis> 指定在一个节点被怀疑为崩溃前,所"
+"丢失的 are-you-alive 信息的次数。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:444
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">shun</emphasis> specifies whether a failed node will "
+"be shunned. Once shunned, the node will be expelled from the cluster even if "
+"it comes back later. The shunned node would have to re-join the cluster "
+"through the discovery process. JGroups allows to configure itself such that "
+"shunning leads to automatic rejoins and state transfer, which is the default "
+"behaivour within JBoss Application Server."
+msgstr ""
+"<emphasis role=\"bold\">shun</emphasis> 指定崩溃的节点是否该被剔除"
+"(shunned)。一旦被剔除,这个节点将从群集里开除,即使之后它又恢复了。被剔除的"
+"节点可以通过探索过程(discovery process)重新加入到群集系统里来。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:450
+#, no-c-format
+msgid ""
+"Regular traffic from a node counts as if it is a live. So, the are-you-alive "
+"messages are only sent when there is no regular traffic to the node for "
+"sometime."
+msgstr ""
+"从某个节点的有规律的网络流量可以判定它是否正常工作。所以,are-you-alive 信息"
+"只是在节点有一段时间没有有规律的网络流量时才发送。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:459
+#, no-c-format
+msgid "FD_SOCK"
+msgstr "FD_SOCK"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:460
+#, no-c-format
+msgid ""
+"FD_SOCK is a failure detection protocol based on a ring of TCP sockets "
+"created between group members. Each member in a group connects to its "
+"neighbor (last member connects to first) thus forming a ring. Member B is "
+"suspected when its neighbor A detects abnormally closed TCP socket "
+"(presumably due to a node B crash). However, if a member B is about to leave "
+"gracefully, it lets its neighbor A know, so that it does not become "
+"suspected. The simplest FD_SOCK configuration does not take any attribute. "
+"You can just declare an empty <literal>FD_SOCK</literal> element in "
+"JGroups's <literal>Config</literal> element."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:464
+#, fuzzy, no-c-format
+msgid "<FD_SOCK_down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.STATE_TRANSFER \n"
+" down_thread=\"false\"\n"
+" up_thread=\"false\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:466
+#, fuzzy, no-c-format
+msgid ""
+"There available attributes in the <literal>FD_SOCK</literal> element are "
+"listed below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:469
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bind_addr</emphasis> specifies the interface to "
+"which the server socket should bind to. If -Djgroups.bind_address system "
+"property is defined, XML value will be ignore. This behaivour can be "
+"reversed setting -Djgroups.ignore.bind_addr=true system property."
+msgstr ""
+"<emphasis role=\"bold\">srv_sock_bind_addr</emphasis> 指定服务器套接字应该绑"
+"定的接口。如果它被忽略,服务器启动时命令行里的 <literal>-D bind.address</"
+"literal> 属性将被使用。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:477
+#, no-c-format
+msgid "VERIFY_SUSPECT"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:478
+#, no-c-format
+msgid ""
+"This protocol verifies whether a suspected member is really dead by pinging "
+"that member once again. This verification is performed by the coordinator of "
+"the cluster. The suspected member is dropped from the cluster group if "
+"confirmed to be dead. The aim of this protocol is to minimize false "
+"suspicions. Here's an example."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:482
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<VERIFY_SUSPECT timeout=\"1500\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:484
+#, fuzzy, no-c-format
+msgid "The available attributes in the FD_SOCK element are listed below."
+msgstr "下列是 <literal>FD</literal> 元素的可用属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:489
+#, no-c-format
+msgid ""
+"timeout specifies how long to wait for a response from the suspected member "
+"before considering it dead."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:500
+#, no-c-format
+msgid "FD versus FD_SOCK"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:501
+#, no-c-format
+msgid ""
+"FD and FD_SOCK, each taken individually, do not provide a solid failure "
+"detection layer. Let's look at the the differences between these failure "
+"detection protocols to understand how they complement each other:"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:505
+#, no-c-format
+msgid "<emphasis>FD</emphasis>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:510
+#, no-c-format
+msgid "An overloaded machine might be slow in sending are-you-alive responses."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:515
+#, no-c-format
+msgid "A member will be suspected when suspended in a debugger/profiler."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:520
+#, no-c-format
+msgid ""
+"Low timeouts lead to higher probability of false suspicions and higher "
+"network traffic."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:525
+#, no-c-format
+msgid "High timeouts will not detect and remove crashed members for some time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:532
+#, no-c-format
+msgid "<emphasis>FD_SOCK</emphasis>:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:538
+#, no-c-format
+msgid ""
+"Suspended in a debugger is no problem because the TCP connection is still "
+"open."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:543
+#, no-c-format
+msgid "High load no problem either for the same reason."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:548
+#, no-c-format
+msgid "Members will only be suspected when TCP connection breaks"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:557
+#, no-c-format
+msgid "So hung members will not be detected."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:562
+#, no-c-format
+msgid ""
+"Also, a crashed switch will not be detected until the connection runs into "
+"the TCP timeout (between 2-20 minutes, depending on TCP/IP stack "
+"implementation)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:569
+#, no-c-format
+msgid ""
+"The aim of a failure detection layer is to report real failures and "
+"therefore avoid false suspicions. There are two solutions:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:574
+#, no-c-format
+msgid ""
+"By default, JGroups configures the FD_SOCK socket with KEEP_ALIVE, which "
+"means that TCP sends a heartbeat on socket on which no traffic has been "
+"received in 2 hours. If a host crashed (or an intermediate switch or router "
+"crashed) without closing the TCP connection properly, we would detect this "
+"after 2 hours (plus a few minutes). This is of course better than never "
+"closing the connection (if KEEP_ALIVE is off), but may not be of much help. "
+"So, the first solution would be to lower the timeout value for KEEP_ALIVE. "
+"This can only be done for the entire kernel in most operating systems, so if "
+"this is lowered to 15 minutes, this will affect all TCP sockets."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:579
+#, no-c-format
+msgid ""
+"The second solution is to combine FD_SOCK and FD; the timeout in FD can be "
+"set such that it is much lower than the TCP timeout, and this can be "
+"configured individually per process. FD_SOCK will already generate a suspect "
+"message if the socket was closed abnormally. However, in the case of a "
+"crashed switch or host, FD will make sure the socket is eventually closed "
+"and the suspect message generated. Example:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:584
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<FD_SOCK down_thread=\"false\" up_thread=\"false\"/>\n"
+"<FD timeout=\"10000\" max_tries=\"5\" shun=\"true\" \n"
+"down_thread=\"false\" up_thread=\"false\" /> ]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:586
+#, no-c-format
+msgid ""
+"This suspects a member when the socket to the neighbor has been closed "
+"abonormally (e.g. process crash, because the OS closes all sockets). "
+"However, f a host or switch crashes, then the sockets won't be closed, "
+"therefore, as a seond line of defense, FD will suspect the neighbor after 50 "
+"seconds. Note that with this example, if you have your system stopped in a "
+"breakpoint in the debugger, the node you're debugging will be suspected "
+"after ca 50 seconds."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:589
+#, no-c-format
+msgid ""
+"A combination of FD and FD_SOCK provides a solid failure detection layer and "
+"for this reason, such technique is used accross JGroups configurations "
+"included within JBoss Application Server."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:598
+#, no-c-format
+msgid "Reliable Delivery Protocols"
+msgstr "可靠传输协议(Reliable Delivery Protocols)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:599
+#, fuzzy, no-c-format
+msgid ""
+"Reliable delivery protocols within the JGroups stack ensure that data "
+"pockets are actually delivered in the right order (FIFO) to the destination "
+"node. The basis for reliable message delivery is positive and negative "
+"delivery acknowledgments (ACK and NAK). In the ACK mode, the sender resends "
+"the message until the acknowledgment is received from the receiver. In the "
+"NAK mode, the receiver requests retransmission when it discovers a gap."
+msgstr ""
+"JGroups 栈里的可靠传输协议(reliable delivery protocols)确保数据包按正确的顺"
+"序(FIFO)正确地递送到目的节点。可靠的信息递送的基础是肯定和否定的递送确认"
+"(delivery acknowledgments)(ACK 和 NAK)。在 ACK 模式下,发送者重新发送信息"
+"直到收到接收者的确认。在 NAK 模式下,当接收者发现一个间断时,它会请求重新传"
+"送。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:606
+#, no-c-format
+msgid "UNICAST"
+msgstr "UNICAST"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:607
+#, fuzzy, no-c-format
+msgid ""
+"The UNICAST protocol is used for unicast messages. It uses ACK. It is "
+"configured as a sub-element under the JGroups Config element. If the JGroups "
+"stack is configured with TCP transport protocol, UNICAST is not necessary "
+"because TCP itself guarantees FIFO delivery of unicast messages. Here is an "
+"example configuration for the <literal>UNICAST</literal> protocol."
+msgstr ""
+"UNICAST 协议用于单播信息。它使用 ACK。它被配置成 JGroups <literal>Config</"
+"literal> 元素下的一个子元素。这里有一个配置 <literal>UNICAST</literal> 协议的"
+"例子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:610
+#, fuzzy, no-c-format
+msgid ""
+"<UNICAST timeout=\"100,200,400,800\"\n"
+"down_thread=\"false\" up_thread=\"false\"/>"
+msgstr "<UNICAST timeout=\"100,200,400,800\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:612
+#, no-c-format
+msgid ""
+"There is only one configurable attribute in the <literal>UNICAST</literal> "
+"element."
+msgstr "<literal>UNICAST</literal> 元素里只有一个可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:615
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timeout</emphasis> specifies the retransmission "
+"timeout (in milliseconds). For instance, if the timeout is \"100,200,400,800"
+"\", the sender resends the message if it hasn't received an ACK after 100 ms "
+"the first time, and the second time it waits for 200 ms before resending, "
+"and so on."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定重新传送的超时时间(毫秒数)。"
+"例如,如果这个超时时间是 \"100,200,400,800\",如果发送者在 100 毫秒后还没有接"
+"到 ACK,它会重新发送信息,第二此重发会在 200 毫秒后,以此类推。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:625
+#, no-c-format
+msgid "NAKACK"
+msgstr "NAKACK"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:626
+#, no-c-format
+msgid ""
+"The NAKACK protocol is used for multicast messages. It uses NAK. Under this "
+"protocol, each message is tagged with a sequence number. The receiver keeps "
+"track of the sequence numbers and deliver the messages in order. When a gap "
+"in the sequence number is detected, the receiver asks the sender to "
+"retransmit the missing message. The NAKACK protocol is configured as the "
+"<literal>pbcast.NAKACK</literal> sub-element under the JGroups "
+"<literal>Config</literal> element. Here is an example configuration."
+msgstr ""
+"NAKACK 协议用于多点传送信息。它使用 NAK。在这个协议下,每个信息用一个序列号标"
+"识。接收者根据这个序列号来按顺序递送信息。当检测到序列号存在一个间断时,接收"
+"者会要求发送者重新传送丢失的信息。NAKACK 协议被配置为 JGroups "
+"<literal>Config</literal> 元素下的 <literal>pbcast.NAKACK</literal> 子元素。"
+"这里有一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:633
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.NAKACK max_xmit_size=\"60000\" use_mcast_xmit=\"false\" \n"
+" \n"
+" retransmit_timeout=\"300,600,1200,2400,4800\" gc_lag=\"0\"\n"
+" discard_delivered_msgs=\"true\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.NAKACK\n"
+" max_xmit_size=\"8192\"\n"
+" use_mcast_xmit=\"true\" \n"
+" retransmit_timeout=\"600,1200,2400,4800\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:636
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.NAKACK</literal> element "
+"are as follows."
+msgstr "下列是 <literal>pbcast.NAKACK</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:639
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">retransmit_timeout</emphasis> specifies the "
+"retransmission timeout (in milliseconds). It is the same as the "
+"<literal>timeout</literal> attribute in the UNICAST protocol."
+msgstr ""
+"<emphasis role=\"bold\">retransmit_timeout</emphasis> 指定重发的超时时间(毫"
+"秒数)。它和 UNICAST 协议里的 <literal>timeout</literal> 属性是一样的。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:644
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use_mcast_xmit</emphasis> determines whether the "
+"sender should send the retransmission to the entire cluster rather than just "
+"the node requesting it. This is useful when the sender drops the pocket -- "
+"so we do not need to retransmit for each node."
+msgstr ""
+"<emphasis role=\"bold\">use_mcast_xmit</emphasis> 决定发送者是否应该重发给整"
+"个群集而不只是请求的节点。这在发送者取消数据包时很有用 - 我们不需要对每个节点"
+"都重发。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:650
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_xmit_size</emphasis> specifies maximum size for "
+"a bundled retransmission, if multiple packets are reported missing."
+msgstr ""
+"<emphasis role=\"bold\">max_xmit_size</emphasis> 指定当多个数据包丢失时,捆绑"
+"在一起的重发的最大规模。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:654
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">discard_delivered_msgs</emphasis> specifies whether "
+"to discard delivery messages on the receiver nodes. By default, we save all "
+"delivered messages. However, if we only ask the sender to resend their "
+"messages, we can enable this option and discard delivered messages."
+msgstr ""
+"<emphasis role=\"bold\">discard_delivered_msgs</emphasis> 指定是否丢弃接收节"
+"点上的递送信息。在缺省情况下,我们保存所有的递送的信息。然而,如果我们只需要"
+"发送者重发信息,我们就可以启用这个选项来丢弃递送的信息。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:661
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">gc_lag specifies</emphasis> the number of messages "
+"garbage collection lags behind."
+msgstr ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>:用来接受客户联接的线程的"
+"数量。它的缺省值是 1。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:672
+#, no-c-format
+msgid "Other Configuration Options"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:673
+#, no-c-format
+msgid ""
+"In addition to the protocol stacks, you can also configure JGroups network "
+"services in the <literal>Config</literal> element."
+msgstr ""
+"除了协议栈以外,你也可以在 <literal>Config</literal> 元素里配置 JGroups 网络"
+"服务。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:677
+#, no-c-format
+msgid "Group Membership"
+msgstr "组成员资格(Group Membership)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:678
+#, no-c-format
+msgid ""
+"The group membership service in the JGroups stack maintains a list of active "
+"nodes. It handles the requests to join and leave the cluster. It also "
+"handles the SUSPECT messages sent by failure detection protocols. All nodes "
+"in the cluster, as well as the load balancer and client side interceptors, "
+"are notified if the group membership changes. The group membership service "
+"is configured in the <literal>pbcast.GMS</literal> sub-element under the "
+"JGroups <literal>Config</literal> element. Here is an example configuration."
+msgstr ""
+"JGroups 栈里的组成员资格(group membership)服务维护一个活动节点的列表。它处"
+"理加入和离开群集系统的请求。它也处理故障检测协议(failure detection "
+"protocols)发送的 SUSPECT 信息。当组成员资格有变动时,它通知群集系统里的所有"
+"节点,负载平衡系统(load balancer)和客户端拦截器(client side "
+"interceptors)。组成员资格(group membership)服务可以在 JGroups "
+"<literal>Config</literal> 元素下的 <literal>pbcast.GMS</literal> 子元素里配"
+"置。这里是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:684
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.GMS print_local_addr=\"true\"\n"
+" join_timeout=\"3000\"\n"
+" down_thread=\"false\" up_thread=\"false\"\n"
+" join_retry_timeout=\"2000\"\n"
+" shun=\"true\"\n"
+" view_bundling=\"true\"/>"
+msgstr ""
+"<pbcast.GMS print_local_addr=\"true\"\n"
+" join_timeout=\"3000\"\n"
+" down_thread=\"false\" \n"
+" join_retry_timeout=\"2000\"\n"
+" shun=\"true\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:688
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.GMS</literal> element are "
+"as follows."
+msgstr "下列是 <literal>pbcast.GMS</literal> 元素里的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:691
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">join_timeout</emphasis> specifies the maximum number "
+"of milliseconds to wait for a new node JOIN request to succeed. Retry "
+"afterwards."
+msgstr ""
+"<emphasis role=\"bold\">join_timeout</emphasis> 指定了等待新节点 JOIN 请求成"
+"功的最长时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:695
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">join_retry_timeout</emphasis> specifies the maximum "
+"number of milliseconds to wait after a failed JOIN to re-submit it."
+msgstr ""
+"<emphasis role=\"bold\">join_retry_timeout</emphasis> 指定 JOIN 失败后重新递"
+"交前所等待的时间(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:699
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">print_local_addr</emphasis> specifies whether to "
+"dump the node's own address to the output when started."
+msgstr ""
+"<emphasis role=\"bold\">print_local_addr</emphasis> 指定是否在启动时输出节点"
+"自己的地址。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:703
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">shun</emphasis> specifies whether a node should shun "
+"itself if it receives a cluster view that it is not a member node."
+msgstr ""
+"<emphasis role=\"bold\">shun</emphasis> 指定如果收到指明自己并非成员节点的群"
+"集视图,节点是否剔除(shun)自己。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:707
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">disable_initial_coord</emphasis> specifies whether "
+"to prevent this node as the cluster coordinator."
+msgstr ""
+"<emphasis role=\"bold\">disable_initial_coord</emphasis> 指定是否阻止这个节点"
+"成为群集控制点(cluster coordinator)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:711
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">view_bundling</emphasis> specifies whether multiple "
+"JOIN or LEAVE request arriving at the same time are bundled and handled "
+"together at the same time, only sending out 1 new view / bundle. This is is "
+"more efficient than handling each request separately."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:720
+#, no-c-format
+msgid "Flow Control"
+msgstr "流量控制(Flow Control)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:721
+#, no-c-format
+msgid ""
+"The flow control service tries to adapt the sending data rate and the "
+"receiving data among nodes. If a sender node is too fast, it might overwhelm "
+"the receiver node and result in dropped packets that have to be "
+"retransmitted. In JGroups, the flow control is implemented via a credit-"
+"based system. The sender and receiver nodes have the same number of credits "
+"(bytes) to start with. The sender subtracts credits by the number of bytes "
+"in messages it sends. The receiver accumulates credits for the bytes in the "
+"messages it receives. When the sender's credit drops to a threshold, the "
+"receivers sends some credit to the sender. If the sender's credit is used "
+"up, the sender blocks until it receives credits from the receiver. The flow "
+"control service is configured in the <literal>FC</literal> sub-element under "
+"the JGroups <literal>Config</literal> element. Here is an example "
+"configuration."
+msgstr ""
+"流量控制(flow control)服务试图在节点间控制发送和接收数据传输率。如果一个节"
+"点发送的过快,它可能会使接收节点难以负荷,导致数据包的丢失而且不得不重新发"
+"送。在 JGroups 里,流量控制通过基于信用值(credit-based)的系统来实现。发送和"
+"接收节点具有相同的初始信用值(credits)(字节数)。发送者减去所发送信息的字节"
+"数,而接收者积累它接收到的信息的字节数。当发送者的信用值减少至某一极限时,接"
+"收者将把一些信用值发送给发送者。如果发送者的信用值被用光了,发送者将暂停,直"
+"到它收到接收者的信用值为止。流量控制服务在 JGroups <literal>Config</literal> "
+"元素下的 <literal>FC</literal> 子元素里配置。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:732
+#, fuzzy, no-c-format
+msgid ""
+"<FC max_credits=\"1000000\"\n"
+"down_thread=\"false\" up_thread=\"false\" \n"
+" min_threshold=\"0.10\"/>"
+msgstr ""
+"<FC max_credits=\"1000000\"\n"
+" down_thread=\"false\" \n"
+" min_threshold=\"0.10\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:735
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:872
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>FC</literal> element are as "
+"follows."
+msgstr "下列是 <literal>FC</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:738
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_credits</emphasis> specifies the maximum number "
+"of credits (in bytes). This value should be smaller than the JVM heap size."
+msgstr ""
+"<emphasis role=\"bold\">max_credits</emphasis> 指定最大的信用值(字节数)。这"
+"个值应该小于 JVM 的 heap size。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:742
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_credits</emphasis> specifies the threshold "
+"credit on the sender, below which the receiver should send in more credits."
+msgstr ""
+"<emphasis role=\"bold\">min_credits</emphasis> 指定发送者的极限信用值,如果低"
+"于这个值,接收者就应该发送更多的信用值给发送者。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:746
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_threshold</emphasis> specifies percentage value "
+"of the threshold. It overrides the <literal>min_credits</literal> attribute."
+msgstr ""
+"<emphasis role=\"bold\">min_threshold</emphasis> 指定极限值的百分比。它可以覆"
+"盖 <literal>min_credits</literal> 属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:750
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_block_time</emphasis> specifies the max time (in "
+"ms) a sender blocks. If a sender is blocking, and no credits have been "
+"received after 5 seconds, then it sends an explicit credit request to the "
+"receivers whose credits are currently below 0, until it receives credits "
+"from all members whose credits are below 0."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:755
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:816
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:756
+#, no-c-format
+msgid ""
+"Applications that use synchronous group RPC calls primarily do not require "
+"FC protocol in their JGroups protocol stack because synchronous "
+"communication, where the hread that makes the call blocks waiting for "
+"responses from all the members of the group, already slows overall rate of "
+"calls. Even though TCP provides flow control by itself, FC is still required "
+"in TCP based JGroups stacks because of group communication, where we "
+"essentially have to send group messages at the highest speed the slowest "
+"receiver can keep up with. TCP flow control only takes into account "
+"individual node communications and has not a notion of who's the slowest in "
+"the group, which is why FC is required."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:762
+#, no-c-format
+msgid "Why is FC needed on top of TCP ? TCP has its own flow control !"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:763
+#, no-c-format
+msgid ""
+"The reason is group communication, where we essentially have to send group "
+"messages at the highest speed the slowest receiver can keep up with. Let's "
+"say we have a cluster {A,B,C,D}. D is slow (maybe overloaded), the rest is "
+"fast. When A sends a group message, it establishes TCP connections A-A "
+"(conceptually), A-B, A-C and A-D (if they don't yet exist). So let's say A "
+"sends 100 million messages to the cluster. Because TCP's flow control only "
+"applies to A-B, A-C and A-D, but not to A-{B,C,D}, where {B,C,D} is the "
+"group, it is possible that A, B and C receive the 100M, but D only received "
+"1M messages. (BTW: this is also the reason why we need NAKACK, although TCP "
+"does its own retransmission)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:767
+#, no-c-format
+msgid ""
+"Now JGroups has to buffer all messages in memory for the case when the "
+"original sender S dies and a node asks for retransmission of a message of S. "
+"Because all members buffer all messages they received, they need to purge "
+"stable messages (= messages seen by everyone) every now and then. This is "
+"done by the STABLE protocol, which can be configured to run the stability "
+"protocol round time based (e.g. every 50s) or size based (whenever 400K data "
+"has been received)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:770
+#, no-c-format
+msgid ""
+"In the above case, the slow node D will prevent the group from purging "
+"messages above 1M, so every member will buffer 99M messages ! This in most "
+"cases leads to OOM exceptions. Note that - although the sliding window "
+"protocol in TCP will cause writes to block if the window is full - we assume "
+"in the above case that this is still much faster for A-B and A-C than for A-"
+"D."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:773
+#, no-c-format
+msgid ""
+"So, in summary, we need to send messages at a rate the slowest receiver (D) "
+"can handle."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:779
+#, no-c-format
+msgid "So do I always need FC?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:780
+#, no-c-format
+msgid ""
+"This depends on how the application uses the JGroups channel. Referring to "
+"the example above, if there was something about the application that would "
+"naturally cause A to slow down its rate of sending because D wasn't keeping "
+"up, then FC would not be needed."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:783
+#, no-c-format
+msgid ""
+"A good example of such an application is one that makes synchronous group "
+"RPC calls (typically using a JGroups RpcDispatcher.) By synchronous, we mean "
+"the thread that makes the call blocks waiting for responses from all the "
+"members of the group. In that kind of application, the threads on A that are "
+"making calls would block waiting for responses from D, thus naturally "
+"slowing the overall rate of calls."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:786
+#, no-c-format
+msgid ""
+"A JBoss Cache cluster configured for REPL_SYNC is a good example of an "
+"application that makes synchronous group RPC calls. If a channel is only "
+"used for a cache configured for REPL_SYNC, we recommend you remove FC from "
+"its protocol stack."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:789
+#, no-c-format
+msgid ""
+"And, of course, if your cluster only consists of two nodes, including FC in "
+"a TCP-based protocol stack is unnecessary. There is no group beyond the "
+"single peer-to-peer relationship, and TCP's internal flow control will "
+"handle that just fine."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:792
+#, no-c-format
+msgid ""
+"Another case where FC may not be needed is for a channel used by a JBoss "
+"Cache configured for buddy replication and a single buddy. Such a channel "
+"will in many respects act like a two node cluster, where messages are only "
+"exchanged with one other node, the buddy. (There may be other messages "
+"related to data gravitation that go to all members, but in a properly "
+"engineered buddy replication use case these should be infrequent. But if you "
+"remove FC be sure to load test your application.)"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:802
+#, no-c-format
+msgid "Fragmentation"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:803
+#, no-c-format
+msgid ""
+"This protocol fragments messages larger than certain size. Unfragments at "
+"the receiver's side. It works for both unicast and multicast messages. It is "
+"configured in the FRAG2 sub-element under the JGroups Config element. Here "
+"is an example configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:806
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+" <FRAG2 frag_size=\"60000\" down_thread=\"false\" up_thread="
+"\"false\"/>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:808
+#, fuzzy, no-c-format
+msgid "The configurable attributes in the FRAG2 element are as follows."
+msgstr "下列是 <literal>FC</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:813
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">frag_size</emphasis> specifies the max frag size in "
+"bytes. Messages larger than that are fragmented."
+msgstr ""
+"<emphasis role=\"bold\">max_credits</emphasis> 指定最大的信用值(字节数)。这"
+"个值应该小于 JVM 的 heap size。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:817
+#, no-c-format
+msgid ""
+"TCP protocol already provides fragmentation but a fragmentation JGroups "
+"protocol is still needed if FC is used. The reason for this is that if you "
+"send a message larger than FC.max_bytes, FC protocol would block. So, "
+"frag_size within FRAG2 needs to be set to always be less than FC.max_bytes."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:826
+#, no-c-format
+msgid "State Transfer"
+msgstr "状态传输(State Transfer)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:827
+#, no-c-format
+msgid ""
+"The state transfer service transfers the state from an existing node (i.e., "
+"the cluster coordinator) to a newly joining node. It is configured in the "
+"<literal>pbcast.STATE_TRANSFER</literal> sub-element under the JGroups "
+"<literal>Config</literal> element. It does not have any configurable "
+"attribute. Here is an example configuration."
+msgstr ""
+"状态传输服务(state transfer service)把状态从一个现存的节点(就是群集控制"
+"点)传输到新加入的节点上。它可以在 JGroups <literal>Config</literal> 元素下"
+"的 <literal>pbcast.STATE_TRANSFER</literal> 子元素里配置。它没有任何可配置属"
+"性。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:831
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.STATE_TRANSFER down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<pbcast.STATE_TRANSFER \n"
+" down_thread=\"false\"\n"
+" up_thread=\"false\"/>"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:835
+#, no-c-format
+msgid "Distributed Garbage Collection"
+msgstr "分布式垃圾收集(Distributed Garbage Collection)"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:836
+#, no-c-format
+msgid ""
+"In a JGroups cluster, all nodes have to store all messages received for "
+"potential retransmission in case of a failure. However, if we store all "
+"messages forever, we will run out of memory. So, the distributed garbage "
+"collection service in JGroups periodically purges messages that have seen by "
+"all nodes from the memory in each node. The distributed garbage collection "
+"service is configured in the <literal>pbcast.STABLE</literal> sub-element "
+"under the JGroups <literal>Config</literal> element. Here is an example "
+"configuration."
+msgstr ""
+"在 JGroups 群集系统里,在失败的情况下,所有的节点都得保存所有接收到的信息,用"
+"于可能发生的重新传送。然而,如果我们一直保存这些信息,就会用光所有的内存。所"
+"以,JGroups 的分布式垃圾收集(distributed garbage collection )服务定期地从每"
+"个节点的内存里清理所有节点都已经看过的信息。我们在 JGroups <literal>Config</"
+"literal> 元素下的 <literal>pbcast.STABLE</literal> 子元素里配置分布式垃圾收集"
+"(distributed garbage collection )服务。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:840
+#, fuzzy, no-c-format
+msgid ""
+"<pbcast.STABLE stability_delay=\"1000\"\n"
+" desired_avg_gossip=\"5000\" \n"
+" down_thread=\"false\" up_thread=\"false\"\n"
+" max_bytes=\"400000\"/>"
+msgstr ""
+"<pbcast.STABLE stability_delay=\"1000\"\n"
+" desired_avg_gossip=\"5000\" \n"
+" down_thread=\"false\"\n"
+" max_bytes=\"250000\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:842
+#, no-c-format
+msgid ""
+"The configurable attributes in the <literal>pbcast.STABLE</literal> element "
+"are as follows."
+msgstr "下列是 <literal>pbcast.STABLE</literal> 元素里的可配置属性。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:845
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">desired_avg_gossip</emphasis> specifies intervals "
+"(in milliseconds) of garbage collection runs. Value <literal>0</literal> "
+"disables this service."
+msgstr ""
+"<emphasis role=\"bold\">desired_avg_gossip</emphasis> 指定垃圾收集(garbage "
+"collection)服务运行的时间间隔(毫秒数)。它如果为 0,这个服务将不会运行。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:850
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_bytes</emphasis> specifies the maximum number of "
+"bytes received before the cluster triggers a garbage collection run. Value "
+"<literal>0</literal> disables this service."
+msgstr ""
+"<emphasis role=\"bold\">max_bytes</emphasis> 指定了在群集系统触发垃圾收集"
+"(garbage collection)服务之前,能接收的最多字节数。它如果为 0,这个服务将不"
+"会运行。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:855
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">stability_delay</emphasis> specifies delay before we "
+"send STABILITY msg (give others a change to send first). If used together "
+"with max_bytes, this attribute should be set to a small number."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:859
+#, no-c-format
+msgid ""
+"Set the <literal>max_bytes</literal> attribute when you have a high traffic "
+"cluster."
+msgstr "当你有一个大流量的群集系统时,设置 <literal>max_bytes</literal> 属性。"
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:864
+#, no-c-format
+msgid "Merging"
+msgstr "Merging"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:865
+#, no-c-format
+msgid ""
+"When a network error occurs, the cluster might be partitioned into several "
+"different partitions. JGroups has a MERGE service that allows the "
+"coordinators in partitions to communicate with each other and form a single "
+"cluster back again. The flow control service is configured in the "
+"<literal>MERGE2</literal> sub-element under the JGroups <literal>Config</"
+"literal> element. Here is an example configuration."
+msgstr ""
+"当有网络错误发生时,群集系统可能分为己个不同的子分区(partitions)。JGroups "
+"有一个 MERGE 服务,它允许分区里的控制点(coordinators)相互通信且再次组成单一"
+"群集系统。流量控制服务可以在 JGroups <literal>Config</literal> 元素下的 "
+"<literal>MERGE2</literal> 子元素里配置。下面是一个配置示例。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:869
+#, fuzzy, no-c-format
+msgid ""
+"<MERGE2 max_interval=\"10000\"\n"
+" min_interval=\"2000\"\n"
+" down_thread=\"false\" up_thread=\"false\"/>"
+msgstr ""
+"<MERGE2 max_interval=\"10000\"\n"
+" min_interval=\"2000\"/>"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:875
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max_interval</emphasis> specifies the maximum number "
+"of milliseconds to send out a MERGE message."
+msgstr ""
+"<emphasis role=\"bold\">max_interval</emphasis> 指定发送 MERGE 信息的最大时间"
+"间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:879
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min_interval</emphasis> specifies the minimum number "
+"of milliseconds to send out a MERGE message."
+msgstr ""
+"<emphasis role=\"bold\">min_interval</emphasis> 指定发送 MERGE 信息的最小时间"
+"间隔(毫秒数)。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:883
+#, no-c-format
+msgid ""
+"JGroups chooses a random value between <literal>min_interval</literal> and "
+"<literal>max_interval</literal> to send out the MERGE message."
+msgstr ""
+"JGroups 在 <literal>min_interval</literal> 之间 <literal>max_interval</"
+"literal> 选取一个随机值来发送 MERGE 信息。"
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:886
+#, no-c-format
+msgid ""
+"The cluster states are not merged in a merger. This has to be done by the "
+"application. If <literal>MERGE2</literal> is used in conjunction with "
+"TCPPING, the <literal>initial_hosts</literal> attribute must contain all the "
+"nodes that could potentially be merged back, in order for the merge process "
+"to work properly. Otherwise, the merge process would not merge all the nodes "
+"even though shunning is disabled. Alternatively use MPING, which is commonly "
+"used with TCP to provide multicast member discovery capabilities, instead of "
+"TCPPING to avoid having to specify all the nodes."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:892
+#, no-c-format
+msgid "Binding JGroups Channels to a particular interface"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:893
+#, no-c-format
+msgid ""
+"In the Transport Protocols section above, we briefly touched on how the "
+"interface to which JGroups will bind sockets is configured. Let's get into "
+"this topic in more depth:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:896
+#, no-c-format
+msgid ""
+"First, it's important to understand that the value set in any bind_addr "
+"element in an XML configuration file will be ignored by JGroups if it finds "
+"that system property jgroups.bind_addr (or a deprecated earlier name for the "
+"same thing, <literal>bind.address</literal>) has been set. The system "
+"property trumps XML. If JBoss AS is started with the -b (a.k.a. --host) "
+"switch, the AS will set <literal>jgroups.bind_addr</literal> to the "
+"specified value."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:899
+#, no-c-format
+msgid ""
+"Beginning with AS 4.2.0, for security reasons the AS will bind most services "
+"to localhost if -b is not set. The effect of this is that in most cases "
+"users are going to be setting -b and thus jgroups.bind_addr is going to be "
+"set and any XML setting will be ignored."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:902
+#, no-c-format
+msgid ""
+"So, what are <emphasis>best practices</emphasis> for managing how JGroups "
+"binds to interfaces?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:907
+#, no-c-format
+msgid ""
+"Binding JGroups to the same interface as other services. Simple, just use -b:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:909
+#, no-c-format
+msgid "./run.sh -b 192.168.1.100 -c all"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:913
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to one interface, but use a different one "
+"for JGroups: <screen>./run.sh -b 10.0.0.100 -Djgroups."
+"bind_addr=192.168.1.100 -c all</screen> Specifically setting the system "
+"property overrides the -b value. This is a common usage pattern; put client "
+"traffic on one network, with intra-cluster traffic on another."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:921
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to all interfaces. This can be done like "
+"this: <screen>./run.sh -b 0.0.0.0 -c all</screen> However, doing this will "
+"not cause JGroups to bind to all interfaces! Instead , JGroups will bind to "
+"the machine's default interface. See the Transport Protocols section for how "
+"to tell JGroups to receive or send on all interfaces, if that is what you "
+"really want."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:929
+#, no-c-format
+msgid ""
+"Binding services (e.g., JBoss Web) to all interfaces, but specify the "
+"JGroups interface: <screen>./run.sh -b 0.0.0.0 -Djgroups."
+"bind_addr=192.168.1.100 -c all</screen> Again, specifically setting the "
+"system property overrides the -b value."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:937
+#, no-c-format
+msgid "Using different interfaces for different channels:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:939
+#, no-c-format
+msgid "./run.sh -b 10.0.0.100 -Djgroups.ignore.bind_addr=true -c all"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:944
+#, no-c-format
+msgid ""
+"This setting tells JGroups to ignore the <literal>jgroups.bind_addr</"
+"literal> system property, and instead use whatever is specfied in XML. You "
+"would need to edit the various XML configuration files to set the "
+"<literal>bind_addr</literal> to the desired interfaces."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:949
+#, no-c-format
+msgid "Isolating JGroups Channels"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:950
+#, no-c-format
+msgid ""
+"Within JBoss AS, there are a number of services that independently create "
+"JGroups channels -- 3 different JBoss Cache services (used for HttpSession "
+"replication, EJB3 SFSB replication and EJB3 entity replication) along with "
+"the general purpose clustering service called HAPartition that underlies "
+"most other JBossHA services."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:953
+#, no-c-format
+msgid ""
+"It is critical that these channels only communicate with their intended "
+"peers; not with the channels used by other services and not with channels "
+"for the same service opened on machines not meant to be part of the group. "
+"Nodes improperly communicating with each other is one of the most common "
+"issues users have with JBoss AS clustering."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:956
+#, no-c-format
+msgid ""
+"Whom a JGroups channel will communicate with is defined by its group name, "
+"multicast address, and multicast port, so isolating JGroups channels comes "
+"down to ensuring different channels use different values for the group name, "
+"multicast address and multicast port."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:959
+#, no-c-format
+msgid ""
+"To isolate JGroups channels for different services on the same set of AS "
+"instances from each other, you MUST change the group name and the multicast "
+"port. In other words, each channel must have its own set of values."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:962
+#, no-c-format
+msgid ""
+"For example, say we have a production cluster of 3 machines, each of which "
+"has an HAPartition deployed along with a JBoss Cache used for web session "
+"clustering. The HAPartition channels should not communicate with the JBoss "
+"Cache channels. They should use a different group name and multicast port. "
+"They can use the same multicast address, although they don't need to."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:965
+#, no-c-format
+msgid ""
+"To isolate JGroups channels for the same service from other instances of the "
+"service on the network, you MUST change ALL three values. Each channel must "
+"have its own group name, multicast address, and multicast port."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:968
+#, no-c-format
+msgid ""
+"For example, say we have a production cluster of 3 machines, each of which "
+"has an HAPartition deployed. On the same network there is also a QA cluster "
+"of 3 machines, which also has an HAPartition deployed. The HAPartition group "
+"name, multicast address, and multicast port for the production machines must "
+"be different from those used on the QA machines."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:974
+#, no-c-format
+msgid "Changing the Group Name"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:975
+#, no-c-format
+msgid ""
+"The group name for a JGroups channel is configured via the service that "
+"starts the channel. Unfortunately, different services use different "
+"attribute names for configuring this. For HAPartition and related services "
+"configured in the deploy/cluster-service.xml file, this is configured via a "
+"PartitionName attribute. For JBoss Cache services, the name of the attribute "
+"is ClusterName."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:978
+#, no-c-format
+msgid ""
+"Starting with JBoss AS 4.0.4, for the HAPartition and all the standard JBoss "
+"Cache services, we make it easy for you to create unique groups names simply "
+"by using the -g (a.k.a. –partition) switch when starting JBoss: <screen>./"
+"run.sh -g QAPartition -b 192.168.1.100 -c all</screen> This switch sets the "
+"jboss.partition.name system property, which is used as a component in the "
+"configuration of the group name in all the standard clustering configuration "
+"files. For example,"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:982
+#, no-c-format
+msgid ""
+"<![CDATA[<attribute name=\"ClusterName\">Tomcat-${jboss.partition.name:"
+"Cluster}</attribute>]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:988
+#, no-c-format
+msgid "Changing the multicast address and port"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:989
+#, no-c-format
+msgid ""
+"The -u (a.k.a. --udp) command line switch may be used to control the "
+"multicast address used by the JGroups channels opened by all standard AS "
+"services. <screen><![CDATA[/run.sh -u 230.1.2.3 -g QAPartition -b "
+"192.168.1.100 -c all]]></screen> This switch sets the jboss.partition."
+"udpGroup system property, which you can see referenced in all of the "
+"standard protocol stack configs in JBoss AS:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:995
+#, no-c-format
+msgid ""
+"<![CDATA[<Config>\n"
+"<UDP mcast_addr=\"${jboss.partition.udpGroup:228.1.2.3}\"\n"
+" ....]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:996
+#, no-c-format
+msgid ""
+"Unfortunately, setting the multicast ports is not so simple. As described "
+"above, by default there are four separate JGroups channels in the standard "
+"JBoss AS all configuration, and each should be given a unique port. There "
+"are no command line switches to set these, but the standard configuration "
+"files do use system properties to set them. So, they can be configured from "
+"the command line by using -D. For example,"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:999
+#, no-c-format
+msgid ""
+"/run.sh -u 230.1.2.3 -g QAPartition -Djboss.hapartition.mcast_port=12345 -"
+"Djboss.webpartition.mcast_port=23456 -Djboss.ejb3entitypartition."
+"mcast_port=34567 -Djboss.ejb3sfsbpartition.mcast_port=45678 -b 192.168.1.100 "
+"-c all"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1001
+#, no-c-format
+msgid "Why isn't it sufficient to change the group name?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1002
+#, no-c-format
+msgid ""
+"If channels with different group names share the same multicast address and "
+"port, the lower level JGroups protocols in each channel will see, process "
+"and eventually discard messages intended for the other group. This will at a "
+"minimum hurt performance and can lead to anomalous behavior."
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1006
+#, no-c-format
+msgid "Why do I need to change the multicast port if I change the address?"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1007
+#, no-c-format
+msgid ""
+"It should be sufficient to just change the address, but there is a problem "
+"on several operating systems whereby packets addressed to a particular "
+"multicast port are delivered to all listeners on that port, regardless of "
+"the multicast address they are listening on. So the recommendation is to "
+"change both the address and the port."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1013
+#, no-c-format
+msgid "JGroups Troubleshooting"
+msgstr ""
+
+#. Tag: emphasis
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1014
+#, no-c-format
+msgid "Nodes do not form a cluster"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1016
+#, no-c-format
+msgid ""
+"Make sure your machine is set up correctly for IP multicast. There are 2 "
+"test programs that can be used to detect this: McastReceiverTest and "
+"McastSenderTest. Go to the <literal>$JBOSS_HOME/server/all/lib</literal> "
+"directory and start McastReceiverTest, for example:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1018
+#, no-c-format
+msgid ""
+"java -cp jgroups.jar org.jgroups.tests.McastReceiverTest -mcast_addr "
+"224.10.10.10 -port 5555"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1021
+#, no-c-format
+msgid "Then in another window start <literal>McastSenderTest</literal>:"
+msgstr ""
+
+#. Tag: screen
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1023
+#, no-c-format
+msgid ""
+"java -cp jgroups.jar org.jgroups.tests.McastSenderTest -mcast_addr "
+"224.10.10.10 -port 5555"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1026
+#, no-c-format
+msgid ""
+"If you want to bind to a specific network interface card (NIC), use "
+"<literal>-bind_addr 192.168.0.2</literal>, where 192.168.0.2 is the IP "
+"address of the NIC to which you want to bind. Use this parameter in both the "
+"sender and the receiver."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1029
+#, no-c-format
+msgid ""
+"You should be able to type in the <literal>McastSenderTest</literal> window "
+"and see the output in the <literal>McastReceiverTest</literal> window. If "
+"not, try to use -ttl 32 in the sender. If this still fails, consult a system "
+"administrator to help you setup IP multicast correctly, and ask the admin to "
+"make sure that multicast will work on the interface you have chosen or, if "
+"the machines have multiple interfaces, ask to be told the correct interface. "
+"Once you know multicast is working properly on each machine in your cluster, "
+"you can repeat the above test to test the network, putting the sender on one "
+"machine and the receiver on another."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1036
+#, no-c-format
+msgid "Causes of missing heartbeats in FD"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1037
+#, no-c-format
+msgid ""
+"Sometimes a member is suspected by FD because a heartbeat ack has not been "
+"received for some time T (defined by timeout and max_tries). This can have "
+"multiple reasons, e.g. in a cluster of A,B,C,D; C can be suspected if (note "
+"that A pings B, B pings C, C pings D and D pings A):"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1043
+#, no-c-format
+msgid ""
+"B or C are running at 100% CPU for more than T seconds. So even if C sends a "
+"heartbeat ack to B, B may not be able to process it because it is at 100%"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1048
+#, no-c-format
+msgid "B or C are garbage collecting, same as above."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1053
+#, no-c-format
+msgid "A combination of the 2 cases above"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1058
+#, no-c-format
+msgid ""
+"The network loses packets. This usually happens when there is a lot of "
+"traffic on the network, and the switch starts dropping packets (usually "
+"broadcasts first, then IP multicasts, TCP packets last)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JBoss_Cache_JGroups.xml:1063
+#, no-c-format
+msgid ""
+"B or C are processing a callback. Let's say C received a remote method call "
+"over its channel and takes T+1 seconds to process it. During this time, C "
+"will not process any other messages, including heartbeats, and therefore B "
+"will not receive the heartbeat ack and will suspect C."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JMS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JMS.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JMS.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,551 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:5
+#, no-c-format
+msgid "Clustered JMS Services"
+msgstr "群集的 JMS 服务"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:7
+#, no-c-format
+msgid ""
+"JBoss AS 3.2.4 and above support high availability JMS (HA-JMS) services in "
+"the <literal>all</literal> server configuration. In the current production "
+"release of JBoss AS, the HA-JMS service is implemented as a clustered "
+"singleton fail-over service."
+msgstr ""
+"JBoss AS 3.2.4 和更高的版本支持高可用性的 <literal>all</literal> 服务器配置里"
+"的 JMS(HA-JMS)服务。在 JBoss AS 当前的发布版本里,HA-JMS 服务用一个群集的 "
+"singleton fail-over 服务来实现。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:12
+#, no-c-format
+msgid ""
+"If you are willing to configure HA-JMS yourself, you can get it to work with "
+"earlier versions of JBoss AS. We have a customer who uses HA-JMS "
+"successfully in JBoss AS 3.0.7. Please contact JBoss support for more "
+"questions."
+msgstr ""
+"如果你希望自己来配置 HA-JMS,你可以在以前的 JBoss AS 版本里让它运行。我们有一"
+"个客户成功地在 JBoss AS 3.0.7 里使用 HA-JMS。如果你有更多问题的话,请联系 "
+"JBoss 支持部门。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:16
+#, no-c-format
+msgid ""
+"The HA-JMS in JBoss AS 4.2.2 and earlier is based on the JBoss MQ messaging "
+"product. In later releases of the AS, JBoss MQ will be replaced by the newer "
+"JBoss Messaging project. JBoss Messaging's clustering implementation is "
+"considerably different from HA-JMS based on JBoss MQ; most notably it is not "
+"based on a singleton service only running on one node in the cluster."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:25
+#, no-c-format
+msgid "High Availability Singleton Fail-over"
+msgstr "高可用性的 Singleton Fail-over"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:26
+#, fuzzy, no-c-format
+msgid ""
+"The JBoss HA-JMS service (i.e., message queues topics and supporting "
+"services) only runs on a single node (i.e., the master node) in the cluster "
+"at any given time. If that node fails, the cluster simply elects another "
+"node to run the JMS service, and the queues, topics and supporting services "
+"are deployed on that server (fail-over). This setup provides redundancy "
+"against server failures but does not reduce the work load on the JMS server "
+"node."
+msgstr ""
+"JBoss HA-JMS 服务(也就是消息队列和主题)任何给定时间都只在群集里的单节点运行"
+"(主节点)。如果这个节点崩溃了,群集系统简单地选取另外一节点来运行 JMS 服务"
+"(fail-over)。这种设置提供了针对服务器瘫痪的冗余措施,但并没有降低 JMS 服务"
+"器节点的负载。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:28
+#, no-c-format
+msgid ""
+"While you cannot load balance HA-JMS queues (there is only one master node "
+"that runs the queues), you can load balance the MDBs that process messages "
+"from those queues (see <xref linkend=\"clustering-jms-loadbalanced\"/>)."
+msgstr ""
+"虽然你不能够对 HA-JMS 队列进行负载平衡(只有一个运行这个队列的主节点),但是"
+"你可以平衡处理队列里信息的 MDBs 的负载(请参考 <xref linkend=\"clustering-"
+"jms-loadbalanced\"/>)。"
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:33
+#, no-c-format
+msgid "Server Side Configuration"
+msgstr "服务端配置"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:35
+#, no-c-format
+msgid ""
+"The biggest configuration difference between HA-JMS in the all configuration "
+"and the non-HA version found in the default configuration is the location of "
+"most configuration files. For HA-JMS, most configuration files are found in "
+"the deploy-hasingleton/jms directory, not in deploy/jms. Your queues and "
+"topics must be deployed in deploy-hasingleton (or a subdirectory of it like "
+"deploy-hasingleton/jms.) Application components that act as clients to HA-"
+"JMS (e.g., MDBs and other JMS clients) do not need to be deployed in deploy-"
+"hasingleton. They should only be deployed there if you only want them "
+"running on one node in the cluster at a time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:38
+#, fuzzy, no-c-format
+msgid ""
+"To use the singleton fail-over HA-JMS service, you must configure JMS "
+"services identically on all nodes in the cluster. That includes all JMS "
+"related service MBeans and all deployed queues and topics. However, "
+"applications that use JMS (e.g., MDBs and other JMS clients) do not need to "
+"be deployed identically across the cluster."
+msgstr ""
+"为了使用 singleton fail-over HA-JMS 服务,你必须在群集里的所有节点上配置相同"
+"的 JMS 服务。这包括所有和 JMS 相关的 MBeans 以及部署的 JMS 应用程序。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:44
+#, fuzzy, no-c-format
+msgid ""
+"The JMS server is configured to persist its data in the <literal>DefaultDS</"
+"literal>. By default, that is the embedded HSQLDB. However, for the HA-JMS "
+"service fail-over to work, the newly started HA-JMS server needs to be able "
+"to find the data persisted by the old server. That's not likely to happen if "
+"the data is persisted in files written by the old servers' HSQLDB. In almost "
+"any cluster environments, all nodes need to persist data against a shared "
+"database. So, the first thing to do before you start clustered JMS is to "
+"setup a shared database for JMS. You need to do the following:"
+msgstr ""
+"JMS 服务器被设置成在 <literal>DefaultDS</literal> 里持久化它的数据。在缺省的"
+"情况下,那就是内含的 HSQLDB。然而,在大部分群集环境里,所有节点都需要把数据持"
+"久化到一个共享数据库里。因此,在你启动群集 JMS 之前要做的第一件事就是建立一个"
+"共享数据库。你需要做如下的事情:"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:50
+#, no-c-format
+msgid ""
+"Configure <literal>DefaultDS</literal> to point to the database server of "
+"your choice. That is to replace the <literal>deploy/hsqlsb-ds.xml</literal> "
+"file with the <literal>xxx-ds.xml</literal> file in the <literal>docs/"
+"examples/jca</literal> directory, where <literal>xxx</literal> is the name "
+"of the target shared database (e.g., <literal>mysql-ds.xml</literal>)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:57
+#, no-c-format
+msgid ""
+"Replace the <literal>hsqldb-jdbc2-service.xml</literal> file under the "
+"<literal>server/all/deploy-hasingleton/jms</literal> directory with one "
+"tuned to the specific database. For example if you use MySQL the file is "
+"<literal>mysql-jdbc2-service.xml</literal>. Configuration files for a number "
+"of RDBMS are bundled with the JBoss AS distribution. They can be found under "
+"<literal>docs/examples/jms</literal>."
+msgstr ""
+"把 <literal>server/all/deploy-hasingleton/jms</literal> 目录下的 "
+"<literal>hsqldb-jdbc2-service.xml</literal>文件用特定数据库的文件代替。例如,"
+"MySQL 的文件就是 <literal>mysql-jdbc2-service.xml</literal>。JBoss AS 发行版"
+"本捆绑了一些 RDBMS 的配置文件。它们可以在 <literal>docs/examples/jms</"
+"literal> 下找到。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:66
+#, fuzzy, no-c-format
+msgid ""
+"There is no need to replace the <literal>hsqldb-jdbc-state-service.xml</"
+"literal> file under the <literal>server/all/deploy-hasingleton/jms</literal> "
+"directory. Despite the <literal>hsql</literal> in its name, it works with "
+"all SQL92 compliant databases, including HSQL, MySQL, SQL Server, and more. "
+"It automatically uses the <literal>DefaultDS</literal> for storage, which we "
+"configured above."
+msgstr ""
+"你不需要替换 <literal>server/all/deploy-hasingleton/jms</literal> 目录下的 "
+"<literal>hsqldb-jdbc-state-service.xml</literal> 文件。尽管它的名字里包含 "
+"<literal>hsql</literal>,它适用于所有兼容 SQL92 的数据库,包括 HSQL,MySQL,"
+"SQL Server 和更多数据库。象我们上面配置的那样,它自动使用 "
+"<literal>DefaultDS</literal> 来存放数据。"
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:77
+#, fuzzy, no-c-format
+msgid "Non-MDB HA-JMS Clients"
+msgstr "HA-JMS 客户"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:79
+#, no-c-format
+msgid ""
+"The HA-JMS client is different from regular JMS clients in two important "
+"aspects."
+msgstr "HA-JMS 客户和常规的 JMS 客户在两个方面有所不同。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:83
+#, no-c-format
+msgid ""
+"The HA-JMS client must look up JMS connection factories as well as queues "
+"and topicsusing HA-JNDI (the default port is 1100). This ensures the factory/"
+"queue/topic can be found no matter which cluster node is running the HA-JMS "
+"server."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:91
+#, no-c-format
+msgid ""
+"If the client is a J2EE component (session bean or web application) running "
+"inside the AS, the lookup via HA-JNDI can be configured using the "
+"component's deployment descriptors: In the standard deployment descriptor "
+"(ejb-jar.xml or web.xml):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JMS.xml:99
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<resource-ref>\n"
+" <res-ref-name>jms/ConnectionFactory</res-ref-name>\n"
+" <res-type>javax.jms.QueueConnectionFactory</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+"</resource-ref>\n"
+" \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/Queue</res-ref-name>\n"
+" <res-type>javax.jms.Queue</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+"</resource-ref>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:101
+#, no-c-format
+msgid "And in the JBoss-specific descriptor (jboss.xml or jboss-web.xml):"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JMS.xml:105
+#, no-c-format
+msgid ""
+"<![CDATA[ \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/ConnectionFactory</res-ref-name>\n"
+" <!-- Use the JMS Resource Adapter, let it deal\n"
+" with knowing where the JMS server is -->\n"
+" <jndi-name>java:/JmsXA</jndi-name>\n"
+" </resource-ref>\n"
+" \n"
+"<resource-ref>\n"
+" <res-ref-name>jms/Queue</res-ref-name>\n"
+" <!-- Use HA-JNDI so we can find the queue on any node -->\n"
+" <jndi-name>jnp://localhost:1100/queue/A</jndi-name>\n"
+"</resource-ref>]]>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:110
+#, no-c-format
+msgid ""
+"The HA-JMS client must deal with exceptions that will occur on the JMS "
+"connection if server failover occurs. Unlike, for example, clustered EJB "
+"proxies, the JMS connection object does not include automatic failover "
+"logic. If the HA-JMS service fails over to a different master node, all "
+"client operations on the current connection will fail with a JMSException. "
+"To deal with this:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:118
+#, no-c-format
+msgid ""
+"If the client is running inside the application server, the client should "
+"obtain the ConnectionFactory by looking up java:/JmsXAin JNDI. This will "
+"find the JBoss JMS Resource Adapter; the resource adapter will handle the "
+"task of detecting server failover and reconnecting to the new server when it "
+"starts."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:122
+#, no-c-format
+msgid ""
+"For clients outside the application server, the best approach is to register "
+"an ExceptionListener with the connection; the listener will get a callback "
+"if there is an exception on the connection. The callback should then handle "
+"the task of closing the old connection and reconnecting. Following is a "
+"example application that continuously sends messages to a queue, handling "
+"any exceptions that occur:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JMS.xml:128
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"package com.test.hajms.client;\n"
+"\n"
+"import javax.naming.InitialContext;\n"
+"import javax.jms.ConnectionFactory;\n"
+"import javax.jms.Destination;\n"
+"import javax.jms.Connection;\n"
+"import javax.jms.Session;\n"
+"import javax.jms.MessageProducer;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.ExceptionListener;\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.DeliveryMode;\n"
+"\n"
+"import org.apache.commons.logging.Log;\n"
+"import org.apache.commons.logging.LogFactory;\n"
+" \n"
+"public class FailoverJMSClient\n"
+"{\n"
+"private static final Log log = LogFactory.getLog(FailoverJMSClient.class);\n"
+"\n"
+"public static final int NUM_RETRIES = 3;\n"
+"\n"
+"volatile boolean doSend = true;\n"
+"ConnectionFactory connectionFactory;\n"
+"Destination queue;\n"
+"Connection connection;\n"
+"Session session;\n"
+"MessageProducer producer;\n"
+"\n"
+"\n"
+"public static void main(String[] args) throws Exception\n"
+"{\n"
+"FailoverJMSClient jmsClient = new FailoverJMSClient();\n"
+"jmsClient.setUpJMS();\n"
+"jmsClient.sendMessages();\n"
+"}\n"
+"\n"
+"\n"
+"public boolean setUpJMS()\n"
+"{\n"
+"InitialContext ic;\n"
+"try\n"
+"{\n"
+"// assume jndi.properties is configured for HA-JNDI\n"
+"ic = new InitialContext();\n"
+"connectionFactory = (ConnectionFactory)ic.lookup(\"ConnectionFactory\");\n"
+"queue = (Destination)ic.lookup(\"queue/FailoverTestQueue\");\n"
+"connection = connectionFactory.createConnection();\n"
+"try\n"
+"{\n"
+"log.debug(\"Connection created ...\");\n"
+"\n"
+"// KEY - register for exception callbacks\n"
+"connection.setExceptionListener(new ExceptionListenerImpl());\n"
+"\n"
+"session = connection.createSession(false, Session.AUTO_ACKNOWLEDGE);\n"
+"log.debug(\"Session created ...\");\n"
+"producer = session.createProducer(queue);\n"
+"\n"
+"producer.setDeliveryMode(DeliveryMode.NON_PERSISTENT);\n"
+"log.debug(\"Producer created ...\");\n"
+"\n"
+"return true;\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"// We failed so close the connection\n"
+"try\n"
+"{\n"
+"connection.close();\n"
+"}\n"
+"catch (JMSException ignored)\n"
+"{\n"
+"// Pointless\n"
+"}\n"
+"// Rethrow the initial problem to where we will log it\n"
+"throw e;\n"
+"} \n"
+"finally\n"
+"{\n"
+"// And close the initial context\n"
+"// We don't want to wait for the garbage collector to close it\n"
+"// otherwise we'll have useless hanging network connections\n"
+"ic.close();\n"
+"}\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"log.error(\"Error setting up JMS\", e);\n"
+"return false;\n"
+"}\n"
+"}\n"
+"\n"
+"public void sendMessages()\n"
+"{\n"
+"int cnt = 0;\n"
+"while(doSend)\n"
+"{\n"
+"try\n"
+"{\n"
+"Thread.sleep(100);\n"
+"\n"
+"Message m = session.createObjectMessage(new Integer(cnt++));\n"
+"producer.send(m);\n"
+"\n"
+"log.trace(\"message \" + cnt + \" sent\");\n"
+"\n"
+"}\n"
+"catch(Exception e)\n"
+"{\n"
+"cnt--;\n"
+"log.error(e.getMessage());\n"
+"}\n"
+"}\n"
+"}\n"
+"\n"
+"\n"
+"\n"
+"private class ExceptionListenerImpl implements ExceptionListener\n"
+"{\n"
+"public void onException(JMSException e)\n"
+"{\n"
+" \n"
+"for(int i = 0; i < NUM_RETRIES; i++)\n"
+" {\n"
+" log.warn(\"Connection has problems, trying to re-create it, "
+"attempt \" +\n"
+" (i + 1) + \" ...\");\n"
+" \n"
+" try \n"
+" {\n"
+" connection.close(); // unregisters the ExceptionListener\n"
+" }\n"
+" catch(Exception e2) {\n"
+" // I will get an Exception anyway, since the connection to "
+"the \n"
+" //server is broken, but close() frees up resources associated \n"
+" // with the connection\n"
+" }\n"
+" \n"
+" boolean setupOK = setUpJMS();\n"
+" \n"
+" if (setupOK)\n"
+" {\n"
+" log.info(\"Connection re-established\");\n"
+" return;\n"
+" }\n"
+" else\n"
+" {\n"
+" log.warn(\"Re-creating connection failed, retrying ...\");\n"
+" }\n"
+" }\n"
+" \n"
+" log.error(\"Cannot re-establish connection, giving up ...\");\n"
+" doSend = false;\n"
+" }\n"
+" }\n"
+"}\n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:132
+#, no-c-format
+msgid "MDBs and HA-JMS Failover"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:133
+#, no-c-format
+msgid ""
+"When you deploy an MDB in JBoss, JBoss' MDB container handles for you all "
+"issues associated with finding the cluster singleton HA-JMS server and with "
+"reconnecting to it if it fails over."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JMS.xml:143
+#, no-c-format
+msgid "Load Balanced HA-JMS MDBs"
+msgstr "负载平衡的 HA-JMS MDBs "
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:144
+#, no-c-format
+msgid ""
+"While the HA-JMS queues and topics only run on a single node at a time, MDBs "
+"on multiple nodes can receive and process messages from the HA-JMS master "
+"node. The contested queues and topics result in load balancing behavior for "
+"MDBs. To enable loading balancing for MDBs, you can specify a receiver for "
+"the queue. The receiver records which node is waiting for a message and in "
+"which order the messages should be processed. JBoss provides three receiver "
+"implementations."
+msgstr ""
+"虽然 HA-JMS 队列(queues)和主题(topics)在同一时间只在单节点上运行,但其他"
+"节点上的 MDBs 也能够接收和处理 HA-JMS 主节点上的信息。这种竞争的情况导致 "
+"MDBs 的平衡负载行为。为了启用 MDBs 的平衡负载,你可以指定队列的 receiver。这"
+"个 receiver 记录哪个节点正在等待信息和信息该按什么样的顺序来处理。JBoss 提供"
+"三个 receiver 的实现(implementations)。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:151
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImpl</literal> is the default "
+"implementation using a <literal>HashSet</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImpl</literal> 是 <literal>HashSet</"
+"literal> 的缺省实现(implementation)。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:155
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImplArrayList</literal> is the "
+"implementation using an <literal>ArrayList</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImplArrayList</literal> 是 "
+"<literal>ArrayList</literal> 的实现。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:159
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.mq.server.ReceiversImplLinkedList</literal> is the "
+"implementation using a <literal>LinkedList</literal>."
+msgstr ""
+"<literal>org.jboss.mq.server.ReceiversImplLinkedList</literal> 是 "
+"<literal>LinkedList</literal> 的实现。"
+
+#. Tag: para
+#: Clustering_Guide_JMS.xml:163
+#, no-c-format
+msgid ""
+"You can specify the receiver implementation class name as an attribute in "
+"the MBean that defines the permanent JMS <literal>Queue</literal> or "
+"<literal>DestinationManager</literal> on each node. For best load balancing "
+"performance, we suggest you to use the <literal>ReceiversImplArrayList</"
+"literal> or <literal>ReceiversImplLinkedList</literal> implementations due "
+"to an undesirable implementation detail of <literal>HashSet</literal> in the "
+"JVM."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JNDI.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JNDI.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Guide_JNDI.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,1010 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:5
+#, no-c-format
+msgid "Clustered JNDI Services"
+msgstr "群集的 JNDI 服务"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:6
+#, no-c-format
+msgid ""
+"JNDI is one of the most important services provided by the application "
+"server. The JBoss HA-JNDI (High Availability JNDI) service brings the "
+"following features to JNDI:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:10
+#, no-c-format
+msgid ""
+"Transparent failover of naming operations. If an HA-JNDI naming Context is "
+"connected to the HA-JNDI service on a particular JBoss AS instance, and that "
+"service fails or is shut down, the HA-JNDI client can transparently fail "
+"over to another AS instance."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:15
+#, no-c-format
+msgid ""
+"Load balancing of naming operations. An HA-JNDI naming Context will "
+"automatically load balance its requests across all the HA-JNDI servers in "
+"the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:20
+#, no-c-format
+msgid "Automatic client discovery of HA-JNDI servers (using multicast)."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:25
+#, no-c-format
+msgid ""
+"Unified view of JNDI trees cluster-wide. Client can connect to the HA-JNDI "
+"service running on any node in the cluster and find objects bound in JNDI on "
+"any other node. This is accomplished via two mechanisms:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:33
+#, no-c-format
+msgid ""
+"Cross-cluster lookups. A client can perform a lookup and the server side HA-"
+"JNDI service has the ability to find things bound in regular JNDI on any "
+"node in the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:37
+#, no-c-format
+msgid ""
+"A replicated cluster-wide context tree. An object bound into the HA-JNDI "
+"service will be replicated around the cluster, and a copy of that object "
+"will be available in-VM on each node in the cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:46
+#, no-c-format
+msgid ""
+"JNDI is a key component for many other interceptor-based clustering "
+"services: those services register themselves with the JNDI so that the "
+"client can lookup their proxies and make use of their services. HA-JNDI "
+"completes the picture by ensuring that clients have a highly-available means "
+"to look up those proxies. However, it is important to understand that using "
+"HA-JNDI (or not) has no effect whatsoever on the clustering behavior of the "
+"objects that are looked up. To illustrate:"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:51
+#, no-c-format
+msgid ""
+"If an EJB is not configured as clustered, looking up the EJB via HA-JNDI "
+"does not somehow result in the addition of clustering capabilities (load "
+"balancing of EJB calls, transparent failover, state replication) to the EJB."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:56
+#, no-c-format
+msgid ""
+"If an EJB is configured as clustered, looking up the EJB via regular JNDI "
+"instead of HA-JNDI does not somehow result in the removal of the bean "
+"proxy's clustering capabilities."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:66
+#, no-c-format
+msgid "How it works"
+msgstr "它怎样工作"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:67
+#, no-c-format
+msgid ""
+"The JBoss client-side HA-JNDI naming Context is based on the client-side "
+"interceptor architecture. The client obtains an HA-JNDI proxy object (via "
+"the InitialContext object) and invokes JNDI lookup services on the remote "
+"server through the proxy. The client specifies that it wants an HA-JNDI "
+"proxy by configuring the naming properties used by the InitialContext "
+"object. This is covered in detail in the “Client Configuration” section. "
+"Other than the need to ensure the appropriate naming properties are provided "
+"to the InitialContext, the fact that the naming Context is using HA-JNDI is "
+"completely transparent to the client."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:70
+#, fuzzy, no-c-format
+msgid ""
+"On the server side, he the HA-JNDI service maintains a cluster-wide context "
+"tree. The cluster wide tree is always available as long as there is one node "
+"left in the cluster. Each node in the cluster also maintains its own local "
+"JNDI context tree. The HA-JNDI service on that node is able to find objects "
+"bound into the local JNDI context tree. An application can bind its objects "
+"to either tree. The design rationale for this architecture is as follows:"
+msgstr ""
+"JBoss HA-JNDI (高可用性 JNDI)服务维护了一个跨群集的上下文树(context "
+"tree)。只要群集里有一个节点,这个树就会存在。群集里的每个 JNDI 节点也维护子"
+"集的本地 JNDI 上下文。服务器端的应用程序可以把它的对象绑定在两者中的任意一个"
+"上。在本部分内容里,你将学习怎样区分这两种树和在应用部署时的最佳做法。这个架"
+"构的合理设计如下:"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:75
+#, fuzzy, no-c-format
+msgid ""
+"It avoids migration issues with applications that assume that their JNDI "
+"implementation is local. This allows clustering to work out-of-the-box with "
+"just a few tweaks of configuration files."
+msgstr ""
+"我们不希望在本地实现 JNDI 的应用程序有任何的移植问题。我们希望通过简单的配置"
+"群集系统就可以正常工作。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:81
+#, fuzzy, no-c-format
+msgid ""
+"In a homogeneous cluster, this configuration actually cuts down on the "
+"amount of network traffic. A homogenous cluster is one where the same types "
+"of objects are bound under the same names on each node."
+msgstr "在同样的群集里,这个配置实际上降低了网络的负载。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:86
+#, no-c-format
+msgid ""
+"Designing it in this way makes the HA-JNDI service an optional service since "
+"all underlying cluster code uses a straight new <literal>InitialContext()</"
+"literal> to lookup or create bindings."
+msgstr ""
+"既然所有下面的群集节点都使用一个新的 <literal>InitialContext()</literal> 来查"
+"找或创建绑定,用这个方法来设计可以使 HA-JNDI 服务成为一种可选的服务。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:92
+#, fuzzy, no-c-format
+msgid ""
+"On the server side, a naming <literal>Context</literal> obtained via a call "
+"to new <literal>InitialContext()</literal> will be bound to the local-only, "
+"non-cluster-wide JNDI Context (this is actually basic JNDI). So, all EJB "
+"homes and such will not be bound to the cluster-wide JNDI Context, but "
+"rather, each home will be bound into the local JNDI."
+msgstr ""
+"在服务器端,<literal>new InitialContext()</literal> 将会绑定到一个仅用于本地"
+"的,非跨群集的 JNDI 上下文(实际上是基本 JNDI)。因此,所有 EJB 主接口"
+"(homes)都不会绑定到跨群集的 JNDI 上下文。但是,每个主接口都会绑定到本地 "
+"JNDI 上。当远程的客户通过 HA-JNDI 发起一个查找,HA-JNDI 在全局跨群集上下文找"
+"不到这个对象时会委托给本地 JNDI 上下文。详细的查找规则如下所示。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:95
+#, no-c-format
+msgid ""
+"When a remote client does a lookup through HA-JNDI, HA-JNDI will delegate to "
+"the local JNDI Context when it cannot find the object within the global "
+"cluster-wide Context. The detailed lookup rule is as follows."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:100
+#, fuzzy, no-c-format
+msgid "If the binding is available in the cluster-wide JNDI tree, return it."
+msgstr "如果这个绑定在跨群集的 JNDI 树(JNDI tree)里可用。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:103
+#, fuzzy, no-c-format
+msgid ""
+"If the binding is not in the cluster-wide tree, delegate the lookup query to "
+"the local JNDI service and return the received answer if available."
+msgstr ""
+"如果这个绑定不在跨群集的树里,它会把查找请求委托给本地 JNDI 服务并返回可用的"
+"结果。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:106
+#, fuzzy, no-c-format
+msgid ""
+"If not available, the HA-JNDI services asks all other nodes in the cluster "
+"if their local JNDI service owns such a binding and returns the answer from "
+"the set it receives."
+msgstr ""
+"如果没有可用的结果,HA-JNDI 服务会查找其他群集里的节点,如果它们的本地 JNDI "
+"服务拥有这样的绑定,就会返回相应的结果。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:109
+#, no-c-format
+msgid ""
+"If no local JNDI service owns such a binding, a "
+"<literal>NameNotFoundException</literal> is finally raised."
+msgstr ""
+"如果没有任何本地 JNDI 服务有这样的一个绑定,最后会产生 "
+"<literal>NameNotFoundException</literal> 异常。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:113
+#, no-c-format
+msgid ""
+"In practice, objects are rarely bound in the cluster-wide JNDI tree; rather "
+"they are bound in the local JNDI tree. For example, when EJBs are deployed, "
+"their proxies are always bound in local JNDI, not HA-JNDI. So, an EJB home "
+"lookup done through HA-JNDI will always be delegated to the local JNDI "
+"instance."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:117 Clustering_Guide_JNDI.xml:124
+#: Clustering_Guide_JNDI.xml:130
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:118
+#, fuzzy, no-c-format
+msgid ""
+"If different beans (even of the same type, but participating in different "
+"clusters) use the same JNDI name, this means that each JNDI server will have "
+"a logically different \"target\" bound (JNDI on node 1 will have a binding "
+"for bean A and JNDI on node 2 will have a binding, under the same name, for "
+"bean B). Consequently, if a client performs a HA-JNDI query for this name, "
+"the query will be invoked on any JNDI server of the cluster and will return "
+"the locally bound stub. Nevertheless, it may not be the correct stub that "
+"the client is expecting to receive! So, it is always best practice to ensure "
+"that across the cluster different names are used for logically different "
+"bindings."
+msgstr ""
+"所以,当 EJB home 通过 HA-JNDI 查找,总会委托给本地 JNDI 实例。如果不同的 "
+"beans(即使是相同的类型,但在不同的群集里)使用同一个 JNDI 名称,这意味着每个 "
+"JNDI 服务器将会有一个不同的 \"target\" 绑定(节点 1 上的 JNDI 将有一个用于 "
+"bean A 的绑定,节点 2 会有一个用于 bean B 的相同名字的绑定)。因此,如果客户为"
+"这个名字执行 HA-JNDI 查询,这个查询会在群集里的任何 JNDI 服务器上调用并返回本"
+"地绑定的 stub。而且,它未必是客户所希望的正确的 stub!"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:125
+#, fuzzy, no-c-format
+msgid ""
+"You cannot currently use a non-JNP JNDI implementation (i.e. LDAP) for your "
+"local JNDI implementation if you want to use HA-JNDI. However, you can use "
+"JNDI federation using the ExternalContext MBean to bind non-JBoss JNDI trees "
+"into the JBoss JNDI namespace. Furthermore, nothing prevents you using one "
+"centralized JNDI server for your whole cluster and scrapping HA-JNDI and JNP."
+msgstr ""
+"如果你想使用 HA-JNDI,你不能有一个用于本地 JNDI 实现的 non-JNP JNDI 实现"
+"(如:LDAP)。然而,你可以用 <literal>ExternalContext</literal> MBean 来运用 "
+"JNDI 联合把非 JBoss JNDI trees 绑定到 JBoss JNDI 命名空间里。而且,你也可以对"
+"整个群集使用集中式的 JNDI 服务器,而不用 HA-JNDI 和 JNP。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:131
+#, fuzzy, no-c-format
+msgid ""
+"If a binding is only made available on a few nodes in the cluster (for "
+"example because a bean is only deployed on a small subset of nodes in the "
+"cluster), the probability that a lookup will hit a HA-JNDI server that does "
+"not own this binding is higher and thus the lookup will need to be forwarded "
+"to all nodes in the cluster. Consequently, the query time will be longer "
+"than if the binding would have been available locally. Moral of the story: "
+"as much as possible, cache the result of your JNDI queries in your client."
+msgstr ""
+"如果绑定只在群集(例如,bean 只在群集里某一小的子集里部署)里的一些节点上可"
+"用,查找没有这个绑定 HA-JNDI 服务器的可能性就增高了,而且需要将查找转发给群集"
+"里的所有节点。因此,查询时间会比这个绑定在本地可用的情况更长。这就告诉我们:"
+"尽可能地在客户端缓存你的 JNDI 查询结果。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:139
+#, no-c-format
+msgid ""
+"So, an EJB home lookup through HA-JNDI, will always be delegated to the "
+"local JNDI instance. If different beans (even of the same type, but "
+"participating in different clusters) use the same JNDI name, it means that "
+"each JNDI server will have a different \"target\" bound (JNDI on node 1 will "
+"have a binding for bean A and JNDI on node 2 will have a binding, under the "
+"same name, for bean B). Consequently, if a client performs a HA-JNDI query "
+"for this name, the query will be invoked on any JNDI server of the cluster "
+"and will return the locally bound stub. Nevertheless, it may not be the "
+"correct stub that the client is expecting to receive!"
+msgstr ""
+"所以,当 EJB home 通过 HA-JNDI 查找,总会委托给本地 JNDI 实例。如果不同的 "
+"beans(即使是相同的类型,但在不同的群集里)使用同一个 JNDI 名称,这意味着每个 "
+"JNDI 服务器将会有一个不同的 \"target\" 绑定(节点 1 上的 JNDI 将有一个用于 "
+"bean A 的绑定,节点 2 会有一个用于 bean B 的相同名字的绑定)。因此,如果客户为"
+"这个名字执行 HA-JNDI 查询,这个查询会在群集里的任何 JNDI 服务器上调用并返回本"
+"地绑定的 stub。而且,它未必是客户所希望的正确的 stub!"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:147
+#, no-c-format
+msgid ""
+"You cannot currently use a non-JNP JNDI implementation (i.e. LDAP) for your "
+"local JNDI implementation if you want to use HA-JNDI. However, you can use "
+"JNDI federation using the <literal>ExternalContext</literal> MBean to bind "
+"non-JBoss JNDI trees into the JBoss JNDI namespace. Furthermore, nothing "
+"prevents you though of using one centralized JNDI server for your whole "
+"cluster and scrapping HA-JNDI and JNP."
+msgstr ""
+"如果你想使用 HA-JNDI,你不能有一个用于本地 JNDI 实现的 non-JNP JNDI 实现"
+"(如:LDAP)。然而,你可以用 <literal>ExternalContext</literal> MBean 来运用 "
+"JNDI 联合把非 JBoss JNDI trees 绑定到 JBoss JNDI 命名空间里。而且,你也可以对"
+"整个群集使用集中式的 JNDI 服务器,而不用 HA-JNDI 和 JNP。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:154
+#, no-c-format
+msgid ""
+"If a binding is only made available on a few nodes in the cluster (for "
+"example because a bean is only deployed on a small subset of nodes in the "
+"cluster), the probability to lookup a HA-JNDI server that does not own this "
+"binding is higher and the lookup will need to be forwarded to all nodes in "
+"the cluster. Consequently, the query time will be longer than if the binding "
+"would have been available locally. Moral of the story: as much as possible, "
+"cache the result of your JNDI queries in your client."
+msgstr ""
+"如果绑定只在群集(例如,bean 只在群集里某一小的子集里部署)里的一些节点上可"
+"用,查找没有这个绑定 HA-JNDI 服务器的可能性就增高了,而且需要将查找转发给群集"
+"里的所有节点。因此,查询时间会比这个绑定在本地可用的情况更长。这就告诉我们:"
+"尽可能地在客户端缓存你的 JNDI 查询结果。"
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:166
+#, no-c-format
+msgid "Client configuration"
+msgstr "客户端配置"
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:168
+#, no-c-format
+msgid "For clients running inside the application server"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:169
+#, fuzzy, no-c-format
+msgid ""
+"If you want to access HA-JNDI from inside the application server, you must "
+"explicitly get an InitialContext by passing in JNDI properties. The "
+"following code shows how to create a naming Context bound to HA-JNDI:"
+msgstr ""
+"如果你要从服务器端访问 HA-JNDI,你必须传入 JNDI 属性来显性地得到 "
+"<literal>InitialContext</literal>。下面的代码展示了怎样访问 HA-JNDI。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:172
+#, fuzzy, no-c-format
+msgid ""
+"Properties p = new Properties(); \n"
+" p.put(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jnp.interfaces.NamingContextFactory\"); \n"
+" p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces"
+"\"); \n"
+" p.put(Context.PROVIDER_URL, \"localhost:1100\"); // HA-JNDI port. \n"
+" return new InitialContext(p);"
+msgstr ""
+"Properties p = new Properties(); \n"
+"p.put(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jnp.interfaces.NamingContextFactory\"); \n"
+"p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces\"); \n"
+"p.put(Context.PROVIDER_URL, \"localhost:1100\"); // HA-JNDI port. \n"
+"return new InitialContext(p);"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:173
+#, fuzzy, no-c-format
+msgid ""
+"The Context.PROVIDER_URL property points to the HA-JNDI service configured "
+"in the HANamingService MBean (see the section called “JBoss configuration”)."
+msgstr ""
+"<literal>Context.PROVIDER_URL</literal> 属性指向 <literal>HANamingService</"
+"literal> MBean (参看 <xref linkend=\"clustering-jndi-jboss\"/>)里配置的 HA-"
+"JNDI 服务。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:176
+#, no-c-format
+msgid ""
+"However, this does not work in all cases, especially when running a multi-"
+"homed cluster (several JBoss instances on one machine bound to different "
+"IPs). A safer method is not to specify the Context.PROVIDER_URL (which does "
+"not work in all scenarios) but the partition name property:"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:179
+#, fuzzy, no-c-format
+msgid ""
+"Properties p = new Properties();\n"
+" p.put(Context.INITIAL_CONTEXT_FACTORY, \"org.jnp.interfaces."
+"NamingContextFactory\");\n"
+" p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces"
+"\");\n"
+" p.put(\"jnp.partitionName\", \"DefaultPartition\"); // partition "
+"name.\n"
+" return new InitialContext(p);"
+msgstr ""
+"Properties p = new Properties(); \n"
+"p.put(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jnp.interfaces.NamingContextFactory\"); \n"
+"p.put(Context.URL_PKG_PREFIXES, \"jboss.naming:org.jnp.interfaces\"); \n"
+"p.put(Context.PROVIDER_URL, \"localhost:1100\"); // HA-JNDI port. \n"
+"return new InitialContext(p);"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:180
+#, no-c-format
+msgid ""
+"Do not attempt to simplify things by placing a jndi.properties file in your "
+"deployment or by editing the AS's conf/jndi.properties file. Doing either "
+"will almost certainly break things for your application and quite possibly "
+"across the application server. If you want to externalize your client "
+"configuration, one approach is to deploy a properties file not named jndi."
+"properties, and then programatically create a Properties object that loads "
+"that file's contents."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:187
+#, no-c-format
+msgid "For clients running outside the application server"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:189
+#, fuzzy, no-c-format
+msgid ""
+"The JNDI client needs to be aware of the HA-JNDI cluster. You can pass a "
+"list of JNDI servers (i.e., the nodes in the HA-JNDI cluster) to the "
+"<literal>java.naming.provider.url</literal> JNDI setting in the "
+"<literal>jndi.properties</literal> file. Each server node is identified by "
+"its IP address and the JNDI port number. The server nodes are separated by "
+"commas (see <xref linkend=\"clustering-jndi-jboss\"/> for how to configure "
+"the servers and ports)."
+msgstr ""
+"JNDI 客户需要意识到 HA-JNDI 的群集方式。你可以把 JNDI 服务器的列表(HA-JNDI群"
+"集里的节点)写入到 <literal>jndi.properties</literal> 文件里的 <literal>java."
+"naming.provider.url</literal> 设置里。每个服务器节点都用它的 IP 地址和 JNDI "
+"端口号码来识别。服务器节点用逗号来隔开(关于怎么配置服务器和端口,请参看 "
+"<xref linkend=\"clustering-jndi-jboss\"/> )。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:191
+#, no-c-format
+msgid ""
+"java.naming.provier.url=server1:1100,server2:1100,server3:1100,server4:1100"
+msgstr ""
+"java.naming.provier.url=server1:1100,server2:1100,server3:1100,server4:1100"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:192
+#, no-c-format
+msgid ""
+"When initialising, the JNP client code will try to get in touch with each "
+"server node from the list, one after the other, stopping as soon as one "
+"server has been reached. It will then download the HA-JNDI stub from this "
+"node."
+msgstr ""
+"初始化时,JNP 客户代码会试图连接列表里的每个服务器,一个接一个,只要连接到一"
+"个服务器它就会停止尝试。然后它将从这个节点下载 HA-JNDI stub。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:196
+#, fuzzy, no-c-format
+msgid ""
+"There is no load balancing behavior in the JNP client lookup process itself. "
+"It just goes through the provider lists and uses the first available server "
+"to obtain the stub. The HA-JNDI provider list only needs to contain a subset "
+"of HA-JNDI nodes in the cluster."
+msgstr ""
+"JNP 客户的查找过程中没有用到负载平衡。它只是遍历这个列表来使用第一个可用的服"
+"务器。HA-JNDI 提供者列表只需要包含群集里的 HA-JNDI 节点的一个子集。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:199
+#, fuzzy, no-c-format
+msgid ""
+"The downloaded smart proxy contains the list of currently running nodes and "
+"the logic to load balance naming requests and to fail-over to another node "
+"if necessary. Furthermore, each time a JNDI invocation is made to the "
+"server, the list of targets in the proxy interceptor is updated (only if the "
+"list has changed since the last call)."
+msgstr ""
+"下载的 smart stub 包含了必要时失效切换(fail-over)至另一节点的逻辑和更新的当"
+"前运行节点的列表。而且,每次对服务器执行 JNDI 调用后,stub interceptor 里的目"
+"标节点列表都会被更新(只有在上次调用后又有修改的情况下)"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:203
+#, fuzzy, no-c-format
+msgid ""
+"If the property string java.naming.provider.url is empty or if all servers "
+"it mentions are not reachable, the JNP client will try to discover a HA-JNDI "
+"server through a multicast call on the network (auto-discovery). See the "
+"section called “JBoss configuration” on how to configure auto-discovery on "
+"the JNDI server nodes. Through auto-discovery, the client might be able to "
+"get a valid HA-JNDI server node without any configuration. Of course, for "
+"auto-discovery to work, the network segment(s) between the client and the "
+"server cluster must be configured to propagate such multicast datagrams."
+msgstr ""
+"如果属性字符串 <literal>java.naming.provider.url</literal> 是空或者它标明的所"
+"有服务器是不可到达的,JNP client 会试图通过网络上的多点传送(multicast)调用"
+"来恢复 HA-JNDI 服务器。请参考 <xref linkend=\"clustering-jndi-jboss\"/>关于怎"
+"样在 JNDI 服务器节点上配置自动恢复(auto-discovery)的内容。通过自动恢复,客"
+"户端不需要任何配置就可以获得一个有效的 HA-JNDI 服务器节点。当然,为了自动恢复"
+"能够工作,客户应用程序必须和服务器节点(使用 EJB 服务器的 web servlets)在同"
+"一局域网里。局域网和广域网也必须配置成可以传送这样的多点传送数据包。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:207
+#, fuzzy, no-c-format
+msgid ""
+"By default the auto-discovery feature uses multicast group address 230.0.0.4 "
+"and port1102."
+msgstr "自动恢复(auto-discovery)特征使用多点传送组地址 230.0.0.4:1102。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:209
+#, fuzzy, no-c-format
+msgid ""
+"In addition to the <literal>java.naming.provider.url</literal> property, you "
+"can specify a set of other properties. The following list shows all "
+"clustering-related client side properties you can specify when creating a "
+"new InitialContext. (All of the standard, non-clustering-related environment "
+"properties used with regular JNDI are also available.)"
+msgstr ""
+"除 <literal>java.naming.provier.url</literal> 属性以外,你还可以指定一系列其"
+"他属性。下面的列表展示了当建立一个新的 <literal>InitialContext</literal> 时,"
+"你可以指定的所有客户端属性。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:212
+#, fuzzy, no-c-format
+msgid ""
+"<literal>java.naming.provider.url</literal>: Provides a list of IP addresses "
+"and port numbers for HA-JNDI provider nodes in the cluster. The client tries "
+"those providers one by one and uses the first one that responds."
+msgstr ""
+"<literal>java.naming.provier.url</literal>:提供群集里 HA-JNDI 提供者节点的 "
+"IP 地址和端口号的列表。客户端会尝试这些提供者并使用第一个响应的服务器。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:217
+#, no-c-format
+msgid ""
+"<literal>jnp.disableDiscovery</literal>: When set to <literal>true</"
+"literal>, this property disables the automatic discovery feature. Default is "
+"<literal>false</literal>."
+msgstr ""
+"<literal>jnp.disableDiscovery</literal>:当设置为 <literal>true</literal> "
+"时,这个属性关闭了自动恢复(automatic discovery)特征。它的缺省值是 "
+"<literal>false</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:222
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.partitionName</literal>: In an environment where multiple HA-"
+"JNDI services bound to distinct clusters (a.k.a. partitions), are running, "
+"this property allows you to ensure that your client only accepts automatic-"
+"discovery responses from servers in the desired partition. If you do not use "
+"the automatic discovery feature (i.e. jnp.disableDiscovery is true), this "
+"property is not used. By default, this property is not set and the automatic "
+"discovery select the first HA-JNDI server that responds, irregardless of the "
+"cluster partition name."
+msgstr ""
+"<literal>jnp.partitionName</literal>:在有多个绑定在不同的群集系统的 HA-JNDI "
+"服务的环境里,这个属性允许你配置当使用自动恢复(automatic discovery)特征时广"
+"播至哪个群集。如果你没有使用自动恢复特征(就是说你可在以在 <literal>java."
+"naming.provider.url</literal> 里显性地提供有效的 JNDI 节点的列表),这个属性"
+"就不会被使用。在缺省情况下,这个属性不会被设置,自动恢复选择第一个响应的 HA-"
+"JNDI 服务器,而不管在哪个群集系统里。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:225
+#, no-c-format
+msgid ""
+"<literal>jnp.discoveryTimeout</literal>: Determines how much time the "
+"context will wait for a response to its automatic discovery packet. Default "
+"is 5000 ms."
+msgstr ""
+"<literal>jnp.discoveryTimeout</literal>:决定上下文(context)等待对它的自动"
+"恢复数据包应答的的时间,它的缺省值是 5000 毫秒。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:229
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.discoveryGroup</literal>: Determines which multicast group "
+"address is used for the automatic discovery. Default is 230.0.0.4. Must "
+"match the value of the AutoDiscoveryAddress configured on the server side HA-"
+"JNDI service."
+msgstr ""
+"<literal>jnp.discoveryGroup</literal>:决定用于自动恢复的多点传送组地址。它的"
+"缺省值是 <literal>230.0.0.4</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:232
+#, fuzzy, no-c-format
+msgid ""
+"<literal>jnp.discoveryPort</literal>: Determines which multicast group port "
+"is used for the automatic discovery. Default is 1102. Must match the value "
+"of the AutoDiscoveryPort configured on the server side HA-JNDI service."
+msgstr ""
+"<literal>jnp.discoveryPort</literal>:决定用于自动恢复的多点传送组端口。它的"
+"缺省值是 <literal>1102</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:235
+#, no-c-format
+msgid ""
+"<literal>jnp.discoveryTTL</literal>: specifies the TTL (time-to-live) for "
+"autodiscovery IP multicast packets. This value represents the number of "
+"network hops a multicast packet can be allowed to propagate before "
+"networking equipment should drop the packet. Despite its name, it does not "
+"represent a unit of time."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Guide_JNDI.xml:246
+#, no-c-format
+msgid "JBoss configuration"
+msgstr "JBoss 配置"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:247
+#, no-c-format
+msgid ""
+"The <literal>cluster-service.xml</literal> file in the <literal>all/deploy</"
+"literal> directory includes the following MBean to enable HA-JNDI services."
+msgstr ""
+"<literal>all/deploy</literal> 目录下的 <literal>cluster-service.xml</"
+"literal> 文件包括了下列启用 HA-JNDI 服务的 MBean。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:249
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=${jboss.partition."
+"name:DefaultPartition}</depends> \n"
+" \n"
+"<mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>jboss:service=DefaultPartition</depends> \n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:250
+#, fuzzy, no-c-format
+msgid ""
+"You can see that this MBean depends on the <literal>DefaultPartition</"
+"literal> MBean defined above it (discussed earlier in this chapter). In "
+"other configurations, you can put that element in the <literal>jboss-service."
+"xml</literal> file or any other JBoss configuration files in the <literal>/"
+"deploy</literal> directory to enable HA-JNDI services. The available "
+"attributes for this MBean are listed below."
+msgstr ""
+"你可以看到这个 MBean 依赖于在它之上定义的 <literal>DefaultPartition</"
+"literal> MBean(在本章之前的部分曾讨论过)。在其他配置里,你可以把那个元素"
+"(element)放在 <literal>jboss-services.xml</literal> 或者 <literal>/"
+"deploy</literal> 目录下的其他 JBoss 配置文件里来启用 HA-JNDI 服务。这个 "
+"MBean 的可用属性如下所示。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:256
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Cluster Partition</emphasis> is a required attribute "
+"to inject the HAPartition service that HA-JNDI uses for intra-cluster "
+"communication."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:259
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BindAddress</emphasis> is an optional attribute to "
+"specify the address to which the HA-JNDI server will bind waiting for JNP "
+"clients. Only useful for multi-homed computers. The default value is the "
+"value of the jboss.bind.address system property, or the host's default "
+"addresss if that property is not set. The jboss.bind.address system property "
+"is set if the -b command line switch is used when JBoss is started."
+msgstr ""
+"<emphasis role=\"bold\">BindAddress</emphasis> 是一个可选属性,它指定 HA-"
+"JNDI 服务器绑定的等待 JNP 客户连接的地址。它只对多宿主主机(multi-homed "
+"computers)有用。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:262
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Port</emphasis> is an optional attribute to specify "
+"the port to which the HA-JNDI server will bind waiting for JNP clients. The "
+"default value is <literal>1100</literal>."
+msgstr ""
+"<emphasis role=\"bold\">Port</emphasis> 是一个可选属性,它指定 HA-JNDI 服务器"
+"等待 JNP 客户连接所绑定的端口。它的缺省值是 <literal>1100</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:267
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Backlog</emphasis> is an optional attribute to "
+"specify the backlog value used for the TCP server socket waiting for JNP "
+"clients. The default value is <literal>50</literal>."
+msgstr ""
+"<emphasis role=\"bold\">Backlog</emphasis> 是一个可选属性,它指定 TCP 服务器"
+"套接字等待 JNP 客户所使用的 backlog 值。它的缺省值是 <literal>50</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:272
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RmiPort</emphasis> determines which port the server "
+"should use to communicate with the downloaded stub. This attribute is "
+"optional. The default value is 1101. If no value is set, the server "
+"automatically assigns a RMI port."
+msgstr ""
+"<emphasis role=\"bold\">RmiPort</emphasis> 决定服务器应与下载的 stub 通信所用"
+"的端口。这个属性是可选的。如果它没有设置,服务器会自动分配一个 RMI 端口。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:275
+#, fuzzy, no-c-format
+msgid ""
+"<literal>DiscoveryDisabled</literal> is a boolean flag that disables "
+"configuration of the auto discovery multicast listener."
+msgstr ""
+"<emphasis role=\"bold\">DiscoveryDisabled</emphasis> 是一个布尔值标记,它可用"
+"来取消自动恢复多点传送侦听者(multicast listener)的配置。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:281
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryAddress</emphasis> is an optional "
+"attribute to specify the multicast address to listen to for JNDI automatic "
+"discovery. The default value is the value of the jboss.partition.udpGroup "
+"system property, or 230.0.0.4 if that is not set. The jboss.partition."
+"udpGroup system property is set if the -u command line switch is used when "
+"JBoss is started."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryAddress</emphasis> 是一个可选属性,它指"
+"定侦听的用于 JNDI 自动恢复的多点传送地址。它的缺省值是 <literal>230.0.0.4</"
+"literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:284
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryGroup</emphasis> is an optional "
+"attribute to specify the multicast group to listen to for JNDI automatic "
+"discovery.. The default value is <literal>1102</literal>."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryGroup</emphasis> 是一个可选属性,它指定"
+"侦听的用于 JNDI 自动恢复的多点传送组。它的缺省值是 <literal>1102</literal>。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:290
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryBindAddress</emphasis> sets the "
+"interface on which HA-JNDI should listen for auto-discovery request packets. "
+"If this attribute is not specified and a <literal>BindAddress</literal> is "
+"specified, the <literal>BindAddress</literal> will be used.."
+msgstr ""
+"<emphasis role=\"bold\">AutoDiscoveryBindAddress</emphasis> 设置自动恢复引导"
+"程序绑定的地址。如果这个属性没有指定而设置了 <literal>BindAddress</literal>,"
+"<literal>BindAddress</literal> 将被使用。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:293
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AutoDiscoveryTTL</emphasis> specifies the TTL (time-"
+"to-live) for autodiscovery IP multicast packets. This value represents the "
+"number of network hops a multicast packet can be allowed to propagate before "
+"networking equipment should drop the packet. Despite its name, it does not "
+"represent a unit of time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:296
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis> specifies the class "
+"name of the LoadBalancePolicyimplementation that should be included in the "
+"client proxy. See the earlier section on “Load-Balancing Policies” for "
+"details."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:301
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LookupPool</emphasis> specifies the thread pool "
+"service used to control the bootstrap and auto discovery lookups."
+msgstr ""
+"<emphasis role=\"bold\">LookupPool</emphasis> 指定用于控制引导程序和自动恢复"
+"查找的线程池服务。"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:306
+#, no-c-format
+msgid ""
+"The full default configuration of the <literal>HANamingService</literal> "
+"MBean is as follows."
+msgstr "<literal>HANamingService</literal> MBean 的完整缺省配置如下所示。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:307
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+" <mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <!-- We now inject the partition into the HAJNDI service instead \n"
+" of requiring that the partition name be passed --> \n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=${jboss.partition.name:"
+"DefaultPartition}</depends> \n"
+" <!-- Bind address of bootstrap and HA-JNDI RMI endpoints --> \n"
+" <attribute name=\"BindAddress\">${jboss.bind.address}</attribute> \n"
+" <!-- Port on which the HA-JNDI stub is made available --> \n"
+" <attribute name=\"Port\">1100</attribute> \n"
+" <!-- RmiPort to be used by the HA-JNDI service once bound. 0 => "
+"auto. --> \n"
+" <attribute name=\"RmiPort\">1101</attribute> \n"
+" <!-- Accept backlog of the bootstrap socket --> \n"
+" <attribute name=\"Backlog\">50</attribute> \n"
+" <!-- The thread pool service used to control the bootstrap and auto "
+"discovery lookups --> \n"
+" <depends optional-attribute-name=\"LookupPool\" \n"
+" proxy-type=\"attribute\">jboss.system:service=ThreadPool</"
+"depends> \n"
+" <!-- A flag to disable the auto discovery via multicast --> \n"
+" <attribute name=\"DiscoveryDisabled\">false</attribute> \n"
+" <!-- Set the auto-discovery bootstrap multicast bind address. If "
+"not \n"
+" specified and a BindAddress is specified, the BindAddress will be "
+"used. --> \n"
+" <attribute name=\"AutoDiscoveryBindAddress\">${jboss.bind.address}</"
+"attribute> \n"
+" <!-- Multicast Address and group port used for auto-discovery --> \n"
+" <attribute name=\"AutoDiscoveryAddress\">${jboss.partition."
+"udpGroup:230.0.0.4}</attribute> \n"
+" <attribute name=\"AutoDiscoveryGroup\">1102</attribute> \n"
+" <!-- The TTL (time-to-live) for autodiscovery IP multicast packets "
+"--> \n"
+" <attribute name=\"AutoDiscoveryTTL\">16</attribute> \n"
+" <!-- The load balancing policy for HA-JNDI --> \n"
+" <attribute name=\"LoadBalancePolicy\">org.jboss.ha.framework."
+"interfaces.RoundRobin</attribute> \n"
+" \n"
+" <!-- Client socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ClientSocketFactory\">custom</attribute> \n"
+" --> \n"
+" <!-- Server socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ServerSocketFactory\">custom</attribute> \n"
+" --> \n"
+" </mbean>]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>\n"
+" jboss:service=${jboss.partition.name:DefaultPartition}\n"
+" </depends> \n"
+" <! -- Name of the partition to which the service is linked --> \n"
+" <attribute name=\"PartitionName\">\n"
+" ${jboss.partition.name:DefaultPartition}\n"
+" </attribute> \n"
+" <! -- Bind address of bootstrap and HA-JNDI RMI endpoints --> \n"
+" <attribute name=\"BindAddress\">${jboss.bind.address}</"
+"attribute> \n"
+" <! -- Port on which the HA-JNDI stub is made available --> \n"
+" <attribute name=\"Port\">1100</attribute> \n"
+" <! -- RmiPort to be used by the HA-JNDI service once bound. \n"
+" 0 is for auto. --> \n"
+" <attribute name=\"RmiPort\">1101</attribute> \n"
+" <! -- Accept backlog of the bootstrap socket --> \n"
+" <attribute name=\"Backlog\">50</attribute> \n"
+" <! -- The thread pool service used to control the bootstrap and \n"
+" auto discovery lookups --> \n"
+" <depends optional-attribute-name=\"LookupPool\" \n"
+" proxy-type=\"attribute\">jboss.system:service=ThreadPool</"
+"depends>\n"
+"\n"
+" <! -- A flag to disable the auto discovery via multicast --> \n"
+" <attribute name=\"DiscoveryDisabled\">false</attribute> \n"
+" <! -- Set the auto-discovery bootstrap multicast bind address. --"
+"> \n"
+" <attribute name=\"AutoDiscoveryBindAddress\">\n"
+" ${jboss.bind.address}\n"
+" </attribute> \n"
+" \n"
+" <! -- Multicast Address and group port used for auto-discovery --"
+"> \n"
+" <attribute name=\"AutoDiscoveryAddress\">\n"
+" ${jboss.partition.udpGroup:230.0.0.4}\n"
+" </attribute> \n"
+" <attribute name=\"AutoDiscoveryGroup\">1102</attribute> \n"
+" <! -- The TTL (time-to-live))for autodiscovery IP multicast packets "
+"--> \n"
+" <attribute name=\"AutoDiscoveryTTL\">16</attribute>\n"
+"\n"
+" <! -- Client socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ClientSocketFactory\">custom</attribute> \n"
+" --> \n"
+" <! -- Server socket factory to be used for client-server \n"
+" RMI invocations during JNDI queries \n"
+" <attribute name=\"ServerSocketFactory\">custom</attribute> \n"
+" --> \n"
+"</mbean>"
+
+#. Tag: para
+#: Clustering_Guide_JNDI.xml:308
+#, fuzzy, no-c-format
+msgid ""
+"It is possible to start several HA-JNDI services that use different "
+"clusters. This can be used, for example, if a node is part of many clusters. "
+"In this case, make sure that you set a different port or IP address for "
+"eachservices. For instance, if you wanted to hook up HA-JNDI to the example "
+"cluster you set up and change the binding port, the Mbean descriptor would "
+"look as follows."
+msgstr ""
+"你可以启动几个使用不同群集的 HA-JNDI 服务。例如,这可以用在如果某一节点是属于"
+"多个群集系统的情况下。这个时候,你要确保给不同服务设置了不同的端口号或 IP 地"
+"址。例如,如果你想把 HA-JNDI 与 example 群集挂钩并改变绑定的端口,Mbean 描述"
+"会象下面的样子。"
+
+#. Tag: programlisting
+#: Clustering_Guide_JNDI.xml:311
+#, fuzzy, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+"\n"
+" <depends optional-attribute-name=\"ClusterPartition\" \n"
+" proxy-type=\"attribute\">jboss:service=MySpecialPartition</depends> \n"
+" <attribute name=\"Port\">56789</attribute> \n"
+"</mbean> ]]>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>jboss:service=MySpecialPartition</depends> \n"
+" <attribute name=\"PartitionName\">MySpecialPartition</"
+"attribute> \n"
+" <attribute name=\"Port\">56789</attribute> \n"
+"</mbean>"
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Clustering_Intro.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,767 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Clustering_Intro.xml:6
+#, no-c-format
+msgid "Quick Tutorial to Setup a Clustered Web Application"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:7
+#, no-c-format
+msgid ""
+"Web server clustering is to use multiple JBoss AS server instances to serve "
+"the same web address (e.g., http://www.jboss.com/). It is one of the most "
+"common clustering architectures JBoss AS users deploy. In this tutorial, we "
+"discuss the basic architecture of a web cluster and give step-by-step "
+"instructions on how to setup the cluster. A very simple web cluster looks "
+"like <xref linkend=\"Quick_Tutorial_to_Setup_a_Clustered_Web_Application-"
+"A_very_simple_web_cluster\"/>."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:11
+#, no-c-format
+msgid "A very simple web cluster"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:18
+#, no-c-format
+msgid ""
+"A lightweight web server, known as the load balancer, receives all HTTP "
+"requests from that web address and dispatches them to JBoss AS nodes in the "
+"cluster. The JBoss AS node does the heavy lifting of processing the request "
+"and generating the response. All the JBoss AS nodes share the same database "
+"server for persistent data in the application. Notice that each node "
+"contains the entire JBoss AS stack, including the web server, servlet "
+"container, EJB container, persistence manager etc. Breaking the JBoss AS "
+"stack to different physical servers would substantially complicate the "
+"architecture but without much scalability benefit."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:22
+#, no-c-format
+msgid "Setup the simple web cluster"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:23
+#, no-c-format
+msgid ""
+"In our simple cluster depicted in <xref linkend="
+"\"Quick_Tutorial_to_Setup_a_Clustered_Web_Application-"
+"A_very_simple_web_cluster\"/>, every JBoss AS node is independent of each "
+"other. The load balancer \"remembers\" the user sessions and always forwards "
+"requests from the same session to the same JBoss AS node (a.k.a sticky "
+"session). So, each JBoss AS node stores its own set of HTTP session data. "
+"There is no information sharing between JBoss AS nodes, besides the "
+"persistent data in the shared database."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:26
+#, no-c-format
+msgid ""
+"Assuming that the load balancer and the shared database are not performance "
+"bottlenecks, this cluster can scale linearly with the number of JBoss AS "
+"nodes. Of course, the simplicity and scalability has their price. The most "
+"obvious shortcomings of the this simple architecture are the lack of support "
+"for failover and database cache. We will look at solutions for those "
+"problems in <xref linkend=\"Optional_improvements_to_the_simple_cluster-"
+"Database_cache\"/>."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:30
+#, fuzzy, no-c-format
+msgid "Setup the load balancer"
+msgstr "负载平衡系统"
+
+#. Tag: para
+#: Clustering_Intro.xml:31
+#, no-c-format
+msgid ""
+"The easiest way to setup a load balancer is to use the Apache web server "
+"with the mod_jk module to interact with JBoss AS. After installing the "
+"Apache web server, you should download the mod_jk 1.2.x binary from <ulink "
+"url=\"http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/\"> "
+"http://www.apache.org/dist/jakarta/tomcat-connectors/jk/binaries/</ulink>. "
+"Rename the downloaded file to mod_jk.so and copy it under APACHE_HOME/"
+"modules/ directory."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:35
+#, no-c-format
+msgid "Use mod_jk 1.2.x"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:36
+#, no-c-format
+msgid ""
+"We strongly advise you to use mod_jk 1.2.x, as both mod_jk and mod_jk2 are "
+"deprecated, unsupported and no further developments are going on in the "
+"community."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:41
+#, no-c-format
+msgid ""
+"Aside from loading balancing, using Apache mod_jk to front JBoss AS servers "
+"have other benefits. The most important one is that Apache serves static "
+"content (e.g., images) much faster than Tomcat (i.e., the embedded servlet "
+"server in JBoss AS). Apache also handles SSL and keep-alive connections much "
+"more efficiently than Tomcat. In addition, Apache provides modules for "
+"access control, URL rewriting, CGI/PHP execution. So, we recommend fronting "
+"JBoss AS with Apache mod_jk even if you have only one JBoss AS node."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:45
+#, no-c-format
+msgid ""
+"To tell the Apache server to use mod_jk, you need to add the following line "
+"to the APACHE_HOME/conf/httpd.conf file."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:48
+#, no-c-format
+msgid "Add this to the httpd.conf file"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:49
+#, fuzzy, no-c-format
+msgid ""
+"# Include mod_jk's specific configuration file\n"
+"Include conf/mod_jk.conf"
+msgstr ""
+"# Include mod_jk's specific configuration file \n"
+"Include conf/mod-jk.conf"
+
+#. Tag: para
+#: Clustering_Intro.xml:50
+#, fuzzy, no-c-format
+msgid ""
+"Next, you should configure the interaction between Apache server and mod_jk "
+"by creating the APACHE_HOME/conf/mod_jk.conf file as follows. The LoadModule "
+"directive must reference the mod_jk library you have downloaded in the "
+"previous section. You must indicate the exact same name with the \"modules\" "
+"file path prefix. The JkMount directive tells Apache which URLs it should "
+"forward to the mod_jk module (and, in turn, to the JBoss AS instances). In "
+"the above file, all requests with URL path /application/* are sent to the "
+"mod_jk load-balancer. This way, you can configure Apache to server static "
+"contents (or PHP contents) directly and only use the loadbalancer for Java "
+"applications. If you only use mod_jk as a loadbalancer, you can also forward "
+"all URLs (i.e., /*) to mod_jk."
+msgstr ""
+"<literal>JkMount</literal> 指令告诉 Apache 应该把 URLs 转发给哪个 mod_jk 模块"
+"(和 Servlet 容器)。在上面的文件里,所有基于 URL 路径 <literal>/application/"
+"*</literal> 的请求都被发送到 mod_jk 负载平衡系统(load-balancer)。这样的"
+"话,你能够使 Apache 直接处理静态内容 (或 PHP 内容)而只对 Java 应用程序使用"
+"负载平衡系统。如果你只把 mod_jk 当作负载平衡系统使用,你也可以把所有的 URLs "
+"(也就是 <literal>/*</literal>)转发给 mod_jk。"
+
+#. Tag: title
+#: Clustering_Intro.xml:53
+#, fuzzy, no-c-format
+msgid "The mod_jk.conf file"
+msgstr "context.xml 文件"
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:54
+#, fuzzy, no-c-format
+msgid ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+"\n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+msgstr ""
+"# Load mod_jk module\n"
+"# Specify the filename of the mod_jk lib\n"
+"LoadModule jk_module modules/mod_jk.so\n"
+" \n"
+"# Where to find workers.properties\n"
+"JkWorkersFile conf/workers.properties\n"
+"\n"
+"# Where to put jk logs\n"
+"JkLogFile logs/mod_jk.log\n"
+" \n"
+"# Set the jk log level [debug/error/info]\n"
+"JkLogLevel info \n"
+" \n"
+"# Select the log format\n"
+"JkLogStampFormat \"[%a %b %d %H:%M:%S %Y]\"\n"
+" \n"
+"# JkOptions indicates to send SSK KEY SIZE\n"
+"JkOptions +ForwardKeySize +ForwardURICompat -ForwardDirectories\n"
+" \n"
+"# JkRequestLogFormat\n"
+"JkRequestLogFormat \"%w %V %T\"\n"
+" \n"
+"# Mount your applications\n"
+"JkMount /application/* loadbalancer\n"
+" \n"
+"# You can use external file for mount points.\n"
+"# It will be checked for updates each 60 seconds.\n"
+"# The format of the file is: /url=worker\n"
+"# /examples/*=loadbalancer\n"
+"JkMountFile conf/uriworkermap.properties \n"
+"\n"
+"# Add shared memory.\n"
+"# This directive is present with 1.2.10 and\n"
+"# later versions of mod_jk, and is needed for\n"
+"# for load balancing to work properly\n"
+"JkShmFile logs/jk.shm \n"
+" \n"
+"# Add jkstatus for managing runtime data\n"
+"<Location /jkstatus/>\n"
+" JkMount status\n"
+" Order deny,allow\n"
+" Deny from all\n"
+" Allow from 127.0.0.1\n"
+"</Location>"
+
+#. Tag: para
+#: Clustering_Intro.xml:55
+#, fuzzy, no-c-format
+msgid ""
+"Then, you need to configure mod_jk itself to load balance the JBoss AS "
+"cluster. The workers file conf/workers.properties specifies the locations of "
+"JBoss AS server nodes and how calls should be load-balanced across them. For "
+"a two nodes setup, the file could look like the following."
+msgstr ""
+"然后,你需要配置 mod_jk 的 workers 文件 <literal>conf/workers.properties</"
+"literal>。这个文件指定不同的 Servlet 容器的存放位置和怎样对它们之间的调用进行"
+"负载平衡。这个配置文件包含了一个全局设置部分以及针对每个目标 Servlet 容器的设"
+"置部分。对于两个节点的设立,这个文件如下所示:"
+
+#. Tag: title
+#: Clustering_Intro.xml:58
+#, fuzzy, no-c-format
+msgid "The workers.properties file"
+msgstr "A sample jndi.properties file"
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:59
+#, no-c-format
+msgid ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+msgstr ""
+"# Define list of workers that will be used\n"
+"# for mapping requests\n"
+"worker.list=loadbalancer,status\n"
+"\n"
+"# Define Node1\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node1.port=8009\n"
+"worker.node1.host=node1.mydomain.com \n"
+"worker.node1.type=ajp13\n"
+"worker.node1.lbfactor=1\n"
+"worker.node1.cachesize=10\n"
+"\n"
+"# Define Node2\n"
+"# modify the host as your host IP or DNS name.\n"
+"worker.node2.port=8009\n"
+"worker.node2.host= node2.mydomain.com\n"
+"worker.node2.type=ajp13\n"
+"worker.node2.lbfactor=1\n"
+"worker.node2.cachesize=10\n"
+"\n"
+"# Load-balancing behaviour\n"
+"worker.loadbalancer.type=lb\n"
+"worker.loadbalancer.balance_workers=node1,node2\n"
+"worker.loadbalancer.sticky_session=1\n"
+"#worker.list=loadbalancer\n"
+"\n"
+"# Status worker for managing load balancer\n"
+"worker.status.type=status"
+
+#. Tag: para
+#: Clustering_Intro.xml:60
+#, no-c-format
+msgid ""
+"The above file configures mod_jk to perform weighted round-robin load "
+"balancing between two JBoss AS instances, node1 and node2, listening on port "
+"8009. In the works.properties file, each node is defined using the worker."
+"XXX naming convention where XXX represents an arbitrary name you choose for "
+"one of the target JBoss AS node. For each worker, you must give the host "
+"name (or IP address) and port number of the AJP13 connector (the port 8009 "
+"is default). The lbfactor attribute is the load-balancing factor for this "
+"specific worker. It is used to define the priority (or weight) a node should "
+"have over other nodes. The higher this number is, the more HTTP requests it "
+"will receive. This setting can be used to differentiate servers with "
+"different processing power. The cachesize attribute defines the size of the "
+"thread pools associated to the JBoss AS node (i.e. the number of concurrent "
+"requests it will forward to the node). Make sure this number does not "
+"outnumber the number of threads configured on the AJP13 connector of the "
+"node. The last part of the conf/workers.properties file defines the "
+"loadbalancer worker. The worker.loadbalancer.balanced_workers line must list "
+"all workers previously defined in the same file, and then load-balancing "
+"will happen over these workers."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:64
+#, no-c-format
+msgid "Sticky sessions"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:65
+#, no-c-format
+msgid ""
+"In mod_jk, you almost always configure the load balancer to use \"sticky "
+"sessions\". With sticky sessions, mod_jk forwards requests in the same web "
+"session to the same JBoss AS node. The sticky session ensures that the user "
+"is always served by the JBoss AS instance that has the correct session "
+"state. Sticky session is required for our simple cluster setup."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:72
+#, fuzzy, no-c-format
+msgid "Configure JBoss AS nodes"
+msgstr "配置 JBoss"
+
+#. Tag: para
+#: Clustering_Intro.xml:73
+#, no-c-format
+msgid ""
+"The JBoss AS nodes in the cluster are almost identical to each other. They "
+"must run the same version of JBoss AS, the same applications, and have the "
+"same configuration except for few clustering related configuration options. "
+"In this section, we cover two JBoss AS configuration options required for "
+"the web cluster. One of them is universal for all nodes and the other is "
+"unique for each node."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:77
+#, no-c-format
+msgid "The clustering profile for JBoss AS"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:78
+#, no-c-format
+msgid ""
+"For this simple clustering architecture, you do not even need the "
+"\"clustering\" profile of JBoss AS -- you can just use the default JBoss AS "
+"profile since there is no communication (i.e., clustering) between JBoss AS "
+"nodes."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:82
+#, no-c-format
+msgid ""
+"First, we must configure all JBoss AS nodes to add an \"identifier\" of "
+"itself to all HTTP session IDs it serves. This way, the load balancer would "
+"know which JBoss AS node to forward each request just by checking at the "
+"session ID of the request. To do that, edit the JBOSS_HOME/server/all/deploy/"
+"jboss-web.deploy/META-INF/jboss-service.xml file (replace all with your own "
+"server configuration name). Locate the <attribute> element with a name "
+"of UseJK, and set its value to true as follows."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:85
+#, no-c-format
+msgid ""
+"Configure jboss-service.xml to support JBoss AS node identity in HTTP "
+"session IDs"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:86
+#, no-c-format
+msgid "<attribute name=\"UseJK\">true</attribute>"
+msgstr "<attribute name=\"UseJK\">true</attribute>"
+
+#. Tag: para
+#: Clustering_Intro.xml:87
+#, fuzzy, no-c-format
+msgid ""
+"Second, you need to actually give an identity to each JBoss AS node. On each "
+"clustered JBoss node, you need to name the node according to the name "
+"specified in workers.properties. For instance, on JBoss instance node1, edit "
+"the JBOSS_HOME/server/all/deploy/jboss-web.deployer/server.xml file (replace "
+"all with your own server configuration name if necessary). Locate the <"
+"Engine> element and add an attribute jvmRoute as follows."
+msgstr ""
+"在每个群集节点上,我们得按 <literal>workers.properties</literal> 里指定的名字"
+"来命名节点名。例如,在 JBoss 实例节点1上,编辑 <literal>JBOSS_HOME/server/"
+"all/deploy/jbossweb-tomcat50.sar/server.xml</literal> 文件(有必要的话用你自"
+"己的服务器名代替<literal>/all</literal>)。定位 <literal><Engine></"
+"literal> 元素并加入一个 <literal>jvmRoute</literal> 属性:"
+
+#. Tag: title
+#: Clustering_Intro.xml:90
+#, no-c-format
+msgid "Add node information to the server.xml file"
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:91
+#, fuzzy, no-c-format
+msgid ""
+"<Engine name=\"jboss.web\" \n"
+" defaultHost=\"localhost\" jvmRoute=\"node1\">\n"
+"... ...\n"
+"</Engine>"
+msgstr ""
+"<Engine name=\"jboss.web\" defaultHost=\"localhost\" jvmRoute=\"node1"
+"\">\n"
+"... ...\n"
+"</Engine>"
+
+#. Tag: para
+#: Clustering_Intro.xml:92
+#, no-c-format
+msgid ""
+"Each JBoss AS instance appends its own jvmRoute value to its HTTP session "
+"IDs so that mod_jk can route incoming requests. That's all you need on "
+"the JBoss AS node."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:98
+#, no-c-format
+msgid "Shared Database"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:99
+#, no-c-format
+msgid ""
+"By default, JBoss AS uses an embedded HSQL database for persistence data "
+"storage. For a web cluster to work properly, you must use a shared database "
+"for all server nodes. We recommend you setup a separate MySQL database "
+"server and then configure it as the DataSource for applications deployed on "
+"all nodes. Please see <xref linkend=\"alternative_DBs\"/> for more "
+"information on how to setup external databases as DataSources."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:107
+#, no-c-format
+msgid "Optional improvements to the simple cluster"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:108
+#, no-c-format
+msgid ""
+"The simple web cluster we discussed above is simply a load balanced "
+"architecture for servers that only share information at the database level. "
+"This architecture is highly scalable but it does not provide crucial "
+"clustering features such as failover and distributed caching. With some "
+"simple optional steps, you can easily add those features to your cluster."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:111
+#, no-c-format
+msgid ""
+"Please note that you need to install a clustering enabled JBoss AS profile "
+"(i.e., the all or ejb3-cluster profiles) on all your server nodes for the "
+"optional setups."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:115
+#, no-c-format
+msgid "Failover support"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:116
+#, no-c-format
+msgid ""
+"The simple web cluster does not support failover if one of the server nodes "
+"crashes. Since each JBoss AS node stores its own HTTP session state data -- "
+"the users on the crashed server would lose their sessions when the load "
+"balancer forwards their requests to another node. The solution is for each "
+"node in the cluster to replicate its HTTP session data to other nodes in the "
+"cluster, so that when the node crashes, there is another node node to pick "
+"up all users it left off without any session loss."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:119
+#, no-c-format
+msgid ""
+"When you start multiple clustering enabled JBoss AS instances on the same "
+"network, they automatically form a cluster. Therefore, all you need to do is "
+"to enable HTTP session replication in your web application. That is by "
+"adding a <distributable/> tag in your web.xml file."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:122
+#, no-c-format
+msgid ""
+"<web-app ...>\n"
+" <distributable/>\n"
+" <!-- ... -->\n"
+"</web-app>"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:123
+#, no-c-format
+msgid ""
+"However, failover does not come free. Since extra object serialization (CPU "
+"intensive) and communication between server nodes (network intensive) are "
+"required, the cluster can no longer scale linearly with the number of nodes. "
+"With the default setup, the HTTP sessions on each node are replicated to all "
+"other nodes in the cluster. So the clustering workload increases "
+"geometrically with the number of server nodes. The cluster would not scale "
+"beyond 8 to 10 servers with the default setup. For a truly scalable failover "
+"solution, we need to setup buddy replication in the cluster so that each "
+"node only replicates its HTTP session data to another \"buddy\" failover "
+"node."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:129
+#, no-c-format
+msgid "Database cache"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:130
+#, no-c-format
+msgid ""
+"Database cache is very useful for improving performance of ORM solutions "
+"like Hibernate and EJB 3.0. It stores frequently accessed data objects in "
+"the application server's memory and hence reduces the round trips to the "
+"database server. However, the challenge is to keep the cache on all server "
+"nodes in sync. For instance, data object O might be cached on both server "
+"nodes A and B. Now, node A updates object O and flushes the change back to "
+"the database. If A and B are not correlated, there is no way for B to know "
+"that object O already has an updated value in the database -- so users on "
+"server B would continue to access the expired value of O and get errors."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:133
+#, no-c-format
+msgid ""
+"The solution here is to use a distributed database cache. The cache is "
+"\"shared\" by all server nodes. So, if one node adds / updates / removes, "
+"any object into / from the cache, all other nodes get the updated cache "
+"instantly as well. Here we give an example configuration for EJB 3.0 entity "
+"bean, which is supported by Hibernate 3.2+."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:136
+#, no-c-format
+msgid ""
+"The distributed database cache is supported out of the box in the ejb3-"
+"cluster profile of JBoss AS. As the case with HTTP session replication, all "
+"you need is to enable this feature in your application. First, you need to "
+"specify JBoss TreeCache as your database cache provider in your persistence."
+"xml file."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:139
+#, fuzzy, no-c-format
+msgid ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>\n"
+"\n"
+"<property name=\"treecache.mbean.object_name\">\n"
+" jboss.cache:service=EJB3EntityTreeCache\n"
+"</property>"
+msgstr ""
+"<!-- Clustered cache with TreeCache -->\n"
+"<property name=\"cache.provider_class\">\n"
+" org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"</property>"
+
+#. Tag: para
+#: Clustering_Intro.xml:140
+#, no-c-format
+msgid ""
+"The on each entity bean class you want to cache, add the @Cache annotation."
+msgstr ""
+
+#. Tag: programlisting
+#: Clustering_Intro.xml:143
+#, fuzzy, no-c-format
+msgid ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Product implements Serializable { \n"
+" // ... ... \n"
+"}"
+msgstr ""
+"@Entity \n"
+"@Cache(usage=CacheConcurrencyStrategy.TRANSACTIONAL) \n"
+"public class Customer implements Serializable { \n"
+" // ... ... \n"
+"}"
+
+#. Tag: para
+#: Clustering_Intro.xml:144
+#, no-c-format
+msgid ""
+"That's it. Now the Product data objects are cached in the shared cache "
+"across all JBoss AS server nodes in the cluster."
+msgstr ""
+
+#. Tag: title
+#: Clustering_Intro.xml:152
+#, no-c-format
+msgid "Basic optimization"
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:153
+#, no-c-format
+msgid ""
+"In this section, we will give a few optimization tips to improve the "
+"performance of the cluster. Details of those optimization techniques will be "
+"covered later in this book."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:156
+#, no-c-format
+msgid ""
+"The first tip is to balance the connection pools in JBoss AS server nodes "
+"and the load balancer. The goal is to make the Apache connection poll 80% "
+"the size of the combined connection pools of the JBoss AS nodes. In "
+"addition, to optimize thread performance in the load balancer, we highly "
+"recommend you install the \"worker\" MPM for Apache on Unix / Linux servers "
+"and the \"winnt\" MPM for Windows servers."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:159
+#, no-c-format
+msgid ""
+"Second, we need to understand that HTTP session replication is very "
+"expensive and should be minimized when possible. Choosing the right "
+"replication trigger and granularity is an important step. For instance, "
+"setting the replication trigger to SET might require you to write more code "
+"to push changed data back into the session. But it can drastically reduce "
+"the replication work load for a mostly read-only application. Setting the "
+"granularity level to ATTRIBUTE would be much more efficient than SESSION if "
+"the session size is large. However, setting the granularity level to FIELD "
+"may not have a great benefit due to the AOP overhead associated with dirty "
+"checking on fields."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:162
+#, no-c-format
+msgid ""
+"In addition, as we discussed before, the default \"replicate-to-all-nodes\" "
+"approach for HTTP session replication does scale for large clusters."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:165
+#, no-c-format
+msgid ""
+"At the network level, it is important to make sure that you use an "
+"asynchronous communication mechanism to replicate HTTP sessions. Since the "
+"replicated HTTP sessions are only used when a rare failover happens, it is "
+"not essential for the failover node to always have the exact same state as "
+"the primary node at real time."
+msgstr ""
+
+#. Tag: para
+#: Clustering_Intro.xml:168
+#, no-c-format
+msgid ""
+"It also worth noting that the choice of underlying network protocols for the "
+"inter-node communication also affects performance. In general, on a small "
+"network (i.e., 4 or less nodes) the node-to-node TCP/IP protocol would out "
+"perform the broadcast-based UDP protocol. It is the opposite when the "
+"cluster size grows larger."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Deploy.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Deploy.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Deploy.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,383 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Deploy.xml:6
+#, fuzzy, no-c-format
+msgid "Deployment"
+msgstr "Farming 部署"
+
+#. Tag: para
+#: Deploy.xml:8
+#, no-c-format
+msgid ""
+"Deploying applications on JBoss AS is very easy. You just need to copy the "
+"application into the jboss-as/server/production/deploy directory. You can "
+"replace default with different server profiles such as all or minimal or "
+"production. We will cover those later in this chapter. JBoss AS constantly "
+"scans the deploy directory to pick up new applications or any changes to "
+"existing applications. So, you can \"hot deploy\" application on the fly "
+"while JBoss AS is still running."
+msgstr ""
+
+#. Tag: title
+#: Deploy.xml:11
+#, fuzzy, no-c-format
+msgid "Deployable Application Types"
+msgstr "Web 应用程序"
+
+#. Tag: para
+#: Deploy.xml:13
+#, no-c-format
+msgid ""
+"You can deploy several different types of enterprise applications in JBoss "
+"AS:"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:17
+#, no-c-format
+msgid ""
+"The WAR application archive (e.g., myapp.war) packages a Java EE web "
+"application in a JAR file. It contains servlet classes, view pages, "
+"libraries, and deployment descriptors such as web.xml, faces-config.xml, and "
+"jboss-web.xml etc.."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:19
+#, no-c-format
+msgid ""
+"The EAR application archive (e.g., myapp.ear) packages a Java EE enterprise "
+"application in a JAR file. It typically contains a WAR file for the web "
+"module, JAR files for EJB modules, as well as deployment descriptors such as "
+"application.xml and jboss-app.xml etc.."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:21
+#, no-c-format
+msgid ""
+"The SAR application archive (e.g., myservice.sar) packages a JBoss service "
+"in a JAR file. It is mostly used by JBoss internal services. Please see more "
+"in <xref linkend=\"The_JBoss_JMX_Microkernel\"/>."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:23
+#, no-c-format
+msgid ""
+"The *-ds.xml file defines connections to external databases. The data source "
+"can then be reused by all applications and services in JBoss AS via the "
+"internal JNDI."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:25
+#, no-c-format
+msgid ""
+"You can deploy XML files with MBean service definitions. If you have the "
+"appropriate JAR files available in the deploy or lib directories, the MBeans "
+"specified in the XML files will be started. This is the way how you start "
+"many JBoss AS internal services, such as the JMS queues."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:27
+#, no-c-format
+msgid ""
+"You can also deploy JAR files containing EJBs or other service objects "
+"directly in JBoss AS."
+msgstr ""
+
+#. Tag: title
+#: Deploy.xml:32
+#, no-c-format
+msgid "Exploded Deployment"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:33
+#, no-c-format
+msgid ""
+"The WAR, EAR, and SAR deployment packages are really just JAR files with "
+"special XML deployment descriptors in directories like META-INF and WEB-INF. "
+"JBoss AS allows you to deploy those archives as expanded directories instead "
+"of JAR files. That allows you to make changes to web pages etc on the fly "
+"without re-deploying the entire application. If you do need to re-deploy the "
+"exploded directory without re-start the server, you can just \"touch\" the "
+"deployment descriptors (e.g., the WEB-INF/web.xml in a WAR and the META-INF/"
+"application.xml in an EAR) to update their timestamps."
+msgstr ""
+
+#. Tag: title
+#: Deploy.xml:39
+#, fuzzy, no-c-format
+msgid "Standard Server Configurations"
+msgstr "服务端配置"
+
+#. Tag: para
+#: Deploy.xml:41
+#, no-c-format
+msgid ""
+"The JBoss Enterprise Platform ships with four server configurations. You can "
+"choose which configuration to start by passing the -c parameter to the "
+"server startup script. For instance, command run.sh -c all would start the "
+"server in the all configuration. Each configuration is contained in a "
+"directory named jboss-as/server/[config name]/. You can look into each "
+"server configuration's directory to see the default services, applications, "
+"and libraries supported in the configuration."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:44
+#, no-c-format
+msgid ""
+"The minimal configuration starts the core server container without any of "
+"the enterprise services. It is a good starting point if you want to build a "
+"customized version of JBoss AS that only contains the servers you need."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:45
+#, no-c-format
+msgid ""
+"The default configuration is the mostly common used configuration for "
+"application developers. It supports the standard J2EE 1.4 and most of the "
+"Java EE 5.0 programming APIs (e.g., JSF and EJB3)."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:46
+#, no-c-format
+msgid ""
+"The all configuration is the default configuration with clustering support "
+"and other enterprise extensions."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:47
+#, no-c-format
+msgid ""
+"The production configuration is based on the all configuration but with key "
+"parameters pre-tuned for production deployment."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:50
+#, no-c-format
+msgid ""
+"The detailed services and APIs supported in each of those configurations "
+"will be discussed throughout this book. In this section, we focus on the "
+"optimization we did for the production configuration."
+msgstr ""
+
+#. Tag: title
+#: Deploy.xml:53
+#, fuzzy, no-c-format
+msgid "The production Configuration"
+msgstr "EJB 应用程序配置"
+
+#. Tag: para
+#: Deploy.xml:55
+#, no-c-format
+msgid ""
+"To start the server in the production configuration, you can use the "
+"following command under Linux / Unix:"
+msgstr ""
+
+#. Tag: programlisting
+#: Deploy.xml:57
+#, no-c-format
+msgid ""
+"cd /path/to/jboss-as\n"
+"RUN_CONF=server/production/run.conf bin/run.sh -c production"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:59
+#, no-c-format
+msgid ""
+"Or, you can simply copy the jboss-as/server/production/run.conf file to "
+"jboss-as/bin directory and start the server with run.sh -c production "
+"command. Below is a list of optimizations we specifically did for the "
+"production configuration:"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:62
+#, no-c-format
+msgid ""
+"In the jboss-as/server/production/run.conf file, we expanded the memory size "
+"of the server to 1.7 GB. We added the -server tag to JVM startup command on "
+"all platforms except for Darwin (Mac OS X). If the JVM is BEA jRockit, the -"
+"Xgc:gencon parameter is also added."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:63
+#, no-c-format
+msgid ""
+"We configured the key generation algorithm to use the database to generate "
+"HiLo keys in order to generate the correct keys in a cluster environment "
+"(see deploy/uuid-key-generator.sar/META-INF/jboss-service.xml)."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:64
+#, no-c-format
+msgid ""
+"We removed the test JMS queues from deploy-hasingleton/jms/jbossmq-"
+"destinations-service.xml. Those queues are setup primarily for ease of "
+"application development. Production applications should configure their own "
+"JMS queues."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:65
+#, no-c-format
+msgid ""
+"We set the ScanPeriod parameter to 60000 in conf/jboss-minimal.xml and conf/"
+"jboss-service.xml, so that JBoss AS does not spend too much time constantly "
+"scanning the deploy directory for new or updated deployments."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:66
+#, no-c-format
+msgid ""
+"We removed the connection monitoring in deploy/jbossjca-service.xml. The "
+"connection monitoring feature helps catch unclosed connections that would "
+"otherwise cause leaks in the connection pools in development. However, it is "
+"a global point of contention that should be turned off (false) in production."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:67
+#, no-c-format
+msgid ""
+"Logging is a big contention point in many production applications. In the "
+"production configuration, we removed the console logging and increased the "
+"logging level to WARN and ERROR for most packages. Please see details in "
+"conf/jboss-log4j.xml."
+msgstr ""
+
+#. Tag: title
+#: Deploy.xml:73
+#, no-c-format
+msgid "Further Tuning from the production Configuration"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:75
+#, no-c-format
+msgid ""
+"In addition to the standard optimization in the production configuration, "
+"there are a couple of simple techniques you can use to improve the "
+"performance and stability of your server."
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:77
+#, no-c-format
+msgid ""
+"The production configuration increases the JVM heap memory size to 1.7 GB. "
+"You should probably change it to fit your own server. For instance, if have "
+"a 64 bit server with several GBs of RAM, you can probably increase this "
+"value as long as you also use a 64 bit JVM. If your server has less than 2 "
+"GB RAM, you should decrease that value accordingly. In the production/run."
+"conf file, the -Xmx and -Xms parameters specify the maximum and minimum heap "
+"sizes respectively. It is recommended that you set the -Xmx and -Xms to the "
+"same value to avoid dynamic re-sizing of the heap, which is a source of "
+"instability in many JVMs. You could also consider turing on parallel GC "
+"options if you are using the Sun JVM on a multi-core machine. The following "
+"is an example setup you might use a reference. Please see the Sun JVM "
+"documentation for more details on this startup parameters."
+msgstr ""
+
+#. Tag: programlisting
+#: Deploy.xml:79
+#, no-c-format
+msgid ""
+"JAVA_OPTS=\"-Xms1740m -Xmx1740m -XX:PermSize=256m -XX:MaxPermSize=512\n"
+" -XX:+UseConcMarkSweepGC -XX:+CMSPermGenSweepingEnabled \n"
+" -XX:+CMSClassUnloadingEnabled\""
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:81
+#, no-c-format
+msgid ""
+"In the embedded Tomcat module, you can turn off the development mode so that "
+"the server does not constantly monitor the changes in JSP files. To do that, "
+"edit the deploy/jboss-web.deployer/conf/web.xml file and add the development "
+"attribute to the JspServlet."
+msgstr ""
+
+#. Tag: programlisting
+#: Deploy.xml:83
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" <servlet>\n"
+" <servlet-name>jsp</servlet-name>\n"
+" <servlet-class>org.apache.jasper.servlet.JspServlet</servlet-class>\n"
+" ... ...\n"
+" <init-param>\n"
+" <param-name>development</param-name>\n"
+" <param-value>false</param-value>\n"
+" </init-param>\n"
+" ... ...\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:85
+#, no-c-format
+msgid ""
+"In Tomcat, you could adjust the size of the thread pool. If you have multi-"
+"core CPUs or more than one CPUs on your server, it might be beneficial to "
+"increase the thread pool beyond the default 250. On the other hand, if you "
+"have a slow server, decreasing the thread pool will decrease the overhead on "
+"the server. The thread pool size can be adjusted via the deploy/jboss-web."
+"deployer/server.xml file."
+msgstr ""
+
+#. Tag: programlisting
+#: Deploy.xml:87
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" ... ...\n"
+" <Connector port=\"8080\" address=\"${jboss.bind.address}\"\n"
+" maxThreads=\"250\" maxHttpHeaderSize=\"8192\"\n"
+" emptySessionPath=\"true\" protocol=\"HTTP/1.1\"\n"
+" enableLookups=\"false\" redirectPort=\"8443\" acceptCount=\"100\"\n"
+" connectionTimeout=\"20000\" disableUploadTimeout=\"true\" />\n"
+" ... ...\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: Deploy.xml:89
+#, no-c-format
+msgid ""
+"In addition, JBoss AS needs to use a relational database to store runtime "
+"data. In a production environment, you should use a production quality "
+"database to replace the embedded HSQL database. Please see <xref linkend="
+"\"alternative_DBs\"/> for more information on how to setup alternative "
+"databases for the JBoss AS."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/EJB3.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/EJB3.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/EJB3.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,1015 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: EJB3.xml:6
+#, no-c-format
+msgid "Enterprise Applications with EJB3 Services"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:10
+#, no-c-format
+msgid ""
+"EJB3 (Enterprise JavaBean 3.0) provides the core component model for Java EE "
+"5 applications. An EJB3 bean is a managed component that is automatically "
+"wired to take advantage of all services the J2EE server container provides, "
+"such as transaction, security, persistence, naming, dependency injection, "
+"etc. The managed component allows developers to focus on the business logic, "
+"and leave the cross-cutting concerns to the container as configurations. As "
+"an application developer, you need not create or destroy the components "
+"yourself. You only need to ask for an EJB3 bean from the Java EE container "
+"by its name, and then you can call its methods with all configured container "
+"services applied. You can get access to an EJB3 bean from either inside or "
+"outside of the J2EE container."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:12
+#, no-c-format
+msgid "&JBPAPP; &VER; supports EJB3 out of the box."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:14
+#, no-c-format
+msgid ""
+"The details of the EJB3 component programming model is beyond the scope of "
+"this guide. Most EJB3 interfaces and annotations are part of the Java EE 5 "
+"standard and hence they are the same for all Java EE 5 compliant application "
+"servers. Interested readers should refer to the EJB3 specification or "
+"numerous EJB3 books to learn more about EJB3 programming."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:16
+#, no-c-format
+msgid ""
+"In this chapter, we only cover EJB3 configuration issues that are specific "
+"to the JBoss AS. For instance, we discuss the JNDI naming conventions for "
+"EJB3 components inside the JBoss AS, the optional configurations for the "
+"Hibernate persistence engine for entity beans, as well as custom options in "
+"the JBoss EJB3 deployer."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:19
+#, fuzzy, no-c-format
+msgid "Session Beans"
+msgstr "JBoss XMBeans"
+
+#. Tag: para
+#: EJB3.xml:21
+#, no-c-format
+msgid ""
+"Session beans are widely used to provide transactional services for local "
+"and remote clients. To write a session bean, you need an interface and an "
+"implementation class."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:23
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@Local\n"
+"public interface MyBeanInt {\n"
+" public String doSomething (String para1, int para2);\n"
+"}\n"
+"\n"
+"@Stateless\n"
+"public class MyBean implements MyBeanInt {\n"
+"\n"
+" public String doSomething (String para1, int para2) {\n"
+" ... implement the logic ...\n"
+" } \n"
+" \n"
+"} \n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:25
+#, no-c-format
+msgid ""
+"When you invoke a session bean method, the method execution is automatically "
+"managed by the transaction manager and the security manager in the server. "
+"You can specify the transactional or security properties for each method "
+"using annotations on the method. A session bean instance can be reused by "
+"many clients. Depending on whether the server maintains the bean's "
+"internal state between two clients, the session bean can be stateless or "
+"stateful. Depending on whether the bean is available to remote clients (i."
+"e., clients outside of the current JVM for the server), the session bean can "
+"be local or remote. All these are configurable via standard annotations on "
+"the beans."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:27
+#, no-c-format
+msgid ""
+"After you define a session bean, how does the client get access to it? As we "
+"discussed, the client does not create or destroy EJB3 components, it merely "
+"asks the server for a reference of an existing instance managed by the "
+"server. That is done via JNDI. In JBoss AS, the default local JNDI name for "
+"a session bean is dependent on the deployment packaging of the bean class."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:30
+#, no-c-format
+msgid ""
+"If the bean is deployed in a standalone JAR file in the <varname>jboss-as/"
+"production/deploy</varname> directory, the bean is accessible via local JNDI "
+"name <varname>MyBean/local</varname>, where <varname>MyBean</varname> is the "
+"implementation class name of the bean as we showed earlier. The \"local\" "
+"JNDI in JBoss AS means that the JNDI name is relative to <varname>java:comp/"
+"env/</varname>."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:31
+#, no-c-format
+msgid ""
+"If the JAR file containing the bean is packaged in an EAR file, the local "
+"JNDI name for the bean is <varname>myapp/MyBean/local</varname>, where "
+"<varname>myapp</varname> is the root name of the EAR archive file (e.g., "
+"<varname>myapp.ear</varname>, see later for the EAR packaging of EJB3 beans)."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:34
+#, no-c-format
+msgid ""
+"Of course, you should change <varname>local</varname> to <varname>remote</"
+"varname> if the bean interface is annotated with <varname>@Remote</varname> "
+"and the bean is accessed from outside of the server it is deployed on. Below "
+"is the code snippet to get a reference of the MyBean bean in a web "
+"application (e.g., in a servlet or a JSF backing bean) packaged in "
+"<varname>myapp.ear</varname>, and then invoke a managed method."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:36
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" MyBeanInt bean = (MyBeanInt) ctx.lookup(\"myapp/MyBean/local\");\n"
+"} catch (Exception e) {\n"
+" e.printStackTrace ();\n"
+"}\n"
+"\n"
+"... ...\n"
+"\n"
+"String result = bean.doSomething(\"have fun\", 1);\n"
+"\n"
+"... ...\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:38
+#, no-c-format
+msgid ""
+"What the client gets from the JNDI is essentially a \"stub\" or \"proxy\" of "
+"the bean instance. When the client invokes a method, the proxy figures out "
+"how to route the request to the server and marshal together the response."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:40
+#, no-c-format
+msgid ""
+"If you do not like the default JNDI names, you can always specify your own "
+"JNDI binding for any bean via the <varname>@LocalBinding</varname> "
+"annotation on the bean implementation class. The JNDI binding is always "
+"\"local\" under the <varname>java:comp/env/</varname> space. For instance, "
+"the following bean class definition results in the bean instances available "
+"under JNDI name <varname>java:comp/env/MyService/MyOwnName</varname>."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:42
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@Stateless\n"
+"@LocalBinding (jndiBinding=\"MyService/MyOwnName\")\n"
+"public class MyBean implements MyBeanInt {\n"
+"\n"
+" public String doSomething (String para1, int para2) {\n"
+" ... implement the logic ...\n"
+" } \n"
+" \n"
+"} \n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:45
+#, no-c-format
+msgid "Injecting EJB3 Beans into the Web Tier"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:46
+#, no-c-format
+msgid ""
+"Java EE 5 allows you to inject EJB3 bean instances directly into the web "
+"application via annotations without explicit JNDI lookup. This behavior is "
+"not yet supported in JBoss AS 4.2. However, &JBPAPP; provides an integration "
+"framework called JBoss Seam. JBoss Seam brings EJB3 / JSF integration to new "
+"heights far beyond what Java EE 5 provides. Please see more details in the "
+"JBoss Seam reference guide bundled with the platform."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:52
+#, no-c-format
+msgid "Entity Beans (a.k.a. Java Persistence API)"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:54
+#, no-c-format
+msgid ""
+"EJB3 session beans allow you to implement data accessing business logic in "
+"transactional methods. To actually access the database, you will need EJB3 "
+"entity beans and the entity manager API. They are collectively called the "
+"Java Persistence API (JPA)."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:56
+#, no-c-format
+msgid ""
+"EJB3 Entity Beans are Plain Old Java Objects (POJOs) that map to relational "
+"database tables. For instance, the following entity bean class maps to a "
+"relational table named customer. The table has three columns: name, age, and "
+"signupdate. Each instance of the bean corresponds to a row of data in the "
+"table."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:58
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@Entity\n"
+"public class Customer {\n"
+"\n"
+" String name;\n"
+"\n"
+" public String getName () {\n"
+" return name;\n"
+" }\n"
+" \n"
+" public void setName (String name) {\n"
+" this.name = name;\n"
+" }\n"
+" \n"
+" int age;\n"
+" \n"
+" public int getAge () {\n"
+" return age;\n"
+" }\n"
+" \n"
+" public void setAge (int age) {\n"
+" this.age = age;\n"
+" }\n"
+" \n"
+" Date signupdate;\n"
+" \n"
+" public Date getSignupdate () {\n"
+" return signupdate;\n"
+" }\n"
+" \n"
+" public void setSignupdate (Date signupdate) {\n"
+" this.signupdate = signupdate;\n"
+" }\n"
+"} \n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:60
+#, no-c-format
+msgid ""
+"Besides simple data properties, the entity bean can also contain references "
+"to other entity beans with relational mapping annotations such as @OneToOne, "
+"@OneToMany, @ManyToMany etc. The relationships of those entity objects will "
+"be automatically set up in the database as foreign keys. For instance, the "
+"following example shows that each record in the Customer table has one "
+"corresponding record in the Account table, multiple corresponding records in "
+"the Order table, and each record in the Employee table has multiple "
+"corresponding records in the Customer table."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:62
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@Entity\n"
+"public class Customer {\n"
+"\n"
+" ... ...\n"
+" \n"
+" Account account;\n"
+" \n"
+" @OneToOne\n"
+" public Account getAccount () {\n"
+" return account;\n"
+" }\n"
+" \n"
+" public void setAccount (Accout account) {\n"
+" this.account = account;\n"
+" }\n"
+" \n"
+" Employee salesRep;\n"
+" \n"
+" @ManyToOne\n"
+" public Employee getSalesRep () {\n"
+" return salesRep;\n"
+" }\n"
+" \n"
+" public void setSalesRep (Employee salesRep) {\n"
+" this.salesRep = salesRep;\n"
+" }\n"
+" \n"
+" Vector <Order> orders;\n"
+" \n"
+" @OneToMany\n"
+" public Vector <Order> getOrders () {\n"
+" return orders;\n"
+" }\n"
+" \n"
+" public void setOrders (Vector <Order> orders) {\n"
+" this.orders = orders;\n"
+" }\n"
+"\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:64
+#, no-c-format
+msgid ""
+"Using the EntityManager API, you can create, update, delete, and query "
+"entity objects. The EntityManager transparently updates the underlying "
+"database tables in the process. You can obtain an EntityManager object in "
+"your EJB3 session bean via the @PersistenceContext annotation."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:66
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@PersistenceContext\n"
+"EntityManager em;\n"
+"\n"
+"Customer customer = new Cutomer ();\n"
+"// populate data in customer\n"
+"\n"
+"// Save the newly created customer object to DB\n"
+"em.persist (customer);\n"
+"\n"
+"// Increase age by 1 and auto save to database\n"
+"customer.setAge (customer.getAge() + 1);\n"
+"\n"
+"// delete the customer and its related objects from the DB\n"
+"em.remove (customer);\n"
+"\n"
+"// Get all customer records with age > 30 from the DB\n"
+"List <Customer> customers = em.query (\n"
+" \"select c from Customer where c.age > 30\");\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:68
+#, no-c-format
+msgid ""
+"The detailed use of the EntityManager API is beyond the scope of this book. "
+"Interested readers should refer to the JPA documentation or Hibernate "
+"EntityManager documentation."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:71
+#, fuzzy, no-c-format
+msgid "The persistence.xml file"
+msgstr "server.xml 文件"
+
+#. Tag: para
+#: EJB3.xml:73
+#, no-c-format
+msgid ""
+"The EntityManager API is great, but how does the server know which database "
+"it is supposed to save / update / query the entity objects? How do we "
+"configure the underlying object-relational-mapping engine and cache for "
+"better performance and trouble shooting? The persistence.xml file gives you "
+"complete flexibility to configure the EntityManager."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:75
+#, no-c-format
+msgid ""
+"The persistence.xml file is a standard configuration file in JPA. It has to "
+"be included in the META-INF directory inside the JAR file that contains the "
+"entity beans. The persistence.xml file must define a persistence-unit with a "
+"unique name in the current scoped classloader. The provider attribute "
+"specifies the underlying implementation of the JPA EntityManager. In JBoss "
+"AS, the default and only supported / recommended JPA provider is Hibernate. "
+"The jta-data-source points to the JNDI name of the database this persistence "
+"unit maps to. The java:/DefaultDS here points to the HSQL DB embedded in the "
+"JBoss AS. Please refer to <xref linkend=\"alternative_DBs\"/> on how to "
+"setup alternative databases for JBoss AS."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:77
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<persistence>\n"
+" <persistence-unit name=\"myapp\">\n"
+" <provider>org.hibernate.ejb.HibernatePersistence</provider>\n"
+" <jta-data-source>java:/DefaultDS</jta-data-source>\n"
+" <properties>\n"
+" ... ...\n"
+" </properties>\n"
+" </persistence-unit>\n"
+"</persistence> \n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:80
+#, no-c-format
+msgid "Inject EntityManager by persistence-unit name"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:81
+#, no-c-format
+msgid ""
+"Since you might have multiple instances of persistence-unit defined in the "
+"same application, you typically need to explicitly tell the "
+"@PersistenceContext annotation which unit you want to inject. For instance, "
+"@PersistenceContext(name=\"myapp\") injects the EntityManager from the "
+"persistence-unit named \"myapp\"."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:82
+#, no-c-format
+msgid ""
+"However, if you deploy your EAR application in its own scoped classloader "
+"and have only one persistence-unit defined in the whole application, you can "
+"omit the \"name\" on @PersistenceContext. See later in this chapter for EAR "
+"packaging and deployment."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:85
+#, no-c-format
+msgid ""
+"The properties element in the persistence.xml can contain any configuration "
+"properties for the underlying persistence provider. Since JBoss AS uses "
+"Hibernate as the EJB3 persistence provider, you can pass in any Hibernate "
+"options here. Please refer to the Hibernate and Hibernate EntityManager "
+"documentation for more details. Here we will just give an example to set the "
+"SQL dialect of the persistence engine to HSQL, and to create tables from the "
+"entity beans when the application starts and drop those tables when the "
+"application stops."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:87
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<persistence>\n"
+" <persistence-unit name=\"myapp\">\n"
+" <provider>org.hibernate.ejb.HibernatePersistence</provider>\n"
+" <jta-data-source>java:/DefaultDS</jta-data-source>\n"
+" <properties>\n"
+" property name=\"hibernate.dialect\" \n"
+" value=\"org.hibernate.dialect.HSQLDialect\"/>\n"
+" <property name=\"hibernate.hbm2ddl.auto\" value=\"create-drop\"/>\n"
+" </properties>\n"
+" </persistence-unit>\n"
+"</persistence> \n"
+"]]>"
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:92
+#, no-c-format
+msgid "Use Alternative Databases"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:94
+#, no-c-format
+msgid ""
+"To use an alternative database other than the built-in HSQL DB to back your "
+"entity beans, you need to first define the data source for the database and "
+"register it in the JNDI. This is done via the *-ds.xml files in the deploy "
+"directory. Please see <xref linkend=\"Connectors_on_JBoss-"
+"Configuring_JDBC_DataSources\"/> for more details. Examples of *-ds.xml "
+"files for various databases are available in jboss-as/docs/examples/jca "
+"directory in the server."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:96
+#, no-c-format
+msgid ""
+"Then, in the persistence.xml, you need to change the jta-data-source "
+"attribute to point to the new data source in JNDI (e.g., java:/MysqlDS if "
+"you are using the default mysql-ds.xml to setup a MySQL external database)."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:98
+#, no-c-format
+msgid ""
+"In most cases, Hibernate tries to automatically detect the database it "
+"connects to and then automatically selects an appropriate SQL dialect for "
+"the database. However, we have found that this detection does not always "
+"work, especially for less used database servers. We recommend you to set the "
+"hibernate.dialect property explicitly in persistence.xml. Here are the "
+"Hibernate dialect for database servers officially supported on the JBoss "
+"platform."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:101
+#, no-c-format
+msgid "Oracle 9i and 10g: org.hibernate.dialect.Oracle9Dialect"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:102
+#, no-c-format
+msgid "Microsoft SQL Server 2005: org.hibernate.dialect.SQLServerDialect"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:103
+#, no-c-format
+msgid "PostgresSQL 8.1: org.hibernate.dialect.PostgreSQLDialect"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:104
+#, no-c-format
+msgid "MySQL 5.0: org.hibernate.dialect.MySQL5Dialect"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:105
+#, no-c-format
+msgid "DB2 8.0: org.hibernate.dialect.DB2Dialect"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:106
+#, no-c-format
+msgid "Sybase ASE 12.5: org.hibernate.dialect.SybaseDialect"
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:112
+#, no-c-format
+msgid "Default Hibernate options"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:114
+#, no-c-format
+msgid ""
+"Hibernate has many configuration properties. For the properties that you do "
+"not specify in the persistence.xml file, JBoss AS will provide a reasonable "
+"set of default values. The default Hibernate property values are specified "
+"in the <varname>jboss-as/server/production/deploy/ejb3.deployer/META-INF/"
+"persistence.properties</varname> file. Below is the <varname>persistence."
+"properties</varname> file bundled in &JBPAPP;. Notice the options that are "
+"commented out. They give you an idea of available properties in your "
+"<varname>persistence.xml</varname> file."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:116
+#, no-c-format
+msgid ""
+"hibernate.transaction.manager_lookup_class=org.hibernate.transaction."
+"JBossTransactionManagerLookup\n"
+"#hibernate.connection.release_mode=after_statement\n"
+"#hibernate.transaction.flush_before_completion=false\n"
+"#hibernate.transaction.auto_close_session=false\n"
+"#hibernate.query.factory_class=org.hibernate.hql.ast."
+"ASTQueryTranslatorFactory\n"
+"#hibernate.hbm2ddl.auto=create-drop\n"
+"#hibernate.hbm2ddl.auto=create\n"
+"hibernate.cache.provider_class=org.hibernate.cache.HashtableCacheProvider\n"
+"# Clustered cache with TreeCache\n"
+"#hibernate.cache.provider_class=org.jboss.ejb3.entity.TreeCacheProviderHook\n"
+"#hibernate.treecache.mbean.object_name=jboss.cache:"
+"service=EJB3EntityTreeCache\n"
+"#hibernate.dialect=org.hibernate.dialect.HSQLDialect\n"
+"hibernate.jndi.java.naming.factory.initial=org.jnp.interfaces."
+"NamingContextFactory\n"
+"hibernate.jndi.java.naming.factory.url.pkgs=org.jboss.naming:org.jnp."
+"interfaces\n"
+"hibernate.bytecode.use_reflection_optimizer=false\n"
+"# I don't think this is honored, but EJB3Deployer uses it\n"
+"hibernate.bytecode.provider=javassist"
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:133
+#, fuzzy, no-c-format
+msgid "Message Driven Beans"
+msgstr "Managed Beans 或 MBeans"
+
+#. Tag: para
+#: EJB3.xml:135
+#, no-c-format
+msgid ""
+"Messaging driven beans are specialized EJB3 beans that receive service "
+"requests via JMS messages instead of proxy method calls from the \"stub\". "
+"So, a crucial configuration parameter for the message driven bean is to "
+"specify which JMS message queue its listens to. When there is an incoming "
+"message in the queue, the server invokes the beans's <varname>onMessage()"
+"</varname> method, and passes in the message itself for processing. The bean "
+"class specifies the JMS queue it listens to in the @MessageDriven "
+"annotation. The queue is registered under the local JNDI java:comp/env/ name "
+"space."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:137
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"@MessageDriven(activationConfig =\n"
+"{\n"
+" @ActivationConfigProperty(propertyName=\"destinationType\",\n"
+" propertyValue=\"javax.jms.Queue\"),\n"
+" @ActivationConfigProperty(propertyName=\"destination\",\n"
+" propertyValue=\"queue/MyQueue\")\n"
+"})\n"
+"public class MyJmsBean implements MessageListener {\n"
+"\n"
+" public void onMessage (Message msg) {\n"
+" // ... do something with the msg ...\n"
+" }\n"
+"\n"
+" // ... ...\n"
+"}\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:139
+#, no-c-format
+msgid ""
+"When a message driven bean is deployed, its incoming message queue is "
+"automatically created if it does not exist already. To send a message to the "
+"bean, you can use the standard JMS API."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:141
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" queue = (Queue) ctx.lookup(\"queue/MyQueue\");\n"
+" QueueConnectionFactory factory =\n"
+" (QueueConnectionFactory) ctx.lookup(\"ConnectionFactory\");\n"
+" cnn = factory.createQueueConnection();\n"
+" sess = cnn.createQueueSession(false,\n"
+" QueueSession.AUTO_ACKNOWLEDGE);\n"
+"\n"
+"} catch (Exception e) {\n"
+" e.printStackTrace ();\n"
+"}\n"
+" \n"
+"TextMessage msg = sess.createTextMessage(...);\n"
+"\n"
+"sender = sess.createSender(queue);\n"
+"sender.send(msg);\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:143
+#, no-c-format
+msgid ""
+"Please refer to the JMS specification or books to learn how to program in "
+"the JMS API."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:169
+#, no-c-format
+msgid "Package and Deploy EJB3 Services"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:171
+#, no-c-format
+msgid ""
+"EJB3 bean classes are packaged in regular JAR files. The standard "
+"configuration files, such as ejb-jar.xml for session beans, and persistence."
+"xml for entity beans, are in the META-INF directory inside the JAR. You can "
+"deploy EJB3 beans as standalone services in JBoss AS or as part of an "
+"enterprise application (i.e., in an EAR archive). In this section, we "
+"discuss those two deployment options."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:174
+#, no-c-format
+msgid "Deploy the EJB3 JAR"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:176
+#, no-c-format
+msgid ""
+"When you drop JAR files into the <varname>jboss-as/server/production/deploy/"
+"</varname> directory, it will be automatically picked up and processed by "
+"the server. All the EJB3 beans defined in the JAR file will then be "
+"available to other applications deployed inside or outside of the server via "
+"JNDI names like <varname>MyBean/local</varname>, where <varname>MyBean</"
+"varname> is the implementation class name for the session bean. The "
+"deployment is done via the JBoss EJB3 deployer in jboss-as/server/production/"
+"ejb3.deployer/. The META-INF/persistence.properties file we discussed "
+"earlier to configure the default behavior of EJB3 entity manager is located "
+"in the EJB3 deployer."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:178
+#, no-c-format
+msgid ""
+"The EJB3 deployer automatically scans JARs on the classpath to look for EJB3 "
+"annotations. When it finds classes with EJB3 annotations, it would deploy "
+"them as EJB3 services. However, scanning all JARs on the classpath could be "
+"very time-consuming if you have large applications with many JARs deployed. "
+"In the jboss-as/server/production/ejb3.deployer/META-INF/jboss-service.xml "
+"file, you can tell the EJB3 deployer to ignore JARs you know do not contain "
+"EJB3 beans. The non-EJB3 JAR files shipped with the JBoss AS are already "
+"listed in the jboss.ejb3:service=JarsIgnoredForScanning MBean service:"
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:181
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+" ... ...\n"
+" <mbean code=\"org.jboss.ejb3.JarsIgnoredForScanning\" \n"
+" name=\"jboss.ejb3:service=JarsIgnoredForScanning\">\n"
+" <attribute name=\"IgnoredJars\">\n"
+" snmp-adaptor.jar,\n"
+" otherimages.jar,\n"
+" applet.jar,\n"
+" jcommon.jar,\n"
+" console-mgr-classes.jar,\n"
+" jfreechart.jar,\n"
+" juddi-service.jar,\n"
+" wsdl4j.jar,\n"
+" ... ...\n"
+" servlets-webdav.jar\n"
+" </attribute>\n"
+" </mbean>\n"
+" ... ...\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:183
+#, no-c-format
+msgid ""
+"You can add any non-EJB3 JARs from your application to this list so that the "
+"server do not have to waste time scanning them. This could significantly "
+"improve the application startup time in some cases."
+msgstr ""
+
+#. Tag: title
+#: EJB3.xml:188
+#, no-c-format
+msgid "Deploy EAR with EJB3 JAR"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:190
+#, no-c-format
+msgid ""
+"Most Java EE applications are deployed as EAR archives. An EAR archive is a "
+"JAR file that typically contains a WAR archive for the web pages, servlets, "
+"and other web-related components, one or several EJB3 JARs that provide "
+"services (e.g., data access and transaction) to the WAR components, and some "
+"other support library JARs required by the application. An EAR file also "
+"have deployment descriptors such as application.xml and jboss-app.xml. Below "
+"is the basic structure of a typical EAR application."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:192
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"myapp.ear\n"
+"|+ META-INF\n"
+" |+ applications.xml and jboss-app.xml\n"
+"|+ myapp.war\n"
+" |+ web pages and JSP /JSF pages\n"
+" |+ WEB-INF\n"
+" |+ web.xml, jboss-web.xml, faces-config.xml etc.\n"
+" |+ lib\n"
+" |+ tag library JARs\n"
+" |+ classes\n"
+" |+ servlets and other classes used by web pages\n"
+"|+ myapp.jar\n"
+" |+ EJB3 bean classes\n"
+" |+ META-INF\n"
+" |+ ejb-jar.xml and persistence.xml\n"
+"|+ lib\n"
+" |+ Library JARs for the EAR\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:194
+#, no-c-format
+msgid ""
+"Notice that in JBoss AS, unlike in many other application servers, you do "
+"not need to declare EJB references in the web.xml file in order for the "
+"components in the WAR file to access EJB3 services. You can obtain the "
+"references directly via JNDI as we discussed earlier in the chapter."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:196
+#, no-c-format
+msgid ""
+"A typical application.xml file is as follows. It declares the WAR and EJB3 "
+"JAR archives in the EAR, and defines the web content root for the "
+"application. Of course, you can have multiple EJB3 modules in the same EAR "
+"application. The application.xml file could also optionally define a shared "
+"classpath for JAR files used in this application. The JAR file location "
+"defaults to lib in JBoss AS -- but it might be different in other "
+"application servers."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:198
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<application>\n"
+" <display-name>My Application</display-name>\n"
+"\n"
+" <module>\n"
+" <web>\n"
+" <web-uri>myapp.war</web-uri>\n"
+" <context-root>/myapp</context-root>\n"
+" </web>\n"
+" </module>\n"
+"\n"
+" <module>\n"
+" <ejb>myapp.jar</ejb>\n"
+" </module>\n"
+" \n"
+" <library-directory>lib</library-directory>\n"
+"\n"
+"</application>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:200
+#, no-c-format
+msgid ""
+"The jboss-app.xml file provides JBoss-specific deployment configuration for "
+"the EAR application. For instance, it can specify the deployment order of "
+"modules in the EAR, deploy JBoss-specific application modules in the EAR, "
+"such as SARs (Service ARchive for MBeans) and HARs (Hibernate ARchive for "
+"Hibernate objects), provide security domain and JMX MBeans that can be used "
+"with this application, etc. You can learn more about the possible attributes "
+"in jboss-app.xml in its DTD: http://www.jboss.org/j2ee/dtd/jboss-app_4_2.dtd."
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:202
+#, no-c-format
+msgid ""
+"A common use case for jboss-app.xml is to configure whether this EAR file "
+"should be deployed in its own scoped classloader to avoid naming conflicts "
+"with other applications. If your EAR application is deployed in its own "
+"scoped classloader and it only has one persistence-unit defined in its EJB3 "
+"JARs, you will be able to use @PersistenceContext EntotyManager em to inject "
+"EntityManager to session beans without worrying about passing the "
+"persistence unit name to the @PersistenceContext annotation. The following "
+"jboss-app.xml specifies a scoped classloader myapp:archive=myapp.ear for the "
+"EAR application."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:204
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<jboss-app>\n"
+" <loader-repository>\n"
+" myapp:archive=myapp.ear\n"
+" </loader-repository>\n"
+"</jboss-app>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:206
+#, no-c-format
+msgid ""
+"The EAR deployment is configured by the jboss-as/server/production/deploy/"
+"ear-deploy.xml file. This file contains three attributes as follows."
+msgstr ""
+
+#. Tag: programlisting
+#: EJB3.xml:208
+#, no-c-format
+msgid ""
+"<![CDATA[\n"
+"<server>\n"
+" <mbean code=\"org.jboss.deployment.EARDeployer\"\n"
+" name=\"jboss.j2ee:service=EARDeployer\">\n"
+" <!-- \n"
+" A flag indicating if ear deployments should \n"
+" have their own scoped class loader to isolate \n"
+" their classes from other deployments.\n"
+" -->\n"
+" <attribute name=\"Isolated\">false</attribute>\n"
+" \n"
+" <!-- \n"
+" A flag indicating if the ear components should \n"
+" have in VM call optimization disabled.\n"
+" -->\n"
+" <attribute name=\"CallByValue\">false</attribute>\n"
+" \n"
+" <!-- \n"
+" A flag the enables the default behavior of \n"
+" the ee5 library-directory. If true, the lib \n"
+" contents of an ear are assumed to be the default \n"
+" value for library-directory in the absence of \n"
+" an explicit library-directory. If false, there \n"
+" must be an explicit library-directory.\n"
+" -->\n"
+" <attribute name=\"EnablelibDirectoryByDefault\">true</attribute>\n"
+" </mbean>\n"
+"</server>\n"
+"]]>"
+msgstr ""
+
+#. Tag: para
+#: EJB3.xml:210
+#, no-c-format
+msgid ""
+"If you set the Isolated parameter to true, all EAR deployment will have "
+"scoped classloaders by default. There will be no need to define the "
+"classloader in jboss-app.xml. The CallByValue attribute specifies whether we "
+"should treat all EJB calls as remote calls. Remote calls have a large "
+"additional performance penalty compared with local call-by-reference calls, "
+"because objects involved in remote calls have to be serialized and de-"
+"serialized. For most of our applications, the WAR and EJB3 JARs are deployed "
+"on the same server, hence this value should be default to false and the "
+"server uses local call-by-reference calls to invoke EJB methods in the same "
+"JVM. The EnablelibDirectoryByDefault attribute specifies whether the lib "
+"directory in the EAR archive should be the default location for shared "
+"library JARs."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Feedback.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Feedback.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Feedback.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,35 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Feedback.xml:6
+#, no-c-format
+msgid "Feedback"
+msgstr ""
+
+#. Tag: para
+#: Feedback.xml:7
+#, no-c-format
+msgid ""
+"If you spot a typo in this guide, or if you have thought of a way to make "
+"this manual better, we would love to hear from you! Submit a report in "
+"<ulink url=\"http://jira.jboss.com/jira/browse/JBPAPP\">JIRA</ulink> against "
+"the Product: JBoss Enterprise Application Platform, Version: "
+"<replaceable><version></replaceable>, Component: <emphasis>Doc</"
+"emphasis>. If you have a suggestion for improving the documentation, try to "
+"be as specific as possible. If you have found an error, include the section "
+"number and some of the surrounding text so we can find it easily."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Additional_Services.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Additional_Services.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Additional_Services.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,2004 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:6
+#, fuzzy, no-c-format
+msgid "Additional Services"
+msgstr "代理服务"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:7
+#, no-c-format
+msgid ""
+"This chapter discusses useful MBean services that are not discussed "
+"elsewhere either because they are utility services not necessary for running "
+"JBoss, or they don't fit into a current section of the book."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:11
+#, no-c-format
+msgid "Memory and Thread Monitoring"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:12
+#, no-c-format
+msgid ""
+"The <literal>jboss.system:type=ServerInfo</literal> MBean provides several "
+"attributes that can be used to monitor the thread and memory usage in a "
+"JBoss instance. These attributes can be monitored in many ways: through the "
+"JMX Console, from a third-party JMX management tool, from shell scripts "
+"using the twiddle command, etc... The most interesting attributes are shown "
+"below."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:17
+#, no-c-format
+msgid "FreeMemory"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:19
+#, no-c-format
+msgid "This is the current free memory available in the JVM."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:25
+#, no-c-format
+msgid "ActiveThreadCount"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:27
+#, no-c-format
+msgid "This is the number of active threads in the JVM."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:33
+#, no-c-format
+msgid "ActiveThreadGroupCount"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:35
+#, no-c-format
+msgid "This is the number of active thread groups in the JVM."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:41
+#, no-c-format
+msgid ""
+"These are useful metrics for monitoring and alerting, but developers and "
+"administrators need a little more insite than this. The Java 5 JVMs from Sun "
+"provide more detailed information about the current state of the JVM. Some "
+"of these details are exposed by JBoss through operations on the SystemInfo "
+"MBean."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:46
+#, no-c-format
+msgid "listMemoryPools"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:48
+#, no-c-format
+msgid ""
+"This operations shows the size and current usage of all JVM memory pools. "
+"This operation is only available when using Java 5."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:54
+#, no-c-format
+msgid "listThreadDump"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:56
+#, no-c-format
+msgid ""
+"This operations shows all threads currently running in the JVM. When using "
+"Java 5, JBoss will display a complete stack trace for each thread, showing "
+"you exactly what code each thread is executing."
+msgstr ""
+
+#. Tag: emphasis
+#: J2EE_Additional_Services.xml:62
+#, no-c-format
+msgid "listThreadCpuUtilization"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:64
+#, no-c-format
+msgid ""
+"This operations shows all threads currently running in the JVM along with "
+"the total CPU time each thread has used. The operation is only available in "
+"Java 5."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:73
+#, fuzzy, no-c-format
+msgid "The Log4j Service"
+msgstr "Tomcat 服务"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:74
+#, no-c-format
+msgid ""
+"The <literal>Log4jService</literal> MBean configures the Apache log4j "
+"system. JBoss uses the log4j framework as its internal logging API."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:79
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ConfigurationURL</emphasis>: The URL for the log4j "
+"configuration file. This can refer to either a XML document parsed by the "
+"<literal>org.apache.log4j.xml.DOMConfigurator</literal> or a Java properties "
+"file parsed by the <literal>org.apache.log4j.PropertyConfigurator</literal>. "
+"The type of the file is determined by the URL content type, or if this is "
+"null, the file extension. The default setting of <literal>resource:log4j."
+"xml</literal> refers to the <literal>conf/log4j.xml</literal> file of the "
+"active server configuration file set."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:84
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RefreshPeriod</emphasis>: The time in seconds "
+"between checks for changes in the log4 configuration specified by the "
+"<literal>ConfigurationURL</literal> attribute. The default value is 60 "
+"seconds."
+msgstr ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis>:运行scanner线程间隔的毫秒数。"
+"它的缺省值是5000(5秒)。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:89
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CatchSystemErr</emphasis>: This boolean flag if "
+"true, indicates if the <literal>System.err</literal> stream should be "
+"redirected onto a log4j category called <literal>STDERR</literal>. The "
+"default is true."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:94
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CatchSystemOut</emphasis>: This boolean flag if "
+"true, indicates if the <literal>System.out</literal> stream should be "
+"redirected onto a log4j category called <literal>STDOUT</literal>. The "
+"default is true."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:99
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Log4jQuietMode</emphasis>: This boolean flag if "
+"true, sets the <literal>org.apache.log4j.helpers.LogLog.setQuiteMode</"
+"literal>. As of log4j1.2.8 this needs to be set to avoid a possible deadlock "
+"on exception at the appender level. See bug#696819."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:107
+#, no-c-format
+msgid "System Properties Management"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:108
+#, no-c-format
+msgid ""
+"The management of system properties can be done using the system properties "
+"service. It supports setting of the VM global property values just as "
+"<literal>java.lang.System.setProperty</literal> method and the VM command "
+"line arguments do."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:111
+#, fuzzy, no-c-format
+msgid "Its configurable attributes include:"
+msgstr "可配置的属性如下:"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:116
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Properties</emphasis>: a specification of multiple "
+"property <literal>name=value</literal> pairs using the <literal>java.util."
+"Properites.load(java.io.InputStream)</literal> method format. Each "
+"<literal>property=value</literal> statement is given on a separate line "
+"within the body of the <literal>Properties</literal> attribute element."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:121
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">URLList</emphasis>: a comma separated list of URL "
+"strings from which to load properties file formatted content. If a component "
+"in the list is a relative path rather than a URL it will be treated as a "
+"file path relative to the <literal><jboss-dist>/server/<config></"
+"literal> directory. For example, a component of <literal>conf/local."
+"properties</literal> would be treated as a file URL that points to the "
+"<literal><jboss-dist>/server/production/conf/local.properties</"
+"literal> file when running with the <literal>default</literal> configuration "
+"file set."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:126
+#, no-c-format
+msgid ""
+"The following illustrates the usage of the system properties service with an "
+"external properties file."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:129
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.varia.property.SystemPropertiesService\"\n"
+" name=\"jboss.util:type=Service,name=SystemProperties\">\n"
+" \n"
+" <!-- Load properties from each of the given comma separated URLs --"
+">\n"
+" <attribute name=\"URLList\">\n"
+" http://somehost/some-location.properties,\n"
+" ./conf/somelocal.properties\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:130
+#, no-c-format
+msgid ""
+"The following illustrates the usage of the system properties service with an "
+"embedded properties list."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:133
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.varia.property.SystemPropertiesService\"\n"
+" name=\"jboss.util:type=Service,name=SystemProperties\">\n"
+" <!-- Set properties using the properties file style. -->\n"
+" <attribute name=\"Properties\">\n"
+" property1=This is the value of my property\n"
+" property2=This is the value of my other property\n"
+" </attribute>\n"
+" \n"
+"</mbean>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:137
+#, no-c-format
+msgid "Property Editor Management"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:138
+#, no-c-format
+msgid ""
+"In JBoss, JavaBean property editors are used for reading data types from "
+"service files and for editing values in the JMX console. The <literal>java."
+"bean.PropertyEditorManager</literal> class controls the <literal>java.bean."
+"PropertyEditor</literal> instances in the system. The property editor "
+"manager can be managed in JBoss using the <literal>org.jboss.varia.property."
+"PropertyEditorManagerService</literal> MBean. The property editor manager "
+"service is configured in <literal>deploy/properties-service.xml</literal> "
+"and supports the following attributes:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:143
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BootstrapEditors:</emphasis> This is a listing of "
+"<literal>property_editor_class=editor_value_type_class</literal> pairs "
+"defining the property editor to type mappings that should be preloaded into "
+"the property editor manager. The value type of this attribute is a string so "
+"that it may be set from a string without requiring a custom property editor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:148
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Editors</emphasis>: This serves the same function as "
+"the <literal>BootstrapEditors</literal> attribute, but its type is "
+"<literal>java.util.Properties</literal>. Setting it from a string value in a "
+"service file requires a custom property editor for properties objects "
+"already be loaded. JBoss provides a suitable property editor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:153
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EditorSearchPath</emphasis>: This attribute allows "
+"one to set the editor packages search path on the "
+"<literal>PropertyEditorManager</literal> editor packages search path. Since "
+"there can be only one search path, setting this value overrides the default "
+"search path established by JBoss. If you set this, make sure to add the "
+"JBoss search path, <literal>org.jboss.util.propertyeditor</literal> and "
+"<literal>org.jboss.mx.util.propertyeditor</literal>, to the front of the new "
+"search path."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:161
+#, fuzzy, no-c-format
+msgid "Services Binding Management"
+msgstr "JNDI 绑定管理者(Binding Manager)"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:162
+#, no-c-format
+msgid ""
+"With all of the independently deployed services available in JBoss, running "
+"multiple instances on a given machine can be a tedious exercise in "
+"configuration file editing to resolve port conflicts. The binding service "
+"allows you centrally configure the ports for multiple JBoss instances. After "
+"the service is normally loaded by JBoss, the <literal>ServiceConfigurator</"
+"literal> queries the service binding manager to apply any overrides that may "
+"exist for the service. The service binding manager is configured in "
+"<literal>conf/jboss-service.xml</literal>. The set of configurable "
+"attributes it supports include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:167
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerName</emphasis>: This is the name of the "
+"server configuration this JBoss instance is associated with. The binding "
+"manager will apply the overrides defined for the named configuration."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:172
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StoreFactoryClassName</emphasis>: This is the name "
+"of the class that implements the <literal>ServicesStoreFactory</literal> "
+"interface. You may provide your own implementation, or use the default XML "
+"based store <literal>org.jboss.services.binding.XMLServicesStoreFactory</"
+"literal>. The factory provides a <literal>ServicesStore</literal> instance "
+"responsible for providing the names configuration sets."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:177
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StoreURL</emphasis>: This is the URL of the "
+"configuration store contents, which is passed to the <literal>ServicesStore</"
+"literal> instance to load the server configuration sets from. For the XML "
+"store, this is a simple service binding file."
+msgstr ""
+"<emphasis role=\"bold\">ClientConnectPort</emphasis>:客户传入 "
+"<literal>Socket(addr, port)</literal> 构造函数的端口。它的缺省值是服务器侦听"
+"套接字的端口号。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:182
+#, no-c-format
+msgid ""
+"The following is a sample service binding manager configuration that uses "
+"the <literal>ports-01</literal> configuration from the <literal>sample-"
+"bindings.xml</literal> file provided in the JBoss examples directory."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:185
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.services.binding.ServiceBindingManager\" \n"
+" name=\"jboss.system:service=ServiceBindingManager\">\n"
+" <attribute name=\"ServerName\">ports-01</attribute>\n"
+" <attribute name=\"StoreURL\">\n"
+" ../docs/examples/binding-manager/sample-bindings.xml\n"
+" </attribute>\n"
+" <attribute name=\"StoreFactoryClassName\">\n"
+" org.jboss.services.binding.XMLServicesStoreFactory \n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:186
+#, no-c-format
+msgid ""
+"The structure of the binding file is shown in <xref linkend="
+"\"Services_Binding_Management-The_binding_service_file_structure\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:190
+#, no-c-format
+msgid "The binding service file structure"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:197
+#, fuzzy, no-c-format
+msgid "The elements are:"
+msgstr "子元素是:"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:202
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">service-bindings</emphasis>: The root element of the "
+"configuration file. It contains one or more server elements."
+msgstr ""
+"<emphasis role=\"bold\">DiscoveryDisabled</emphasis> 是一个布尔值标记,它可用"
+"来取消自动恢复多点传送侦听者(multicast listener)的配置。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:207
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">server</emphasis>: This is the base of a JBoss "
+"server instance configuration. It has a required <literal>name</literal> "
+"attribute that defines the JBoss instance name to which it applies. This is "
+"the name that correlates with the <literal>ServiceBindingManager</"
+"literal><literal>ServerName</literal> attribute value. The server element "
+"content consists of one or more <literal>service-config</literal> elements."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:212
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">service-config</emphasis>: This element represents a "
+"configuration override for an MBean service. It has a required name "
+"attribute that is the JMX <literal>ObjectName</literal> string of the MBean "
+"service the configuration applies to. It also has a required "
+"<literal>delegateClass</literal> name attribute that specifies the class "
+"name of the <literal>ServicesConfigDelegate</literal> implementation that "
+"knows how to handle bindings for the target service. Its contents consists "
+"of an optional <literal>delegate-config</literal> element and one or more "
+"binding elements."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:217
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">binding</emphasis>: A <literal>binding</literal> "
+"element specifies a named port and address pair. It has an optional "
+"<literal>name</literal> that can be used to provide multiple binding for a "
+"service. An example would be multiple virtual hosts for a web container. The "
+"port and address are specified via the optional <literal>port</literal> and "
+"<literal>host</literal> attributes respectively. If the port is not "
+"specified it defaults to 0 meaning choose an anonymous port. If the host is "
+"not specified it defaults to null meaning any address."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:222
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">delegate-config</emphasis>: The <literal>delegate-"
+"config</literal> element is an arbitrary XML fragment for use by the "
+"<literal>ServicesConfigDelegate</literal> implementation. The "
+"<literal>hostName</literal> and <literal>portName</literal> attributes only "
+"apply to the <literal>AttributeMappingDelegate</literal> of the example and "
+"are there to prevent DTD aware editors from complaining about their "
+"existence in the <literal>AttributeMappingDelegate</literal> configurations. "
+"Generally both the attributes and content of the <literal>delegate-config</"
+"literal> are arbitrary, but there is no way to specify and a element can "
+"have any number of attributes with a DTD."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:227
+#, no-c-format
+msgid ""
+"The three <literal>ServicesConfigDelegate</literal> implementations are "
+"<literal>AttributeMappingDelegate</literal>, <literal>XSLTConfigDelegate</"
+"literal>, and <literal>XSLTFileDelegate</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:231
+#, no-c-format
+msgid "AttributeMappingDelegate"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:232
+#, no-c-format
+msgid ""
+"The <literal>AttributeMappingDelegate</literal> class is an implementation "
+"of the <literal>ServicesConfigDelegate</literal> that expects a "
+"<literal>delegate-config</literal> element of the form:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:235
+#, no-c-format
+msgid ""
+"<delegate-config portName=\"portAttrName\" hostName=\"hostAttrName\">\n"
+" <attribute name=\"someAttrName\">someHostPortExpr</"
+"attribute>\n"
+" <!-- ... -->\n"
+"</delegate-config>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:236
+#, no-c-format
+msgid ""
+"The <literal>portAttrName</literal> is the attribute name of the MBean "
+"service to which the binding port value should be applied, and the "
+"<literal>hostAttrName</literal> is the attribute name of the MBean service "
+"to which the binding host value should be applied. If the <literal>portName</"
+"literal> attribute is not specified then the binding port is not applied. "
+"Likewise, if the <literal>hostName</literal> attribute is not specified then "
+"the binding host is not applied. The optional attribute element(s) specify "
+"arbitrary MBean attribute names whose values are a function of the host and/"
+"or port settings. Any reference to <literal>${host}</literal> in the "
+"attribute content is replaced with the host binding and any <literal>${port}"
+"</literal> reference is replaced with the port binding. The "
+"<literal>portName</literal>, <literal>hostName</literal> attribute values "
+"and attribute element content may reference system properties using the "
+"<literal>${x}</literal> syntax that is supported by the JBoss services "
+"descriptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:239
+#, no-c-format
+msgid ""
+"The sample listing illustrates the usage of "
+"<literal>AttributeMappingDelegate</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:242
+#, no-c-format
+msgid ""
+"<service-config name=\"jboss:service=Naming\"\n"
+" delegateClass=\"org.jboss.services.binding."
+"AttributeMappingDelegate\">\n"
+" <delegate-config portName=\"Port\"/>\n"
+" <binding port=\"1099\" />\n"
+"</service-config>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:243
+#, no-c-format
+msgid ""
+"Here the <literal>jboss:service=Naming</literal> MBean service has its "
+"<literal>Port</literal> attribute value overridden to 1099. The "
+"corresponding setting from the jboss1 server configuration overrides the "
+"port to 1199."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:249
+#, no-c-format
+msgid "XSLTConfigDelegate"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:250
+#, no-c-format
+msgid ""
+"The <literal>XSLTConfigDelegate</literal> class is an implementation of the "
+"<literal>ServicesConfigDelegate</literal> that expects a <literal>delegate-"
+"config</literal> element of the form:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:253 J2EE_Additional_Services.xml:268
+#, no-c-format
+msgid ""
+"<delegate-config>\n"
+" <xslt-config configName=\"ConfigurationElement\"><![CDATA[\n"
+" Any XSL document contents...\n"
+" ]]>\n"
+" </xslt-config>\n"
+" <xslt-param name=\"param-name\">param-value</xslt-param>\n"
+" <!-- ... -->\n"
+"</delegate-config>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:254
+#, no-c-format
+msgid ""
+"The <literal>xslt-config</literal> child element content specifies an "
+"arbitrary XSL script fragment that is to be applied to the MBean service "
+"attribute named by the <literal>configName</literal> attribute. The named "
+"attribute must be of type <literal>org.w3c.dom.Element</literal>. The "
+"optional <literal>xslt-param</literal> elements specify XSL script parameter "
+"values for parameters used in the script. There are two XSL parameters "
+"defined by default called <literal>host</literal> and <literal>port</"
+"literal>, and their values are set to the configuration host and port "
+"bindings."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:257
+#, no-c-format
+msgid ""
+"The <literal>XSLTConfigDelegate</literal> is used to transform services "
+"whose <literal>port/interface</literal> configuration is specified using a "
+"nested XML fragment. The following example maps the port number on "
+"hypersonic datasource:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:260
+#, no-c-format
+msgid ""
+"<service-config name=\"jboss.jca:service=ManagedConnectionFactory,"
+"name=DefaultDS\" \n"
+" delegateClass=\"org.jboss.services.binding.XSLTConfigDelegate"
+"\">\n"
+" <delegate-config>\n"
+" <xslt-config configName=\"ManagedConnectionFactoryProperties\">"
+"<![CDATA[\n"
+"<xsl:stylesheet\n"
+" xmlns:xsl='http://www.w3.org/1999/XSL/Transform' "
+"version='1.0'>\n"
+"\n"
+" <xsl:output method=\"xml\" />\n"
+" <xsl:param name=\"host\"/>\n"
+" <xsl:param name=\"port\"/>\n"
+"\n"
+" <xsl:template match=\"/\">\n"
+" <xsl:apply-templates/>\n"
+" </xsl:template>\n"
+"\n"
+" <xsl:template match=\"config-property[@name='ConnectionURL']"
+"\">\n"
+" <config-property type=\"java.lang.String\" name=\"ConnectionURL"
+"\">\n"
+" jdbc:hsqldb:hsql://<xsl:value-of select='$host'/>:<"
+"xsl:value-of select='$port'/>\n"
+" </config-property>\n"
+" </xsl:template>\n"
+"\n"
+" <xsl:template match=\"*|@*\">\n"
+" <xsl:copy>\n"
+" <xsl:apply-templates select=\"@*|node()\"/>\n"
+" </xsl:copy>\n"
+" </xsl:template>\n"
+"</xsl:stylesheet>\n"
+"]]>\n"
+" </xslt-config>\n"
+" </delegate-config>\n"
+" <binding host=\"localhost\" port=\"1901\"/>\n"
+"</service-config>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:264
+#, no-c-format
+msgid "XSLTFileDelegate"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:265
+#, no-c-format
+msgid ""
+"The <literal>XSLTFileDelegate</literal> class works similarly to the "
+"<literal>XSLTConfigDelegate</literal> except that instead of transforming an "
+"embedded XML fragment, the XSLT script transforms a file read in from the "
+"file system. The <literal>delegate-config</literal> takes exactly the same "
+"form:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:269
+#, no-c-format
+msgid ""
+"The <literal>xslt-config</literal> child element content specifies an "
+"arbitrary XSL script fragment that is to be applied to the MBean service "
+"attribute named by the <literal>configName</literal> attribute. The named "
+"attribute must be a String value corresponding to an XML file that will be "
+"transformed. The optional <literal>xslt-param</literal> elements specify XSL "
+"script parameter values for parameters used in the script. There are two XSL "
+"parameters defined by default called <literal>host</literal> and "
+"<literal>port</literal>, and their values are set to the configuration "
+"<literal>host</literal> and <literal>port</literal> bindings."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:272
+#, no-c-format
+msgid ""
+"The following example maps the host and port values for the Tomcat "
+"connectors:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:275
+#, no-c-format
+msgid ""
+"<service-config name=\"jboss.web:service=WebServer\"\n"
+" delegateClass=\"org.jboss.services.binding.XSLTFileDelegate"
+"\">\n"
+" <delegate-config>\n"
+" <xslt-config configName=\"ConfigFile\"><![CDATA[\n"
+" <xsl:stylesheet\n"
+" xmlns:xsl='http://www.w3.org/1999/XSL/Transform' "
+"version='1.0'>\n"
+"\n"
+" <xsl:output method=\"xml\" />\n"
+" <xsl:param name=\"port\"/>\n"
+"\n"
+" <xsl:variable name=\"portAJP\" select=\"$port - 71\"/>\n"
+" <xsl:variable name=\"portHttps\" select=\"$port + 363\"/>\n"
+"\n"
+" <xsl:template match=\"/\">\n"
+" <xsl:apply-templates/>\n"
+" </xsl:template>\n"
+"\n"
+" <xsl:template match = \"Connector\">\n"
+" <Connector>\n"
+" <xsl:for-each select=\"@*\">\n"
+" <xsl:choose>\n"
+" <xsl:when test=\"(name() = 'port' and . = "
+"'8080')\">\n"
+" <xsl:attribute name=\"port\">\n"
+" <xsl:value-of select=\"$port\" />\n"
+" </xsl:attribute>\n"
+" </xsl:when>\n"
+" <xsl:when test=\"(name() = 'port' and . = "
+"'8009')\">\n"
+" <xsl:attribute name=\"port\">\n"
+" <xsl:value-of select=\"$portAJP\" />\n"
+" </xsl:attribute>\n"
+" </xsl:when>\n"
+" <xsl:when test=\"(name() = 'redirectPort')\">\n"
+" <xsl:attribute name=\"redirectPort\">\n"
+" <xsl:value-of select=\"$portHttps\" />\n"
+" </xsl:attribute>\n"
+" </xsl:when>\n"
+" <xsl:when test=\"(name() = 'port' and . = "
+"'8443')\">\n"
+" <xsl:attribute name=\"port\">\n"
+" <xsl:value-of select=\"$portHttps\" />\n"
+" </xsl:attribute>\n"
+" </xsl:when>\n"
+" <xsl:otherwise>\n"
+" <xsl:attribute name=\"{name()}\"><xsl:value-of "
+"select=\".\" /></xsl:attribute>\n"
+" </xsl:otherwise>\n"
+" </xsl:choose>\n"
+" </xsl:for-each>\n"
+" <xsl:apply-templates/>\n"
+" </Connector>\n"
+" </xsl:template>\n"
+"\n"
+" <xsl:template match=\"*|@*\">\n"
+" <xsl:copy>\n"
+" <xsl:apply-templates select=\"@*|node()\"/>\n"
+" </xsl:copy>\n"
+" </xsl:template>\n"
+" </xsl:stylesheet>\n"
+" ]]>\n"
+" </xslt-config>\n"
+" </delegate-config>\n"
+" <binding port=\"8280\"/>\n"
+"</service-config>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:279
+#, no-c-format
+msgid "The Sample Bindings File"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:280
+#, no-c-format
+msgid ""
+"JBoss ships with service binding configuration file for starting up to three "
+"separate JBoss instances on one host. Here we will walk through the steps to "
+"bring up the two instances and look at the sample configuration. Start by "
+"making two server configuration file sets called <literal>jboss0</literal> "
+"and <literal>jboss1</literal> by running the following command from the book "
+"examples directory:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:283
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=misc -Dex=1 run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:284
+#, no-c-format
+msgid ""
+"This creates duplicates of the <literal>server/default</literal> "
+"configuration file sets as <literal>server/jboss0</literal> and "
+"<literal>server/jboss1</literal>, and then replaces the <literal>conf/jboss-"
+"service.xml</literal> descriptor with one that has the "
+"<literal>ServiceBindingManager</literal> configuration enabled as follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:287
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.services.binding.ServiceBindingManager\"\n"
+" name=\"jboss.system:service=ServiceBindingManager\">\n"
+" <attribute name=\"ServerName\">${jboss.server.name}</"
+"attribute>\n"
+" <attribute name=\"StoreURL\">${jboss.server.base.dir}/misc-ex1-"
+"bindings.xml</attribute>\n"
+" <attribute name=\"StoreFactoryClassName\">\n"
+" org.jboss.services.binding.XMLServicesStoreFactory\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:288
+#, no-c-format
+msgid ""
+"Here the configuration name is <literal>${jboss.server.name}</literal>. "
+"JBoss will replace that with name of the actual JBoss server configuration "
+"that we pass to the run script with the <literal>-c</literal> option. That "
+"will be either <literal>jboss0</literal> or <literal>jboss1</literal>, "
+"depending on which configuration is being run. The binding manager will find "
+"the corresponding server configuration section from the <literal>misc-ex1-"
+"bindings.xml</literal> and apply the configured overrides. The "
+"<literal>jboss0</literal> configuration uses the default settings for the "
+"ports, while the <literal>jboss1</literal> configuration adds 100 to each "
+"port number."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:291
+#, no-c-format
+msgid ""
+"To test the sample configuration, start two JBoss instances using the "
+"<literal>jboss0</literal> and <literal>jboss1</literal> configuration file "
+"sets created previously. You can observe that the port numbers in the "
+"console log are different for the <literal>jboss1</literal> server. To test "
+"out that both instances work correctly, try accessing the web server of the "
+"first JBoss on port 8080 and then try the second JBoss instance on port 8180."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:299
+#, no-c-format
+msgid "RMI Dynamic Class Loading"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:300
+#, no-c-format
+msgid ""
+"The <literal>WebService</literal> MBean provides dynamic class loading for "
+"RMI access to the server EJBs. The configurable attributes for the service "
+"are as follows:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:305
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Port</emphasis>: the <literal>WebService</literal> "
+"listening port number. A port of 0 will use any available port."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:310
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Host</emphasis>: Set the name of the public "
+"interface to use for the host portion of the RMI codebase URL."
+msgstr ""
+"<emphasis role=\"bold\">name</emphasis>:构造函数的名字,它必须和实现类名一"
+"致。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:315
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BindAddress</emphasis>: the specific address the "
+"<literal>WebService</literal> listens on. This can be used on a multi-homed "
+"host for a <literal>java.net.ServerSocket</literal> that will only accept "
+"connect requests to one of its addresses."
+msgstr ""
+"<emphasis role=\"bold\">BindAddress</emphasis>:<literal>NamingService</"
+"literal> 侦听的特定地址。它可以用在多宿主主机上,使用只接受其中一个地址的连接"
+"请求的 <literal>java.net.ServerSocket</literal>。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:320
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Backlog</emphasis>: The maximum queue length for "
+"incoming connection indications (a request to connect) is set to the "
+"<literal>backlog</literal> parameter. If a connection indication arrives "
+"when the queue is full, the connection is refused."
+msgstr ""
+"<emphasis role=\"bold\">Backlog</emphasis>:<literal>backlog</literal> 参数指"
+"定进来的连接指示(连接请求)的最大队列长度。如果在连接指示到达时,队列已经满"
+"了,这个连接将被拒绝。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:325
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DownloadServerClasses</emphasis>: A flag indicating "
+"if the server should attempt to download classes from thread context class "
+"loader when a request arrives that does not have a class loader key prefix."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:330
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DownloadResources</emphasis>: A flag indicating "
+"whether the server should attempt to download non-class file resources using "
+"the thread context class loader. Note that allowing this is generally a "
+"security risk as it allows access to server configuration files which may "
+"contain security settings."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:335
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ThreadPool</emphasis>: The <literal>org.jboss.util."
+"threadpool.BasicThreadPoolMBean</literal> instance thread pool used for the "
+"class loading."
+msgstr ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis>:与代理关联的 "
+"<literal>org.jboss.ha.framework.interfaces.LoadBalancePolicy</literal> 接口实"
+"现的类名。"
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:343
+#, no-c-format
+msgid "Scheduling Tasks"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:344
+#, no-c-format
+msgid ""
+"Java includes a simple timer based capability through the <literal>java.util."
+"Timer</literal> and <literal>java.util.TimerTask</literal> utility classes. "
+"JMX also includes a mechanism for scheduling JMX notifications at a given "
+"time with an optional repeat interval as the <literal>javax.management.timer."
+"TimerMBean</literal> agent service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:347
+#, no-c-format
+msgid ""
+"JBoss includes two variations of the JMX timer service in the <literal>org."
+"jboss.varia.scheduler.Scheduler</literal> and <literal>org.jboss.varia."
+"scheduler.ScheduleManager</literal> MBeans. Both MBeans rely on the JMX "
+"timer service for the basic scheduling. They extend the behavior of the "
+"timer service as described in the following sections."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:351
+#, no-c-format
+msgid "org.jboss.varia.scheduler.Scheduler"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:352
+#, no-c-format
+msgid ""
+"The Scheduler differs from the <literal>TimerMBean</literal> in that the "
+"<literal>Scheduler</literal> directly invokes a callback on an instance of a "
+"user defined class, or an operation of a user specified MBean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:357
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InitialStartDate</emphasis>: Date when the initial "
+"call is scheduled. It can be either:"
+msgstr ""
+"<emphasis role=\"bold\">InitialStateRetrievalTimeout</emphasis> 指定的取得初"
+"始状态所需要等待的时间(毫秒数)。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:362
+#, no-c-format
+msgid "<literal>NOW</literal>: date will be the current time plus 1 seconds"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:367
+#, no-c-format
+msgid "A number representing the milliseconds since 1/1/1970"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:372
+#, no-c-format
+msgid ""
+"Date as String able to be parsed by <literal>SimpleDateFormat</literal> with "
+"default format pattern \"<literal>M/d/yy h:mm a</literal>\". If the date is "
+"in the past the <literal>Scheduler</literal> will search a start date in the "
+"future with respect to the initial repetitions and the period between calls. "
+"This means that when you restart the MBean (restarting JBoss etc.) it will "
+"start at the next scheduled time. When no start date is available in the "
+"future the <literal>Scheduler</literal> will not start."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:377
+#, no-c-format
+msgid ""
+"For example, if you start your <literal>Schedulable</literal> everyday at "
+"Noon and you restart your JBoss server then it will start at the next Noon "
+"(the same if started before Noon or the next day if start after Noon)."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:382
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InitialRepetitions</emphasis>: The number of times "
+"the scheduler will invoke the target's callback. If -1 then the callback "
+"will be repeated until the server is stopped."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:387
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StartAtStartup</emphasis>: A flag that determines if "
+"the <literal>Scheduler</literal> will start when it receives its "
+"startService life cycle notification. If true the <literal>Scheduler</"
+"literal> starts on its startup. If false, an explicit "
+"<literal>startSchedule</literal> operation must be invoked on the "
+"<literal>Scheduler</literal> to begin."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:392
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulePeriod</emphasis>: The interval between "
+"scheduled calls in milliseconds. This value must be bigger than 0."
+msgstr ""
+"<emphasis role=\"bold\">read-write</emphasis>:既可读又可写。这是缺省选项。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:397
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulableClass</emphasis>: The fully qualified "
+"class name of the <literal>org.jboss.varia.scheduler.Schedulable</literal> "
+"interface implementation that is to be used by the <literal>Scheduler</"
+"literal> . The <literal>SchedulableArguments</literal> and "
+"<literal>SchedulableArgumentTypes</literal> must be populated to correspond "
+"to the constructor of the <literal>Schedulable</literal> implementation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:402
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulableArguments</emphasis>: A comma separated "
+"list of arguments for the <literal>Schedulable</literal> implementation "
+"class constructor. Only primitive data types, <literal>String</literal> and "
+"classes with a constructor that accepts a <literal>String</literal> as its "
+"sole argument are supported."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:407
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulableArgumentTypes</emphasis>: A comma "
+"separated list of argument types for the <literal>Schedulable</literal> "
+"implementation class constructor. This will be used to find the correct "
+"constructor via reflection. Only primitive data types, <literal>String</"
+"literal> and classes with a constructor that accepts a <literal>String</"
+"literal> as its sole argument are supported."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:412
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulableMBean</emphasis>: Specifies the fully "
+"qualified JMX <literal>ObjectName</literal> name of the schedulable MBean to "
+"be called. If the MBean is not available it will not be called but the "
+"remaining repetitions will be decremented. When using "
+"<literal>SchedulableMBean</literal> the <literal>SchedulableMBeanMethod</"
+"literal> must also be specified."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:417
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SchedulableMBeanMethod</emphasis>: Specifies the "
+"operation name to be called on the schedulable MBean. It can optionally be "
+"followed by an opening bracket, a comma separated list of parameter "
+"keywords, and a closing bracket. The supported parameter keywords include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:422
+#, no-c-format
+msgid ""
+"<literal>NOTIFICATION</literal> which will be replaced by the timers "
+"notification instance (javax.management.Notification)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:427
+#, no-c-format
+msgid ""
+"<literal>DATE</literal> which will be replaced by the date of the "
+"notification call (java.util.Date)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:432
+#, no-c-format
+msgid ""
+"<literal>REPETITIONS</literal> which will be replaced by the number of "
+"remaining repetitions (long)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:437
+#, no-c-format
+msgid ""
+"<literal>SCHEDULER_NAME</literal> which will be replaced by the "
+"<literal>ObjectName</literal> of the <literal>Scheduler</literal>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:442
+#, no-c-format
+msgid ""
+"Any fully qualified class name which the <literal>Scheduler</literal> will "
+"set to null."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:449
+#, no-c-format
+msgid ""
+"A given Scheduler instance only support a single schedulable instance. If "
+"you need to configure multiple scheduled events you would use multiple "
+"<literal>Scheduler</literal> instances, each with a unique "
+"<literal>ObjectName</literal>. The following is an example of configuring a "
+"<literal>Scheduler</literal> to call a <literal>Schedulable</literal> "
+"implementation as well as a configuration for calling a MBean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:452
+#, no-c-format
+msgid ""
+"<server>\n"
+" \n"
+" <mbean code=\"org.jboss.varia.scheduler.Scheduler\"\n"
+" name=\"jboss.docs:service=Scheduler\">\n"
+" <attribute name=\"StartAtStartup\">true</attribute>\n"
+" <attribute name=\"SchedulableClass\">org.jboss.book.misc.ex2."
+"ExSchedulable</attribute>\n"
+" <attribute name=\"SchedulableArguments\">TheName,123456789</"
+"attribute>\n"
+" <attribute name=\"SchedulableArgumentTypes\">java.lang.String,"
+"long</attribute>\n"
+" \n"
+" <attribute name=\"InitialStartDate\">NOW</attribute>\n"
+" <attribute name=\"SchedulePeriod\">60000</attribute>\n"
+" <attribute name=\"InitialRepetitions\">-1</attribute>\n"
+" </mbean>\n"
+" \n"
+"</server>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:453
+#, no-c-format
+msgid ""
+"The <literal>SchedulableClass</literal><literal>org.jboss.book.misc.ex2."
+"ExSchedulable</literal> example class is given below."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:456
+#, no-c-format
+msgid ""
+"package org.jboss.book.misc.ex2;\n"
+"\n"
+"import java.util.Date;\n"
+"import org.jboss.varia.scheduler.Schedulable;\n"
+"\n"
+"import org.apache.log4j.Logger;\n"
+"\n"
+"/**\n"
+" * A simple Schedulable example.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExSchedulable implements Schedulable\n"
+"{\n"
+" private static final Logger log = Logger.getLogger(ExSchedulable."
+"class);\n"
+"\n"
+" private String name;\n"
+" private long value;\n"
+"\n"
+" public ExSchedulable(String name, long value)\n"
+" {\n"
+" this.name = name;\n"
+" this.value = value;\n"
+" log.info(\"ctor, name: \" + name + \", value: \" + value);\n"
+" }\n"
+"\n"
+" public void perform(Date now, long remainingRepetitions)\n"
+" {\n"
+" log.info(\"perform, now: \" + now +\n"
+" \", remainingRepetitions: \" + remainingRepetitions +\n"
+" \", name: \" + name + \", value: \" + value);\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:457
+#, fuzzy, no-c-format
+msgid "Deploy the timer SAR by running:"
+msgstr "用下面的命令部署示例 ear:"
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:460
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=misc -Dex=2 run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:461
+#, no-c-format
+msgid ""
+"The server console shows the following which includes the first two timer "
+"invocations, separated by 60 seconds:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:464
+#, no-c-format
+msgid ""
+"21:09:27,716 INFO [ExSchedulable] ctor, name: TheName, value: 123456789\n"
+"21:09:28,925 INFO [ExSchedulable] perform, now: Mon Dec 20 21:09:28 CST "
+"2004, \n"
+" remainingRepetitions: -1, name: TheName, value: 123456789\n"
+"21:10:28,899 INFO [ExSchedulable] perform, now: Mon Dec 20 21:10:28 CST "
+"2004, \n"
+" remainingRepetitions: -1, name: TheName, value: 123456789\n"
+"21:11:28,897 INFO [ExSchedulable] perform, now: Mon Dec 20 21:11:28 CST "
+"2004, \n"
+" remainingRepetitions: -1, name: TheName, value: 123456789"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:470
+#, fuzzy, no-c-format
+msgid "The Timer Service"
+msgstr "Tomcat 服务"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:471
+#, no-c-format
+msgid ""
+"The JMX standard defines a timer MBean (<literal>javax.management.timer."
+"Timer</literal>) which can send notifications at predetermined times. The a "
+"timer MBean can be instantiated within JBoss as any other MBean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:474
+#, no-c-format
+msgid ""
+"<mbean code=\"javax.management.timer.Timer\" name=\"jboss.monitor:"
+"name=Heartbeat,type=Timer\"/>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:475
+#, no-c-format
+msgid ""
+"A standard JMX timer doesn't produce any timer events unless it is asked "
+"to. To aid in the configuration of the timer MBean, JBoss provides a "
+"complementary <literal>TimerService</literal> MBean. It interacts with the "
+"timer MBean to configure timer events at regular intervals and to transform "
+"them into JMX notifications more suitable for other services. The "
+"<literal>TimerService</literal> MBean takes the following attributes:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:480
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NotificationType</emphasis>: This is the type of the "
+"notification to be generated."
+msgstr ""
+"<emphasis role=\"bold\">notification-type</emphasis>:这个元素包含用逗号隔开"
+"的通知类型串。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:485
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NotificationMessage</emphasis>: This is the message "
+"that should be associated with the generated notification."
+msgstr ""
+"<emphasis role=\"bold\">notification-type</emphasis>:这个元素包含用逗号隔开"
+"的通知类型串。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:490
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TimerPeriod</emphasis>: This is the time period "
+"between notification. The time period is in milliseconds, unless otherwise "
+"specified with a unit like \"30min\" or \"4h\". Valid time suffixes are "
+"<literal>msec</literal>, <literal>sec</literal>, <literal>min</literal> and "
+"<literal>h</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:495
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Repeatitions</emphasis>: This is the number of times "
+"the alert should be generated. A value of 0 indicates the alert should "
+"repeat indefinitely."
+msgstr ""
+"<emphasis role=\"bold\">ServerBindPort</emphasis>:用于服务器套接字的端口。如"
+"果为 0 则表示使用匿名端口。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:500
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TimerMbean</emphasis>: This is the "
+"<literal>ObjectName</literal> of the time MBean that this "
+"<literal>TimerService</literal> instance should configure notifications for."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:505
+#, fuzzy, no-c-format
+msgid ""
+"The following sample illustrates the the use of the <literal>TimerService</"
+"literal> MBean."
+msgstr "<literal>HANamingService</literal> MBean 的完整缺省配置如下所示。"
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:508
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.monitor.services.TimerService\" \n"
+" name=\"jboss.monitor:name=Heartbeat,type=TimerService\">\n"
+" <attribute name=\"NotificationType\">jboss.monitor.heartbeat</"
+"attribute>\n"
+" <attribute name=\"NotificationMessage\">JBoss is alive!</"
+"attribute>\n"
+" <attribute name=\"TimerPeriod\">60sec</attribute>\n"
+" <depends optional-attribute-name=\"TimerMBean\">\n"
+" jboss.monitor:name=Heartbeat,type=Timer\n"
+" </depends>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:509
+#, no-c-format
+msgid ""
+"This MBean configuration configures the <literal>jboss.monitor:"
+"name=Heartbeat,type=Timer</literal> timer to generate a <literal>jboss."
+"monitor.heartbeat</literal> notification every 60 seconds. Any service that "
+"that wants to receive this periodic notifications can subscribe to the "
+"notification."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:512
+#, no-c-format
+msgid ""
+"As an example, JBoss provides a simple <literal>NotificationListener</"
+"literal> MBean that can listen for a particular notification and log a log "
+"message when an event is generated. This MBean is very useful for debugging "
+"or manually observing notifications. The following MBean definition listens "
+"for any events generated by the heartbeat timer used in the previous "
+"examples."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:515
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.monitor.services.NotificationListener\" \n"
+" name=\"jboss.monitor:service=NotificationListener\">\n"
+" <attribute name=\"SubscriptionList\">\n"
+" <subscription-list>\n"
+" <mbean name=\"jboss.monitor:name=Heartbeat,type=Timer\" /"
+">\n"
+" </subscription-list>\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:516
+#, no-c-format
+msgid ""
+"The <literal>subscription-list</literal> element lists which MBeans the "
+"listener should listen to. Notice that the MBean we are listening to is the "
+"name of the actual timer MBean and not the <literal>TimerService</literal> "
+"MBean. Because the timer might generate multiple events, configured by "
+"multiple <literal>TimerService</literal> instances, you may need to filter "
+"by notification type. The <literal>filter</literal> element can be used to "
+"create notification filters that select only the notification types desired. "
+"The following listing shows how we can limit notifications to only the "
+"<literal>jboss.monitor.heartbeat</literal> type the timer service configured."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:519
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.monitor.services.NotificationListener\"\n"
+" name=\"jboss.monitor:service=NotificationListener\">\n"
+" <attribute name=\"SubscriptionList\">\n"
+" <subscription-list>\n"
+" <mbean name=\"jboss.monitor:name=Heartbeat,type=Timer\">\n"
+" <filter factory=\"NotificationFilterSupportFactory\">\n"
+" <enable type=\"jboss.monitor.heartbeat\"/"
+"> \n"
+" </filter>\n"
+" </mbean>\n"
+" </subscription-list>\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:520
+#, no-c-format
+msgid ""
+"As an example of a slightly more interesting listener, we'll look at the "
+"ScriptingListener. This listener listens for particular events and then "
+"executes a specified script when events are received. The script can be "
+"written in any bean shell scripting language. The ScriptingListener accepts "
+"has the following parameters."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:525
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ScriptLanguage</emphasis>: This is the language the "
+"script is written in. This should be <literal>beanshell</literal>, unless "
+"you have loaded libraries for another beanshell compatible language."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:530
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Script</emphasis>: This is the text of the script to "
+"evaluate. It is good practice to enclose the script in a CDATA section to "
+"minimize conflicts between scripting language syntax and XML syntax."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:535
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SubscriptionList</emphasis>: This is the list of "
+"MBeans that this MBean will listen to for events that will trigger the "
+"script."
+msgstr ""
+"<emphasis role=\"bold\">directory</emphasis>:这是建立访问日志文件的目录路"
+"径。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:540
+#, no-c-format
+msgid ""
+"The following example illustrates the use of the <literal>ScriptingListener</"
+"literal>. When the previously configured timer generates a heartbeat "
+"notification, the beanshell script will execute, printing the current memory "
+"values to STDOUT. (This output will be redirected to the log files) Notice "
+"that the beanshell script has a reference to the MBean server and can "
+"execute operations against other MBeans."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:543
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.monitor.services.ScriptingListener\" \n"
+" name=\"jboss.monitor:service=ScriptingListener\"> \n"
+" <attribute name=\"SubscriptionList\">\n"
+" <subscription-list>\n"
+" <mbean name=\"jboss.monitor:name=Heartbeat,type=Timer\"/>\n"
+" </subscription-list>\n"
+" </attribute>\n"
+" <attribute name=\"ScriptLanguage\">beanshell</attribute>\n"
+" <attribute name=\"Script\">\n"
+" <![CDATA[\n"
+" import javax.management.ObjectName;\n"
+"\n"
+" /* poll free memory and thread count */ \n"
+" ObjectName target = new ObjectName(\"jboss.system:type=ServerInfo\");\n"
+"\n"
+" long freeMemory = server.getAttribute(target, \"FreeMemory\");\n"
+" long threadCount = server.getAttribute(target, \"ActiveThreadCount\");\n"
+"\n"
+" log.info(\"freeMemory\" + freeMemory + \", threadCount\" + threadCount);\n"
+"]]>\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:544
+#, no-c-format
+msgid ""
+"Of course, you are not limited to these JBoss-provided notification "
+"listeners. Other services such as the barrier service (see <xref linkend="
+"\"Additional_Services-The_BarrierController_Service\"/>) receive and act on "
+"notifications that could be generated from a timer. Additionally, any MBean "
+"can be coded to listen for timer-generated notifications."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:550
+#, fuzzy, no-c-format
+msgid "The BarrierController Service"
+msgstr "The ServiceController MBean"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:551
+#, no-c-format
+msgid ""
+"Expressing dependencies between services using the <depends> tag is a "
+"convenient way to make the lifecycle of one service depend on the lifecycle "
+"of another. For example, when <literal>serviceA</literal> depends on "
+"<literal>serviceB</literal> JBoss will ensure the <literal>serviceB.create()"
+"</literal> is called before <literal>serviceA.create()</literal> and "
+"<literal>serviceB.start()</literal> is called before <literal>serviceA.start"
+"()</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:554
+#, no-c-format
+msgid ""
+"However, there are cases where services do not conform to the JBoss "
+"lifecycle model, i.e. they don't expose create/start/stop/destroy "
+"lifecycle methods). This is the case for <literal>jboss.system:type=Server "
+"MBean</literal>, which represents the JBoss server itself. No lifecycle "
+"operations are exposed so you cannot simply express a dependency like: if "
+"JBoss is fully started then start my own service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:557
+#, no-c-format
+msgid ""
+"Or, even if they do conform to the JBoss lifecycle model, the completion of "
+"a lifecycle method (e.g. the <literal>start</literal> method) may not be "
+"sufficient to describe a dependency. For example the <literal>jboss.web:"
+"service=WebServer</literal> MBean that wraps the embedded Tomcat server in "
+"JBoss does not start the Tomcat connectors until after the server is fully "
+"started. So putting a dependency on this MBean, if we want to hit a webpage "
+"through Tomcat, will do no good."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:560
+#, no-c-format
+msgid ""
+"Resolving such non-trivial dependencies is currently performed using JMX "
+"notifications. For example the <literal>jboss.system:type=Server</literal> "
+"MBean emits a notification of type <literal>org.jboss.system.server.started</"
+"literal> when it has completed startup, and a notification of type "
+"<literal>org.jboss.system.server.stopped</literal> when it shuts down. "
+"Similarly, <literal>jboss.web:service=WebServer</literal> emits a "
+"notification of type <literal>jboss.tomcat.connectors.started</literal> when "
+"it starts up. Services can subscribe to those notifications in order to "
+"implement more complex dependencies. This technique has been generalized "
+"with the barrier controller service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:563
+#, no-c-format
+msgid ""
+"The barrier controller is a relatively simple MBean service that extends "
+"<literal>ListenerServiceMBeanSupport</literal> and thus can subscribe to any "
+"notification in the system. It uses the received notifications to control "
+"the lifecycle of a dynamically created MBean called the barrier."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:566
+#, no-c-format
+msgid ""
+"The barrier is instantiated, registered and brought to the create state when "
+"the barrier controller is deployed. After that, the barrier is started and "
+"stopped when matching notifications are received. Thus, other services need "
+"only depend on the barrier MBean using the usual <literal><depends></"
+"literal> tag, without having to worry about complex lifecycle issues. They "
+"will be started and stopped in tandem with the Barrier. When the barrier "
+"controller is undeployed the barrier is destroyed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:569
+#, no-c-format
+msgid ""
+"The notifications of interest are configured in the barrier controller using "
+"the <literal>SubscriptionList</literal> attribute. In order to identify the "
+"starting and stopping notifications we associate with each subscription a "
+"handback string object. Handback objects, if specified, are passed back "
+"along with the delivered notifications at reception time (i.e. when "
+"<literal>handleNotification()</literal> is called) to qualify the received "
+"notifications, so that you can identify quickly from which subscription a "
+"notification is originating (because your listener can have many active "
+"subscriptions)."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:572
+#, no-c-format
+msgid ""
+"So we tag the subscriptions that produce the starting/stopping notifications "
+"of interest using any handback strings, and we configure this same string to "
+"the <literal>StartBarrierHandback</literal> (and "
+"<literal>StopBarrierHandback</literal> correspondingly) attribute of the "
+"barrier controller. Thus we can have more than one notifications triggering "
+"the starting or stopping of the barrier."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:575
+#, no-c-format
+msgid ""
+"The following example shows a service that depends on the Tomcat connectors. "
+"In fact, this is a very common pattern for services that want to hit a "
+"servlet inside tomcat. The service that depends on the Barrier in the "
+"example, is a simple memory monitor that creates a background thread and "
+"monitors the memory usage, emitting notifications when thresholds get "
+"crossed, but it could be anything. We've used this because it prints out "
+"to the console starting and stopping messages, so we know when the service "
+"gets activated/deactivated."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Additional_Services.xml:578
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!-- $Id: J2EE_Additional_Services.xml,v 1.1 2007/11/09 07:30:09 vrenish "
+"Exp $ -->\n"
+"\n"
+"<server>\n"
+" <!--\n"
+" In this example we have the BarrierController controlling a Barrier\n"
+" that is started when we receive the \"jboss.tomcat.connectors.started\"\n"
+" notification from the Tomcat mbean, and stopped when we receive the\n"
+" \"org.jboss.system.server.stopped\" notification from the server mbean.\n"
+" \n"
+" The dependent services need only define a dependency on the Barrier "
+"mbean!\n"
+" -->\n"
+" <mbean code=\"org.jboss.system.BarrierController\"\n"
+" name=\"jboss:service=BarrierController\">\n"
+" \n"
+" <!-- Whether to have the Barrier initially started or not -->\n"
+" <attribute name=\"BarrierEnabledOnStartup\">false</"
+"attribute>\n"
+" \n"
+" <!-- Whether to subscribe for notifications after startup -->\n"
+" <attribute name=\"DynamicSubscriptions\">true</attribute>\n"
+" \n"
+" <!-- Dependent services will depend on this mbean -->\n"
+" <attribute name=\"BarrierObjectName\">jboss:name=TomcatConnector,"
+"type=Barrier</attribute>\n"
+" \n"
+" <!-- The notification subscription handback that starts the barrier --"
+">\n"
+" <attribute name=\"StartBarrierHandback\">start</attribute>\n"
+" \n"
+" <!-- The notification subscription handback that stops the barrier --"
+">\n"
+" <attribute name=\"StopBarrierHandback\">stop</attribute>\n"
+" \n"
+" <!-- The notifications to subscribe for, along with their handbacks --"
+">\n"
+" <attribute name=\"SubscriptionList\">\n"
+" <subscription-list>\n"
+" <mbean name=\"jboss.web:service=WebServer\" handback=\"start"
+"\">\n"
+" <filter factory=\"NotificationFilterSupportFactory\">\n"
+" <enable type=\"jboss.tomcat.connectors.started\"/>\n"
+" </filter>\n"
+" </mbean>\n"
+" <mbean name=\"jboss.system:type=Server\" handback=\"stop\">\n"
+" <filter factory=\"NotificationFilterSupportFactory\">\n"
+" <enable type=\"org.jboss.system.server.stopped\"/>\n"
+" </filter>\n"
+" </mbean> \n"
+" </subscription-list>\n"
+" </attribute>\n"
+" </mbean>\n"
+"\n"
+" <!--\n"
+" An example service that depends on the Barrier we declared above.\n"
+" This services creates a background thread and monitors the memory\n"
+" usage. When it exceeds the defined thresholds it emits notifications\n"
+" -->\n"
+" <mbean code=\"org.jboss.monitor.services.MemoryMonitor\"\n"
+" name=\"jboss.monitor:service=MemoryMonitor\">\n"
+"\n"
+" <attribute name=\"FreeMemoryWarningThreshold\">20m</"
+"attribute>\n"
+" <attribute name=\"FreeMemoryCriticalThreshold\">15m</"
+"attribute>\n"
+" \n"
+" <!-- The BarrierObjectName configured in the BarrierController --"
+">\n"
+" <depends>jboss:name=TomcatConnector,type=Barrier</depends>\n"
+" </mbean>\n"
+" \n"
+"</server>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:579
+#, no-c-format
+msgid ""
+"If you hot-deploy this on a running server the Barrier will be stopped "
+"because by the time the barrier controller is deployed the starting "
+"notification is already seen. (There are ways to overcome this.) However, if "
+"you re-start the server, the barrier will be started just after the Tomcat "
+"connectors get activated. You can also manually start or stop the barrier by "
+"using the <literal>startBarrier()</literal> and <literal>stopBarrier()</"
+"literal> operations on the barrier controller. The attribute "
+"<literal>BarrierStateString</literal> indicates the status of the barrier."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:585
+#, no-c-format
+msgid "Exposing MBean Events via SNMP"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:586
+#, no-c-format
+msgid ""
+"JBoss has an SNMP adaptor service that can be used to intercept JMX "
+"notifications emitted by MBeans, convert them to traps and send them to SNMP "
+"managers. In this respect the snmp-adaptor acts as a SNMP agent. Future "
+"versions may offer support for full agent get/set functionality that maps "
+"onto MBean attributes or operations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:589
+#, no-c-format
+msgid ""
+"This service can be used to integrate JBoss with higher order system/network "
+"management platforms (HP OpenView, for example), making the MBeans visible "
+"to those systems. The MBean developer can instrument the MBeans by producing "
+"notifications for any significant event (e.g. server coldstart), and adaptor "
+"can then be configured to intercept the notification and map it onto an SNMP "
+"traps. The adaptor uses the JoeSNMP package from OpenNMS as the SNMP engine."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:592
+#, no-c-format
+msgid ""
+"The SNMP service is configured in <literal>snmp-adaptor.sar</literal>. This "
+"service is only available in the <literal>all</literal> configuration, so "
+"you'll need to copy it to your configuration if you want to use it. "
+"Inside the snmp-adaptor.sar directory, there are two configuration files "
+"that control the SNMP service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:597
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">managers.xml</emphasis>: configures where to send "
+"traps. The content model for this file is shown in <xref linkend="
+"\"_Exposing_MBean_Events_via_SNMP-The_schema_for_the_SNMP_managers_file\"/>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:602
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">notifications.xml</emphasis>: specifies the exact "
+"mapping of each notification type to a corresponding SNMP trap. The content "
+"model for this file is shown in <xref linkend="
+"\"_Exposing_MBean_Events_via_SNMP-"
+"The_schema_for_the_notification_to_trap_mapping_file\"/>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:607
+#, no-c-format
+msgid ""
+"The <literal>SNMPAgentService</literal> MBean is configured in <literal>snmp-"
+"adaptor.sar/META-INF/jboss-service.xml</literal>. The configurable "
+"parameters are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:612
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">HeartBeatPeriod</emphasis>: The period in seconds at "
+"which heartbeat notifications are generated."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:与通知元数据相关联的任何描述"
+"符。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:617
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ManagersResName</emphasis>: Specifies the resource "
+"name of the <literal>managers.xml</literal> file."
+msgstr ""
+"<emphasis role=\"bold\">CacheLoaderClass</emphasis> 指定了 "
+"<literal>CacheLoader</literal> 实现的完整类名。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:622
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NotificationMapResName</emphasis>: Specifies the "
+"resource name of the <literal>notications.xml</literal> file."
+msgstr ""
+"<emphasis role=\"bold\">CacheLoaderClass</emphasis> 指定了 "
+"<literal>CacheLoader</literal> 实现的完整类名。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:627
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TrapFactoryClassName</emphasis>: The <literal>org."
+"jboss.jmx.adaptor.snmp.agent.TrapFactory</literal> implementation class that "
+"takes care of translation of JMX Notifications into SNMP V1 and V2 traps."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:632
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TimerName</emphasis>: Specifies the JMX ObjectName "
+"of the JMX timer service to use for heartbeat notifications."
+msgstr ""
+"<emphasis role=\"bold\">TransactionManagerService</emphasis>:JTA 事务管理服"
+"务的 JMX ObjectName。"
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:637
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SubscriptionList</emphasis>: Specifies which MBeans "
+"and notifications to listen for."
+msgstr ""
+"<emphasis role=\"bold\">gossip_port</emphasis> 指定 GossipRouter 所侦听的端"
+"口。"
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:643
+#, no-c-format
+msgid "The schema for the SNMP managers file"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Additional_Services.xml:651
+#, no-c-format
+msgid "The schema for the notification to trap mapping file"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Additional_Services.xml:658
+#, no-c-format
+msgid ""
+"<literal>TrapdService</literal> is a simple MBean that acts as an SNMP "
+"Manager. It listens to a configurable port for incoming traps and logs them "
+"as DEBUG messages using the system logger. You can modify the log4j "
+"configuration to redirect the log output to a file. "
+"<literal>SnmpAgentService</literal> and <literal>TrapdService</literal> are "
+"not dependent on each other."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Connectors_On_JBOSS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Connectors_On_JBOSS.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Connectors_On_JBOSS.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,2232 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:6
+#, no-c-format
+msgid "Connectors on JBoss"
+msgstr ""
+
+#. Tag: subtitle
+#: J2EE_Connectors_On_JBOSS.xml:7
+#, fuzzy, no-c-format
+msgid "The JCA Configuration and Architecture"
+msgstr "JBoss 类加载器架构"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:8
+#, no-c-format
+msgid ""
+"This chapter discusses the JBoss server implementation of the J2EE Connector "
+"Architecture (JCA). JCA is a resource manager integration API whose goal is "
+"to standardize access to non-relational resources in the same way the JDBC "
+"API standardized access to relational data. The purpose of this chapter is "
+"to introduce the utility of the JCA APIs and then describe the architecture "
+"of JCA in JBoss"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:12
+#, fuzzy, no-c-format
+msgid "JCA Overview"
+msgstr "JMX组件概述"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:13
+#, no-c-format
+msgid ""
+"J2EE 1.4 contains a connector architecture (JCA) specification that allows "
+"for the integration of transacted and secure resource adaptors into a J2EE "
+"application server environment. The JCA specification describes the notion "
+"of such resource managers as Enterprise Information Systems (EIS). Examples "
+"of EIS systems include enterprise resource planning packages, mainframe "
+"transaction processing, non-Java legacy applications, etc."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:16
+#, no-c-format
+msgid ""
+"The reason for focusing on EIS is primarily because the notions of "
+"transactions, security, and scalability are requirements in enterprise "
+"software systems. However, the JCA is applicable to any resource that needs "
+"to integrate into JBoss in a secure, scalable and transacted manner. In this "
+"introduction we will focus on resource adapters as a generic notion rather "
+"than something specific to the EIS environment."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:19
+#, no-c-format
+msgid ""
+"The connector architecture defines a standard SPI (Service Provider "
+"Interface) for integrating the transaction, security and connection "
+"management facilities of an application server with those of a resource "
+"manager. The SPI defines the system level contract between the resource "
+"adaptor and the application server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:22
+#, no-c-format
+msgid ""
+"The connector architecture also defines a Common Client Interface (CCI) for "
+"accessing resources. The CCI is targeted at EIS development tools and other "
+"sophisticated users of integrated resources. The CCI provides a way to "
+"minimize the EIS specific code required by such tools. Typically J2EE "
+"developers will access a resource using such a tool, or a resource specific "
+"interface rather than using CCI directly. The reason is that the CCI is not "
+"a type specific API. To be used effectively it must be used in conjunction "
+"with metadata that describes how to map from the generic CCI API to the "
+"resource manager specific data types used internally by the resource manager."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:25
+#, no-c-format
+msgid ""
+"The purpose of the connector architecture is to enable a resource vendor to "
+"provide a standard adaptor for its product. A resource adaptor is a system-"
+"level software driver that is used by a Java application to connect to "
+"resource. The resource adaptor plugs into an application server and provides "
+"connectivity between the resource manager, the application server, and the "
+"enterprise application. A resource vendor need only implement a JCA "
+"compliant adaptor once to allow use of the resource manager in any JCA "
+"capable application server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:28
+#, no-c-format
+msgid ""
+"An application server vendor extends its architecture once to support the "
+"connector architecture and is then assured of seamless connectivity to "
+"multiple resource managers. Likewise, a resource manager vendor provides one "
+"standard resource adaptor and it has the capability to plug in to any "
+"application server that supports the connector architecture."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:32
+#, no-c-format
+msgid ""
+"The relationship between a J2EE application server and a JCA resource adaptor"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:39
+#, no-c-format
+msgid ""
+"illustrates that the application server is extended to provide support for "
+"the JCA SPI to allow a resource adaptor to integrate with the server "
+"connection pooling, transaction management and security management "
+"facilities. This integration API defines a three-part system contract."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:44
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Connection management</emphasis>: a contract that "
+"allows the application server to pool resource connections. The purpose of "
+"the pool management is to allow for scalability. Resource connections are "
+"typically expense objects to create and pooling them allows for more "
+"effective reuse and management."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:49
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transaction Management</emphasis>: a contract that "
+"allows the application server transaction manager to manage transactions "
+"that engage resource managers."
+msgstr ""
+"<emphasis role=\"bold\">TransactionManagerService</emphasis>:JTA 事务管理服"
+"务的 JMX ObjectName。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:54
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Security Management</emphasis>: a contract that "
+"enables secured access to resource managers."
+msgstr "<emphasis role=\"bold\">Instrumentation</emphasis> 它是所管理的资源"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:59
+#, no-c-format
+msgid ""
+"The resource adaptor implements the resource manager side of the system "
+"contract. This entails using the application server connection pooling, "
+"providing transaction resource information and using the security "
+"integration information. The resource adaptor also exposes the resource "
+"manager to the application server components. This can be done using the CCI "
+"and/or a resource adaptor specific API."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:62
+#, no-c-format
+msgid ""
+"The application component integrates into the application server using a "
+"standard J2EE container to component contract. For an EJB component this "
+"contract is defined by the EJB specification. The application component "
+"interacts with the resource adaptor in the same way as it would with any "
+"other standard resource factory, for example, a <literal>javax.sql."
+"DataSource</literal> JDBC resource factory. The only difference with a JCA "
+"resource adaptor is that the client has the option of using the resource "
+"adaptor independent CCI API if the resource adaptor supports this."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:65
+#, no-c-format
+msgid ""
+"(from the JCA 1.5 specification) illustrates the relationship between the "
+"JCA architecture participants in terms of how they relate to the JCA SPI, "
+"CCI and JTA packages."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:69
+#, no-c-format
+msgid ""
+"The JCA 1.0 specification class diagram for the connection management "
+"architecture."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:76
+#, no-c-format
+msgid ""
+"The JBossCX architecture provides the implementation of the application "
+"server specific classes. <xref linkend=\"JCA_Overview-"
+"The_JCA_1.0_specification_class_diagram_for_the_connection_management_architecture."
+"\"/> shows that this comes down to the implementation of the <literal>javax."
+"resource.spi.ConnectionManager</literal> and <literal>javax.resource.spi."
+"ConnectionEventListener</literal> interfaces. The key aspects of this "
+"implementation are discussed in the following section on the JBossCX "
+"architecture."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:82
+#, fuzzy, no-c-format
+msgid "An Overview of the JBossCX Architecture"
+msgstr "JBossNS 架构"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:83
+#, no-c-format
+msgid ""
+"The JBossCX framework provides the application server architecture extension "
+"required for the use of JCA resource adaptors. This is primarily a "
+"connection pooling and management extension along with a number of MBeans "
+"for loading resource adaptors into the JBoss server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:86
+#, no-c-format
+msgid ""
+"There are three coupled MBeans that make up a RAR deployment. These are the "
+"<literal>org.jboss.resource.deployment.RARDeployment</literal>, <literal>org."
+"jboss.resource.connectionmanager.RARDeployment</literal>, and <literal>org."
+"jboss.resource.connectionmanager.BaseConnectionManager2</literal>. The "
+"<literal>org.jboss.resource.deployment.RARDeployment</literal> is simply an "
+"encapsulation of the metadata of a RAR <literal>META-INF/ra.xml</literal> "
+"descriptor. It exposes this information as a DynamicMBean simply to make it "
+"available to the <literal>org.jboss.resource.connectionmanager."
+"RARDeployment</literal> MBean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:89
+#, no-c-format
+msgid ""
+"The RARDeployer service handles the deployment of archives files containing "
+"resource adaptors (RARs). It creates the <literal>org.jboss.resource."
+"deployment.RARDeployment</literal> MBeans when a RAR file is deployed. "
+"Deploying the RAR file is the first step in making the resource adaptor "
+"available to application components. For each deployed RAR, one or more "
+"connection factories must be configured and bound into JNDI. This task "
+"performed using a JBoss service descriptor that sets up a <literal>org.jboss."
+"resource.connectionmanager.BaseConnectionManager2</literal> MBean "
+"implementation with a <literal>org.jboss.resource.connectionmgr."
+"RARDeployment</literal> dependent."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:93
+#, no-c-format
+msgid "BaseConnectionManager2 MBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:94
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.resource.connectionmanager.BaseConnectionManager2</"
+"literal> MBean is a base class for the various types of connection managers "
+"required by the JCA spec. Subclasses include <literal>NoTxConnectionManager</"
+"literal>, <literal>LocalTxConnectionManager</literal> and "
+"<literal>XATxConnectionManager</literal>. These correspond to resource "
+"adaptors that support no transactions, local transaction and XA transaction "
+"respectively. You choose which subclass to use based on the type of "
+"transaction semantics you want, provided the JCA resource adaptor supports "
+"the corresponding transaction capability."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:97
+#, no-c-format
+msgid ""
+"The common attributes supported by the BaseConnectionManager2 MBean are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:102
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ManagedConnectionPool</emphasis>: This specifies the "
+"ObjectName of the MBean representing the pool for this connection manager. "
+"The MBean must have an <literal>ManagedConnectionPool</literal> attribute "
+"that is an implementation of the <literal>org.jboss.resource."
+"connectionmanager.ManagedConnectionPool</literal> interface. Normally it "
+"will be an embedded MBean in a depends tag rather than an "
+"<literal>ObjectName</literal> reference to an existing MBean. The default "
+"MBean for use is the <literal>org.jboss.resource.connectionmanager."
+"JBossManagedConnectionPool</literal>. Its configurable attributes are "
+"discussed below."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:107
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CachedConnectionManager</emphasis>: This specifies "
+"the <literal>ObjectName</literal> of the <literal>CachedConnectionManager</"
+"literal> MBean implementation used by the connection manager. Normally this "
+"is specified using a depends tag with the <literal>ObjectName</literal> of "
+"the unique <literal>CachedConnectionManager</literal> for the server. The "
+"name <literal>jboss.jca:service=CachedConnectionManager</literal> is the "
+"standard setting to use."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:112
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityDomainJndiName</emphasis>: This specifies "
+"the JNDI name of the security domain to use for authentication and "
+"authorization of resource connections. This is typically of the form "
+"<literal>java:/jaas/<domain></literal> where the <literal><"
+"domain></literal> value is the name of an entry in the <literal>conf/"
+"login-config.xml</literal> JAAS login module configuration file. This "
+"defines which JAAS login modules execute to perform authentication."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:117
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JaasSecurityManagerService</emphasis>: This is the "
+"<literal>ObjectName</literal> of the security manager service. This should "
+"be set to the security manager MBean name as defined in the <literal>conf/"
+"jboss-service.xml</literal> descriptor, and currently this is <literal>jboss."
+"security:service=JaasSecurityManager</literal>. This attribute will likely "
+"be removed in the future."
+msgstr ""
+"<emphasis role=\"bold\">InvokerName</emphasis>:<literal>conf/jboss-service."
+"xml</literal> 描述符里定义的 <literal>NamingService</literal> 的 JMX "
+"<literal>ObjectName</literal>。JBoss 发行版本里定义的标准设定是 "
+"<literal>jboss:service=Naming</literal>。"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:125
+#, fuzzy, no-c-format
+msgid "RARDeployment MBean"
+msgstr "The SARDeployer MBean"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:126
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.resource.connectionmanager.RARDeployment</literal> "
+"MBean manages configuration and instantiation "
+"<literal>ManagedConnectionFactory</literal> instance. It does this using the "
+"resource adaptor metadata settings from the RAR <literal>META-INF/ra.xml</"
+"literal> descriptor along with the <literal>RARDeployment</literal> "
+"attributes. The configurable attributes are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:131
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">OldRarDeployment</emphasis>: This is the "
+"<literal>ObjectName</literal> of the <literal>org.jboss.resource."
+"RarDeployment</literal> MBean that contains the resource adaptor metadata. "
+"The form of this name is <literal>jboss.jca:service=RARDeployment,name=<"
+"ra-display-name></literal> where the <literal><ra-display-name></"
+"literal> is the <literal>ra.xml</literal> descriptor <literal>display-name</"
+"literal> attribute value. The <literal>RARDeployer</literal> creates this "
+"when it deploys a RAR file. This attribute will likely be removed in the "
+"future."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:136
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ManagedConnectionFactoryProperties</emphasis>: This "
+"is a collection of (name, type, value) triples that define attributes of the "
+"<literal>ManagedConnectionFactory</literal> instance. Therefore, the names "
+"of the attributes depend on the resource adaptor "
+"<literal>ManagedConnectionFactory</literal> instance. The following example "
+"shows the structure of the content of this attribute."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:139
+#, no-c-format
+msgid ""
+"<properties>\n"
+" <config-property>\n"
+" <config-property-name>Attr0Name</config-property-name>\n"
+" <config-property-type>Attr0Type</config-property-type>\n"
+" <config-property-value>Attr0Value</config-property-"
+"value>\n"
+" </config-property>\n"
+" <config-property>\n"
+" <config-property-name>Attr1Name</config-property-name>\n"
+" <config-property-type>Attr2Type</config-property-type>\n"
+" <config-property-value>Attr2Value</config-property-"
+"value>\n"
+" </config-property> \n"
+" ...\n"
+"</properties>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:140
+#, no-c-format
+msgid ""
+"<literal>AttrXName</literal> is the Xth attribute name, <literal>AttrXType</"
+"literal> is the fully qualified Java type of the attribute, and "
+"<literal>AttrXValue</literal> is the string representation of the value. The "
+"conversion from string to <literal>AttrXType</literal> is done using the "
+"<literal>java.beans.PropertyEditor</literal> class for the "
+"<literal>AttrXType</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:145
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: This is the JNDI name under "
+"which the resource adaptor will be made available. Clients of the resource "
+"adaptor use this name to obtain either the <literal>javax.resource.cci."
+"ConnectionFactory</literal> or resource adaptor specific connection factory. "
+"The full JNDI name will be <literal>java:/<JndiName></literal> meaning "
+"that the <literal>JndiName</literal> attribute value will be prefixed with "
+"<literal>java:/</literal>. This prevents use of the connection factory "
+"outside of the JBoss server VM. In the future this restriction may be "
+"configurable."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:153
+#, no-c-format
+msgid "JBossManagedConnectionPool MBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:154
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.resource.connectionmanager."
+"JBossManagedConnectionPool</literal> MBean is a connection pooling MBean. It "
+"is typically used as the embedded MBean value of the "
+"<literal>BaseConnectionManager2</literal><literal>ManagedConnectionPool</"
+"literal> attribute. When you setup a connection manager MBean you typically "
+"embed the pool configuration in the connection manager descriptor. The "
+"configurable attributes of the <literal>JBossManagedConnectionPool</literal> "
+"are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:159
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ManagedConnectionFactoryName</emphasis>: This "
+"specifies the <literal>ObjectName</literal> of the MBean that creates "
+"<literal>javax.resource.spi.ManagedConnectionFactory</literal> instances. "
+"Normally this is configured as an embedded MBean in a depends element rather "
+"than a separate MBean reference using the <literal>RARDeployment</literal> "
+"MBean. The MBean must provide an appropriate "
+"<literal>startManagedConnectionFactory</literal> operation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:164
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MinSize</emphasis>: This attribute indicates the "
+"minimum number of connections this pool should hold. These are not created "
+"until a <literal>Subject</literal> is known from a request for a connection. "
+"<literal>MinSize</literal> connections will be created for each sub-pool."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:169
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaxSize</emphasis>: This attribute indicates the "
+"maximum number of connections for a pool. No more than MaxSize connections "
+"will be created in each sub-pool."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定对 are-you-alive 信息的应答的"
+"最长等待时间(毫秒数)。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:174
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BlockingTimeoutMillis</emphasis>: This attribute "
+"indicates the maximum time to block while waiting for a connection before "
+"throwing an exception. Note that this blocks only while waiting for a permit "
+"for a connection, and will never throw an exception if creating a new "
+"connection takes an inordinately long time."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:179
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">IdleTimeoutMinutes</emphasis>: This attribute "
+"indicates the maximum time a connection may be idle before being closed. The "
+"actual maximum time depends also on the idle remover thread scan time, which "
+"is 1/2 the smallest idle timeout of any pool."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:184
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NoTxSeparatePools</emphasis>: Setting this to true "
+"doubles the available pools. One pool is for connections used outside a "
+"transaction the other inside a transaction. The actual pools are lazily "
+"constructed on first use. This is only relevant when setting the pool "
+"parameters associated with the <literal>LocalTxConnectionManager</literal> "
+"and <literal>XATxConnectionManager</literal>. Its use case is for Oracle "
+"(and possibly other vendors) XA implementations that don't like using an "
+"XA connection with and without a JTA transaction."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:189
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Criteria</emphasis>: This attribute indicates if the "
+"JAAS <literal>javax.security.auth.Subject</literal> from security domain "
+"associated with the connection, or app supplied parameters (such as from "
+"<literal>getConnection(user, pw)</literal>) are used to distinguish "
+"connections in the pool. The allowed values are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:194
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ByContainer</emphasis>: use <literal>Subject</"
+"literal>"
+msgstr ""
+"<emphasis role=\"bold\">file:/var/opt/myapp.ear</emphasis>从本地位置部署"
+"<literal>myapp.ear</literal>"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:199
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ByApplication</emphasis>: use application supplied "
+"parameters only"
+msgstr "<emphasis role=\"bold\">description</emphasis>:参数的可选描述。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:204
+#, fuzzy, no-c-format
+msgid "<emphasis role=\"bold\">ByContainerAndApplication</emphasis>: use both"
+msgstr "<emphasis role=\"bold\">jboss-aop.deployer</emphasis>,"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:209
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ByNothing</emphasis>: all connections are "
+"equivalent, usually if adapter supports reauthentication"
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:219
+#, no-c-format
+msgid "CachedConnectionManager MBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:220
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.resource.connectionmanager.CachedConnectionManager</"
+"literal> MBean manages associations between meta-aware objects (those "
+"accessed through interceptor chains) and connection handles, as well as "
+"between user transactions and connection handles. Normally there should only "
+"be one such MBean, and this is configured in the core <literal>jboss-service."
+"xml</literal> descriptor. It is used by "
+"<literal>CachedConnectionInterceptor</literal>, JTA "
+"<literal>UserTransaction</literal> implementation and all "
+"<literal>BaseConnectionManager2</literal> instances. The configurable "
+"attributes of the <literal>CachedConnectionManager</literal> MBean are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:225
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SpecCompliant</emphasis>: Enable this boolean "
+"attribute for spec compliant non-shareable connections reconnect processing. "
+"This allows a connection to be opened in one call and used in another. Note "
+"that specifying this behavior disables connection close processing."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:230
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Debug</emphasis>: Enable this boolean property for "
+"connection close processing. At the completion of an EJB method invocation, "
+"unclosed connections are registered with a transaction synchronization. If "
+"the transaction ends without the connection being closed, an error is "
+"reported and JBoss closes the connection. This is a development feature that "
+"should be turned off in production for optimal performance."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:235
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TransactionManagerServiceName</emphasis>: This "
+"attribute specifies the JMX <literal>ObjectName</literal> of the JTA "
+"transaction manager service. Connection close processing is now synchronized "
+"with the transaction manager and this attribute specifies the transaction "
+"manager to use."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:243
+#, no-c-format
+msgid "A Sample Skeleton JCA Resource Adaptor"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:244
+#, no-c-format
+msgid ""
+"To conclude our discussion of the JBoss JCA framework we will create and "
+"deploy a single non-transacted resource adaptor that simply provides a "
+"skeleton implementation that stubs out the required interfaces and logs all "
+"method calls. We will not discuss the details of the requirements of a "
+"resource adaptor provider as these are discussed in detail in the JCA "
+"specification. The purpose of the adaptor is to demonstrate the steps "
+"required to create and deploy a RAR in JBoss, and to see how JBoss interacts "
+"with the adaptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:247
+#, no-c-format
+msgid ""
+"The adaptor we will create could be used as the starting point for a non-"
+"transacted file system adaptor. The source to the example adaptor can be "
+"found in the <literal>src/main/org/jboss/book/jca/ex1</literal> directory of "
+"the book examples. A class diagram that shows the mapping from the required "
+"<literal>javax.resource.spi</literal> interfaces to the resource adaptor "
+"implementation is given in <xref linkend="
+"\"A_Sample_Skeleton_JCA_Resource_Adaptor-The_file_system_RAR_class_diagram\"/"
+">."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:251
+#, no-c-format
+msgid "The file system RAR class diagram"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:258
+#, no-c-format
+msgid ""
+"We will build the adaptor, deploy it to the JBoss server and then run an "
+"example client against an EJB that uses the resource adaptor to demonstrate "
+"the basic steps in a complete context. We'll then take a look at the "
+"JBoss server log to see how the JBoss JCA framework interacts with the "
+"resource adaptor to help you better understand the components in the JCA "
+"system level contract."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:261
+#, no-c-format
+msgid ""
+"To build the example and deploy the RAR to the JBoss server <literal>deploy/"
+"lib</literal> directory, execute the following Ant command in the book "
+"examples directory."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:264
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=jca build-chap"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:265
+#, no-c-format
+msgid ""
+"The deployed files include a <literal>jca-ex1.sar</literal> and a "
+"<literal>notxfs-service.xml</literal> service descriptor. The example "
+"resource adaptor deployment descriptor is shown in <xref linkend="
+"\"A_Sample_Skeleton_JCA_Resource_Adaptor-"
+"The_nontransactional_file_system_resource_adaptor_deployment_descriptor.\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:268
+#, no-c-format
+msgid ""
+"The nontransactional file system resource adaptor deployment descriptor."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:269
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<connector xmlns=\"http://java.sun.com/xml/ns/\"Whats_new_in_JBoss_4-"
+"J2EE_Certification_and_Standards_Compliance\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/connector_1_5.xsd\" "
+"version=\"1.5\">\n"
+" <display-name>File System Adapter</display-name>\n"
+" <vendor-name>JBoss</vendor-name>\n"
+" <eis-type>FileSystem</eis-type>\n"
+" <resourceadapter-version>1.0</resourceadapter-version>\n"
+" <license>\n"
+" <description>LGPL</description>\n"
+" <license-required>false</license-required>\n"
+" </license>\n"
+" <resourceadapter>\n"
+" <resourceadapter-class>\n"
+" org.jboss.resource.deployment.DummyResourceAdapter\n"
+" </resourceadapter-class>\n"
+" <outbound-resourceadapter>\n"
+" <connection-definition>\n"
+" <emphasis role=\"bold\"><managedconnectionfactory-"
+"class> org.jboss.book.jca.ex1.ra.FSManagedConnectionFactory </"
+"managedconnectionfactory-class></emphasis>\n"
+" <config-property>\n"
+" <config-property-name>FileSystemRootDir</config-"
+"property-name>\n"
+" <config-property-type>java.lang.String</config-"
+"property-type>\n"
+" <config-property-value>/tmp/db/fs_store</config-"
+"property-value>\n"
+" </config-property>\n"
+" <config-property>\n"
+" <config-property-name>UserName</config-property-"
+"name>\n"
+" <config-property-type>java.lang.String</config-"
+"property-type>\n"
+" <config-property-value/>\n"
+" </config-property>\n"
+" <config-property>\n"
+" <config-property-name>Password</config-property-"
+"name>\n"
+" <config-property-type>java.lang.String</config-"
+"property-type>\n"
+" <config-property-value/>\n"
+" </config-property>\n"
+" <emphasis role=\"bold\"><connectionfactory-interface> "
+"org.jboss.book.jca.ex1.ra.DirContextFactory </connectionfactory-"
+"interface> <connectionfactory-impl-class> org.jboss.book.jca.ex1.ra."
+"DirContextFactoryImpl </connectionfactory-impl-class> <connection-"
+"interface> javax.naming.directory.DirContext </connection-"
+"interface> <connection-impl-class> org.jboss.book.jca.ex1.ra."
+"FSDirContext </connection-impl-class></emphasis>\n"
+" </connection-definition>\n"
+" <transaction-support>NoTransaction</transaction-"
+"support>\n"
+" <authentication-mechanism>\n"
+" <authentication-mechanism-type>BasicPassword</"
+"authentication-mechanism-type>\n"
+" <credential-interface>\n"
+" javax.resource.spi.security.PasswordCredential\n"
+" </credential-interface>\n"
+" </authentication-mechanism>\n"
+" <emphasis role=\"bold\"><reauthentication-support>true</"
+"reauthentication-support></emphasis>\n"
+" </outbound-resourceadapter>\n"
+" <security-permission>\n"
+" <description> Read/Write access is required to the "
+"contents of the\n"
+" FileSystemRootDir </description>\n"
+" <security-permission-spec> permission java.io."
+"FilePermission\n"
+" \"/tmp/db/fs_store/*\", \"read,write\"; \n"
+" </security-permission-spec>\n"
+" </security-permission>\n"
+" </resourceadapter>\n"
+"</connector>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:270
+#, no-c-format
+msgid ""
+"The key items in the resource adaptor deployment descriptor are highlighted "
+"in bold. These define the classes of the resource adaptor, and the elements "
+"are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:275
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">managedconnectionfactory-class</emphasis>: The "
+"implementation of the <literal>ManagedConnectionFactory</literal> interface, "
+"<literal>org.jboss.book.jca.ex1.ra.FSManagedConnectionFactory</literal>"
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"naming.HttpNamingContextFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:280
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connectionfactory-interface</emphasis>: This is the "
+"interface that clients will obtain when they lookup the connection factory "
+"instance from JNDI, here a proprietary resource adaptor value, <literal>org."
+"jboss.book.jca.ex1.ra.DirContextFactory</literal>. This value will be needed "
+"when we create the JBoss <literal>ds.xml</literal> to use the resource."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:285
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connectionfactory-impl-class</emphasis>: This is the "
+"class that provides the implementation of the <literal>connectionfactory-"
+"interface</literal>, <literal>org.jboss.book.jca.ex1.ra."
+"DirContextFactoryImpl</literal>."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"naming.HttpNamingContextFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:290
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-interface</emphasis>: This is the "
+"interface for the connections returned by the resource adaptor connection "
+"factory, here the JNDI <literal>javax.naming.directory.DirContext</literal> "
+"interface."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"naming.HttpNamingContextFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:295
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-impl-class</emphasis>: This is he class "
+"that provides the <literal>connection-interface</literal> implementation, "
+"<literal>org.jboss.book.jca.ex1.ra.FSDirContext</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Engine</literal> 接口实现的类的全名。它的缺省值是 <literal>org."
+"apache.catalina.core.StandardEngine</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:300
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">transaction-support</emphasis>: The level of "
+"transaction support, here defined as <literal>NoTransaction</literal>, "
+"meaning the file system resource adaptor does not do transactional work."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:305
+#, no-c-format
+msgid ""
+"The RAR classes and deployment descriptor only define a resource adaptor. To "
+"use the resource adaptor it must be integrated into the JBoss application "
+"server using a <literal>ds.xml</literal> descriptor file. An example of this "
+"for the file system adaptor is shown in <xref linkend="
+"\"A_Sample_Skeleton_JCA_Resource_Adaptor-The_notxfs_ds."
+"xml_resource_adaptor_MBeans_service_descriptor.\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:308
+#, no-c-format
+msgid "The notxfs-ds.xml resource adaptor MBeans service descriptor."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:309
+#, no-c-format
+msgid ""
+"<!DOCTYPE connection-factories PUBLIC\n"
+" \"-//JBoss//DTD JBOSS JCA Config 1.5//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss-ds_1_5.dtd\">\n"
+"<!-- \n"
+" The non-transaction FileSystem resource adaptor service "
+"configuration\n"
+"-->\n"
+"<connection-factories>\n"
+" <no-tx-connection-factory>\n"
+" <jndi-name>NoTransFS</jndi-name>\n"
+" <rar-name>jca-ex1.rar</rar-name>\n"
+" <connection-definition>\n"
+" org.jboss.book.jca.ex1.ra.DirContextFactory\n"
+" </connection-definition>\n"
+" <config-property name=\"FileSystemRootDir\"\n"
+" type=\"java.lang.String\">/tmp/db/fs_store</"
+"config-property>\n"
+" </no-tx-connection-factory>\n"
+"</connection-factories>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:310
+#, fuzzy, no-c-format
+msgid "The main attributes are:"
+msgstr "The Attributes"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:315
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jndi-name</emphasis>: This specifies where the "
+"connection factory will be bound into JNDI. For this deployment that binding "
+"will be <literal>java:/NoTransFS</literal>."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 指定了部署这个 farm 的群集的"
+"名字。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:320
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">rar-name</emphasis>: This is the name of the RAR "
+"file that contains the definition for the resource we want to provide. For "
+"nested RAR files, the name would look like <literal>myapplication.ear#my."
+"rar</literal>. In this example, it is simply <literal>jca-ex1.rar</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:325
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-definition</emphasis>: This is the "
+"connection factory interface class. It should match the "
+"<literal>connectionfactory-interface</literal> in the <literal>ra.xml</"
+"literal> file. Here our connection factory interface is <literal>org.jboss."
+"book.jca.ex1.ra.DirContextFactory</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:330
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">config-property</emphasis>: This can be used to "
+"provide non-default settings to the resource adaptor connection factory. "
+"Here the <literal>FileSystemRootDir</literal> is being set to <literal>/tmp/"
+"db/fs_store</literal>. This overrides the default value in the <literal>ra."
+"xml</literal> file."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:335
+#, no-c-format
+msgid ""
+"To deploy the RAR and connection manager configuration to the JBoss server, "
+"run the following:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:338
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=jca config"
+msgstr "[examples]$ ant -Dchap=naming config"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:339
+#, no-c-format
+msgid ""
+"The server console will display some logging output indicating that the "
+"resource adaptor has been deployed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:342
+#, no-c-format
+msgid ""
+"Now we want to test access of the resource adaptor by a J2EE component. To "
+"do this we have created a trivial stateless session bean that has a single "
+"method called <literal>echo</literal>. Inside of the <literal>echo</literal> "
+"method the EJB accesses the resource adaptor connection factory, creates a "
+"connection, and then immediately closes the connection. The <literal>echo</"
+"literal> method code is shown below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:345
+#, no-c-format
+msgid ""
+"The stateless session bean echo method code that shows the access of the "
+"resource adaptor connection factory."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:346
+#, no-c-format
+msgid ""
+"public String echo(String arg)\n"
+"{\n"
+" log.info(\"echo, arg=\"+arg);\n"
+" try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" Object ref = ctx.lookup(\"java:comp/env/ra/DirContextFactory"
+"\");\n"
+" log.info(\"echo, ra/DirContextFactory=\" + ref);\n"
+"\n"
+" DirContextFactory dcf = (DirContextFactory) ref;\n"
+" log.info(\"echo, found dcf=\" + dcf);\n"
+"\n"
+" DirContext dc = dcf.getConnection();\n"
+" log.info(\"echo, lookup dc=\" + dc);\n"
+"\n"
+" dc.close();\n"
+" } catch(NamingException e) {\n"
+" log.error(\"Failed during JNDI access\", e);\n"
+" }\n"
+" return arg;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:347
+#, no-c-format
+msgid ""
+"The EJB is not using the CCI interface to access the resource adaptor. "
+"Rather, it is using the resource adaptor specific API based on the "
+"proprietary <literal>DirContextFactory</literal> interface that returns a "
+"JNDI <literal>DirContext</literal> object as the connection object. The "
+"example EJB is simply exercising the system contract layer by looking up the "
+"resource adaptor connection factory, creating a connection to the resource "
+"and closing the connection. The EJB does not actually do anything with the "
+"connection, as this would only exercise the resource adaptor implementation "
+"since this is a non-transactional resource."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:350
+#, no-c-format
+msgid ""
+"Run the test client which calls the <literal>EchoBean.echo</literal> method "
+"by running Ant as follows from the examples directory:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Connectors_On_JBOSS.xml:353
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=jca -Dex=1 run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:354
+#, no-c-format
+msgid ""
+"You'll see some output from the bean in the system console, but much "
+"more detailed logging output can be found in the <literal>server/production/"
+"log/server.log</literal> file. Don't worry if you see exceptions. They "
+"are just stack traces to highlight the call path into parts of the adaptor. "
+"To help understand the interaction between the adaptor and the JBoss JCA "
+"layer, we'll summarize the events seen in the log using a sequence "
+"diagram. <xref linkend=\"A_Sample_Skeleton_JCA_Resource_Adaptor-"
+"A_sequence_diagram_illustrating_the_key_interactions_between_the_JBossCX_framework_and_the_example_resource_adaptor_that_result_when_the_EchoBean_accesses_the_resource_adaptor_connection_factory."
+"\"/> is a sequence diagram that summarizes the events that occur when the "
+"<literal>EchoBean</literal> accesses the resource adaptor connection factory "
+"from JNDI and creates a connection."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:358
+#, no-c-format
+msgid ""
+"A sequence diagram illustrating the key interactions between the JBossCX "
+"framework and the example resource adaptor that result when the EchoBean "
+"accesses the resource adaptor connection factory."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:365
+#, no-c-format
+msgid ""
+"The starting point is the client's invocation of the <literal>EchoBean."
+"echo</literal> method. For the sake of conciseness of the diagram, the "
+"client is shown directly invoking the EchoBean.echo method when in reality "
+"the JBoss EJB container handles the invocation. There are three distinct "
+"interactions between the <literal>EchoBean</literal> and the resource "
+"adaptor; the lookup of the connection factory, the creation of a connection, "
+"and the close of the connection."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:368
+#, no-c-format
+msgid ""
+"The lookup of the resource adaptor connection factory is illustrated by the "
+"1.1 sequences of events. The events are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:373
+#, no-c-format
+msgid ""
+"1, the echo method invokes the <literal>getConnection</literal> method on "
+"the resource adaptor connection factory obtained from the JNDI lookup on the "
+"<literal>java:comp/env/ra/DirContextFactory</literal> name which is a link "
+"to the <literal>java:/NoTransFS</literal> location."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:378
+#, no-c-format
+msgid ""
+"1.1, the <literal>DirContextFactoryImpl</literal> class asks its associated "
+"<literal>ConnectionManager</literal> to allocate a connection. It passes in "
+"the <literal>ManagedConnectionFactory</literal> and <literal>FSRequestInfo</"
+"literal> that were associated with the <literal>DirContextFactoryImpl</"
+"literal> during its construction."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:383
+#, no-c-format
+msgid ""
+"1.1.1, the <literal>ConnectionManager</literal> invokes its "
+"<literal>getManagedConnection</literal> method with the current "
+"<literal>Subject</literal> and <literal>FSRequestInfo</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:388
+#, no-c-format
+msgid ""
+"1.1.1.1, the <literal>ConnectionManager</literal> asks its object pool for a "
+"connection object. The <literal>JBossManagedConnectionPool$BasePool</"
+"literal> is get the key for the connection and then asks the matching "
+"<literal>InternalPool</literal> for a connection."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:393
+#, no-c-format
+msgid ""
+"1.1.1.1.1, Since no connections have been created the pool must create a new "
+"connection. This is done by requesting a new managed connection from the "
+"<literal>ManagedConnectionFactory</literal>. The <literal>Subject</literal> "
+"associated with the pool as well as the <literal>FSRequestInfo</literal> "
+"data are passed as arguments to the <literal>createManagedConnection</"
+"literal> method invocation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:398
+#, no-c-format
+msgid ""
+"1.1.1.1.1.1, the <literal>ConnectionFactory</literal> creates a new "
+"<literal>FSManagedConnection</literal> instance and passes in the "
+"<literal>Subject</literal> and <literal>FSRequestInfo</literal> data."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:403
+#, no-c-format
+msgid ""
+"1.1.1.2, a <literal>javax.resource.spi.ConnectionListener</literal> instance "
+"is created. The type of listener created is based on the type of "
+"<literal>ConnectionManager</literal>. In this case it is an <literal>org."
+"jboss.resource.connectionmgr.BaseConnectionManager2$NoTransactionListener</"
+"literal> instance."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:408
+#, no-c-format
+msgid ""
+"1.1.1.2.1, the listener registers as a <literal>javax.resource.spi."
+"ConnectionEventListener</literal> with the <literal>ManagedConnection</"
+"literal> instance created in 1.2.1.1."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:413
+#, no-c-format
+msgid ""
+"1.1.2, the <literal>ManagedConnection</literal> is asked for the underlying "
+"resource manager connection. The <literal>Subject</literal> and "
+"<literal>FSRequestInfo</literal> data are passed as arguments to the "
+"<literal>getConnection</literal> method invocation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:418
+#, no-c-format
+msgid ""
+"The resulting connection object is cast to a <literal>javax.naming.directory."
+"DirContext</literal> instance since this is the public interface defined by "
+"the resource adaptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:423
+#, no-c-format
+msgid ""
+"After the <literal>EchoBean</literal> has obtained the <literal>DirContext</"
+"literal> for the resource adaptor, it simply closes the connection to "
+"indicate its interaction with the resource manager is complete."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:428
+#, no-c-format
+msgid ""
+"This concludes the resource adaptor example. Our investigation into the "
+"interaction between the JBossCX layer and a trivial resource adaptor should "
+"give you sufficient understanding of the steps required to configure any "
+"resource adaptor. The example adaptor can also serve as a starting point for "
+"the creation of your own custom resource adaptors if you need to integrate "
+"non-JDBC resources into the JBoss server environment."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:436
+#, fuzzy, no-c-format
+msgid "Configuring JDBC DataSources"
+msgstr "配置 JBoss"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:437
+#, no-c-format
+msgid ""
+"Rather than configuring the connection manager factory related MBeans "
+"discussed in the previous section via a mbean services deployment "
+"descriptor, JBoss provides a simplified datasource centric descriptor. This "
+"is transformed into the standard <literal>jboss-service.xml</literal> MBean "
+"services deployment descriptor using a XSL transform applied by the "
+"<literal>org.jboss.deployment.XSLSubDeployer</literal> included in the "
+"<literal>jboss-jca.sar</literal> deployment. The simplified configuration "
+"descriptor is deployed the same as other deployable components. The "
+"descriptor must be named using a <literal>*-ds.xml</literal> pattern in "
+"order to be recognized by the <literal>XSLSubDeployer</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:440
+#, no-c-format
+msgid ""
+"The schema for the top-level datasource elements of the <literal>*-ds.xml</"
+"literal> configuration deployment file is shown in <xref linkend="
+"\"Configuring_JDBC_DataSources-"
+"The_simplified_JCA_DataSource_configuration_descriptor_top_level_schema_elements"
+"\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:444
+#, no-c-format
+msgid ""
+"The simplified JCA DataSource configuration descriptor top-level schema "
+"elements"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:451
+#, no-c-format
+msgid ""
+"Multiple datasource configurations may be specified in a configuration "
+"deployment file. The child elements of the datasources root are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:456
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mbean</emphasis>: Any number mbean elements may be "
+"specified to define MBean services that should be included in the "
+"<literal>jboss-service.xml</literal> descriptor that results from the "
+"transformation. This may be used to configure services used by the "
+"datasources."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:461
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">no-tx-datasource</emphasis>: This element is used to "
+"specify the (<literal>org.jboss.resource.connectionmanager</literal>) "
+"<literal>NoTxConnectionManager</literal> service configuration. "
+"<literal>NoTxConnectionManager</literal> is a JCA connection manager with no "
+"transaction support. The <literal>no-tx-datasource</literal> child element "
+"schema is given in <xref linkend=\"Configuring_JDBC_DataSources-"
+"The_non_transactional_DataSource_configuration_schema\"/>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:466
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">local-tx-datasource</emphasis>: This element is used "
+"to specify the (<literal>org.jboss.resource.connectionmanager</literal>) "
+"<literal>LocalTxConnectionManager</literal> service configuration. "
+"<literal>LocalTxConnectionManager</literal> implements a "
+"<literal>ConnectionEventListener</literal> that implements "
+"<literal>XAResource</literal> to manage transactions through the transaction "
+"manager. To ensure that all work in a local transaction occurs over the same "
+"<literal>ManagedConnection</literal>, it includes a xid to "
+"<literal>ManagedConnection</literal> map. When a Connection is requested or "
+"a transaction started with a connection handle in use, it checks to see if a "
+"<literal>ManagedConnection</literal> already exists enrolled in the global "
+"transaction and uses it if found. Otherwise, a free "
+"<literal>ManagedConnection</literal> has its <literal>LocalTransaction</"
+"literal> started and is used. The <literal>local-tx-datasource</literal> "
+"child element schema is given in"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:471
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">xa-datasource</emphasis>: This element is used to "
+"specify the (<literal>org.jboss.resource.connectionmanager</literal>) "
+"<literal>XATxConnectionManager</literal> service configuration. "
+"<literal>XATxConnectionManager</literal> implements a "
+"<literal>ConnectionEventListener</literal> that obtains the "
+"<literal>XAResource</literal> to manage transactions through the transaction "
+"manager from the adaptor <literal>ManagedConnection</literal>. To ensure "
+"that all work in a local transaction occurs over the same "
+"<literal>ManagedConnection</literal>, it includes a xid to "
+"<literal>ManagedConnection</literal> map. When a <literal>Connection</"
+"literal> is requested or a transaction started with a connection handle in "
+"use, it checks to see if a <literal>ManagedConnection</literal> already "
+"exists enrolled in the global transaction and uses it if found. Otherwise, a "
+"free <literal>ManagedConnection</literal> has its <literal>LocalTransaction</"
+"literal> started and is used. The <literal>xa-datasource</literal> child "
+"element schema is given in <xref linkend=\"Configuring_JDBC_DataSources-"
+"The_XA_DataSource_configuration_schema\"/>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:476
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ha-local-tx-datasource</emphasis>: This element is "
+"identical to <literal>local-tx-datasource</literal>, with the addition of "
+"the datasource failover capability allowing JBoss to failover to an "
+"alternate database in the event of a database failure."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:481
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ha-xa-datasource</emphasis>: This element is "
+"identical to <literal>xa-datasource</literal>, with the addition of the "
+"datasource failover capability allowing JBoss to failover to an alternate "
+"database in the event of a database failure."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:487
+#, fuzzy, no-c-format
+msgid "The non-transactional DataSource configuration schema"
+msgstr "The JBoss installer security configuration screen"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:495
+#, fuzzy, no-c-format
+msgid "The non-XA DataSource configuration schema"
+msgstr "The JBoss AS installer configuration sets"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:503
+#, fuzzy, no-c-format
+msgid "The XA DataSource configuration schema"
+msgstr "The JBoss AS installer configuration sets"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:511
+#, no-c-format
+msgid "The schema for the experimental non-XA DataSource with failover"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:519
+#, no-c-format
+msgid "The schema for the experimental XA Datasource with failover"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:526
+#, no-c-format
+msgid "Elements that are common to all datasources include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:531
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jndi-name</emphasis>: The JNDI name under which the "
+"<literal>DataSource</literal> wrapper will be bound. Note that this name is "
+"relative to the <literal>java:/</literal> context, unless <literal>use-java-"
+"context</literal> is set to false. <literal>DataSource</literal> wrappers "
+"are not usable outside of the server VM, so they are normally bound under "
+"the <literal>java:/</literal>, which isn't shared outside the local VM."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:536
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">use-java-context</emphasis>: If this is set to false "
+"the the datasource will be bound in the global JNDI context rather than the "
+"<literal>java:</literal> context."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:541
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">user-name</emphasis>: This element specifies the "
+"default username used when creating a new connection. The actual username "
+"may be overridden by the application code <literal>getConnection</literal> "
+"parameters or the connection creation context JAAS Subject."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:546
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">password</emphasis>: This element specifies the "
+"default password used when creating a new connection. The actual password "
+"may be overridden by the application code <literal>getConnection</literal> "
+"parameters or the connection creation context JAAS Subject."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:551
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">application-managed-security</emphasis>: Specifying "
+"this element indicates that connections in the pool should be distinguished "
+"by application code supplied parameters, such as from <literal>getConnection"
+"(user, pw)</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:556
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">security-domain</emphasis>: Specifying this element "
+"indicates that connections in the pool should be distinguished by JAAS "
+"Subject based information. The content of the <literal>security-domain</"
+"literal> is the name of the JAAS security manager that will handle "
+"authentication. This name correlates to the JAAS <literal>login-config.xml</"
+"literal> descriptor <literal>application-policy/name</literal> attribute."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:561
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">security-domain-and-application</emphasis>: "
+"Specifying this element indicates that connections in the pool should be "
+"distinguished both by application code supplied parameters and JAAS Subject "
+"based information. The content of the <literal>security-domain</literal> is "
+"the name of the JAAS security manager that will handle authentication. This "
+"name correlates to the JAAS <literal>login-config.xml</literal> descriptor "
+"<literal>application-policy/name</literal> attribute."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:566
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min-pool-size</emphasis>: This element specifies the "
+"minimum number of connections a pool should hold. These pool instances are "
+"not created until an initial request for a connection is made. This default "
+"to 0."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:571
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max-pool-size</emphasis>: This element specifies the "
+"maximum number of connections for a pool. No more than the <literal>max-pool-"
+"size</literal> number of connections will be created in a pool. This "
+"defaults to 20."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:576
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">blocking-timeout-millis</emphasis>: This element "
+"specifies the maximum time in milliseconds to block while waiting for a "
+"connection before throwing an exception. Note that this blocks only while "
+"waiting for a permit for a connection, and will never throw an exception if "
+"creating a new connection takes an inordinately long time. The default is "
+"5000."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:581
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">idle-timeout-minutes</emphasis>: This element "
+"specifies the maximum time in minutes a connection may be idle before being "
+"closed. The actual maximum time depends also on the <literal>IdleRemover</"
+"literal> scan time, which is 1/2 the smallest idle-timeout-minutes of any "
+"pool."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:586
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">new-connection-sql</emphasis>: This is a SQL "
+"statement that should be executed when a new connection is created. This can "
+"be used to configure a connection with database specific settings not "
+"configurable via connection properties."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:591
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">check-valid-connection-sql</emphasis>: This is a SQL "
+"statement that should be run on a connection before it is returned from the "
+"pool to test its validity to test for stale pool connections. An example "
+"statement could be: <literal>select count(*) from x</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:596
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">exception-sorter-class-name</emphasis>: This "
+"specifies a class that implements the <literal>org.jboss.resource.adapter."
+"jdbc.ExceptionSorter</literal> interface to examine database exceptions to "
+"determine whether or not the exception indicates a connection error. Current "
+"implementations include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:601
+#, no-c-format
+msgid "org.jboss.resource.adapter.jdbc.vendor.OracleExceptionSorter"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:606
+#, no-c-format
+msgid "org.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:611
+#, no-c-format
+msgid "org.jboss.resource.adapter.jdbc.vendor.SybaseExceptionSorter"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:616
+#, no-c-format
+msgid "org.jboss.resource.adapter.jdbc.vendor.InformixExceptionSorte"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:623
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">valid-connection-checker-class-name</emphasis>: This "
+"specifies a class that implements the <literal>org.jboss.resource.adapter."
+"jdbc.ValidConnectionChecker</literal> interface to provide a "
+"<literal>SQLException isValidConnection(Connection e)</literal> method that "
+"is called with a connection that is to be returned from the pool to test its "
+"validity. This overrides the <literal>check-valid-connection-sql</literal> "
+"when present. The only provided implementation is <literal>org.jboss."
+"resource.adapter.jdbc.vendor.OracleValidConnectionChecker</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:628
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">track-statements</emphasis>: This boolean element "
+"specifies whether to check for unclosed statements when a connection is "
+"returned to the pool. If true, a warning message is issued for each unclosed "
+"statement. If the log4j category <literal>org.jboss.resource.adapter.jdbc."
+"WrappedConnection</literal> has trace level enabled, a stack trace of the "
+"connection close call is logged as well. This is a debug feature that can be "
+"turned off in production."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:633
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">prepared-statement-cache-size</emphasis>: This "
+"element specifies the number of prepared statements per connection in an LRU "
+"cache, which is keyed by the SQL query. Setting this to zero disables the "
+"cache."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:638
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">depends</emphasis>: The <literal>depends</literal> "
+"element specifies the JMX <literal>ObjectName</literal> string of a service "
+"that the connection manager services depend on. The connection manager "
+"service will not be started until the dependent services have been started."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:643
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">type-mapping</emphasis>: This element declares a "
+"default type mapping for this datasource. The type mapping should match a "
+"<literal>type-mapping/name</literal> element from <literal>standardjbosscmp-"
+"jdbc.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:648
+#, no-c-format
+msgid ""
+"Additional common child elements for both <literal>no-tx-datasource</"
+"literal> and <literal>local-tx-datasource</literal> include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:653
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-url</emphasis>: This is the JDBC driver "
+"connection URL string, for example, <literal>jdbc:hsqldb:hsql://"
+"localhost:1701</literal>."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:658
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">driver-class</emphasis>: This is the fully qualified "
+"name of the JDBC driver class, for example, <literal>org.hsqldb.jdbcDriver</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Valve</literal> 接口实现的类全名。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:663
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-property</emphasis>: The "
+"<literal>connection-property</literal> element allows you to pass in "
+"arbitrary connection properties to the <literal>java.sql.Driver.connect(url, "
+"props)</literal> method. Each <literal>connection-property</literal> "
+"specifies a string name/value pair with the property name coming from the "
+"name attribute and the value coming from the element content."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:668
+#, no-c-format
+msgid ""
+"Elements in common to the <literal>local-tx-datasource</literal> and "
+"<literal>xa-datasource</literal> are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:673
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">transaction-isolation</emphasis>: This element "
+"specifies the <literal>java.sql.Connection</literal> transaction isolation "
+"level to use. The constants defined in the Connection interface are the "
+"possible element content values and include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:678
+#, no-c-format
+msgid "TRANSACTION_READ_UNCOMMITTED"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:683
+#, no-c-format
+msgid "TRANSACTION_READ_COMMITTED"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:688
+#, no-c-format
+msgid "TRANSACTION_REPEATABLE_READ"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:693
+#, no-c-format
+msgid "TRANSACTION_SERIALIZABLE"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:698
+#, no-c-format
+msgid "TRANSACTION_NONE"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:705
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">no-tx-separate-pools</emphasis>: The presence of "
+"this element indicates that two connection pools are required to isolate "
+"connections used with JTA transaction from those used without a JTA "
+"transaction. The pools are lazily constructed on first use. Its use case is "
+"for Oracle (and possibly other vendors) XA implementations that don't "
+"like using an XA connection with and without a JTA transaction."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:710
+#, fuzzy, no-c-format
+msgid "The unique <literal>xa-datasource</literal> child elements are:"
+msgstr "<literal>attribute</literal>元素所支持的属性包括:"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:715
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">track-connection-by-tx</emphasis>: Specifying a true "
+"value for this element makes the connection manager keep an xid to "
+"connection map and only put the connection back in the pool when the "
+"transaction completes and all the connection handles are closed or "
+"disassociated (by the method calls returning). As a side effect, we never "
+"suspend and resume the xid on the connection's <literal>XAResource</"
+"literal>. This is the same connection tracking behavior used for local "
+"transactions."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:718
+#, no-c-format
+msgid ""
+"The XA spec implies that any connection may be enrolled in any transaction "
+"using any xid for that transaction at any time from any thread (suspending "
+"other transactions if necessary). The original JCA implementation assumed "
+"this and aggressively delisted connections and put them back in the pool as "
+"soon as control left the EJB they were used in or handles were closed. Since "
+"some other transaction could be using the connection the next time work "
+"needed to be done on the original transaction, there is no way to get the "
+"original connection back. It turns out that most <literal>XADataSource</"
+"literal> driver vendors do not support this, and require that all work done "
+"under a particular xid go through the same connection."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:723
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">xa-datasource-class</emphasis>: The fully qualified "
+"name of the <literal>javax.sql.XADataSource</literal> implementation class, "
+"for example, <literal>com.informix.jdbcx.IfxXADataSource</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Host</literal> 接口实现的类的全名。它的缺省值是 <literal>org.apache."
+"catalina.core.StandardHost</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:728
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">xa-datasource-property</emphasis>: The <literal>xa-"
+"datasource-property</literal> element allows for specification of the "
+"properties to assign to the <literal>XADataSource</literal> implementation "
+"class. Each property is identified by the name attribute and the property "
+"value is given by the <literal>xa-datasource-property</literal> element "
+"content. The property is mapped onto the <literal>XADataSource</literal> "
+"implementation by looking for a JavaBeans style getter method for the "
+"property name. If found, the value of the property is set using the "
+"JavaBeans setter with the element text translated to the true property type "
+"using the <literal>java.beans.PropertyEditor</literal> for the type."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:733
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">isSameRM-override-value</emphasis>: A boolean flag "
+"that allows one to override the behavior of the <literal>javax.transaction."
+"xa.XAResource.isSameRM(XAResource xaRes)</literal> method behavior on the XA "
+"managed connection. If specified, this value is used unconditionally as the "
+"<literal>isSameRM(xaRes)</literal> return value regardless of the "
+"<literal>xaRes</literal> parameter."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:738
+#, no-c-format
+msgid ""
+"The failover options common to <literal>ha-xa-datasource</literal> and "
+"<literal>ha-local-tx-datasource</literal> are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:743
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">url-delimeter</emphasis>: This element specifies a "
+"character used to separate multiple JDBC URLs."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:748
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">url-property</emphasis>: In the case of XA "
+"datasources, this property specifies the name of the <literal>xa-datasource-"
+"property</literal> that contains the list of JDBC URLs to use."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:753
+#, no-c-format
+msgid ""
+"Example configurations for many third-party JDBC drivers are included in the "
+"<literal>JBOSS_DIST/docs/examples/jca</literal> directory. Current example "
+"configurations include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:758
+#, no-c-format
+msgid "asapxcess-jb3.2-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:763
+#, fuzzy, no-c-format
+msgid "cicsr9s-service.xml"
+msgstr "cluster-service.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:768
+#, fuzzy, no-c-format
+msgid "db2-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:773
+#, fuzzy, no-c-format
+msgid "db2-xa-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:778
+#, fuzzy, no-c-format
+msgid "facets-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:783
+#, no-c-format
+msgid "fast-objects-jboss32-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:788
+#, no-c-format
+msgid "firebird-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:793
+#, fuzzy, no-c-format
+msgid "firstsql-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:798
+#, fuzzy, no-c-format
+msgid "firstsql-xa-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:803
+#, no-c-format
+msgid "generic-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:808
+#, no-c-format
+msgid "hsqldb-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:813
+#, no-c-format
+msgid "informix-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:818
+#, no-c-format
+msgid "informix-xa-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:823
+#, no-c-format
+msgid "jdatastore-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:828
+#, fuzzy, no-c-format
+msgid "jms-ds.xml"
+msgstr "jms/jms-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:833
+#, fuzzy, no-c-format
+msgid "jsql-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:838
+#, fuzzy, no-c-format
+msgid "lido-versant-service.xml"
+msgstr "client-deployer-service.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:843
+#, fuzzy, no-c-format
+msgid "mimer-ds.xml"
+msgstr "jms/jms-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:848
+#, fuzzy, no-c-format
+msgid "mimer-xa-ds.xml"
+msgstr "jms/jms-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:853
+#, fuzzy, no-c-format
+msgid "msaccess-ds.xml"
+msgstr "jms/jms-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:858
+#, fuzzy, no-c-format
+msgid "mssql-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:863
+#, fuzzy, no-c-format
+msgid "mssql-xa-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:868
+#, fuzzy, no-c-format
+msgid "mysql-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:873
+#, fuzzy, no-c-format
+msgid "oracle-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:878
+#, no-c-format
+msgid "oracle-xa-ds.xml"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:883
+#, fuzzy, no-c-format
+msgid "postgres-ds.xml"
+msgstr "jms/jms-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:888
+#, fuzzy, no-c-format
+msgid "sapdb-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:893
+#, fuzzy, no-c-format
+msgid "sapr3-ds.xml"
+msgstr "standardjaws.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:898
+#, fuzzy, no-c-format
+msgid "solid-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:903
+#, fuzzy, no-c-format
+msgid "sybase-ds.xml"
+msgstr "hsqldb-ds.xml"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:911
+#, no-c-format
+msgid "Configuring Generic JCA Adaptors"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:912
+#, no-c-format
+msgid ""
+"The XSLSubDeployer also supports the deployment of arbitrary non-JDBC JCA "
+"resource adaptors. The schema for the top-level connection factory elements "
+"of the <literal>*-ds.xml</literal> configuration deployment file is shown in "
+"<xref linkend=\"Configuring_Generic_JCA_Adaptors-"
+"The_simplified_JCA_adaptor_connection_factory_configuration_descriptor_top_level_schema_elements"
+"\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:916
+#, no-c-format
+msgid ""
+"The simplified JCA adaptor connection factory configuration descriptor top-"
+"level schema elements"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:923
+#, no-c-format
+msgid ""
+"Multiple connection factory configurations may be specified in a "
+"configuration deployment file. The child elements of the <literal>connection-"
+"factories</literal> root are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:928
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mbean</emphasis>: Any number mbean elements may be "
+"specified to define MBean services that should be included in the "
+"<literal>jboss-service.xml</literal> descriptor that results from the "
+"transformation. This may be used to configure additional services used by "
+"the adaptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:933
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">no-tx-connection-factory</emphasis>: this element is "
+"used to specify the (<literal>org.jboss.resource.connectionmanager</"
+"literal>) <literal>NoTxConnectionManager</literal> service configuration. "
+"<literal>NoTxConnectionManager</literal> is a JCA connection manager with no "
+"transaction support. The <literal>no-tx-connection-factory</literal> child "
+"element schema is given in <xref linkend=\"Configuring_Generic_JCA_Adaptors-"
+"The_no_tx_connection_factory_element_schema\"/>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:938
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">tx-connection-factory</emphasis>: this element is "
+"used to specify the (<literal>org.jboss.resource.connectionmanager</"
+"literal>) <literal>TxConnectionManager</literal> service configuration. The "
+"<literal>tx-connection-factory</literal> child element schema is given in "
+"<xref linkend=\"Configuring_Generic_JCA_Adaptors-"
+"The_tx_connection_factory_element_schema\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:944
+#, fuzzy, no-c-format
+msgid "The no-tx-connection-factory element schema"
+msgstr "Connector 元素"
+
+#. Tag: title
+#: J2EE_Connectors_On_JBOSS.xml:952
+#, fuzzy, no-c-format
+msgid "The tx-connection-factory element schema"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:959
+#, no-c-format
+msgid ""
+"The majority of the elements are the same as those of the datasources "
+"configuration. The element unique to the connection factory configuration "
+"include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:964
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">adaptor-display-name</emphasis>: A human readable "
+"display name to assign to the connection manager MBean."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:与操作元数据关联的任何描述"
+"符。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:969
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">local-transaction</emphasis>: This element specifies "
+"that the <literal>tx-connection-factory</literal> supports local "
+"transactions."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:974
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">xa-transaction</emphasis>: This element specifies "
+"that the <literal>tx-connection-factory</literal> supports XA transactions."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:979
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">track-connection-by-tx</emphasis>: This element "
+"specifies that a connection should be used only on a single transaction and "
+"that a transaction should only be associated with one connection."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:984
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">rar-name</emphasis>: This is the name of the RAR "
+"file that contains the definition for the resource we want to provide. For "
+"nested RAR files, the name would look like <literal>myapplication.ear#my."
+"rar</literal>."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 指定了部署这个 farm 的群集的"
+"名字。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:989
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">connection-definition</emphasis>: This is the "
+"connection factory interface class. It should match the "
+"<literal>connectionfactory-interface</literal> in the <literal>ra.xml</"
+"literal> file."
+msgstr ""
+"<emphasis role=\"bold\">DefaultSecurityDomain</emphasis>:它指定在 WAR 文件"
+"的 <literal>jboss-web.xml</literal> 里的 <literal>security-domain</literal> "
+"没有显性地指定的情况下的 JAAS 安全域名。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:994
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">config-property</emphasis>: Any number of properties "
+"to supply to the <literal>ManagedConnectionFactory</literal> (MCF) MBean "
+"service configuration. Each <literal>config-property</literal> element "
+"specifies the value of a MCF property. The <literal>config-property</"
+"literal> element has two required attributes:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:999
+#, fuzzy, no-c-format
+msgid "<emphasis role=\"bold\">name</emphasis>: The name of the property"
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:1004
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">type</emphasis>: The fully qualified type of the "
+"property"
+msgstr "<emphasis role=\"bold\">type</emphasis>:attribute类型的类全名。"
+
+#. Tag: para
+#: J2EE_Connectors_On_JBOSS.xml:1009
+#, no-c-format
+msgid ""
+"The content of the <literal>config-property</literal> element provides the "
+"string representation of the property value. This will be converted to the "
+"true property type using the associated type <literal>PropertyEditor</"
+"literal>."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_EJBs_On_JBOSS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_EJBs_On_JBOSS.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_EJBs_On_JBOSS.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,5055 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:6
+#, fuzzy, no-c-format
+msgid "EJBs on JBoss"
+msgstr "Naming on JBoss"
+
+#. Tag: subtitle
+#: J2EE_EJBs_On_JBOSS.xml:7
+#, fuzzy, no-c-format
+msgid "The EJB Container Configuration and Architecture"
+msgstr "The JBoss installer configuration name screen"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:8
+#, no-c-format
+msgid ""
+"The JBoss EJB container architecture employs a modular plug-in approach. All "
+"key aspects of the EJB container may be replaced by custom versions of a "
+"plug-in and/or an interceptor by a developer. This approach allows for fine "
+"tuned customization of the EJB container behavior to optimally suite your "
+"needs. Most of the EJB container behavior is configurable through the EJB "
+"JAR <literal>META-INF/jboss.xml</literal> descriptor and the default server-"
+"wide equivalent <literal>standardjboss.xml</literal> descriptor. We will "
+"look at various configuration capabilities throughout this chapter as we "
+"explore the container architecture."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:12
+#, no-c-format
+msgid "The EJB Client Side View"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:13
+#, no-c-format
+msgid ""
+"We will begin our tour of the EJB container by looking at the client view of "
+"an EJB through the home and remote proxies. It is the responsibility of the "
+"container provider to generate the <literal>javax.ejb.EJBHome</literal> and "
+"<literal>javax.ejb.EJBObject</literal> for an EJB implementation. A client "
+"never references an EJB bean instance directly, but rather references the "
+"<literal>EJBHome</literal> which implements the bean home interface, and the "
+"<literal>EJBObject</literal> which implements the bean remote interface. "
+"<xref linkend=\"The_EJB_Client_Side_View-"
+"The_composition_of_an_EJBHome_proxy_in_JBoss.\"/> shows the composition of "
+"an EJB home proxy and its relation to the EJB deployment."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:17
+#, no-c-format
+msgid "The composition of an EJBHome proxy in JBoss."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:24
+#, no-c-format
+msgid "The numbered items in the figure are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:29
+#, no-c-format
+msgid ""
+"The EJBDeployer (<literal>org.jboss.ejb.EJBDeployer</literal>) is invoked to "
+"deploy an EJB JAR. An <literal>EJBModule</literal> (<literal>org.jboss.ejb."
+"EJBModule</literal>) is created to encapsulate the deployment metadata."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:34
+#, no-c-format
+msgid ""
+"The create phase of the <literal>EJBModule</literal> life cycle creates an "
+"<literal>EJBProxyFactory</literal> (<literal>org.jboss.ejb.EJBProxyFactory</"
+"literal>) that manages the creation of EJB home and remote interface proxies "
+"based on the <literal>EJBModule</literal><literal>invoker-proxy-bindings</"
+"literal> metadata. There can be multiple proxy factories associated with an "
+"EJB and we will look at how this is defined shortly."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:39
+#, no-c-format
+msgid ""
+"The <literal>ProxyFactory</literal> constructs the logical proxies and binds "
+"the homes into JNDI. A logical proxy is composed of a dynamic "
+"<literal>Proxy</literal> (<literal>java.lang.reflect.Proxy</literal>), the "
+"home interfaces of the EJB that the proxy exposes, the "
+"<literal>ProxyHandler</literal> (<literal>java.lang.reflect."
+"InvocationHandler</literal>) implementation in the form of the "
+"<literal>ClientContainer</literal> (<literal>org.jboss.proxy."
+"ClientContainer</literal>), and the client side interceptors."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:44
+#, no-c-format
+msgid ""
+"The proxy created by the <literal>EJBProxyFactory</literal> is a standard "
+"dynamic proxy. It is a serializable object that proxies the EJB home and "
+"remote interfaces as defined in the <literal>EJBModule</literal> metadata. "
+"The proxy translates requests made through the strongly typed EJB interfaces "
+"into a detyped invocation using the <literal>ClientContainer</literal> "
+"handler associated with the proxy. It is the dynamic proxy instance that is "
+"bound into JNDI as the EJB home interface that clients lookup. When a client "
+"does a lookup of an EJB home, the home proxy is transported into the client "
+"VM along with the <literal>ClientContainer</literal> and its interceptors. "
+"The use of dynamic proxies avoids the EJB specific compilation step required "
+"by many other EJB containers."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:49
+#, no-c-format
+msgid ""
+"The EJB home interface is declared in the ejb-jar.xml descriptor and "
+"available from the EJBModule metadata. A key property of dynamic proxies is "
+"that they are seen to implement the interfaces they expose. This is true in "
+"the sense of Java's strong type system. A proxy can be cast to any of "
+"the home interfaces and reflection on the proxy provides the full details of "
+"the interfaces it proxies."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:54
+#, no-c-format
+msgid ""
+"The proxy delegates calls made through any of its interfaces to the "
+"<literal>ClientContainer</literal> handler. The single method required of "
+"the handler is: <literal>public Object invoke(Object proxy, Method m, Object"
+"[] args) throws Throwable</literal>. The <literal>EJBProxyFactory</literal> "
+"creates a <literal>ClientContainer</literal> and assigns this as the "
+"<literal>ProxyHandler</literal>. The <literal>ClientContainer</literal>'"
+"s state consists of an <literal>InvocationContext</literal> (<literal>org."
+"jboss.invocation.InvocationContext</literal>) and a chain of interceptors "
+"(<literal>org.jboss.proxy.Interceptor</literal>). The "
+"<literal>InvocationContext</literal> contains:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:59
+#, no-c-format
+msgid ""
+"the JMX <literal>ObjectName</literal> of the EJB container MBean the "
+"<literal>Proxy</literal> is associated with"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:64
+#, no-c-format
+msgid "the <literal>javax.ejb.EJBMetaData</literal> for the EJB"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:69
+#, no-c-format
+msgid "the JNDI name of the EJB home interface"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:74
+#, no-c-format
+msgid ""
+"the transport specific invoker (<literal>org.jboss.invocation.Invoker</"
+"literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:79
+#, no-c-format
+msgid ""
+"The interceptor chain consists of the functional units that make up the EJB "
+"home or remote interface behavior. This is a configurable aspect of an EJB "
+"as we will see when we discuss the <literal>jboss.xml</literal> descriptor, "
+"and the interceptor makeup is contained in the <literal>EJBModule</literal> "
+"metadata. Interceptors (<literal>org.jboss.proxy.Interceptor</literal>) "
+"handle the different EJB types, security, transactions and transport. You "
+"can add your own interceptors as well."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:84
+#, no-c-format
+msgid ""
+"The transport specific invoker associated with the proxy has an association "
+"to the server side detached invoker that handles the transport details of "
+"the EJB method invocation. The detached invoker is a JBoss server side "
+"component."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:89
+#, no-c-format
+msgid ""
+"The configuration of the client side interceptors is done using the "
+"<literal>jboss.xml</literal><literal>client-interceptors</literal> element. "
+"When the <literal>ClientContainer</literal> invoke method is called it "
+"creates an untyped <literal>Invocation</literal> (<literal>org.jboss."
+"invocation.Invocation</literal>) to encapsulate request. This is then passed "
+"through the interceptor chain. The last interceptor in the chain will be the "
+"transport handler that knows how to send the request to the server and "
+"obtain the reply, taking care of the transport specific details."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:92
+#, no-c-format
+msgid ""
+"As an example of the client interceptor configuration usage, consider the "
+"default stateless session bean configuration found in the <literal>server/"
+"production/standardjboss.xml</literal> descriptor. <xref linkend="
+"\"The_EJB_Client_Side_View-"
+"The_client_interceptors_from_the_Standard_Stateless_SessionBean_configuration."
+"\"/> shows the <literal>stateless-rmi-invoker</literal> client interceptors "
+"configuration referenced by the Standard Stateless SessionBean."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:95
+#, no-c-format
+msgid ""
+"The client-interceptors from the Standard Stateless SessionBean "
+"configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:96
+#, fuzzy, no-c-format
+msgid ""
+"<invoker-proxy-binding>\n"
+" <name>stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmp</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>org.jboss.proxy.ejb.HomeInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor call-by-value=\"false\">\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" <interceptor call-by-value=\"true\">\n"
+" org.jboss.invocation.MarshallingInvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>org.jboss.proxy.ejb."
+"StatelessSessionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor call-by-value=\"false\">\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" <interceptor call-by-value=\"true\">\n"
+" org.jboss.invocation.MarshallingInvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+"</invoker-proxy-binding>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:97
+#, no-c-format
+msgid ""
+"<container-configuration>\n"
+" <container-name>Standard Stateless SessionBean</container-"
+"name>\n"
+" <call-logging>false</call-logging>\n"
+" <invoker-proxy-binding-name>stateless-rmi-invoker</invoker-"
+"proxy-binding-name>\n"
+" <!-- ... -->\n"
+"</container-configuration>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:98
+#, no-c-format
+msgid ""
+"This is the client interceptor configuration for stateless session beans "
+"that is used in the absence of an EJB JAR <literal>META-INF/jboss.xml</"
+"literal> configuration that overrides these settings. The functionality "
+"provided by each client interceptor is:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:103
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.ejb.HomeInterceptor</emphasis>: "
+"handles the <literal>getHomeHandle</literal>, <literal>getEJBMetaData</"
+"literal>, and remove methods of the <literal>EJBHome</literal> interface "
+"locally in the client VM. Any other methods are propagated to the next "
+"interceptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:108
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.ejb.StatelessSessionInterceptor</"
+"emphasis>: handles the <literal>toString</literal>, <literal>equals</"
+"literal>, <literal>hashCode</literal>, <literal>getHandle</literal>, "
+"<literal>getEJBHome</literal> and <literal>isIdentical</literal> methods of "
+"the <literal>EJBObject</literal> interface locally in the client VM. Any "
+"other methods are propagated to the next interceptor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:113
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.SecurityInterceptor</emphasis>: "
+"associates the current security context with the method invocation for use "
+"by other interceptors or the server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:118
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.TransactionInterceptor</emphasis>: "
+"associates any active transaction with the invocation method invocation for "
+"use by other interceptors."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:123
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.invocation.InvokerInterceptor</emphasis>: "
+"encapsulates the dispatch of the method invocation to the transport specific "
+"invoker. It knows if the client is executing in the same VM as the server "
+"and will optimally route the invocation to a by reference invoker in this "
+"situation. When the client is external to the server VM, this interceptor "
+"delegates the invocation to the transport invoker associated with the "
+"invocation context. In the case of the <xref linkend="
+"\"The_EJB_Client_Side_View-"
+"The_client_interceptors_from_the_Standard_Stateless_SessionBean_configuration."
+"\"/> configuration, this would be the invoker stub associated with the "
+"<literal>jboss:service=invoker,type=jrmp</literal>, the "
+"<literal>JRMPInvoker</literal> service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:126
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.invocation.MarshallingInvokerInterceptor</"
+"emphasis>: extends the <literal>InvokerInterceptor</literal> to not optimize "
+"in-VM invocations. This is used to force <literal>call-by-value</literal> "
+"semantics for method calls."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:132
+#, no-c-format
+msgid "Specifying the EJB Proxy Configuration"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:133
+#, no-c-format
+msgid ""
+"To specify the EJB invocation transport and the client proxy interceptor "
+"stack, you need to define an <literal>invoker-proxy-binding</literal> in "
+"either the EJB JAR <literal>META-INF/jboss.xml descriptor</literal>, or the "
+"server <literal>standardjboss.xml</literal> descriptor. There are several "
+"default <literal>invoker-proxy-bindings</literal> defined in the "
+"<literal>standardjboss.xml</literal> descriptor for the various default EJB "
+"container configurations and the standard RMI/JRMP and RMI/IIOP transport "
+"protocols. The current default proxy configurations are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:138
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">entity-rmi-invoker</emphasis>: a RMI/JRMP "
+"configuration for entity beans"
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:143
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">clustered-entity-rmi-invoker</emphasis>: a RMI/JRMP "
+"configuration for clustered entity beans"
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:148
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">stateless-rmi-invoker</emphasis>: a RMI/JRMP "
+"configuration for stateless session beans"
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:153
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">clustered-stateless-rmi-invoker</emphasis>: a RMI/"
+"JRMP configuration for clustered stateless session beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:158
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">stateful-rmi-invoker</emphasis>: a RMI/JRMP "
+"configuration for clustered stateful session beans"
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:163
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">clustered-stateful-rmi-invoker</emphasis>: a RMI/"
+"JRMP configuration for clustered stateful session beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:168
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">message-driven-bean</emphasis>: a JMS invoker for "
+"message driven beans"
+msgstr "<emphasis role=\"bold\">read-only</emphasis>:只读。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:173
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">singleton-message-driven-bean</emphasis>: a JMS "
+"invoker for singleton message driven beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:178
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">message-inflow-driven-bean</emphasis>: a JMS invoker "
+"for message inflow driven beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:183
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jms-message-inflow-driven-bean</emphasis>: a JMS "
+"inflow invoker for standard message driven beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:188
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">iiop</emphasis>: a RMI/IIOP for use with session and "
+"entity beans."
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:193
+#, no-c-format
+msgid ""
+"To introduce a new protocol binding, or customize the proxy factory, or the "
+"client side interceptor stack, requires defining a new <literal>invoker-"
+"proxy-binding</literal>. The full <literal>invoker-proxy-binding</literal> "
+"DTD fragment for the specification of the proxy configuration is given in "
+"<xref linkend=\"Specifying_the_EJB_Proxy_Configuration-"
+"The_invoker_proxy_binding_schema\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:197
+#, no-c-format
+msgid "The invoker-proxy-binding schema"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:204
+#, no-c-format
+msgid "The <literal>invoker-proxy-binding</literal> child elements are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:209
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: The <literal>name</literal> element "
+"gives a unique name for the <literal>invoker-proxy-binding</literal>. The "
+"name is used to reference the binding from the EJB container configuration "
+"when setting the default proxy binding as well as the EJB deployment level "
+"to specify addition proxy bindings. You will see how this is done when we "
+"look at the <literal>jboss.xml</literal> elements that control the server "
+"side EJB container configuration."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:214
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">invoker-mbean</emphasis>: The <literal>invoker-"
+"mbean</literal> element gives the JMX <literal>ObjectName</literal> string "
+"of the detached invoker MBean service the proxy invoker will be associated "
+"with."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:219
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">proxy-factory</emphasis>: The <literal>proxy-"
+"factory</literal> element specifies the fully qualified class name of the "
+"proxy factory, which must implement the <literal>org.jboss.ejb."
+"EJBProxyFactory</literal> interface. The <literal>EJBProxyFactory</literal> "
+"handles the configuration of the proxy and the association of the protocol "
+"specific invoker and context. The current JBoss implementations of the "
+"<literal>EJBProxyFactory</literal> interface include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:224
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.ejb.ProxyFactory</emphasis>: The RMI/"
+"JRMP specific factory."
+msgstr "<emphasis role=\"bold\">file:/var/opt/apps/</emphasis>扫描指定的目录"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:229
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.ejb.ProxyFactoryHA</emphasis>: The "
+"cluster RMI/JRMP specific factory."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:234
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.plugins.jms.JMSContainerInvoker</"
+"emphasis>: The JMS specific factory."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:239
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.proxy.ejb.IORFactory</emphasis>: The RMI/"
+"IIOP specific factory."
+msgstr "<emphasis role=\"bold\">file:/var/opt/apps/</emphasis>扫描指定的目录"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:246
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">proxy-factory-config</emphasis>: The <literal>proxy-"
+"factory-config</literal> element specifies additional information for the "
+"<literal>proxy-factory</literal> implementation. Unfortunately, its "
+"currently an unstructured collection of elements. Only a few of the elements "
+"apply to each type of proxy factory. The child elements break down into the "
+"three invocation protocols: RMI/RJMP, RMI/IIOP and JMS."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:251
+#, no-c-format
+msgid ""
+"For the RMI/JRMP specific proxy factories, <literal>org.jboss.proxy.ejb."
+"ProxyFactory</literal> and <literal>org.jboss.proxy.ejb.ProxyFactoryHA</"
+"literal> the following elements apply:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:256
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">client-interceptors</emphasis>: The <literal>client-"
+"interceptors</literal> define the home, remote and optionally the multi-"
+"valued proxy interceptor stacks."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:261 J2EE_EJBs_On_JBOSS.xml:275
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">web-class-loader</emphasis>: The web class loader "
+"defines the instance of the <literal>org.jboss.web.WebClassLoader</literal> "
+"that should be associated with the proxy for dynamic class loading."
+msgstr ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis>:与代理关联的 "
+"<literal>org.jboss.ha.framework.interfaces.LoadBalancePolicy</literal> 接口实"
+"现的类名。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:266
+#, no-c-format
+msgid ""
+"The following <literal>proxy-factory-config</literal> is for an entity bean "
+"accessed over RMI."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:269
+#, fuzzy, no-c-format
+msgid ""
+"<proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>org.jboss.proxy.ejb.HomeInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.TransactionInterceptor</"
+"interceptor>\n"
+" <interceptor call-by-value=\"false\">\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" <interceptor call-by-value=\"true\">\n"
+" org.jboss.invocation.MarshallingInvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>org.jboss.proxy.ejb.EntityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.TransactionInterceptor</"
+"interceptor>\n"
+" <interceptor call-by-value=\"false\">\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" <interceptor call-by-value=\"true\">\n"
+" org.jboss.invocation.MarshallingInvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" <list-entity>\n"
+" <interceptor>org.jboss.proxy.ejb.ListEntityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.TransactionInterceptor</"
+"interceptor>\n"
+" <interceptor call-by-value=\"false\">\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" <interceptor call-by-value=\"true\">\n"
+" org.jboss.invocation.MarshallingInvokerInterceptor\n"
+" </interceptor>\n"
+" </list-entity>\n"
+" </client-interceptors>\n"
+"</proxy-factory-config>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:270
+#, no-c-format
+msgid ""
+"For the RMI/IIOP specific proxy factory, <literal>org.jboss.proxy.ejb."
+"IORFactory</literal>, the following elements apply:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:280
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">poa</emphasis>: The portable object adapter usage. "
+"Valid values are <literal>per-servant</literal> and <literal>shared</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:285
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">register-ejbs-in-jnp-context</emphasis>: A flag "
+"indicating if the EJBs should be register in JNDI."
+msgstr "<emphasis role=\"bold\">write-only</emphasis>:只写。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:290
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp-context</emphasis>: The JNDI context in which to "
+"register EJBs."
+msgstr "<emphasis role=\"bold\">JndiName</emphasis>:代理将被绑定的 JNDI 名。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:295
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">interface-repository-supported</emphasis>: This "
+"indicates whether or not a deployed EJB has its own CORBA interface "
+"repository."
+msgstr ""
+"<emphasis role=\"bold\">disable_initial_coord</emphasis> 指定是否阻止这个节点"
+"成为群集控制点(cluster coordinator)。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:300
+#, no-c-format
+msgid ""
+"The following shows a <literal>proxy-factory-config</literal> for EJBs "
+"accessed over IIOP."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:303
+#, no-c-format
+msgid ""
+"<proxy-factory-config>\n"
+" <web-class-loader>org.jboss.iiop.WebCL</web-class-loader>\n"
+" <poa>per-servant</poa>\n"
+" <register-ejbs-in-jnp-context>true</register-ejbs-in-jnp-"
+"context>\n"
+" <jnp-context>iiop</jnp-context>\n"
+"</proxy-factory-config>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:304
+#, no-c-format
+msgid ""
+"For the JMS specific proxy factory, <literal>org.jboss.ejb.plugins.jms."
+"JMSContainerInvoker</literal>, the following elements apply:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:309
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MinimumSize</emphasis>: This specifies the minimum "
+"pool size for MDBs processing . This defaults to 1."
+msgstr ""
+"<emphasis role=\"bold\">MaxPoolSize</emphasis>:处理客户的服务器线程数量。它"
+"的缺省值是 300。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:314
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaximumSize</emphasis>: This specifies the upper "
+"limit to the number of concurrent MDBs that will be allowed for the JMS "
+"destination. This defaults to 15."
+msgstr ""
+"<emphasis role=\"bold\">MaxPoolSize</emphasis>:处理客户的服务器线程数量。它"
+"的缺省值是 300。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:319
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaxMessages</emphasis>: This specifies the "
+"<literal>maxMessages</literal> parameter value for the "
+"<literal>createConnectionConsumer</literal> method of <literal>javax.jms."
+"QueueConnection</literal> and <literal>javax.jms.TopicConnection</literal> "
+"interfaces, as well as the <literal>maxMessages</literal> parameter value "
+"for the <literal>createDurableConnectionConsumer</literal> method of "
+"<literal>javax.jms.TopicConnection</literal>. It is the maximum number of "
+"messages that can be assigned to a server session at one time. This defaults "
+"to 1. This value should not be modified from the default unless your JMS "
+"provider indicates this is supported."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:324
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">KeepAliveMillis</emphasis>: This specifies the keep "
+"alive time interval in milliseconds for sessions in the session pool. The "
+"default is 30000 (30 seconds)."
+msgstr ""
+"<emphasis role=\"bold\">SnapshotInterval</emphasis>:它设置在 interval "
+"snapshot 模式下的 snapshot 的时间间隔,单位是毫秒。它的缺省值是 1000 毫秒,也"
+"就是 1 秒。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:329
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MDBConfig</emphasis>: Configuration for the MDB JMS "
+"connection behavior. Among the elements supported are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:334
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ReconnectIntervalSec</emphasis>: The time to wait "
+"(in seconds) before trying to recover the connection to the JMS server."
+msgstr ""
+"<emphasis role=\"bold\">ReplQueueInterval</emphasis> 指定复制复制队列里的元素"
+"所需的时间(毫秒数)。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:339
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DeliveryActive</emphasis>: Whether or not the MDB is "
+"active at startup. The default is true."
+msgstr ""
+"<emphasis role=\"bold\">jnp.discoveryPort</emphasis>:接收发现查询的端口。缺"
+"省值为 1102。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:344
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DLQConfig</emphasis>: Configuration for an MDB's "
+"dead letter queue, used when messages are redelivered too many times."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:349
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JMSProviderAdapterJNDI</emphasis>: The JNDI name of "
+"the JMS provider adapter in the <literal>java:/</literal> namespace. This is "
+"mandatory for an MDB and must implement <literal>org.jboss.jms.jndi."
+"JMSProviderAdapter</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:354
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerSessionPoolFactoryJNDI</emphasis>: The JNDI "
+"name of the session pool in the <literal>java:/</literal> namespace of the "
+"JMS provider's session pool factory. This is mandatory for an MDB and "
+"must implement <literal>org.jboss.jms.asf.ServerSessionPoolFactory</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:361
+#, no-c-format
+msgid ""
+"gives a sample <literal>proxy-factory-config</literal> fragment taken from "
+"the <literal>standardjboss.xml</literal> descriptor."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:364
+#, no-c-format
+msgid "A sample JMSContainerInvoker proxy-factory-config"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:365
+#, no-c-format
+msgid ""
+"<proxy-factory-config>\n"
+" <JMSProviderAdapterJNDI>DefaultJMSProvider</"
+"JMSProviderAdapterJNDI>\n"
+" <ServerSessionPoolFactoryJNDI>StdJMSPool</"
+"ServerSessionPoolFactoryJNDI>\n"
+" <MinimumSize>1</MinimumSize>\n"
+" <MaximumSize>15</MaximumSize>\n"
+" <KeepAliveMillis>30000</KeepAliveMillis>\n"
+" <MaxMessages>1</MaxMessages>\n"
+" <MDBConfig>\n"
+" <ReconnectIntervalSec>10</ReconnectIntervalSec>\n"
+" <DLQConfig>\n"
+" <DestinationQueue>queue/DLQ</DestinationQueue>\n"
+" <MaxTimesRedelivered>10</MaxTimesRedelivered>\n"
+" <TimeToLive>0</TimeToLive>\n"
+" </DLQConfig>\n"
+" </MDBConfig>\n"
+"</proxy-factory-config>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:372
+#, no-c-format
+msgid "The EJB Server Side View"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:373
+#, no-c-format
+msgid ""
+"Every EJB invocation must end up at a JBoss server hosted EJB container. In "
+"this section we will look at how invocations are transported to the JBoss "
+"server VM and find their way to the EJB container via the JMX bus."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:377
+#, fuzzy, no-c-format
+msgid "Detached Invokers - The Transport Middlemen"
+msgstr "脱管调用者引用"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:378
+#, no-c-format
+msgid ""
+"We looked at the detached invoker architecture in the context of exposing "
+"RMI compatible interfaces of MBean services earlier. Here we will look at "
+"how detached invokers are used to expose the EJB container home and bean "
+"interfaces to clients. The generic view of the invoker architecture is "
+"presented in <xref linkend=\"Detached_Invokers___The_Transport_Middlemen-"
+"The_transport_invoker_server_side_architecture\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:382
+#, fuzzy, no-c-format
+msgid "The transport invoker server side architecture"
+msgstr "The main components in the detached invoker architecture"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:389
+#, no-c-format
+msgid ""
+"For each type of home proxy there is a binding to an invoker and its "
+"associated transport protocol. A container may have multiple invocation "
+"protocols active simultaneously. In the <literal>jboss.xml</literal> file, "
+"an <literal>invoker-proxy-binding-name</literal> maps to an <literal>invoker-"
+"proxy-binding/name</literal> element. At the <literal>container-"
+"configuration</literal> level this specifies the default invoker that will "
+"be used for EJBs deployed to the container. At the bean level, the "
+"<literal>invoker-bindings</literal> specify one or more invokers to use with "
+"the EJB container MBean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:392
+#, no-c-format
+msgid ""
+"When one specifies multiple invokers for a given EJB deployment, the home "
+"proxy must be given a unique JNDI binding location. This is specified by the "
+"<literal>invoker/jndi-name</literal> element value. Another issue when "
+"multiple invokers exist for an EJB is how to handle remote homes or "
+"interfaces obtained when the EJB calls other beans. Any such interfaces need "
+"to use the same invoker used to call the outer EJB in order for the "
+"resulting remote homes and interfaces to be compatible with the proxy the "
+"client has initiated the call through. The <literal>invoker/ejb-ref</"
+"literal> elements allow one to map from a protocol independent ENC "
+"<literal>ejb-ref</literal> to the home proxy binding for <literal>ejb-ref</"
+"literal> target EJB home that matches the referencing invoker type."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:395
+#, no-c-format
+msgid ""
+"An example of using a custom <literal>JRMPInvoker</literal> MBean that "
+"enables compressed sockets for session beans can be found in the "
+"<literal>org.jboss.test.jrmp</literal> package of the testsuite. The "
+"following example illustrates the custom <literal>JRMPInvoker</literal> "
+"configuration and its mapping to a stateless session bean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:398
+#, no-c-format
+msgid ""
+"<server>\n"
+" <mbean code=\"org.jboss.invocation.jrmp.server.JRMPInvoker\"\n"
+" name=\"jboss:service=invoker,type=jrmp,"
+"socketType=CompressionSocketFactory\">\n"
+" <attribute name=\"RMIObjectPort\">4445</attribute>\n"
+" <attribute name=\"RMIClientSocketFactory\">\n"
+" org.jboss.test.jrmp.ejb.CompressionClientSocketFactory\n"
+" </attribute>\n"
+" <attribute name=\"RMIServerSocketFactory\">\n"
+" org.jboss.test.jrmp.ejb.CompressionServerSocketFactory\n"
+" </attribute>\n"
+"</mbean>\n"
+" </server>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:399
+#, no-c-format
+msgid ""
+"Here the default <literal>JRMPInvoker</literal> has been customized to bind "
+"to port 4445 and to use custom socket factories that enable compression at "
+"the transport level."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:402
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE jboss PUBLIC\n"
+" \"-//JBoss//DTD JBOSS 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd\">\n"
+"<!-- The jboss.xml descriptor for the jrmp-comp.jar ejb unit -->\n"
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>StatelessSession</ejb-name>\n"
+" <configuration-name>Standard Stateless SessionBean</"
+"configuration-name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" stateless-compression-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>jrmp-compressed/StatelessSession</"
+"jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" \n"
+" <invoker-proxy-bindings>\n"
+" <invoker-proxy-binding>\n"
+" <name>stateless-compression-invoker</name>\n"
+" <invoker-mbean>\n"
+" jboss:service=invoker,type=jrmp,"
+"socketType=CompressionSocketFactory\n"
+" </invoker-mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>org.jboss.proxy.ejb."
+"HomeInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>\n"
+" </invoker-proxy-bindings>\n"
+"</jboss>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:403
+#, no-c-format
+msgid ""
+"The <literal>StatelessSession</literal> EJB <literal>invoker-bindings</"
+"literal> settings specify that the <literal>stateless-compression-invoker</"
+"literal> will be used with the home interface bound under the JNDI name "
+"<literal>jrmp-compressed/StatelessSession</literal>. The <literal>stateless-"
+"compression-invoker</literal> is linked to the custom JRMP invoker we just "
+"declared."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:406
+#, no-c-format
+msgid ""
+"The following example, <literal>org.jboss.test.hello</literal> testsuite "
+"package, is an example of using the <literal>HttpInvoker</literal> to "
+"configure a stateless session bean to use the RMI/HTTP protocol."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:409
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss PUBLIC\n"
+" \"-//JBoss//DTD JBOSS 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_3_2.dtd\">\n"
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>HelloWorldViaHTTP</ejb-name>\n"
+" <jndi-name>helloworld/HelloHTTP</jndi-name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" stateless-http-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" <invoker-proxy-bindings>\n"
+" <!-- A custom invoker for RMI/HTTP -->\n"
+" <invoker-proxy-binding>\n"
+" <name>stateless-http-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=http</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactory</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>org.jboss.proxy.ejb."
+"HomeInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>\n"
+" </invoker-proxy-bindings>\n"
+"</jboss>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:410
+#, no-c-format
+msgid ""
+"Here a custom invoker-proxy-binding named <literal>stateless-http-invoker</"
+"literal> is defined. It uses the <literal>HttpInvoker</literal> MBean as the "
+"detached invoker. The <literal>jboss:service=invoker,type=http</literal> "
+"name is the default name of the <literal>HttpInvoker</literal> MBean as "
+"found in the <literal>http-invoker.sar/META-INF/jboss-service.xml</literal> "
+"descriptor, and its service descriptor fragment is show here:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:413
+#, fuzzy, no-c-format
+msgid ""
+"<!-- The HTTP invoker service configuration -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpInvoker\"\n"
+" name=\"jboss:service=invoker,type=http\">\n"
+" <!-- Use a URL of the form http://<hostname>:8080/invoker/"
+"EJBInvokerServlet\n"
+" where <hostname> is InetAddress.getHostname value on which "
+"the server\n"
+" is running. -->\n"
+" <attribute name=\"InvokerURLPrefix\">http://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8080/invoker/"
+"EJBInvokerServlet</attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+"</mbean>"
+msgstr ""
+"<!-- Expose the SRP service interface via HTTP -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\"\n"
+" name=\"jboss.security.tests:service=SRP/HTTP\">\n"
+" <attribute name=\"InvokerURL\">http://localhost:8080/invoker/"
+"JMXInvokerServlet</attribute>\n"
+" <attribute name=\"InvokerName\">jboss.security.tests:"
+"service=SRPService</attribute>\n"
+" <attribute name=\"ExportedInterface\">\n"
+" org.jboss.security.srp.SRPRemoteServerInterface\n"
+" </attribute>\n"
+" <attribute name=\"JndiName\">srp-test-http/SRPServerInterface</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:414
+#, fuzzy, no-c-format
+msgid ""
+"The client proxy posts the EJB invocation content to the "
+"<literal>EJBInvokerServlet</literal> URL specified in the "
+"<literal>HttpInvoker</literal> service configuration."
+msgstr ""
+"和 JNDI/HTTP 相关的 <literal>InvokerServlet</literal> 的配置是 "
+"<literal>JMXInvokerServlet</literal>,它定义了:"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:420
+#, no-c-format
+msgid "The HA JRMPInvoker - Clustered RMI/JRMP Transport"
+msgstr "The HA JRMPInvoker - Clustered RMI/JRMP Transport"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:421
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.jrmp.server.JRMPInvokerHA</literal> "
+"service is an extension of the <literal>JRMPInvoker</literal> that is a "
+"cluster aware invoker. The <literal>JRMPInvokerHA</literal> fully supports "
+"all of the attributes of the <literal>JRMPInvoker</literal>. This means that "
+"customized bindings of the port, interface and socket transport are "
+"available to clustered RMI/JRMP as well. For additional information on the "
+"clustering architecture and the implementation of the HA RMI proxies see the "
+"JBoss Clustering docs."
+msgstr ""
+"<literal>org.jboss.proxy.generic.ProxyFactoryHA</literal> 服务是 cluster-"
+"aware factory <literal>ProxyFactoryHA</literal> 的一个扩展。"
+"<literal>ProxyFactoryHA</literal> 完全支持 <literal>JRMPProxyFactory</"
+"literal> 的所有属性。这意味着对端口,接口和套接字传输的自定义绑定,对于群集"
+"的 RMI/JRMP 也是可用的。此外,下面的与群集相关的属性也被支持:"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:427
+#, no-c-format
+msgid "The HA HttpInvoker - Clustered RMI/HTTP Transport"
+msgstr "The HA HttpInvoker - Clustered RMI/HTTP Transport"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:428
+#, fuzzy, no-c-format
+msgid ""
+"The RMI/HTTP layer allows for software load balancing of the invocations in "
+"a clustered environment. An HA capable extension of the HTTP invoker has "
+"been added that borrows much of its functionality from the HA-RMI/JRMP "
+"clustering."
+msgstr ""
+"RMI/HTTP 层允许群集环境里的调用的负载平衡。HTTP 调用者的具备 HA 能力的扩展借"
+"用了 HA-RMI/JRMP 群集里的大部分功能。要启用 HA-RMI/HTTP,你需要配置 EJB 容器"
+"的调用者。这可以通过 <literal>jboss.xml</literal> 描述符或 "
+"<literal>standardjboss.xml</literal> 描述符来完成。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:431
+#, no-c-format
+msgid ""
+"To enable HA-RMI/HTTP you need to configure the invokers for the EJB "
+"container. This is done through either a <literal>jboss.xml</literal> "
+"descriptor, or the <literal>standardjboss.xml</literal> descriptor. <xref "
+"linkend=\"The_HA_HttpInvoker___Clustered_RMIHTTP_Transport-A_jboss."
+"xml_stateless_session_configuration_for_HA_RMIHTTP\"/> shows is an example "
+"of a stateless session configuration taken from the <literal>org.jboss.test."
+"hello</literal> testsuite package."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:434
+#, no-c-format
+msgid "A jboss.xml stateless session configuration for HA-RMI/HTTP"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:435
+#, fuzzy, no-c-format
+msgid ""
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>HelloWorldViaClusteredHTTP</ejb-name>\n"
+" <jndi-name>helloworld/HelloHA-HTTP</jndi-name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" stateless-httpHA-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" <invoker-proxy-bindings>\n"
+" <invoker-proxy-binding>\n"
+" <name>stateless-httpHA-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=httpHA</"
+"invoker-mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</"
+"proxy-factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>org.jboss.proxy.ejb."
+"HomeInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"SecurityInterceptor</interceptor>\n"
+" <interceptor>org.jboss.proxy."
+"TransactionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>\n"
+" </invoker-proxy-bindings>\n"
+"</jboss>"
+msgstr ""
+"<jboss>\n"
+" <session>\n"
+" <ejb-name>nextgen_RetryInterceptorStatelessSession</ejb-"
+"name>\n"
+" <invoker-bindings>\n"
+" <invoker>\n"
+" <invoker-proxy-binding-name>\n"
+" clustered-retry-stateless-rmi-invoker\n"
+" </invoker-proxy-binding-name>\n"
+" <jndi-name>\n"
+" nextgen_RetryInterceptorStatelessSession\n"
+" </jndi-name>\n"
+" </invoker>\n"
+" </invoker-bindings>\n"
+" <clustered>true</clustered>\n"
+" </session>\n"
+"\n"
+" <invoker-proxy-binding>\n"
+" <name>clustered-retry-stateless-rmi-invoker</name>\n"
+" <invoker-mbean>jboss:service=invoker,type=jrmpha</invoker-"
+"mbean>\n"
+" <proxy-factory>org.jboss.proxy.ejb.ProxyFactoryHA</proxy-"
+"factory>\n"
+" <proxy-factory-config>\n"
+" <client-interceptors>\n"
+" <home>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.HomeInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </home>\n"
+" <bean>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.StatelessSessionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.SecurityInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.TransactionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.proxy.ejb.RetryInterceptor\n"
+" </interceptor>\n"
+" <interceptor>\n"
+" org.jboss.invocation.InvokerInterceptor\n"
+" </interceptor>\n"
+" </bean>\n"
+" </client-interceptors>\n"
+" </proxy-factory-config>\n"
+" </invoker-proxy-binding>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:436
+#, no-c-format
+msgid ""
+"The <literal>stateless-httpHA-invoker</literal> invoker-proxy-binding "
+"references the <literal>jboss:service=invoker,type=httpHA</literal> invoker "
+"service. This service would be configured as shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:439
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.invocation.http.server.HttpInvokerHA\"\n"
+" name=\"jboss:service=invoker,type=httpHA\">\n"
+" <!-- Use a URL of the form\n"
+" http://<hostname>:8080/invoker/EJBInvokerHAServlet\n"
+" where <hostname> is InetAddress.getHostname value on which "
+"the server\n"
+" is running.\n"
+" -->\n"
+" <attribute name=\"InvokerURLPrefix\">http://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8080/invoker/"
+"EJBInvokerHAServlet</attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:440
+#, no-c-format
+msgid ""
+"The URL used by the invoker proxy is the <literal>EJBInvokerHAServlet</"
+"literal> mapping as deployed on the cluster node. The "
+"<literal>HttpInvokerHA</literal> instances across the cluster form a "
+"collection of candidate http URLs that are made available to the client side "
+"proxy for failover and/or load balancing."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:448
+#, no-c-format
+msgid "The EJB Container"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:449
+#, no-c-format
+msgid ""
+"An EJB container is the component that manages a particular class of EJB. In "
+"JBoss there is one instance of the <literal>org.jboss.ejb.Container</"
+"literal> created for each unique configuration of an EJB that is deployed. "
+"The actual object that is instantiated is a subclass of <literal>Container</"
+"literal> and the creation of the container instance is managed by the "
+"<literal>EJBDeployer</literal> MBean."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:453
+#, fuzzy, no-c-format
+msgid "EJBDeployer MBean"
+msgstr "The SARDeployer MBean"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:454
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.ejb.EJBDeployer</literal> MBean is responsible for "
+"the creation of EJB containers. Given an EJB JAR that is ready for "
+"deployment, the <literal>EJBDeployer</literal> will create and initialize "
+"the necessary EJB containers, one for each type of EJB. The configurable "
+"attributes of the <literal>EJBDeployer</literal> are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:459
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">VerifyDeployments</emphasis>: a boolean flag "
+"indicating if the EJB verifier should be run. This validates that the EJBs "
+"in a deployment unit conform to the EJB 2.1 specification. Setting this to "
+"true is useful for ensuring your deployments are valid."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:464
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">VerifierVerbose</emphasis>: A boolean that controls "
+"the verboseness of any verification failures/warnings that result from the "
+"verification process."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:469
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StrictVerifier</emphasis>: A boolean that enables/"
+"disables strict verification. When strict verification is enable an EJB will "
+"deploy only if verifier reports no errors."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:474
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CallByValue</emphasis>: a boolean flag that "
+"indicates call by value semantics should be used by default."
+msgstr ""
+"<emphasis role=\"bold\">DiscoveryDisabled</emphasis> 是一个布尔值标记,它可用"
+"来取消自动恢复多点传送侦听者(multicast listener)的配置。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:479
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ValidateDTDs</emphasis>: a boolean flag that "
+"indicates if the <literal>ejb-jar.xml</literal> and <literal>jboss.xml</"
+"literal> descriptors should be validated against their declared DTDs. "
+"Setting this to true is useful for ensuring your deployment descriptors are "
+"valid."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:484
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MetricsEnabled</emphasis>: a boolean flag that "
+"controls whether container interceptors marked with an "
+"<literal>metricsEnabled=true</literal> attribute should be included in the "
+"configuration. This allows one to define a container interceptor "
+"configuration that includes metrics type interceptors that can be toggled on "
+"and off."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:489
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">WebServiceName</emphasis>: The JMX ObjectName string "
+"of the web service MBean that provides support for the dynamic class loading "
+"of EJB classes."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:494
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TransactionManagerServiceName</emphasis>: The JMX "
+"ObjectName string of the JTA transaction manager service. This must have an "
+"attribute named <literal>TransactionManager</literal> that returns that "
+"<literal>javax.transaction.TransactionManager</literal> instance."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:499
+#, no-c-format
+msgid ""
+"The deployer contains two central methods: deploy and undeploy. The deploy "
+"method takes a URL, which either points to an EJB JAR, or to a directory "
+"whose structure is the same as a valid EJB JAR (which is convenient for "
+"development purposes). Once a deployment has been made, it can be undeployed "
+"by calling undeploy on the same URL. A call to deploy with an already "
+"deployed URL will cause an undeploy, followed by deployment of the URL. "
+"JBoss has support for full re-deployment of both implementation and "
+"interface classes, and will reload any changed classes. This will allow you "
+"to develop and update EJBs without ever stopping a running server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:502
+#, no-c-format
+msgid ""
+"During the deployment of the EJB JAR the <literal>EJBDeployer</literal> and "
+"its associated classes perform three main functions, verify the EJBs, create "
+"a container for each unique EJB, initialize the container with the "
+"deployment configuration information. We will talk about each function in "
+"the following sections."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:506
+#, fuzzy, no-c-format
+msgid "Verifying EJB deployments"
+msgstr "Farming 部署"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:507
+#, no-c-format
+msgid ""
+"When the <literal>VerifyDeployments</literal> attribute of the "
+"<literal>EJBDeployer</literal> is true, the deployer performs a verification "
+"of EJBs in the deployment. The verification checks that an EJB meets EJB "
+"specification compliance. This entails validating that the EJB deployment "
+"unit contains the required home and remote, local home and local interfaces. "
+"It will also check that the objects appearing in these interfaces are of the "
+"proper types and that the required methods are present in the implementation "
+"class. This is a useful behavior that is enabled by default since there are "
+"a number of steps that an EJB developer and deployer must perform correctly "
+"to construct a proper EJB JAR, and it is easy to make a mistake. The "
+"verification stage attempts to catch any errors and fail the deployment with "
+"an error that indicates what needs to be corrected."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:510
+#, no-c-format
+msgid ""
+"Probably the most problematic aspect of writing EJBs is the fact that there "
+"is a disconnection between the bean implementation and its remote and home "
+"interfaces, as well as its deployment descriptor configuration. It is easy "
+"to have these separate elements get out of synch. One tool that helps "
+"eliminate this problem is XDoclet. It allows you to use custom JavaDoc-like "
+"tags in the EJB bean implementation class to generate the related bean "
+"interfaces, deployment descriptors and related objects. See the XDoclet home "
+"page, <ulink url=\"http://sourceforge.net/projects/xdoclet\"></ulink> for "
+"additional details."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:516
+#, no-c-format
+msgid "Deploying EJBs Into Containers"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:517
+#, no-c-format
+msgid ""
+"The most important role performed by the <literal>EJBDeployer</literal> is "
+"the creation of an EJB container and the deployment of the EJB into the "
+"container. The deployment phase consists of iterating over EJBs in an EJB "
+"JAR, and extracting the bean classes and their metadata as described by the "
+"<literal>ejb-jar.xml</literal> and <literal>jboss.xml</literal> deployment "
+"descriptors. For each EJB in the EJB JAR, the following steps are performed:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:522
+#, no-c-format
+msgid ""
+"Create subclass of <literal>org.jboss.ejb.Container</literal> depending on "
+"the type of the EJB: stateless, stateful, BMP entity, CMP entity, or message "
+"driven. The container is assigned a unique <literal>ClassLoader</literal> "
+"from which it can load local resources. The uniqueness of the "
+"<literal>ClassLoader</literal> is also used to isolate the standard "
+"<literal>java:comp</literal> JNDI namespace from other J2EE components."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:527
+#, no-c-format
+msgid ""
+"Set all container configurable attributes from a merge of the <literal>jboss."
+"xml</literal> and <literal>standardjboss.xml</literal> descriptors."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:532
+#, no-c-format
+msgid ""
+"Create and add the container interceptors as configured for the container."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:537
+#, no-c-format
+msgid ""
+"Associate the container with an application object. This application object "
+"represents a J2EE enterprise application and may contain multiple EJBs and "
+"web contexts."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:542
+#, no-c-format
+msgid ""
+"If all EJBs are successfully deployed, the application is started which in "
+"turn starts all containers and makes the EJBs available to clients. If any "
+"EJB fails to deploy, a deployment exception is thrown and the deployment "
+"module is failed."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:548
+#, fuzzy, no-c-format
+msgid "Container configuration information"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:549
+#, no-c-format
+msgid ""
+"JBoss externalizes most if not all of the setup of the EJB containers using "
+"an XML file that conforms to the <literal>jboss_4_0.dtd</literal>. The "
+"section DTD that relates to container configuration information is shown in "
+"<xref linkend=\"Container_configuration_information-"
+"The_jboss_4_0_DTD_elements_related_to_container_configuration.\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:553
+#, no-c-format
+msgid "The jboss_4_0 DTD elements related to container configuration."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:560
+#, no-c-format
+msgid ""
+"The <literal>container-configuration</literal> element and its subelements "
+"specify container configuration settings for a type of container as given by "
+"the <literal>container-name</literal> element. Each configuration specifies "
+"information such as the default invoker type, the container interceptor "
+"makeup, instance caches/pools and their sizes, persistence manager, "
+"security, and so on. Because this is a large amount of information that "
+"requires a detailed understanding of the JBoss container architecture, JBoss "
+"ships with a standard configuration for the four types of EJBs. This "
+"configuration file is called <literal>standardjboss.xml</literal> and it is "
+"located in the conf directory of any configuration file set that uses EJBs. "
+"The following is a sample of <literal>container-configuration</literal> from "
+"<literal>standardjboss.xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:563
+#, no-c-format
+msgid ""
+"<container-configuration>\n"
+" <container-name>Standard CMP 2.x EntityBean</container-"
+"name>\n"
+" <call-logging>false</call-logging>\n"
+" <invoker-proxy-binding-name>entity-rmi-invoker</invoker-proxy-"
+"binding-name>\n"
+" <sync-on-commit-only>false</sync-on-commit-only>\n"
+" <insert-after-ejb-post-create>false</insert-after-ejb-post-"
+"create>\n"
+" <call-ejb-store-on-clean>true</call-ejb-store-on-clean>\n"
+" <container-interceptors>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"ProxyFactoryFinderInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.LogInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"CallValidationInterceptor</interceptor>\n"
+" <interceptor metricsEnabled=\"true\">\n"
+" org.jboss.ejb.plugins.MetricsInterceptor\n"
+" </interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"EntityCreationInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"EntityInstanceInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"EntityReentranceInterceptor</interceptor>\n"
+" <interceptor>\n"
+" org.jboss.resource.connectionmanager."
+"CachedConnectionInterceptor\n"
+" </interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"EntitySynchronizationInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.cmp.jdbc."
+"JDBCRelationInterceptor</interceptor>\n"
+" </container-interceptors>\n"
+" <instance-pool>org.jboss.ejb.plugins.EntityInstancePool</"
+"instance-pool>\n"
+" <instance-cache>org.jboss.ejb.plugins."
+"InvalidableEntityInstanceCache</instance-cache>\n"
+" <persistence-manager>org.jboss.ejb.plugins.cmp.jdbc."
+"JDBCStoreManager</persistence-manager>\n"
+" <locking-policy>org.jboss.ejb.plugins.lock."
+"QueuedPessimisticEJBLock</locking-policy>\n"
+" <container-cache-conf>\n"
+" <cache-policy>org.jboss.ejb.plugins."
+"LRUEnterpriseContextCachePolicy</cache-policy>\n"
+" <cache-policy-conf>\n"
+" <min-capacity>50</min-capacity>\n"
+" <max-capacity>1000000</max-capacity>\n"
+" <overager-period>300</overager-period>\n"
+" <max-bean-age>600</max-bean-age>\n"
+" <resizer-period>400</resizer-period>\n"
+" <max-cache-miss-period>60</max-cache-miss-period>\n"
+" <min-cache-miss-period>1</min-cache-miss-period>\n"
+" <cache-load-factor>0.75</cache-load-factor>\n"
+" </cache-policy-conf>\n"
+" </container-cache-conf>\n"
+" <container-pool-conf>\n"
+" <MaximumSize>100</MaximumSize>\n"
+" </container-pool-conf>\n"
+" <commit-option>B</commit-option>\n"
+"</container-configuration>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:564
+#, no-c-format
+msgid ""
+"These two examples demonstrate how extensive the container configuration "
+"options are. The container configuration information can be specified at two "
+"levels. The first is in the <literal>standardjboss.xml</literal> file "
+"contained in the configuration file set directory. The second is at the EJB "
+"JAR level. By placing a <literal>jboss.xml</literal> file in the EJB JAR "
+"<literal>META-INF</literal> directory, you can specify either overrides for "
+"container configurations in the <literal>standardjboss.xml</literal> file, "
+"or entirely new named container configurations. This provides great "
+"flexibility in the configuration of containers. As you have seen, all "
+"container configuration attributes have been externalized and as such are "
+"easily modifiable. Knowledgeable developers can even implement specialized "
+"container components, such as instance pools or caches, and easily integrate "
+"them with the standard container configurations to optimize behavior for a "
+"particular application or environment."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:567
+#, no-c-format
+msgid ""
+"How an EJB deployment chooses its container configuration is based on the "
+"explicit or implict <literal>jboss/enterprise-beans/<type>/"
+"configuration-name</literal> element. The <literal>configuration-name</"
+"literal> element is a link to a <literal>container-configurations/container-"
+"configuration</literal> element. It specifies which container configuration "
+"to use for the referring EJB. The link is from a <literal>configuration-"
+"name</literal> element to a <literal>container-name</literal> element."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:570
+#, no-c-format
+msgid ""
+"You are able to specify container configurations per class of EJB by "
+"including a <literal>container-configuration</literal> element in the EJB "
+"definition. Typically one does not define completely new container "
+"configurations, although this is supported. The typical usage of a "
+"<literal>jboss.xml</literal> level <literal>container-configuration</"
+"literal> is to override one or more aspects of a <literal>container-"
+"configuration</literal> coming from the <literal>standardjboss.xml</literal> "
+"descriptor. This is done by specifying <literal>container-configuration</"
+"literal> that references the name of an existing <literal>standardjboss.xml</"
+"literal><literal>container-configuration/container-name</literal> as the "
+"value for the <literal>container-configuration/extends</literal> attribute. "
+"The following example shows an example of defining a new <literal>Secured "
+"Stateless SessionBean</literal> configuration that is an extension of the "
+"<literal>Standard Stateless SessionBean</literal> configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:573
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?>\n"
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>EchoBean</ejb-name>\n"
+" <configuration-name>Secured Stateless SessionBean</"
+"configuration-name>\n"
+" <!-- ... -->\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" <container-configurations>\n"
+" <container-configuration extends=\"Standard Stateless SessionBean"
+"\">\n"
+" <container-name>Secured Stateless SessionBean</"
+"container-name>\n"
+" <!-- Override the container security domain -->\n"
+" <security-domain>java:/jaas/my-security-domain</"
+"security-domain>\n"
+" </container-configuration>\n"
+" </container-configurations>\n"
+"</jboss>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:574
+#, no-c-format
+msgid ""
+"If an EJB does not provide a container configuration specification in the "
+"deployment unit EJB JAR, the container factory chooses a container "
+"configuration from the <literal>standardjboss.xml</literal> descriptor based "
+"on the type of the EJB. So, in reality there is an implicit "
+"<literal>configuration-name</literal> element for every type of EJB, and the "
+"mappings from the EJB type to default container configuration name are as "
+"follows:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:579
+#, no-c-format
+msgid ""
+"container-managed persistence entity version 2.0 = Standard CMP 2.x "
+"EntityBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:584
+#, no-c-format
+msgid ""
+"container-managed persistence entity version 1.1 = Standard CMP EntityBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:589
+#, no-c-format
+msgid "bean-managed persistence entity = Standard BMP EntityBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:594
+#, no-c-format
+msgid "stateless session = Standard Stateless SessionBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:599
+#, no-c-format
+msgid "stateful session = Standard Stateful SessionBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:604
+#, no-c-format
+msgid "message driven = Standard Message Driven Bean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:609
+#, no-c-format
+msgid ""
+"It is not necessary to indicate which container configuration an EJB is "
+"using if you want to use the default based on the bean type. It probably "
+"provides for a more self-contained descriptor to include the "
+"<literal>configuration-name</literal> element, but this is purely a matter "
+"of style."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:612
+#, no-c-format
+msgid ""
+"Now that you know how to specify which container configuration an EJB is "
+"using and can define a deployment unit level override, we now will look at "
+"the <literal>container-configuration</literal> child elements in the "
+"following sections. A number of the elements specify interface class "
+"implementations whose configuration is affected by other elements, so before "
+"starting in on the configuration elements you need to understand the "
+"<literal>org.jboss.metadata.XmlLoadable</literal> interface."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:615
+#, no-c-format
+msgid ""
+"The <literal>XmlLoadable</literal> interface is a simple interface that "
+"consists of a single method. The interface definition is:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:618
+#, no-c-format
+msgid ""
+"import org.w3c.dom.Element;\n"
+"public interface XmlLoadable\n"
+"{\n"
+" public void importXml(Element element) throws Exception;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:619
+#, no-c-format
+msgid ""
+"Classes implement this interface to allow their configuration to be "
+"specified via an XML document fragment. The root element of the document "
+"fragment is what would be passed to the <literal>importXml</literal> method. "
+"You will see a few examples of this as the container configuration elements "
+"are described in the following sections."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:623
+#, fuzzy, no-c-format
+msgid "The container-name element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:624
+#, no-c-format
+msgid ""
+"The <literal>container-name</literal> element specifies a unique name for a "
+"given configuration. EJBs link to a particular container configuration by "
+"setting their <literal>configuration-name</literal> element to the value of "
+"the <literal>container-name</literal> for the container configuration."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:630
+#, fuzzy, no-c-format
+msgid "The call-logging element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:631
+#, no-c-format
+msgid ""
+"The <literal>call-logging</literal> element expects a boolean (true or "
+"false) as its value to indicate whether or not the <literal>LogInterceptor</"
+"literal> should log method calls to a container. This is somewhat obsolete "
+"with the change to log4j, which provides a fine-grained logging API."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:637
+#, no-c-format
+msgid "The invoker-proxy-binding-name element"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:638
+#, no-c-format
+msgid ""
+"The <literal>invoker-proxy-binding-name</literal> element specifies the name "
+"of the default invoker to use. In the absence of a bean level "
+"<literal>invoker-bindings</literal> specification, the <literal>invoker-"
+"proxy-binding</literal> whose name matches the <literal>invoker-proxy-"
+"binding-name</literal> element value will be used to create home and remote "
+"proxies."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:644
+#, fuzzy, no-c-format
+msgid "The sync-on-commit-only element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:645
+#, no-c-format
+msgid ""
+"This configures a performance optimization that will cause entity bean state "
+"to be synchronized with the database only at commit time. Normally the state "
+"of all the beans in a transaction would need to be synchronized when an "
+"finder method is called or when an remove method is called, for example."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:651
+#, no-c-format
+msgid "insert-after-ejb-post-create"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:652
+#, no-c-format
+msgid ""
+"This is another entity bean optimization which cause the database insert "
+"command for a new entity bean to be delayed until the "
+"<literal>ejbPostCreate</literal> method is called. This allows normal CMP "
+"fields as well as CMR fields to be set in a single insert, instead of the "
+"default insert followed by an update, which allows removes the requirement "
+"for relation ship fields to allow null values."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:658
+#, no-c-format
+msgid "call-ejb-store-on-clean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:659
+#, no-c-format
+msgid ""
+"By the specification the container is required to call <literal>ejbStore</"
+"literal> method on an entity bean instance when transaction commits even if "
+"the instance was not modified in the transaction. Setting this to false will "
+"cause JBoss to only call <literal>ejbStore</literal> for dirty objects."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:665
+#, fuzzy, no-c-format
+msgid "The container-interceptors Element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:666
+#, no-c-format
+msgid ""
+"The <literal>container-interceptors</literal> element specifies one or more "
+"interceptor elements that are to be configured as the method interceptor "
+"chain for the container. The value of the interceptor element is a fully "
+"qualified class name of an <literal>org.jboss.ejb.Interceptor</literal> "
+"interface implementation. The container interceptors form a <literal>linked-"
+"list</literal> structure through which EJB method invocations pass. The "
+"first interceptor in the chain is invoked when the <literal>MBeanServer</"
+"literal> passes a method invocation to the container. The last interceptor "
+"invokes the business method on the bean. We will discuss the "
+"<literal>Interceptor</literal> interface latter in this chapter when we talk "
+"about the container plugin framework. Generally, care must be taken when "
+"changing an existing standard EJB interceptor configuration as the EJB "
+"contract regarding security, transactions, persistence, and thread safety "
+"derive from the interceptors."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:672
+#, fuzzy, no-c-format
+msgid "The instance-pool element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:673
+#, no-c-format
+msgid ""
+"The <literal>instance-pool</literal> element specifies the fully qualified "
+"class name of an <literal>org.jboss.ejb.InstancePool</literal> interface "
+"implementation to use as the container <literal>InstancePool</literal>. We "
+"will discuss the InstancePool interface in detail latter in this chapter "
+"when we talk about the container plugin framework."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:679
+#, fuzzy, no-c-format
+msgid "The container-pool-conf element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:680
+#, no-c-format
+msgid ""
+"The <literal>container-pool-conf</literal> is passed to the "
+"<literal>InstancePool</literal> implementation class given by the "
+"<literal>instance-pool</literal> element if it implements the "
+"<literal>XmlLoadable</literal> interface. All current JBoss "
+"<literal>InstancePool</literal> implementations derive from the <literal>org."
+"jboss.ejb.plugins.AbstractInstancePool</literal> class which provides "
+"support for elements shown in <xref linkend="
+"\"The_container_pool_conf_element-The_container_pool_conf_element_DTD\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:684
+#, fuzzy, no-c-format
+msgid "The container-pool-conf element DTD"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:693
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MinimumSize</emphasis>: The <literal>MinimumSize</"
+"literal> element gives the minimum number of instances to keep in the pool, "
+"although JBoss does not currently seed an <literal>InstancePool</literal> to "
+"the <literal>MinimumSize</literal> value."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:698
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaximumSize</emphasis>: The <literal>MaximumSize</"
+"literal> specifies the maximum number of pool instances that are allowed. "
+"The default use of <literal>MaximumSize</literal> may not be what you "
+"expect. The pool <literal>MaximumSize</literal> is the maximum number of EJB "
+"instances that are kept available, but additional instances can be created "
+"if the number of concurrent requests exceeds the <literal>MaximumSize</"
+"literal> value."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:703
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">strictMaximumSize</emphasis>: If you want to limit "
+"the maximum concurrency of an EJB to the pool <literal>MaximumSize</"
+"literal>, you need to set the <literal>strictMaximumSize</literal> element "
+"to true. When <literal>strictMaximumSize</literal> is true, only "
+"<literal>MaximumSize</literal> EJB instances may be active. When there are "
+"<literal>MaximumSize</literal> active instances, any subsequent requests "
+"will be blocked until an instance is freed back to the pool. The default "
+"value for <literal>strictMaximumSize</literal> is false."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:708
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">strictTimeout</emphasis>: How long a request blocks "
+"waiting for an instance pool object is controlled by the "
+"<literal>strictTimeout</literal> element. The <literal>strictTimeout</"
+"literal> defines the time in milliseconds to wait for an instance to be "
+"returned to the pool when there are <literal>MaximumSize</literal> active "
+"instances. A value less than or equal to 0 will mean not to wait at all. "
+"When a request times out waiting for an instance a <literal>java.rmi."
+"ServerException</literal> is generated and the call aborted. This is parsed "
+"as a <literal>Long</literal> so the maximum possible wait time is "
+"9,223,372,036,854,775,807 or about 292,471,208 years, and this is the "
+"default value."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:716
+#, fuzzy, no-c-format
+msgid "The instance-cache element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:717
+#, no-c-format
+msgid ""
+"The <literal>instance-cache</literal> element specifies the fully qualified "
+"class name of the <literal>org.jboss.ejb.InstanceCache</literal> interface "
+"implementation. This element is only meaningful for entity and stateful "
+"session beans as these are the only EJB types that have an associated "
+"identity. We will discuss the <literal>InstanceCache</literal> interface in "
+"detail latter in this chapter when we talk about the container plugin "
+"framework."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:723
+#, fuzzy, no-c-format
+msgid "The container-cache-conf element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:724
+#, no-c-format
+msgid ""
+"The <literal>container-cache-conf</literal> element is passed to the "
+"<literal>InstanceCache</literal> implementation if it supports the "
+"<literal>XmlLoadable</literal> interface. All current JBoss "
+"<literal>InstanceCache</literal> implementations derive from the "
+"<literal>org.jboss.ejb.plugins.AbstractInstanceCache</literal> class which "
+"provides support for the <literal>XmlLoadable</literal> interface and uses "
+"the <literal>cache-policy</literal> child element as the fully qualified "
+"class name of an <literal>org.jboss.util.CachePolicy</literal> "
+"implementation that is used as the instance cache store. The <literal>cache-"
+"policy-conf</literal> child element is passed to the <literal>CachePolicy</"
+"literal> implementation if it supports the <literal>XmlLoadable</literal> "
+"interface. If it does not, the <literal>cache-policy-conf</literal> will "
+"silently be ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:727
+#, no-c-format
+msgid ""
+"There are two JBoss implementations of CachePolicy used by the "
+"<literal>standardjboss.xml</literal> configuration that support the current "
+"array of <literal>cache-policy-conf</literal> child elements. The classes "
+"are <literal>org.jboss.ejb.plugins.LRUEnterpriseContextCachePolicy</literal> "
+"and <literal>org.jboss.ejb.plugins.LRUStatefulContextCachePolicy</literal>. "
+"The <literal>LRUEnterpriseContextCachePolicy</literal> is used by entity "
+"bean containers while the <literal>LRUStatefulContextCachePolicy</literal> "
+"is used by stateful session bean containers. Both cache policies support the "
+"following <literal>cache-policy-conf</literal> child elements, shown in "
+"<xref linkend=\"The_container_cache_conf_element-"
+"The_container_cache_conf_element_DTD\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:731
+#, fuzzy, no-c-format
+msgid "The container-cache-conf element DTD"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:740
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min-capacity</emphasis>: specifies the minimum "
+"capacity of this cache"
+msgstr ""
+"<emphasis role=\"bold\">ip_ttl</emphasis> 指定了多点传送数据包(packet)的 "
+"TTL。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:745
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max-capacity</emphasis>: specifies the maximum "
+"capacity of the cache, which cannot be less than <literal>min-capacity</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_port</emphasis> 指定多点传送端口号码。它的缺省"
+"值是 <literal>45566</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:750
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">overager-period</emphasis>: specifies the period in "
+"seconds between runs of the overager task. The purpose of the overager task "
+"is to see if the cache contains beans with an age greater than the "
+"<literal>max-bean-age</literal> element value. Any beans meeting this "
+"criterion will be passivated."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:755
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max-bean-age</emphasis>: specifies the maximum "
+"period of inactivity in seconds a bean can have before it will be passivated "
+"by the overager process."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定对 are-you-alive 信息的应答的"
+"最长等待时间(毫秒数)。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:760
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">resizer-period</emphasis>: specifies the period in "
+"seconds between runs of the resizer task. The purpose of the resizer task is "
+"to contract or expand the cache capacity based on the remaining three "
+"element values in the following way. When the resizer task executes it "
+"checks the current period between cache misses, and if the period is less "
+"than the <literal>min-cache-miss-period</literal> value the cache is "
+"expanded up to the <literal>max-capacity</literal> value using the "
+"<literal>cache-load-factor</literal>. If instead the period between cache "
+"misses is greater than the <literal>max-cache-miss-period</literal> value "
+"the cache is contracted using the <literal>cache-load-factor</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:765
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max-cache-miss-period</emphasis>: specifies the time "
+"period in seconds in which a cache miss should signal that the cache "
+"capacity be contracted. It is equivalent to the minimum miss rate that will "
+"be tolerated before the cache is contracted."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:770
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">min-cache-miss-period</emphasis>: specifies the time "
+"period in seconds in which a cache miss should signal that the cache "
+"capacity be expanded. It is equivalent to the maximum miss rate that will be "
+"tolerated before the cache is expanded."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:775
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">cache-load-factor</emphasis>: specifies the factor "
+"by which the cache capacity is contracted and expanded. The factor should be "
+"less than 1. When the cache is contracted the capacity is reduced so that "
+"the current ratio of beans to cache capacity is equal to the cache-load-"
+"factor value. When the cache is expanded the new capacity is determined as "
+"<literal>current-capacity * 1/cache-load-factor</literal>. The actual "
+"expansion factor may be as high as 2 based on an internal algorithm based on "
+"the number of cache misses. The higher the cache miss rate the closer the "
+"true expansion factor will be to 2."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:780
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>LRUStatefulContextCachePolicy</literal> also supports the "
+"remaining child elements:"
+msgstr "<literal>run</literal> 脚本支持下列选项:"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:785
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">remover-period</emphasis>: specifies the period in "
+"seconds between runs of the remover task. The remover task removes "
+"passivated beans that have not been accessed in more than <literal>max-bean-"
+"life</literal> seconds. This task prevents stateful session beans that were "
+"not removed by users from filling up the passivation store."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:790
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">max-bean-life</emphasis>: specifies the maximum "
+"period in seconds that a bean can exist inactive. After this period, as a "
+"result, the bean will be removed from the passivation store."
+msgstr ""
+"<emphasis role=\"bold\">timeout</emphasis> 指定对 are-you-alive 信息的应答的"
+"最长等待时间(毫秒数)。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:795
+#, no-c-format
+msgid ""
+"An alternative cache policy implementation is the <literal>org.jboss.ejb."
+"plugins.NoPassivationCachePolicy</literal> class, which simply never "
+"passivates instances. It uses an in-memory <literal>HashMap</literal> "
+"implementation that never discards instances unless they are explicitly "
+"removed. This class does not support any of the <literal>cache-policy-conf</"
+"literal> configuration elements."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:801
+#, fuzzy, no-c-format
+msgid "The persistence-manager element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:802
+#, no-c-format
+msgid ""
+"The <literal>persistence-manager</literal> element value specifies the fully "
+"qualified class name of the persistence manager implementation. The type of "
+"the implementation depends on the type of EJB. For stateful session beans it "
+"must be an implementation of the <literal>org.jboss.ejb."
+"StatefulSessionPersistenceManager</literal> interface. For BMP entity beans "
+"it must be an implementation of the <literal>org.jboss.ejb."
+"EntityPersistenceManager</literal> interface, while for CMP entity beans it "
+"must be an implementation of the <literal>org.jboss.ejb."
+"EntityPersistenceStore</literal> interface."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:808
+#, fuzzy, no-c-format
+msgid "The web-class-loader Element"
+msgstr "Valve 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:809
+#, no-c-format
+msgid ""
+"The <literal>web-class-loader</literal> element specifies a subclass of "
+"<literal>org.jboss.web.WebClassLoader</literal> that is used in conjunction "
+"with the <literal>WebService</literal> MBean to allow dynamic loading of "
+"resources and classes from deployed ears, EJB JARs and WARs. A "
+"<literal>WebClassLoader</literal> is associated with a <literal>Container</"
+"literal> and must have an <literal>org.jboss.mx.loading.UnifiedClassLoader</"
+"literal> as its parent. It overrides the <literal>getURLs()</literal> method "
+"to return a different set of URLs for remote loading than what is used for "
+"local loading."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:812
+#, no-c-format
+msgid ""
+"<literal>WebClaossLoader</literal> has two methods meant to be overridden by "
+"subclasses: <literal>getKey()</literal> and <literal>getBytes()</literal>. "
+"The latter is a no-op in this implementation and should be overridden by "
+"subclasses with bytecode generation ability, such as the classloader used by "
+"the iiop module."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:815
+#, no-c-format
+msgid ""
+"<literal>WebClassLoader</literal> subclasses must have a constructor with "
+"the same signature as the <literal>WebClassLoader(ObjectName containerName, "
+"UnifiedClassLoader parent)</literal> constructor."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:821
+#, fuzzy, no-c-format
+msgid "The locking-policy element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:822
+#, no-c-format
+msgid ""
+"The <literal>locking-policy</literal> element gives the fully qualified "
+"class name of the EJB lock implementation to use. This class must implement "
+"the <literal>org.jboss.ejb.BeanLock</literal> interface. The current JBoss "
+"versions include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:827
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.plugins.lock.QueuedPessimisticEJBLock</"
+"emphasis>: an implementation that holds threads awaiting the transactional "
+"lock to be freed in a fair FIFO queue. Non-transactional threads are also "
+"put into this wait queue as well. This class pops the next waiting "
+"transaction from the queue and notifies only those threads waiting "
+"associated with that transaction. The <literal>QueuedPessimisticEJBLock</"
+"literal> is the current default used by the standard configurations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:832
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.plugins.lock."
+"QueuedPessimisticEJBLockNoADE</emphasis>: This behaves the same as the "
+"<literal>QueuedPessimisticEJBLock</literal> except that deadlock detection "
+"is disabled."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:837
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.plugins.lock.SimpleReadWriteEJBLock</"
+"emphasis>: This lock allows multiple read locks concurrently. Once a writer "
+"has requested the lock, future read-lock requests whose transactions do not "
+"already have the read lock will block until all writers are done; then all "
+"the waiting readers will concurrently go (depending on the reentrant "
+"setting / methodLock). A reader who promotes gets first crack at the write "
+"lock, ahead of other waiting writers. If there is already a reader that is "
+"promoting, we throw an inconsistent read exception. Of course, writers have "
+"to wait for all read-locks to release before taking the write lock."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:842
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.plugins.lock.NoLock</emphasis>: an "
+"anti-locking policy used with the instance per transaction container "
+"configurations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:847
+#, no-c-format
+msgid ""
+"Locking and deadlock detection will be discussed in more detail in <xref "
+"linkend=\"EJBs_on_JBoss-Entity_Bean_Locking_and_Deadlock_Detection\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:853
+#, no-c-format
+msgid "The commit-option and optiond-refresh-rate elements"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:854
+#, fuzzy, no-c-format
+msgid ""
+"The commit-option value specifies the EJB entity bean persistent storage "
+"commit option. It must be one of <literal>A</literal>, <literal>B</literal>, "
+"<literal>C</literal> or <literal>D</literal>."
+msgstr ""
+"<literal>ServiceController</literal> MBean有四个用于服务生命周期管理的关键方"
+"法:<literal>create</literal>,<literal>start</literal>,<literal>stop</"
+"literal> 和 <literal>destroy</literal>。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:859
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">A</emphasis>: the container caches the beans state "
+"between transactions. This option assumes that the container is the only "
+"user accessing the persistent store. This assumption allows the container to "
+"synchronize the in-memory state from the persistent storage only when "
+"absolutely necessary. This occurs before the first business method executes "
+"on a found bean or after the bean is passivated and reactivated to serve "
+"another business method. This behavior is independent of whether the "
+"business method executes inside a transaction context."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:864
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">B</emphasis>: the container caches the bean state "
+"between transactions. However, unlike option <literal>A</literal> the "
+"container does not assume exclusive access to the persistent store. "
+"Therefore, the container will synchronize the in-memory state at the "
+"beginning of each transaction. Thus, business methods executing in a "
+"transaction context don't see much benefit from the container caching "
+"the bean, whereas business methods executing outside a transaction context "
+"(transaction attributes Never, NotSupported or Supports) access the cached "
+"(and potentially invalid) state of the bean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:869
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">C</emphasis>: the container does not cache bean "
+"instances. The in-memory state must be synchronized on every transaction "
+"start. For business methods executing outside a transaction the "
+"synchronization is still performed, but the <literal>ejbLoad</literal> "
+"executes in the same transaction context as that of the caller."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:874
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">D</emphasis>: is a JBoss-specific commit option "
+"which is not described in the EJB specification. It is a lazy read scheme "
+"where bean state is cached between transactions as with option <literal>A</"
+"literal>, but the state is periodically resynchronized with that of the "
+"persistent store. The default time between reloads is 30 seconds, but may "
+"configured using the <literal>optiond-refresh-rate</literal> element."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:882
+#, fuzzy, no-c-format
+msgid "The security-domain element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:883
+#, no-c-format
+msgid ""
+"The <literal>security-domain</literal> element specifies the JNDI name of "
+"the object that implements the <literal>org.jboss.security."
+"AuthenticationManager</literal> and <literal>org.jboss.security."
+"RealmMapping</literal> interfaces. It is more typical to specify the "
+"<literal>security-domain</literal> under the <literal>jboss</literal> root "
+"element so that all EJBs in a given deployment are secured in the same "
+"manner. However, it is possible to configure the security domain for each "
+"bean configuration. The details of the security manager interfaces and "
+"configuring the security layer are discussed in <xref linkend="
+"\"Security_on_JBoss\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:889
+#, fuzzy, no-c-format
+msgid "cluster-config"
+msgstr "群集"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:890
+#, no-c-format
+msgid ""
+"The <literal>cluster-config</literal> element allows to specify cluster "
+"specific settings for all EJBs that use the container configuration. "
+"Specification of the cluster configuration may be done at the container "
+"configuration level or at the individual EJB deployment level."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:894
+#, no-c-format
+msgid "The cluster-config and related elements"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:903
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">partition-name</emphasis>: The <literal>partition-"
+"name</literal> element indicates where to find the <literal>org.jboss.ha."
+"framework.interfaces.HAPartition</literal> interface to be used by the "
+"container to exchange clustering information. This is not the full JNDI name "
+"under which <literal>HAPartition</literal> is bound. Rather, it should "
+"correspond to the <literal>PartitionName</literal> attribute of the "
+"<literal>ClusterPartitionMBean</literal> service that is managing the "
+"desired cluster. The actual JNDI name of the <literal>HAPartition</literal> "
+"binding will be formed by appending <literal>/HASessionState/</literal> to "
+"the partition-name value. The default value is <literal>DefaultPartition</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:908
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">home-load-balance-policy</emphasis>: The "
+"<literal>home-load-balance-policy</literal> element indicates the Java class "
+"name to be used to load balance calls made on the home proxy. The class must "
+"implement the <literal>org.jboss.ha.framework.interface.LoadBalancePolicy</"
+"literal> interface. The default policy is <literal>org.jboss.ha.framework."
+"interfaces.RoundRobin</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:913
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">bean-load-balance-policy</emphasis>: The "
+"<literal>bean-load-balance-policy</literal> element indicates the java class "
+"name to be used to load balance calls in the bean proxy. The class must "
+"implement the <literal>org.jboss.ha.framework.interface.LoadBalancePolicy</"
+"literal> interface. For entity beans and stateful session beans, the default "
+"is <literal>org.jboss.ha.framework.interfaces.FirstAvailavble</literal>. For "
+"stateless session beans, <literal>org.jboss.ha.framework.interfaces."
+"RoundRobin</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:918
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">session-state-manager-jndi-name</emphasis>: The "
+"<literal>session-state-manager-jndi-name</literal> element indicates the "
+"name of the <literal>org.jboss.ha.framework.interfaces.HASessionState</"
+"literal> to be used by the container as a backend for state session "
+"management in the cluster. Unlike the partition-name element, this is a JNDI "
+"name under which the <literal>HASessionState</literal> implementation is "
+"bound. The default location used is <literal>/HASessionState/Default</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:926
+#, fuzzy, no-c-format
+msgid "The depends element"
+msgstr "Host 元素"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:927
+#, no-c-format
+msgid ""
+"The <literal>depends</literal> element gives a JMX <literal>ObjectName</"
+"literal> of a service on which the container or EJB depends. Specification "
+"of explicit dependencies on other services avoids having to rely on the "
+"deployment order being after the required services are started."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:937
+#, no-c-format
+msgid "Container Plug-in Framework"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:938
+#, no-c-format
+msgid ""
+"The JBoss EJB container uses a framework pattern that allows one to change "
+"implementations of various aspects of the container behavior. The container "
+"itself does not perform any significant work other than connecting the "
+"various behavioral components together. Implementations of the behavioral "
+"components are referred to as plugins, because you can plug in a new "
+"implementation by changing a container configuration. Examples of plug-in "
+"behavior you may want to change include persistence management, object "
+"pooling, object caching, container invokers and interceptors. There are four "
+"subclasses of the <literal>org.jboss.ejb.Container</literal> class, each one "
+"implementing a particular bean type:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:943
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.EntityContainer</emphasis>: handles "
+"<literal>javax.ejb.EntityBean</literal> types"
+msgstr ""
+"<emphasis role=\"bold\">file:/var/opt/myapp.ear</emphasis>从本地位置部署"
+"<literal>myapp.ear</literal>"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:948
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.StatelessSessionContainer</emphasis>: "
+"handles Stateless <literal>javax.ejb.SessionBean</literal> types"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:953
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.StatefulSessionContainer</emphasis>: "
+"handles Stateful <literal>javax.ejb.SessionBean</literal> types"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:958
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">org.jboss.ejb.MessageDrivenContainer</emphasis> "
+"handles <literal>javax.ejb.MessageDrivenBean</literal> types"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:963
+#, no-c-format
+msgid ""
+"The EJB containers delegate much of their behavior to components known as "
+"container plug-ins. The interfaces that make up the container plugin points "
+"include the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:968
+#, no-c-format
+msgid "<para>org.jboss.ejb.ContainerPlugin</para>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:973
+#, no-c-format
+msgid "org.jboss.ejb.ContainerInvoker"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:978
+#, no-c-format
+msgid "<para>org.jboss.ejb.Interceptor</para>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:983
+#, no-c-format
+msgid "<para>org.jboss.ejb.InstancePool</para>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:988
+#, no-c-format
+msgid "org.jboss.ejb.InstanceCache"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:993
+#, fuzzy, no-c-format
+msgid "org.jboss.ejb.EntityPersistanceManager"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:998
+#, fuzzy, no-c-format
+msgid "org.jboss.ejb.EntityPersistanceStore"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1003
+#, no-c-format
+msgid "<para>org.jboss.ejb.StatefulSessionPersistenceManager</para>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1008
+#, no-c-format
+msgid ""
+"The container's main responsibility is to manage its plug-ins. This "
+"means ensuring that the plug-ins have all the information they need to "
+"implement their functionality."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1012
+#, no-c-format
+msgid "<title>org.jboss.ejb.ContainerPlugin</title>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1013
+#, no-c-format
+msgid ""
+"The <literal>ContainerPlugin</literal> interface is the parent interface of "
+"all container plug-in interfaces. It provides a callback that allows a "
+"container to provide each of its plug-ins a pointer to the container the "
+"plug-in is working on behalf of. The <literal>ContainerPlugin</literal> "
+"interface is given below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1016
+#, fuzzy, no-c-format
+msgid "The org.jboss.ejb.ContainerPlugin interface"
+msgstr "The org.jboss.naming.NamingContextFactory"
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1017
+#, no-c-format
+msgid ""
+"public interface ContainerPlugin\n"
+" extends Service, AllowedOperationsFlags\n"
+"{\n"
+" /** co\n"
+" * This callback is set by the container so that the plugin\n"
+" * may access its container\n"
+" *\n"
+" * @param con the container which owns the plugin\n"
+" */\n"
+" public void setContainer(Container con);\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1022
+#, no-c-format
+msgid "<title>org.jboss.ejb.Interceptor</title>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1023
+#, no-c-format
+msgid ""
+"The <literal>Interceptor</literal> interface enables one to build a chain of "
+"method interceptors through which each EJB method invocation must pass. The "
+"<literal>Interceptor</literal> interface is given below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1026
+#, fuzzy, no-c-format
+msgid "The org.jboss.ejb.Interceptor interface"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1027
+#, no-c-format
+msgid ""
+"import org.jboss.invocation.Invocation;\n"
+" \n"
+"public interface Interceptor \n"
+" extends ContainerPlugin\n"
+"{\n"
+" public void setNext(Interceptor interceptor);\n"
+" public Interceptor getNext();\n"
+" public Object invokeHome(Invocation mi) throws Exception;\n"
+" public Object invoke(Invocation mi) throws Exception;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1028
+#, no-c-format
+msgid ""
+"All interceptors defined in the container configuration are created and "
+"added to the container interceptor chain by the <literal>EJBDeployer</"
+"literal>. The last interceptor is not added by the deployer but rather by "
+"the container itself because this is the interceptor that interacts with the "
+"EJB bean implementation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1031
+#, no-c-format
+msgid ""
+"The order of the interceptor in the chain is important. The idea behind "
+"ordering is that interceptors that are not tied to a particular "
+"<literal>EnterpriseContext</literal> instance are positioned before "
+"interceptors that interact with caches and pools."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1034
+#, no-c-format
+msgid ""
+"Implementers of the <literal>Interceptor</literal> interface form a linked-"
+"list like structure through which the <literal>Invocation</literal> object "
+"is passed. The first interceptor in the chain is invoked when an invoker "
+"passes a <literal>Invocation</literal> to the container via the JMX bus. The "
+"last interceptor invokes the business method on the bean. There are usually "
+"on the order of five interceptors in a chain depending on the bean type and "
+"container configuration. <literal>Interceptor</literal> semantic complexity "
+"ranges from simple to complex. An example of a simple interceptor would be "
+"<literal>LoggingInterceptor</literal>, while a complex example is "
+"<literal>EntitySynchronizationInterceptor</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1037
+#, no-c-format
+msgid ""
+"One of the main advantages of an interceptor pattern is flexibility in the "
+"arrangement of interceptors. Another advantage is the clear functional "
+"distinction between different interceptors. For example, logic for "
+"transaction and security is cleanly separated between the "
+"<literal>TXInterceptor</literal> and <literal>SecurityInterceptor</literal> "
+"respectively."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1040
+#, no-c-format
+msgid ""
+"If any of the interceptors fail, the call is terminated at that point. This "
+"is a fail-quickly type of semantic. For example, if a secured EJB is "
+"accessed without proper permissions, the call will fail as the "
+"<literal>SecurityInterceptor</literal> before any transactions are started "
+"or instances caches are updated."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1046
+#, no-c-format
+msgid "<title>org.jboss.ejb.InstancePool</title>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1047
+#, no-c-format
+msgid ""
+"An <literal>InstancePool</literal> is used to manage the EJB instances that "
+"are not associated with any identity. The pools actually manage subclasses "
+"of the <literal>org.jboss.ejb.EnterpriseContext</literal> objects that "
+"aggregate unassociated bean instances and related data."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1050
+#, no-c-format
+msgid "The org.jboss.ejb.InstancePool interface"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1051
+#, no-c-format
+msgid ""
+"public interface InstancePool\n"
+" extends ContainerPlugin\n"
+"{\n"
+" /** \n"
+" * Get an instance without identity. Can be used\n"
+" * by finders and create-methods, or stateless beans\n"
+" *\n"
+" * @return Context /w instance\n"
+" * @exception RemoteException\n"
+" */\n"
+" public EnterpriseContext get() throws Exception;\n"
+" \n"
+" /** Return an anonymous instance after invocation.\n"
+" *\n"
+" * @param ctx\n"
+" */\n"
+" public void free(EnterpriseContext ctx);\n"
+" \n"
+" /**\n"
+" * Discard an anonymous instance after invocation.\n"
+" * This is called if the instance should not be reused,\n"
+" * perhaps due to some exception being thrown from it.\n"
+" *\n"
+" * @param ctx\n"
+" */\n"
+" public void discard(EnterpriseContext ctx);\n"
+" \n"
+" /**\n"
+" * Return the size of the pool.\n"
+" *\n"
+" * @return the size of the pool.\n"
+" */\n"
+" public int getCurrentSize();\n"
+" \n"
+" /**\n"
+" * Get the maximum size of the pool.\n"
+" *\n"
+" * @return the size of the pool.\n"
+" */\n"
+" public int getMaxSize();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1052
+#, no-c-format
+msgid ""
+"Depending on the configuration, a container may choose to have a certain "
+"size of the pool contain recycled instances, or it may choose to instantiate "
+"and initialize an instance on demand."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1055
+#, no-c-format
+msgid ""
+"The pool is used by the <literal>InstanceCache</literal> implementation to "
+"acquire free instances for activation, and it is used by interceptors to "
+"acquire instances to be used for Home interface methods (create and finder "
+"calls)."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1061
+#, no-c-format
+msgid "org.jboss.ebj.InstanceCache"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1062
+#, no-c-format
+msgid ""
+"The container <literal>InstanceCache</literal> implementation handles all "
+"EJB-instances that are in an active state, meaning bean instances that have "
+"an identity attached to them. Only entity and stateful session beans are "
+"cached, as these are the only bean types that have state between method "
+"invocations. The cache key of an entity bean is the bean primary key. The "
+"cache key for a stateful session bean is the session id."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1065
+#, no-c-format
+msgid "The org.jboss.ejb.InstanceCache interface"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1066
+#, no-c-format
+msgid ""
+"public interface InstanceCache \n"
+" extends ContainerPlugin\n"
+"{\n"
+" /**\n"
+" * Gets a bean instance from this cache given the identity.\n"
+" * This method may involve activation if the instance is not\n"
+" * in the cache.\n"
+" * Implementation should have O(1) complexity.\n"
+" * This method is never called for stateless session beans.\n"
+" *\n"
+" * @param id the primary key of the bean\n"
+" * @return the EnterpriseContext related to the given id\n"
+" * @exception RemoteException in case of illegal calls\n"
+" * (concurrent / reentrant), NoSuchObjectException if\n"
+" * the bean cannot be found.\n"
+" * @see #release\n"
+" */\n"
+" public EnterpriseContext get(Object id)\n"
+" throws RemoteException, NoSuchObjectException;\n"
+" \n"
+" /**\n"
+" * Inserts an active bean instance after creation or activation.\n"
+" * Implementation should guarantee proper locking and O(1) complexity.\n"
+" *\n"
+" * @param ctx the EnterpriseContext to insert in the cache\n"
+" * @see #remove\n"
+" */\n"
+" public void insert(EnterpriseContext ctx);\n"
+" \n"
+" /**\n"
+" * Releases the given bean instance from this cache.\n"
+" * This method may passivate the bean to get it out of the cache.\n"
+" * Implementation should return almost immediately leaving the\n"
+" * passivation to be executed by another thread.\n"
+" *\n"
+" * @param ctx the EnterpriseContext to release\n"
+" * @see #get\n"
+" */\n"
+" public void release(EnterpriseContext ctx);\n"
+" \n"
+" /**\n"
+" * Removes a bean instance from this cache given the identity.\n"
+" * Implementation should have O(1) complexity and guarantee\n"
+" * proper locking.\n"
+" *\n"
+" * @param id the primary key of the bean\n"
+" * @see #insert\n"
+" */\n"
+" public void remove(Object id);\n"
+" \n"
+" /**\n"
+" * Checks whether an instance corresponding to a particular\n"
+" * id is active\n"
+" *\n"
+" * @param id the primary key of the bean\n"
+" * @see #insert\n"
+" */\n"
+" public boolean isActive(Object id); \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1067
+#, no-c-format
+msgid ""
+"In addition to managing the list of active instances, the "
+"<literal>InstanceCache</literal> is also responsible for activating and "
+"passivating instances. If an instance with a given identity is requested, "
+"and it is not currently active, the <literal>InstanceCache</literal> must "
+"use the <literal>InstancePool</literal> to acquire a free instance, followed "
+"by the persistence manager to activate the instance. Similarly, if the "
+"<literal>InstanceCache</literal> decides to passivate an active instance, it "
+"must call the persistence manager to passivate it and release the instance "
+"to the <literal>InstancePool</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1073
+#, fuzzy, no-c-format
+msgid "org.jboss.ejb.EntityPersistenceManager"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1074
+#, no-c-format
+msgid ""
+"The <literal>EntityPersistenceManager</literal> is responsible for the "
+"persistence of EntityBeans. This includes the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1079
+#, no-c-format
+msgid "Creating an EJB instance in a storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1084
+#, no-c-format
+msgid "Loading the state of a given primary key into an EJB instance"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1089
+#, no-c-format
+msgid "Storing the state of a given EJB instance"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1094
+#, no-c-format
+msgid "Removing an EJB instance from storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1099
+#, no-c-format
+msgid "Activating the state of an EJB instance"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1104
+#, no-c-format
+msgid "Passivating the state of an EJB instance"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1109
+#, fuzzy, no-c-format
+msgid "The org.jboss.ejb.EntityPersistenceManager interface"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1110
+#, no-c-format
+msgid ""
+"public interface EntityPersistenceManager \n"
+" extends ContainerPlugin\n"
+"{\n"
+" /**\n"
+" * Returns a new instance of the bean class or a subclass of the\n"
+" * bean class.\n"
+" *\n"
+" * @return the new instance\n"
+" */\n"
+" Object createBeanClassInstance() throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity is to be created. The\n"
+" * persistence manager is responsible for calling the ejbCreate method\n"
+" * on the instance and to handle the results properly wrt the "
+"persistent\n"
+" * store.\n"
+" *\n"
+" * @param m the create method in the home interface that was\n"
+" * called\n"
+" * @param args any create parameters\n"
+" * @param instance the instance being used for this create call\n"
+" */\n"
+" void createEntity(Method m,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity is to be created. The\n"
+" * persistence manager is responsible for calling the ejbPostCreate "
+"method\n"
+" * on the instance and to handle the results properly wrt the "
+"persistent\n"
+" * store.\n"
+" *\n"
+" * @param m the create method in the home interface that was\n"
+" * called\n"
+" * @param args any create parameters\n"
+" * @param instance the instance being used for this create call\n"
+" */\n"
+" void postCreateEntity(Method m,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when single entities are to be found. The\n"
+" * persistence manager must find out whether the wanted instance is\n"
+" * available in the persistence store, and if so it shall use the\n"
+" * ContainerInvoker plugin to create an EJBObject to the instance, "
+"which\n"
+" * is to be returned as result.\n"
+" *\n"
+" * @param finderMethod the find method in the home interface that was\n"
+" * called\n"
+" * @param args any finder parameters\n"
+" * @param instance the instance to use for the finder call\n"
+" * @return an EJBObject representing the found entity\n"
+" */\n"
+" Object findEntity(Method finderMethod,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when collections of entities are to be\n"
+" * found. The persistence manager must find out whether the wanted\n"
+" * instances are available in the persistence store, and if so it\n"
+" * shall use the ContainerInvoker plugin to create EJBObjects to\n"
+" * the instances, which are to be returned as result.\n"
+" *\n"
+" * @param finderMethod the find method in the home interface that was\n"
+" * called\n"
+" * @param args any finder parameters\n"
+" * @param instance the instance to use for the finder call\n"
+" * @return an EJBObject collection representing the found\n"
+" * entities\n"
+" */\n"
+" Collection findEntities(Method finderMethod,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be activated. The\n"
+" * persistence manager must call the ejbActivate method on the\n"
+" * instance.\n"
+" *\n"
+" * @param instance the instance to use for the activation\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void activateEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity shall be load from the\n"
+" * underlying storage. The persistence manager must load the state\n"
+" * from the underlying storage and then call ejbLoad on the\n"
+" * supplied instance.\n"
+" *\n"
+" * @param instance the instance to synchronize\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void loadEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is used to determine if an entity should be stored.\n"
+" *\n"
+" * @param instance the instance to check\n"
+" * @return true, if the entity has been modified\n"
+" * @throws Exception thrown if some system exception occurs\n"
+" */\n"
+" boolean isModified(EntityEnterpriseContext instance) throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity shall be stored to the\n"
+" * underlying storage. The persistence manager must call ejbStore\n"
+" * on the supplied instance and then store the state to the\n"
+" * underlying storage.\n"
+" *\n"
+" * @param instance the instance to synchronize\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void storeEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be passivate. The\n"
+" * persistence manager must call the ejbPassivate method on the\n"
+" * instance.\n"
+" *\n"
+" * @param instance the instance to passivate\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void passivateEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be removed from the\n"
+" * underlying storage. The persistence manager must call ejbRemove\n"
+" * on the instance and then remove its state from the underlying\n"
+" * storage.\n"
+" *\n"
+" * @param instance the instance to remove\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" * @throws RemoveException thrown if the instance could not be removed\n"
+" */\n"
+" void removeEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException, RemoveException;\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1115
+#, fuzzy, no-c-format
+msgid "The org.jboss.ejb.EntityPersistenceStore interface"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1116
+#, no-c-format
+msgid ""
+"As per the EJB 2.1 specification, JBoss supports two entity bean persistence "
+"semantics: container managed persistence (CMP) and bean managed persistence "
+"(BMP). The CMP implementation uses an implementation of the <literal>org."
+"jboss.ejb.EntityPersistanceStore</literal> interface. By default this is the "
+"<literal>org.jboss.ejb.plugins.cmp.jdbc.JDBCStoreManager</literal> which is "
+"the entry point for the CMP2 persistence engine. The "
+"<literal>EntityPersistanceStore</literal> interface is shown below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1119
+#, fuzzy, no-c-format
+msgid "The org.jboss.ejb.EntityPersistanceStore interface"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1120
+#, no-c-format
+msgid ""
+"public interface EntityPersistenceStore \n"
+" extends ContainerPlugin\n"
+"{\n"
+" /**\n"
+" * Returns a new instance of the bean class or a subclass of the\n"
+" * bean class.\n"
+" *\n"
+" * @return the new instance\n"
+" *\n"
+" * @throws Exception\n"
+" */\n"
+" Object createBeanClassInstance() \n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * Initializes the instance context.\n"
+" *\n"
+" * <p>This method is called before createEntity, and should\n"
+" * reset the value of all cmpFields to 0 or null.\n"
+" *\n"
+" * @param ctx\n"
+" *\n"
+" * @throws RemoteException\n"
+" */\n"
+" void initEntity(EntityEnterpriseContext ctx);\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity is to be created. The\n"
+" * persistence manager is responsible for handling the results\n"
+" * properly wrt the persistent store.\n"
+" *\n"
+" * @param m the create method in the home interface that was\n"
+" * called\n"
+" * @param args any create parameters\n"
+" * @param instance the instance being used for this create call\n"
+" * @return The primary key computed by CMP PM or null for BMP\n"
+" *\n"
+" * @throws Exception\n"
+" */\n"
+" Object createEntity(Method m,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when single entities are to be found. The\n"
+" * persistence manager must find out whether the wanted instance\n"
+" * is available in the persistence store, if so it returns the\n"
+" * primary key of the object.\n"
+" *\n"
+" * @param finderMethod the find method in the home interface that was\n"
+" * called\n"
+" * @param args any finder parameters\n"
+" * @param instance the instance to use for the finder call\n"
+" * @return a primary key representing the found entity\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" * @throws FinderException thrown if some heuristic problem occurs\n"
+" */\n"
+" Object findEntity(Method finderMethod,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when collections of entities are to be\n"
+" * found. The persistence manager must find out whether the wanted\n"
+" * instances are available in the persistence store, and if so it\n"
+" * must return a collection of primaryKeys.\n"
+" *\n"
+" * @param finderMethod the find method in the home interface that was\n"
+" * called\n"
+" * @param args any finder parameters\n"
+" * @param instance the instance to use for the finder call\n"
+" * @return an primary key collection representing the found\n"
+" * entities\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" * @throws FinderException thrown if some heuristic problem occurs\n"
+" */\n"
+" Collection findEntities(Method finderMethod,\n"
+" Object[] args,\n"
+" EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be activated.\n"
+" *\n"
+" * <p>With the PersistenceManager factorization most EJB\n"
+" * calls should not exists However this calls permits us to\n"
+" * introduce optimizations in the persistence store. Particularly\n"
+" * the context has a \"PersistenceContext\" that a PersistenceStore\n"
+" * can use (JAWS does for smart updates) and this is as good a\n"
+" * callback as any other to set it up.\n"
+" * @param instance the instance to use for the activation\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void activateEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity shall be load from the\n"
+" * underlying storage. The persistence manager must load the state\n"
+" * from the underlying storage and then call ejbLoad on the\n"
+" * supplied instance.\n"
+" *\n"
+" * @param instance the instance to synchronize\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void loadEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is used to determine if an entity should be stored.\n"
+" *\n"
+" * @param instance the instance to check\n"
+" * @return true, if the entity has been modified\n"
+" * @throws Exception thrown if some system exception occurs\n"
+" */\n"
+" boolean isModified(EntityEnterpriseContext instance)\n"
+" throws Exception;\n"
+" \n"
+" /**\n"
+" * This method is called whenever an entity shall be stored to the\n"
+" * underlying storage. The persistence manager must call ejbStore\n"
+" * on the supplied instance and then store the state to the\n"
+" * underlying storage.\n"
+" *\n"
+" * @param instance the instance to synchronize\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void storeEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be passivate. The\n"
+" * persistence manager must call the ejbPassivate method on the\n"
+" * instance.\n"
+" *\n"
+" * <p>See the activate discussion for the reason for\n"
+" * exposing EJB callback * calls to the store.\n"
+" *\n"
+" * @param instance the instance to passivate\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" */\n"
+" void passivateEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException;\n"
+" \n"
+" /**\n"
+" * This method is called when an entity shall be removed from the\n"
+" * underlying storage. The persistence manager must call ejbRemove\n"
+" * on the instance and then remove its state from the underlying\n"
+" * storage.\n"
+" *\n"
+" * @param instance the instance to remove\n"
+" *\n"
+" * @throws RemoteException thrown if some system exception occurs\n"
+" * @throws RemoveException thrown if the instance could not be removed\n"
+" */\n"
+" void removeEntity(EntityEnterpriseContext instance)\n"
+" throws RemoteException, RemoveException;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1121
+#, no-c-format
+msgid ""
+"The default BMP implementation of the <literal>EntityPersistenceManager</"
+"literal> interface is <literal>org.jboss.ejb.plugins.BMPPersistenceManager</"
+"literal>. The BMP persistence manager is fairly simple since all persistence "
+"logic is in the entity bean itself. The only duty of the persistence manager "
+"is to perform container callbacks."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1127
+#, no-c-format
+msgid "<title>org.jboss.ejb.StatefulSessionPersistenceManager</title>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1128
+#, no-c-format
+msgid ""
+"The <literal>StatefulSessionPersistenceManager</literal> is responsible for "
+"the persistence of stateful <literal>SessionBeans</literal>. This includes "
+"the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1133
+#, no-c-format
+msgid "Creating stateful sessions in a storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1138
+#, no-c-format
+msgid "Activating stateful sessions from a storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1143
+#, no-c-format
+msgid "Passivating stateful sessions to a storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1148
+#, no-c-format
+msgid "Removing stateful sessions from a storage"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1153
+#, no-c-format
+msgid ""
+"The <literal>StatefulSessionPersistenceManager</literal> interface is shown "
+"below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1156
+#, no-c-format
+msgid "The org.jboss.ejb.StatefulSessionPersistenceManager interface"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1157
+#, no-c-format
+msgid ""
+"public interface StatefulSessionPersistenceManager \n"
+" extends ContainerPlugin\n"
+"{\n"
+" public void createSession(Method m, Object[] args,\n"
+" StatefulSessionEnterpriseContext ctx)\n"
+" throws Exception;\n"
+" \n"
+" public void activateSession(StatefulSessionEnterpriseContext ctx)\n"
+" throws RemoteException;\n"
+" \n"
+" public void passivateSession(StatefulSessionEnterpriseContext ctx)\n"
+" throws RemoteException;\n"
+" \n"
+" public void removeSession(StatefulSessionEnterpriseContext ctx)\n"
+" throws RemoteException, RemoveException;\n"
+" \n"
+" public void removePassivated(Object key);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1158
+#, no-c-format
+msgid ""
+"The default implementation of the "
+"<literal>StatefulSessionPersistenceManager</literal> interface is "
+"<literal>org.jboss.ejb.plugins.StatefulSessionFilePersistenceManager</"
+"literal>. As its name implies, "
+"<literal>StatefulSessionFilePersistenceManager</literal> utilizes the file "
+"system to persist stateful session beans. More specifically, the persistence "
+"manager serializes beans in a flat file whose name is composed of the bean "
+"name and session id with a <literal>.ser</literal> extension. The "
+"persistence manager restores a bean's state during activation and "
+"respectively stores its state during passivation from the bean's "
+"<literal>.ser</literal> file."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1168
+#, no-c-format
+msgid "Entity Bean Locking and Deadlock Detection"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1169
+#, no-c-format
+msgid ""
+"This section provides information on what entity bean locking is and how "
+"entity beans are accessed and locked within JBoss. It also describes the "
+"problems you may encounter as you use entity beans within your system and "
+"how to combat these issues. Deadlocking is formally defined and examined. "
+"And, finally, we walk you through how to fine tune your system in terms of "
+"entity bean locking."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1173
+#, no-c-format
+msgid "Why JBoss Needs Locking"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1174
+#, no-c-format
+msgid ""
+"Locking is about protecting the integrity of your data. Sometimes you need "
+"to be sure that only one user can update critical data at one time. "
+"Sometimes, access to sensitive objects in your system need to be serialized "
+"so that data is not corrupted by concurrent reads and writes. Databases "
+"traditionally provide this sort of functionality with transactional scopes "
+"and table and row locking facilities."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1177
+#, no-c-format
+msgid ""
+"Entity beans are a great way to provide an object-oriented interface to "
+"relational data. Beyond that, they can improve performance by taking the "
+"load off of the database through caching and delaying updates until "
+"absolutely needed so that the database efficiency can be maximized. But, "
+"with caching, data integrity is a problem, so some form of application "
+"server level locking is needed for entity beans to provide the transaction "
+"isolation properties that you are used to with traditional databases."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1183
+#, fuzzy, no-c-format
+msgid "Entity Bean Lifecycle"
+msgstr "EJB 2.x 里的 Entity Bean"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1184
+#, no-c-format
+msgid ""
+"With the default configuration of JBoss there is only one active instance of "
+"a given entity bean in memory at one time. This applies for every cache "
+"configuration and every type of <literal>commit-option</literal>. The "
+"lifecycle for this instance is different for every commit-option though."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1189
+#, no-c-format
+msgid ""
+"For commit option <emphasis>A</emphasis>, this instance is cached and used "
+"between transactions."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1194
+#, no-c-format
+msgid ""
+"For commit option <emphasis>B</emphasis>, this instance is cached and used "
+"between transactions, but is marked as dirty at the end of a transaction. "
+"This means that at the start of a new transaction <literal>ejbLoad</literal> "
+"must be called."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1199
+#, no-c-format
+msgid ""
+"For commit option <emphasis>C</emphasis>, this instance is marked as dirty, "
+"released from the cache, and marked for passivation at the end of a "
+"transaction."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1204
+#, no-c-format
+msgid ""
+"For commit option <emphasis>D</emphasis>, a background refresh thread "
+"periodically calls <literal>ejbLoad</literal> on stale beans within the "
+"cache. Otherwise, this option works in the same way as <emphasis>A</"
+"emphasis>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1209
+#, no-c-format
+msgid ""
+"When a bean is marked for passivation, the bean is placed in a passivation "
+"queue. Each entity bean container has a passivation thread that periodically "
+"passivates beans that have been placed in the passivation queue. A bean is "
+"pulled out of the passivation queue and reused if the application requests "
+"access to a bean of the same primary key."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1212
+#, no-c-format
+msgid ""
+"On an exception or transaction rollback, the entity bean instance is thrown "
+"out of cache entirely. It is not put into the passivation queue and is not "
+"reused by an instance pool. Except for the passivation queue, there is no "
+"entity bean instance pooling."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1218
+#, no-c-format
+msgid "Default Locking Behavior"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1219
+#, no-c-format
+msgid ""
+"Entity bean locking is totally decoupled from the entity bean instance. The "
+"logic for locking is totally isolated and managed in a separate lock object. "
+"Because there is only one allowed instance of a given entity bean active at "
+"one time, JBoss employs two types of locks to ensure data integrity and to "
+"conform to the EJB spec."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1224
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Method Lock</emphasis>: The method lock ensures that "
+"only one thread of execution at a time can invoke on a given Entity Bean. "
+"This is required by the EJB spec."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1229
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transaction Lock</emphasis>: A transaction lock "
+"ensures that only one transaction at a time has access to a give Entity "
+"Bean. This ensures the ACID properties of transactions at the application "
+"server level. Since, by default, there is only one active instance of any "
+"given Entity Bean at one time, JBoss must protect this instance from dirty "
+"reads and dirty writes. So, the default entity bean locking behavior will "
+"lock an entity bean within a transaction until it completes. This means that "
+"if any method at all is invoked on an entity bean within a transaction, no "
+"other transaction can have access to this bean until the holding transaction "
+"commits or is rolled back."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1237
+#, no-c-format
+msgid "Pluggable Interceptors and Locking Policy"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1238
+#, no-c-format
+msgid ""
+"We saw that the basic entity bean lifecycle and behavior is defined by the "
+"container configuration defined in <literal>standardjboss.xml</literal> "
+"descriptor. Let's look at the <literal>container-interceptors</literal> "
+"definition for the <emphasis>Standard CMP 2.x EntityBean</emphasis> "
+"configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1241
+#, no-c-format
+msgid ""
+"<container-interceptors>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"ProxyFactoryFinderInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.LogInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.TxInterceptorCMT</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.CallValidationInterceptor</"
+"interceptor>\n"
+" <interceptor metricsEnabled=\"true\">org.jboss.ejb.plugins."
+"MetricsInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.EntityCreationInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.EntityLockInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.EntityInstanceInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.EntityReentranceInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.resource.connectionmanager."
+"CachedConnectionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins."
+"EntitySynchronizationInterceptor</interceptor>\n"
+" <interceptor>org.jboss.ejb.plugins.cmp.jdbc."
+"JDBCRelationInterceptor</interceptor>\n"
+"</container-interceptors>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1242
+#, no-c-format
+msgid ""
+"The interceptors shown above define most of the behavior of the entity bean. "
+"Below is an explanation of the interceptors that are relevant to this "
+"section."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1247
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EntityLockInterceptor</emphasis>: This "
+"interceptor's role is to schedule any locks that must be acquired before "
+"the invocation is allowed to proceed. This interceptor is very lightweight "
+"and delegates all locking behavior to a pluggable locking policy."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1252
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EntityInstanceInterceptor</emphasis>: The job of "
+"this interceptor is to find the entity bean within the cache or create a new "
+"one. This interceptor also ensures that there is only one active instance of "
+"a bean in memory at one time."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1257
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EntitySynchronizationInterceptor</emphasis>: The "
+"role of this interceptor is to synchronize the state of the cache with the "
+"underlying storage. It does this with the <literal>ejbLoad</literal> and "
+"<literal>ejbStore</literal> semantics of the EJB specification. In the "
+"presence of a transaction this is triggered by transaction demarcation. It "
+"registers a callback with the underlying transaction monitor through the JTA "
+"interfaces. If there is no transaction the policy is to store state upon "
+"returning from invocation. The synchronization polices <emphasis>A</"
+"emphasis>, <emphasis>B</emphasis> and <emphasis>C</emphasis> of the "
+"specification are taken care of here as well as the JBoss specific commit-"
+"option <emphasis>D</emphasis>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1265
+#, no-c-format
+msgid "Deadlock"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1266
+#, no-c-format
+msgid ""
+"Finding deadlock problems and resolving them is the topic of this section. "
+"We will describe what deadlocking MBeans, how you can detect it within your "
+"application, and how you can resolve deadlocks. Deadlock can occur when two "
+"or more threads have locks on shared resources. <xref linkend=\"Deadlock_-"
+"Deadlock_definition_example\"/> illustrates a simple deadlock scenario. "
+"Here, <literal>Thread 1</literal> has the lock for <literal>Bean A</"
+"literal>, and <literal>Thread 2</literal> has the lock for <literal>Bean B</"
+"literal>. At a later time, <literal>Thread 1</literal> tries to lock "
+"<literal>Bean B</literal> and blocks because <literal>Thread 2</literal> has "
+"it. Likewise, as <literal>Thread 2</literal> tries to lock A it also blocks "
+"because <literal>Thread 1</literal> has the lock. At this point both threads "
+"are deadlocked waiting for access to the resource already locked by the "
+"other thread."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1270
+#, no-c-format
+msgid "Deadlock definition example"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1277
+#, no-c-format
+msgid ""
+"The default locking policy of JBoss is to lock an Entity bean when an "
+"invocation occurs in the context of a transaction until the transaction "
+"completes. Because of this, it is very easy to encounter deadlock if you "
+"have long running transactions that access many entity beans, or if you are "
+"not careful about ordering the access to them. Various techniques and "
+"advanced configurations can be used to avoid deadlocking problems. They are "
+"discussed later in this section."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1281
+#, no-c-format
+msgid "Deadlock Detection"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1282
+#, no-c-format
+msgid ""
+"Fortunately, JBoss is able to perform deadlock detection. JBoss holds a "
+"global internal graph of waiting transactions and what transactions they are "
+"blocking on. Whenever a thread determines that it cannot acquire an entity "
+"bean lock, it figures out what transaction currently holds the lock on the "
+"bean and add itself to the blocked transaction graph. An example of what the "
+"graph may look like is given in <xref linkend=\"Deadlock_Detection-"
+"An_example_blocked_transaction_table\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1286
+#, no-c-format
+msgid "An example blocked transaction table"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1290
+#, no-c-format
+msgid "Blocking TX"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1293
+#, no-c-format
+msgid "Tx that holds needed lock"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1300 J2EE_EJBs_On_JBOSS.xml:1319
+#, no-c-format
+msgid "<entry>Tx1</entry>"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1303
+#, no-c-format
+msgid "<entry>Tx2</entry>"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1308
+#, no-c-format
+msgid "<entry>Tx3</entry>"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_EJBs_On_JBOSS.xml:1311 J2EE_EJBs_On_JBOSS.xml:1316
+#, no-c-format
+msgid "<entry>Tx4</entry>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1326
+#, no-c-format
+msgid ""
+"Before the thread actually blocks it tries to detect whether there is "
+"deadlock problem. It does this by traversing the block transaction graph. As "
+"it traverses the graph, it keeps track of what transactions are blocked. If "
+"it sees a blocked node more than once in the graph, then it knows there is "
+"deadlock and will throw an <literal>ApplicationDeadlockException</literal>. "
+"This exception will cause a transaction rollback which will cause all locks "
+"that transaction holds to be released."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1332
+#, no-c-format
+msgid "Catching ApplicationDeadlockException"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1333
+#, no-c-format
+msgid ""
+"Since JBoss can detect application deadlock, you should write your "
+"application so that it can retry a transaction if the invocation fails "
+"because of the <literal>ApplicationDeadlockException</literal>. "
+"Unfortunately, this exception can be deeply embedded within a "
+"<literal>RemoteException</literal>, so you have to search for it in your "
+"catch block. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1336
+#, no-c-format
+msgid ""
+"try {\n"
+" // ...\n"
+"} catch (RemoteException ex) {\n"
+" Throwable cause = null;\n"
+" RemoteException rex = ex;\n"
+" while (rex.detail != null) {\n"
+" cause = rex.detail;\n"
+" if (cause instanceof ApplicationDeadlockException) {\n"
+" // ... We have deadlock, force a retry of the transaction.\n"
+" break;\n"
+" }\n"
+" if (cause instanceof RemoteException) {\n"
+" rex = (RemoteException)cause;\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1340
+#, no-c-format
+msgid "Viewing Lock Information"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1341
+#, no-c-format
+msgid ""
+"The <literal>EntityLockMonitor</literal> MBean service allows one to view "
+"basic locking statistics as well as printing out the state of the "
+"transaction locking table. To enable this monitor uncomment its "
+"configuration in the <literal>conf/jboss-service.xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1344
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.monitor.EntityLockMonitor\"\n"
+" name=\"jboss.monitor:name=EntityLockMonitor\"/>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1345
+#, no-c-format
+msgid ""
+"The <literal>EntityLockMonitor</literal> has no configurable attributes. It "
+"does have the following read-only attributes:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1350
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MedianWaitTime</emphasis>: The median value of all "
+"times threads had to wait to acquire a lock."
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1355
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AverageContenders</emphasis>: The ratio of the total "
+"number of contentions to the sum of all threads that had to wait for a lock."
+msgstr ""
+"<emphasis role=\"bold\">num_initial_members</emphasis> 指定等待的最大的应答数"
+"量。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1360
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TotalContentions</emphasis>: The total number of "
+"threads that had to wait to acquire the transaction lock. This happens when "
+"a thread attempts to acquire a lock that is associated with another "
+"transaction"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1365
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaxContenders</emphasis>: The maximum number of "
+"threads that were waiting to acquire the transaction lock."
+msgstr ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>:用来接受客户联接的线程的"
+"数量。它的缺省值是 1。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1370
+#, no-c-format
+msgid "It also has the following operations:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1375
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">clearMonitor</emphasis>: This operation resets the "
+"lock monitor state by zeroing all counters."
+msgstr "<emphasis role=\"bold\">description</emphasis>:构造函数的描述"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1380
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">printLockMonitor</emphasis>: This operation prints "
+"out a table of all EJB locks that lists the <literal>ejbName</literal> of "
+"the bean, the total time spent waiting for the lock, the count of times the "
+"lock was waited on and the number of transactions that timed out waiting for "
+"the lock."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1390
+#, fuzzy, no-c-format
+msgid "Advanced Configurations and Optimizations"
+msgstr "其他配置选项"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1391
+#, no-c-format
+msgid ""
+"The default locking behavior of entity beans can cause deadlock. Since "
+"access to an entity bean locks the bean into the transaction, this also can "
+"present a huge performance/throughput problem for your application. This "
+"section walks through various techniques and configurations that you can use "
+"to optimize performance and reduce the possibility of deadlock."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1395
+#, no-c-format
+msgid "Short-lived Transactions"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1396
+#, no-c-format
+msgid ""
+"Make your transactions as short-lived and fine-grained as possible. The "
+"shorter the transaction you have, the less likelihood you will have "
+"concurrent access collisions and your application throughput will go up."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1402
+#, no-c-format
+msgid "Ordered Access"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1403
+#, no-c-format
+msgid ""
+"Ordering the access to your entity beans can help lessen the likelihood of "
+"deadlock. This means making sure that the entity beans in your system are "
+"always accessed in the same exact order. In most cases, user applications "
+"are just too complicated to use this approach and more advanced "
+"configurations are needed."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1409
+#, no-c-format
+msgid "Read-Only Beans"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1410
+#, no-c-format
+msgid ""
+"Entity beans can be marked as read-only. When a bean is marked as read-only, "
+"it never takes part in a transaction. This means that it is never "
+"transactionally locked. Using commit-option <emphasis>D</emphasis> with this "
+"option is sometimes very useful when your read-only bean's data is "
+"sometimes updated by an external source."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1413
+#, fuzzy, no-c-format
+msgid ""
+"To mark a bean as read-only, use the <literal>read-only</literal> flag in "
+"the <literal>jboss.xml</literal> deployment descriptor."
+msgstr ""
+"你可以用 <literal>jboss-web.xml</literal> 文件里的 <literal>replication-"
+"config</literal> 元素进一步配置会话复制。下面是一个例子:"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1416
+#, no-c-format
+msgid "Marking an entity bean read-only using jboss.xml"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1417
+#, no-c-format
+msgid ""
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>MyEntityBean</ejb-name>\n"
+" <jndi-name>MyEntityHomeRemote</jndi-name>\n"
+" <read-only>True</read-only>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1422
+#, no-c-format
+msgid "Explicitly Defining Read-Only Methods"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1423
+#, no-c-format
+msgid ""
+"After reading and understanding the default locking behavior of entity "
+"beans, you're probably wondering, \"Why lock the bean if its not "
+"modifying the data?\" JBoss allows you to define what methods on your entity "
+"bean are read only so that it will not lock the bean within the transaction "
+"if only these types of methods are called. You can define these read only "
+"methods within a <literal>jboss.xml</literal> deployment descriptor. "
+"Wildcards are allowed for method names. The following is an example of "
+"declaring all getter methods and the <literal>anotherReadOnlyMethod</"
+"literal> as read-only."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1426
+#, no-c-format
+msgid "Defining entity bean methods as read only"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1427
+#, fuzzy, no-c-format
+msgid ""
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-name>\n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-name>\n"
+" <method-attributes>\n"
+" <method>\n"
+" <method-name>get*</method-name>\n"
+" <read-only>true</read-only>\n"
+" </method>\n"
+" <method>\n"
+" <method-name>anotherReadOnlyMethod</method-"
+"name>\n"
+" <read-only>true</read-only>\n"
+" </method>\n"
+" </method-attributes>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1432
+#, no-c-format
+msgid "Instance Per Transaction Policy"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1433
+#, no-c-format
+msgid ""
+"The Instance Per Transaction policy is an advanced configuration that can "
+"totally wipe away deadlock and throughput problems caused by JBoss's "
+"default locking policy. The default Entity Bean locking policy is to only "
+"allow one active instance of a bean. The Instance Per Transaction policy "
+"breaks this requirement by allocating a new instance of a bean per "
+"transaction and dropping this instance at the end of the transaction. "
+"Because each transaction has its own copy of the bean, there is no need for "
+"transaction based locking."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1436
+#, no-c-format
+msgid ""
+"This option does sound great but does have some drawbacks right now. First, "
+"the transactional isolation behavior of this option is equivalent to "
+"<literal>READ_COMMITTED</literal>. This can create repeatable reads when "
+"they are not desired. In other words, a transaction could have a copy of a "
+"stale bean. Second, this configuration option currently requires commit-"
+"option <emphasis>B</emphasis> or <emphasis>C</emphasis> which can be a "
+"performance drain since an ejbLoad must happen at the beginning of the "
+"transaction. But, if your application currently requires commit-option "
+"<emphasis>B</emphasis> or <emphasis>C</emphasis> anyways, then this is the "
+"way to go. The JBoss developers are currently exploring ways to allow commit-"
+"option <emphasis>A</emphasis> as well (which would allow the use of caching "
+"for this option)."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1439
+#, no-c-format
+msgid ""
+"JBoss has container configurations named <literal>Instance Per Transaction "
+"CMP 2.x EntityBean</literal> and <literal>Instance Per Transaction BMP "
+"EntityBean</literal> defined in the standardjboss.xml that implement this "
+"locking policy. To use this configuration, you just have to reference the "
+"name of the container configuration to use with your bean in the jboss.xml "
+"deployment descriptor as show below."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1442
+#, no-c-format
+msgid "An example of using the Instance Per Transaction policy."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1443
+#, fuzzy, no-c-format
+msgid ""
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>MyCMP2Bean</ejb-name>\n"
+" <jndi-name>MyCMP2</jndi-name>\n"
+" <configuration-name>\n"
+" Instance Per Transaction CMP 2.x EntityBean\n"
+" </configuration-name>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>MyBMPBean</ejb-name>\n"
+" <jndi-name>MyBMP</jndi-name>\n"
+" <configuration-name>\n"
+" Instance Per Transaction BMP EntityBean\n"
+" </configuration-name>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1450
+#, no-c-format
+msgid "Running Within a Cluster"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1451
+#, no-c-format
+msgid ""
+"Currently there is no distributed locking capability for entity beans within "
+"the cluster. This functionality has been delegated to the database and must "
+"be supported by the application developer. For clustered entity beans, it is "
+"suggested to use commit-option <emphasis>B</emphasis> or <emphasis>C</"
+"emphasis> in combination with a row locking mechanism. For CMP, there is a "
+"row-locking configuration option. This option will use a SQL <literal>select "
+"for update</literal> when the bean is loaded from the database. With commit-"
+"option <emphasis>B</emphasis> or <emphasis>C</emphasis>, this implements a "
+"transactional lock that can be used across the cluster. For BMP, you must "
+"explicitly implement the select for update invocation within the BMP's "
+"<literal>ejbLoad</literal> method."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1457
+#, no-c-format
+msgid "Troubleshooting"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1458
+#, no-c-format
+msgid ""
+"This section will describe some common locking problems and their solution."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1462
+#, no-c-format
+msgid "Locking Behavior Not Working"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1463
+#, no-c-format
+msgid ""
+"Many JBoss users observe that locking does not seem to be working and see "
+"concurrent access to their beans, and thus dirty reads. Here are some common "
+"reasons for this:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1468
+#, no-c-format
+msgid ""
+"If you have custom <literal>container-configurations</literal>, make sure "
+"you have updated these configurations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1473
+#, no-c-format
+msgid ""
+"Make absolutely sure that you have implemented <literal>equals</literal> and "
+"<literal>hashCode</literal> correctly from custom/complex primary key "
+"classes."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1478
+#, no-c-format
+msgid ""
+"Make absolutely sure that your custom/complex primary key classes serialize "
+"correctly. One common mistake is assuming that member variable "
+"initializations will be executed when a primary key is unmarshalled."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1486
+#, no-c-format
+msgid "IllegalStateException"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1487
+#, no-c-format
+msgid ""
+"An IllegalStateException with the message \"removing bean lock and it has tx "
+"set!\" usually means that you have not implemented <literal>equals</literal> "
+"and/or <literal>hashCode</literal> correctly for your custom/complex primary "
+"key class, or that your primary key class is not implemented correctly for "
+"serialization."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1493
+#, no-c-format
+msgid "Hangs and Transaction Timeouts"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1494
+#, no-c-format
+msgid ""
+"One long outstanding bug of JBoss is that on a transaction timeout, that "
+"transaction is only marked for a rollback and not actually rolled back. This "
+"responsibility is delegated to the invocation thread. This can cause major "
+"problems if the invocation thread hangs indefinitely since things like "
+"entity bean locks will never be released. The solution to this problem is "
+"not a good one. You really just need to avoid doing stuff within a "
+"transaction that could hang indefinitely. One common mistake is making "
+"connections across the internet or running a web-crawler within a "
+"transaction."
+msgstr ""
+
+#. Tag: title
+#: J2EE_EJBs_On_JBOSS.xml:1504
+#, fuzzy, no-c-format
+msgid "EJB Timer Configuration"
+msgstr "JGroups Configuration"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1505
+#, no-c-format
+msgid ""
+"The J2EE timer service allows for any EJB object to register for a timer "
+"callback either at a designated time in the future. Timer events can be used "
+"for auditing, reporting or other cleanup tasks that need to need to happen "
+"at some given time in the future. Timer events are intended to be persistent "
+"and should be executed even in the event of a server failure. Coding to EJB "
+"timers is a standard part of the J2EE specification, so we won't explore "
+"the programming model. We will, instead, look at the configuration of the "
+"timer service in JBoss so that you can understand how to make timers work "
+"best in your environment"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1508
+#, no-c-format
+msgid ""
+"The EJB timer service is configure by several related MBeans in the "
+"<literal>ejb-deployer.xml</literal> file. The primary MBean is the "
+"<literal>EJBTimerService</literal> MBean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1511
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ejb.txtimer.EJBTimerServiceImpl\" name=\"jboss."
+"ejb:service=EJBTimerService\">\n"
+" <attribute name=\"RetryPolicy\">jboss.ejb:service=EJBTimerService,"
+"retryPolicy=fixedDelay</attribute>\n"
+" <attribute name=\"PersistencePolicy\">jboss.ejb:"
+"service=EJBTimerService,persistencePolicy=database</attribute>\n"
+" <attribute name=\"TimerIdGeneratorClassName\">org.jboss.ejb."
+"txtimer.BigIntegerTimerIdGenerator</attribute>\n"
+" <attribute name=\"TimedObjectInvokerClassName\">org.jboss.ejb."
+"txtimer.TimedObjectInvokerImpl</attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1512
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>EJBTimerService</literal> has the following configurable "
+"attributes:"
+msgstr "<literal>run</literal> 脚本支持下列选项:"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1517
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RetryPolicy</emphasis>: This is name of the MBean "
+"that implements the retry policy. The MBean must support the <literal>org."
+"jboss.ejb.txtimer.RetryPolicy interface</literal>. JBoss provides one "
+"implementation, <literal>FixedDelayRetryPolicy</literal>, which will be "
+"described later."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1522
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PersistencePolicy</emphasis>: This is the name of "
+"the MBean that implements the the persistence strategy for saving timer "
+"events. The MBean must support the <literal>org.jboss.ejb.txtimer."
+"PersistencePolicy</literal> interface. JBoss provides two implementations, "
+"NoopPersistencePolicy and DatabasePersistencePolicy, which will be described "
+"later."
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1527
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TimerIdGeneratorClassName</emphasis>: This is the "
+"name of a class that provides the timer ID generator strategy. This class "
+"must implement the <literal>org.jboss.ejb.txtimer.TimerIdGenerator</literal> "
+"interface. JBoss provides the <literal>org.jboss.ejb.txtimer."
+"BigIntegerTimerIdGenerator</literal> implementation."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:connector 实现的类全名。这个类"
+"必须实现 <literal>org.apache.catalina.Connector</literal> 接口。缺省的内置服"
+"务是 <literal>org.apache.catalina.connector.http.HttpConnector</literal>,它"
+"是一个 HTTP 连接器的实现。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1532
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TimedObjectInvokerClassname</emphasis>: This is the "
+"name of a class that provides the timer method invocation strategy. This "
+"class must implement the <literal>org.jboss.ejb.txtimer.TimedObjectInvoker</"
+"literal> interface. JBoss provides the <literal>org.jboss.ejb.txtimer."
+"TimedObjectInvokerImpl</literal> implementation."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:connector 实现的类全名。这个类"
+"必须实现 <literal>org.apache.catalina.Connector</literal> 接口。缺省的内置服"
+"务是 <literal>org.apache.catalina.connector.http.HttpConnector</literal>,它"
+"是一个 HTTP 连接器的实现。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1537
+#, no-c-format
+msgid "The retry policy MBean definition used is shown here:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1540
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ejb.txtimer.FixedDelayRetryPolicy\"\n"
+" name=\"jboss.ejb:service=EJBTimerService,retryPolicy=fixedDelay"
+"\">\n"
+" <attribute name=\"Delay\">100</attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1541
+#, fuzzy, no-c-format
+msgid "The retry policy takes one configuration value:"
+msgstr "EJB 应用程序配置"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1546
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Delay</emphasis>: This is the delay (ms) before "
+"retrying a failed timer execution. The default delay is 100ms."
+msgstr ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>:用来接受客户联接的线程的"
+"数量。它的缺省值是 1。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1551
+#, no-c-format
+msgid ""
+"If EJB timers do not need to be persisted, the <literal>NoopPersistence</"
+"literal> policy can be used. This MBean is commented out by default, but "
+"when enabled will look like this:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1554
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ejb.txtimer.NoopPersistencePolicy\" \n"
+" name=\"jboss.ejb:service=EJBTimerService,persistencePolicy=noop\"/>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1555
+#, no-c-format
+msgid ""
+"Most applications that use timers will want timers to be persisted. For that "
+"the <literal>DatabasePersitencePolicy</literal> MBean should be used."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_EJBs_On_JBOSS.xml:1558
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.ejb.txtimer.DatabasePersistencePolicy\" \n"
+" name=\"jboss.ejb:service=EJBTimerService,persistencePolicy=database"
+"\">\n"
+" <!-- DataSource JNDI name -->\n"
+" <depends optional-attribute-name=\"DataSource\">jboss.jca:"
+"service=DataSourceBinding,name=DefaultDS</depends>\n"
+" <!-- The plugin that handles database persistence -->\n"
+" <attribute name=\"DatabasePersistencePlugin\">org.jboss.ejb."
+"txtimer.GeneralPurposeDatabasePersistencePlugin</attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1561
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DataSource</emphasis>: This is the MBean for the "
+"DataSource that timer data will be written to."
+msgstr ""
+"<emphasis role=\"bold\">directory</emphasis>:这是建立访问日志文件的目录路"
+"径。"
+
+#. Tag: para
+#: J2EE_EJBs_On_JBOSS.xml:1566
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DatabasePersistencePlugin</emphasis>: This is the "
+"name of the class the implements the persistence strategy. This should be "
+"<literal>org.jboss.ejb.txtimer.GeneralPurposeDatabasePersistencePlugin</"
+"literal>."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Messaging_On_JBOSS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Messaging_On_JBOSS.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Messaging_On_JBOSS.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,76 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_Messaging_On_JBOSS.xml:6
+#, fuzzy, no-c-format
+msgid "Messaging on JBoss"
+msgstr "Naming on JBoss"
+
+#. Tag: para
+#: J2EE_Messaging_On_JBOSS.xml:7
+#, no-c-format
+msgid ""
+"The JMS API stands for Java Message Service Application Programming "
+"Interface, and it is used by applications to send asynchronous "
+"<emphasis>business-quality</emphasis> messages to other applications. In the "
+"messaging world, messages are not sent directly to other applications. "
+"Instead, messages are sent to destinations, known as queues or topics. "
+"Applications sending messages do not need to worry if the receiving "
+"applications are up and running, and conversely, receiving applications do "
+"not need to worry about the sending application's status. Both senders, "
+"and receivers only interact with the destinations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Messaging_On_JBOSS.xml:10
+#, no-c-format
+msgid ""
+"The JMS API is the standardized interface to a JMS provider, sometimes "
+"called a Message Oriented Middleware (MOM) system. JBoss comes with a JMS "
+"1.1 compliant JMS provider called JBoss Messaging. When you use the JMS API "
+"with JBoss, you are using the JBoss Messaging engine transparently. JBoss "
+"Messaging fully implements the JMS specification; therefore, the best JBoss "
+"Messaging user guide is the JMS specification. For more information about "
+"the JMS API please visit the JMS Tutorial or JMS Downloads & "
+"Specifications."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Messaging_On_JBOSS.xml:171
+#, fuzzy, no-c-format
+msgid "JBoss Messaging Overview"
+msgstr "JBoss MBean 服务"
+
+#. Tag: para
+#: J2EE_Messaging_On_JBOSS.xml:172
+#, no-c-format
+msgid ""
+"JBoss Messaging is the new state-of-the-art enterprise messaging system from "
+"JBoss, providing superior performance, reliability and scalability with high "
+"throughput and low latency. JBoss Messaging has replaced JBossMQ as the "
+"default JMS provider in &JBPAPP; &VER;. Since JBoss Messaging is JMS 1.1 and "
+"JMS 1.0.2b compatible, the JMS code written against JBossMQ will run with "
+"JBoss Messaging without any changes."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Messaging_On_JBOSS.xml:175
+#, no-c-format
+msgid ""
+"For more details on configurations and examples, refer to the JBoss "
+"Messaging User Guide."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Reference_Introduction.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Reference_Introduction.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Reference_Introduction.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,11311 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:6
+#, no-c-format
+msgid "The JBoss JMX Microkernel"
+msgstr "The JBoss JMX Microkernel"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:7
+#, no-c-format
+msgid ""
+"Modularly developed from the ground up, the JBoss server and container are "
+"completely implemented using component-based plug-ins. The modularization "
+"effort is supported by the use of JMX, the Java Management Extension API. "
+"Using JMX, industry-standard interfaces help manage both JBoss/Server "
+"components and the applications deployed on it. Ease of use is still the "
+"number one priority, and the JBoss Server architecture sets a new standard "
+"for modular, plug-in design as well as ease of server and application "
+"management."
+msgstr ""
+"从底层的模块化开发开始, JBoss服务器和容器完全是用基于组件的插件来实现的. 这种"
+"模块化设计是由JMX(Java Management Extension API)来支持的. 工业标准的接口使用"
+"JMX管理JBoss服务器组件和所部署的应用程序. 易用性仍然是首要的事情, Boss服务器"
+"架构设定了一个模使块, 插件设计以及使务器和应用程序管理更容易的新标准. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:10
+#, fuzzy, no-c-format
+msgid ""
+"This high degree of modularity benefits the application developer in several "
+"ways. The already tight code can be further trimmed down to support "
+"applications that must have a small footprint. For example, if EJB "
+"passivation is unnecessary in your application, simply take the feature out "
+"of the server. If you later decide to deploy the same application under an "
+"Application Service Provider (ASP) model, simply enable the server's "
+"passivation feature for that web-based deployment. Another example is the "
+"freedom you have to drop your favorite object to relational database (O-R) "
+"mapping tool, such as TOPLink, directly into the container."
+msgstr ""
+"高度的模块化使应用程序开发者从几个方面受益. 已经很紧凑的代码可以进一步缩减来"
+"支持轻量级(small footprint)的应用程序. 例如, 如果你的应用程序不需要EJB钝化"
+"(passivation), 可以简单地把它从服务器里去掉. 如果之后你决定按照Application "
+"Service Provider (ASP)模型部署同样的程序, 又简单地为这个部署把钝化特征启用就"
+"行了. 另外一个例子就是, 你可以把你最喜欢的object to relational database (O-R)"
+"匹配工具, 就象TOPLink, 直接放到容器里."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:13
+#, no-c-format
+msgid ""
+"This chapter will introduce you to JMX and its role as the JBoss server "
+"component bus. You will also be introduced to the JBoss MBean service notion "
+"that adds life cycle operations to the basic JMX management component."
+msgstr ""
+"本章将向你介绍JMX和它作为JBoss服务器组件总线的角色. 你也将学习把生命周期"
+"(life cycle)操作加入到基本的JMX管理组件的JBoss MBean service notion."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:17
+#, no-c-format
+msgid "An Introduction to JMX"
+msgstr "JMX的简介"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:18
+#, fuzzy, no-c-format
+msgid ""
+"The success of the full Open Source J2EE stack lies with the use of JMX "
+"(Java Management Extension). JMX is the best tool for integration of "
+"software. It prov ides a common spine that allows the user to integrate "
+"modules, containers, and plug-ins. <xref linkend=\"An_Introduction_to_JMX-"
+"The_JBoss_JMX_integration_bus_and_the_standard_JBoss_components\"/> shows "
+"the role of JMX as an integration spine or bus into which components plug. "
+"Components are declared as MBean services that are then loaded into JBoss. "
+"The components may subsequently be administered using JMX."
+msgstr ""
+"完全开源的J2EE栈的成功依赖于JMX(Java Management Extension)的使用. JMX是软件集"
+"成的最佳工具. 它提供了允许用户集成模块, 容器和插件的利器. <xref linkend="
+"\"ch2.jmxbus.fig\"/>展示了JMX作为组件集成工具或总线的角色. 组件被声明为MBean"
+"且装载到JBoss里. 然后我们可以使用JMX来管理这些组件. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:22
+#, no-c-format
+msgid "The JBoss JMX integration bus and the standard JBoss components"
+msgstr "JBoss JMX集成总线和标准的JBoss组件"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:29
+#, no-c-format
+msgid ""
+"Before looking at how JBoss uses JMX as its component bus, it would help to "
+"get a basic overview what JMX is by touching on some of its key aspects."
+msgstr ""
+"通过接触JMX的一些关键概念来了解它的概貌, 对学习JBoss怎样把JMX作为组件总线使用"
+"是有帮助的. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:32
+#, no-c-format
+msgid ""
+"JMX components are defined by the Java Management Extensions Instrumentation "
+"and Agent Specification, v1.2, which is available from the JSR003 Web page "
+"at <ulink url=\"http://jcp.org/en/jsr/detail?id=3\"></ulink>. The material "
+"in this JMX overview section is derived from the JMX instrumentation "
+"specification, with a focus on the aspects most used by JBoss. A more "
+"comprehensive discussion of JMX and its application can be found in "
+"<emphasis>JMX: Managing J2EE with Java Management Extensions</emphasis> "
+"written by Juha Lindfors (Sams, 2002)."
+msgstr ""
+"JMX组件由Java Management Extensions Instrumentation 和 Agent Specification, "
+"v1.2定义, 你可以在JSR003网页<ulink url=\"http://jcp.org/en/jsr/detail?id=3"
+"\"></ulink>上获得详情. 这个JMX概述部分里的资料来源于JMX instrumentation "
+"specification, 主要集中在JBoss使用最多的概念上. 你可以在Juha Lindfors 所著的"
+"<emphasis>JMX: Managing J2EE with Java Management Extensions</emphasis>"
+"(Sams, 2002)里找到关于JMX及其应用程序更详尽的论述. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:35
+#, fuzzy, no-c-format
+msgid ""
+"JMX is a standard for managing and monitoring all varieties of software and "
+"hardware components from Java. Further, JMX aims to provide integration with "
+"the large number of existing management standards. <xref linkend="
+"\"An_Introduction_to_JMX-"
+"The_Relationship_between_the_components_of_the_JMX_architecture\"/> shows "
+"examples of components found in a JMX environment, and illustrates the "
+"relationship between them as well as how they relate to the three levels of "
+"the JMX model. The three levels are:"
+msgstr ""
+"JMX是一个管理和监控Java里软件和硬件组件的所有变化的标准. 而且, JMX的目的在于"
+"提供与大量现存管理标准的集成. <xref linkend=\"ch2.jmxrel.fig\"/> 展示了在一个"
+"JMX环境里发现的组件的示例, 而且说明了它们之间的关系和怎样关联到JMX模型的三个"
+"层次里. 这三个层次是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:40
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Instrumentation</emphasis>, which are the resources "
+"to manage"
+msgstr "<emphasis role=\"bold\">Instrumentation</emphasis> 它是所管理的资源"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:45
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Agents</emphasis>, which are the controllers of the "
+"instrumentation level objects"
+msgstr ""
+"<emphasis role=\"bold\">Agents</emphasis> 是设备层(instrumentation level)对象"
+"的控制者(controllers)."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:50
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Distributed services</emphasis>, the mechanism by "
+"which administration applications interact with agents and their managed "
+"objects"
+msgstr ""
+"<emphasis role=\"bold\">Distributed services</emphasis> 是应用程序管理和代理"
+"(agents)及它们所管理的对象之间相互作用的机制."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:56
+#, no-c-format
+msgid "The Relationship between the components of the JMX architecture"
+msgstr "JMX架构的组件之间的关系."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:64
+#, no-c-format
+msgid "Instrumentation Level"
+msgstr "设备层(Instrumentation Level)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:65
+#, no-c-format
+msgid ""
+"The instrumentation level defines the requirements for implementing JMX "
+"manageable resources. A JMX manageable resource can be virtually anything, "
+"including applications, service components, devices, and so on. The "
+"manageable resource exposes a Java object or wrapper that describes its "
+"manageable features, which makes the resource instrumented so that it can be "
+"managed by JMX-compliant applications."
+msgstr ""
+"设备层(Instrumentation Level)定义对实现JMX可管理资源的要求. JMX可管理资源可以"
+"是任何虚拟的东西, 包括应用程序, 服务组件, 设备等等. 可管理资源开放给(expose)"
+"描述它的可管理特征的Java对象或封装器(wrapper), 这使得资源可以设备化从而能被"
+"JMX-compliant应用程序所管理. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:68
+#, no-c-format
+msgid ""
+"The user provides the instrumentation of a given resource using one or more "
+"managed beans, or MBeans. There are four varieties of MBean implementations: "
+"standard, dynamic, model, and open. The differences between the various "
+"MBean types is discussed in Managed Beans or MBeans."
+msgstr ""
+"用户用一个或多个managed beans(或MBeans)提供给定资源的设备化. 有四种MBeans的实"
+"现: standard, dynamic, model, 和 open. 我们将在Managed Beans(或MBeans)章节里"
+"讨论不同类型MBean的区别. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:71
+#, no-c-format
+msgid ""
+"The instrumentation level also specifies a notification mechanism. The "
+"purpose of the notification mechanism is to allow MBeans to communicate "
+"changes with their environment. This is similar to the JavaBean property "
+"change notification mechanism, and can be used for attribute change "
+"notifications, state change notifications, and so on."
+msgstr ""
+"设备层(instrumentation level)也指定了一个提醒机制(notification mechanism). 这"
+"个提醒机制的目的是允许MBeans可以相互通知发生的变化. 这和JavaBean的属性更改提"
+"醒机制相似, 它可以用作属性更改提醒, 状态更改提醒等等. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:77
+#, no-c-format
+msgid "Agent Level"
+msgstr "代理层(Agent Level)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:78
+#, no-c-format
+msgid ""
+"The agent level defines the requirements for implementing agents. Agents are "
+"responsible for controlling and exposing the managed resources that are "
+"registered with the agent. By default, management agents are located on the "
+"same hosts as their resources. This collocation is not a requirement."
+msgstr ""
+"代理层(agent level)定义对实现代理的要求. 代理负责控制和开放用它注册的被管理资"
+"源. 在缺省情况下, 管理代理和它们的资源都在相同的主机里. 但这种安排并不是必需"
+"的."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:81
+#, no-c-format
+msgid ""
+"The agent requirements make use of the instrumentation level to define a "
+"standard MBeanServer management agent, supporting services, and a "
+"communications connector. JBoss provides both an html adaptor as well as an "
+"RMI adaptor."
+msgstr ""
+"代理要求(agent requirements)利用设备层来定义标准的MBeanServer管理代理, 它支持"
+"服务和通信连接器(communications connector). JBoss提供html和RMI适配器."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:84
+#, no-c-format
+msgid ""
+"The JMX agent can be located in the hardware that hosts the JMX manageable "
+"resources when a Java Virtual Machine (JVM) is available. This is how the "
+"JBoss server uses the MBeanServer. A JMX agent does not need to know which "
+"resources it will serve. JMX manageable resources may use any JMX agent that "
+"offers the services it requires."
+msgstr "当Java Virtual Machine (JVM)可用时, "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:87
+#, fuzzy, no-c-format
+msgid ""
+"Managers interact with an agent's MBeans through a protocol adaptor or "
+"connector, as described in the <xref linkend=\"An_Introduction_to_JMX-"
+"Distributed_Services_Level\"/> in the next section. The agent does not need "
+"to know anything about the connectors or management applications that "
+"interact with the agent and its MBeans."
+msgstr ""
+"如下一部分内容里的<xref linkend=\"ch2.distlevel.sect\"/>所描述的那样, 管理者"
+"和代理的MBeans通过协议适配器或者连接器来相互作用. 代理不需要知道它和它的"
+"MBeans相互作用的连接器或管理应用程序的任何东西. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:93
+#, no-c-format
+msgid "Distributed Services Level"
+msgstr "分布服务层(Distributed Services Level)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:94
+#, fuzzy, no-c-format
+msgid ""
+"The JMX specification notes that a complete definition of the distributed "
+"services level is beyond the scope of the initial version of the JMX "
+"specification. This was indicated by the component boxes with the horizontal "
+"lines in <xref linkend=\"An_Introduction_to_JMX-"
+"The_Relationship_between_the_components_of_the_JMX_architecture\"/>. The "
+"general purpose of this level is to define the interfaces required for "
+"implementing JMX management applications or managers. The following points "
+"highlight the intended functionality of the distributed services level as "
+"discussed in the current JMX specification."
+msgstr ""
+"JMX规格注明了分布服务层的完整定义是超出JMX规范初始版本的范围的. 这由<xref "
+"linkend=\"ch2.jmxrel.fig\"/>里用横线标出的组件盒(component boxes)所指出. 这一"
+"层的目的是定义用来实现JMX管理程序或管理者所需的接口. 下述各点强调了在目前的"
+"JMX规范里所讨论的分布服务层的intended functionality. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:99
+#, no-c-format
+msgid ""
+"Provide an interface for management applications to interact transparently "
+"with an agent and its JMX manageable resources through a connector"
+msgstr ""
+"提供给管理程序用来与代理及其JMX可管理资源通过连接器透明地相互作用的接口."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:104
+#, no-c-format
+msgid ""
+"Exposes a management view of a JMX agent and its MBeans by mapping their "
+"semantic meaning into the constructs of a data-rich protocol (for example "
+"HTML or SNMP)"
+msgstr ""
+"通过把语义匹配到data-rich协议(如HTML或SNMP)的构件来开放(exposes)JMX代理及其"
+"MBeans的一个管理视图. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:109
+#, no-c-format
+msgid ""
+"Distributes management information from high-level management platforms to "
+"numerous JMX agents"
+msgstr "把管理信息从高层的管理平台向为数众多的JMX代理分发."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:114
+#, fuzzy, no-c-format
+msgid ""
+"Consolidates management information coming from numerous JMX agents into "
+"logical views that are relevant to the end user's business operations"
+msgstr "把从大量JMX代理来的管理信息并入到和最终用户的商业操作相关的逻辑视图里."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:119
+#, no-c-format
+msgid "Provides security"
+msgstr "提供安全性"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:124
+#, no-c-format
+msgid ""
+"It is intended that the distributed services level components will allow for "
+"cooperative management of networks of agents and their resources. These "
+"components can be expanded to provide a complete management application."
+msgstr ""
+"分布服务层的组件有意允许对代理网络和它们的资源的协同管理(cooperative "
+"management). 这些组件可以被扩展为一个完整的管理程序."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:130
+#, no-c-format
+msgid "JMX Component Overview"
+msgstr "JMX组件概述"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:131
+#, no-c-format
+msgid ""
+"This section offers an overview of the instrumentation and agent level "
+"components. The instrumentation level components include the following:"
+msgstr "这部分是关于设备和代理层组件的概述. 设备层组件包括了:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:136
+#, no-c-format
+msgid "MBeans (standard, dynamic, open, and model MBeans)"
+msgstr "MBeans (standard, dynamic, open, 和 model MBeans)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:141
+#, no-c-format
+msgid "Notification model elements"
+msgstr "Notification model elements"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:146
+#, no-c-format
+msgid "MBean metadata classes"
+msgstr "MBean metadata classes"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:151
+#, no-c-format
+msgid "The agent level components include:"
+msgstr "代理层组件包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:156
+#, no-c-format
+msgid "MBean server"
+msgstr "MBean服务器"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:161
+#, no-c-format
+msgid "Agent services"
+msgstr "代理服务"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:167
+#, no-c-format
+msgid "Managed Beans or MBeans"
+msgstr "Managed Beans 或 MBeans"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:168
+#, no-c-format
+msgid ""
+"An MBean is a Java object that implements one of the standard MBean "
+"interfaces and follows the associated design patterns. The MBean for a "
+"resource exposes all necessary information and operations that a management "
+"application needs to control the resource."
+msgstr ""
+"MBean是一个Java对象, 它实现了一个标准MBean接口和遵循相关的设计模式. 资源的"
+"MBean 开放(expose)管理程序需要用来控制资源的所有必需的信息和操作."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:171
+#, no-c-format
+msgid ""
+"The scope of the management interface of an MBean includes the following:"
+msgstr "MBean的管理接口的范围包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:176
+#, no-c-format
+msgid "Attribute values that may be accessed by name"
+msgstr "可用名字访问的属性值"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:181
+#, no-c-format
+msgid "Operations or functions that may be invoked"
+msgstr "可能调用的操作或功能"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:186
+#, no-c-format
+msgid "Notifications or events that may be emitted"
+msgstr "可能发出的通知和事件"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:191
+#, fuzzy, no-c-format
+msgid "The constructors for the MBean's Java class"
+msgstr "MBean's Java类的构造函数"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:196
+#, no-c-format
+msgid ""
+"JMX defines four types of MBeans to support different instrumentation needs:"
+msgstr "JMX定义了四个类型的MBeans来支持不同的设备化需要:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:201
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Standard MBeans</emphasis>: These use a simple "
+"JavaBean style naming convention and a statically defined management "
+"interface. This is the most common type of MBean used by JBoss."
+msgstr ""
+"<emphasis role=\"bold\">Standard MBeans</emphasis>: 它们使用简单的JavaBean风"
+"格的命名规则和被静态地定义的管理接口. 这是JBoss所使用的最常见类型的MBean."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:206
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Dynamic MBeans</emphasis>: These must implement the "
+"<literal>javax.management.DynamicMBean</literal> interface, and they expose "
+"their management interface at runtime when the component is instantiated for "
+"the greatest flexibility. JBoss makes use of Dynamic MBeans in circumstances "
+"where the components to be managed are not known until runtime."
+msgstr ""
+"<emphasis role=\"bold\">Dynamic MBeans</emphasis>: 它们必须实现"
+"<literal>javax.management.DynamicMBean</literal>接口, 而且当组件为了最大的灵"
+"活性而被实例化时, 它们在运行时开放它们的管理接口. JBoss在被管理的组件直到运行"
+"时才被获知的情况下使用Dynamic MBeans."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:211
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Open MBeans</emphasis>: These are an extension of "
+"dynamic MBeans. Open MBeans rely on basic, self-describing, user-friendly "
+"data types for universal manageability."
+msgstr ""
+"<emphasis role=\"bold\">Open MBeans</emphasis>: 它们是dynamic MBeans的扩展. "
+"Open MBeans依赖于易于管理的简单的, 自我描述的, 用户友好的数据类型. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:216
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Model MBeans</emphasis>: These are also an extension "
+"of dynamic MBeans. Model MBeans must implement the <literal>javax.management."
+"modelmbean.ModelMBean</literal> interface. Model MBeans simplify the "
+"instrumentation of resources by providing default behavior. JBoss XMBeans "
+"are an implementation of Model MBeans."
+msgstr ""
+"<emphasis role=\"bold\">Model MBeans</emphasis>: 它们也是 dynamic MBeans的扩"
+"展. Model MBeans必须实现<literal>javax.management.modelmbean.ModelMBean</"
+"literal>接口. Model MBeans通过提供缺省行为(default behavior)简化了资源的设备"
+"化.JBoss XMBeans是Model MBeans的一个实现."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:221
+#, no-c-format
+msgid ""
+"We will present an example of a Standard and a Model MBean in the section "
+"that discusses extending JBoss with your own custom services."
+msgstr ""
+"我们将在讨论用自定义服务来扩展JBoss的部分里介绍一个Standard 和 Model MBean的"
+"示例."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:227
+#, no-c-format
+msgid "Notification Model"
+msgstr "Notification Model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:228
+#, no-c-format
+msgid ""
+"JMX Notifications are an extension of the Java event model. Both the MBean "
+"server and MBeans can send notifications to provide information. The JMX "
+"specification defines the <literal>javax.management</literal> package "
+"<literal>Notification</literal> event object, "
+"<literal>NotificationBroadcaster</literal> event sender, and "
+"<literal>NotificationListener</literal> event receiver interfaces. The "
+"specification also defines the operations on the MBean server that allow for "
+"the registration of notification listeners."
+msgstr ""
+"JMX Notifications 是Java事件模型的扩展. MBean 服务器和 MBeans 都可以发送通知"
+"来提供信息. JMX规格定义了 <literal>javax.management</literal>包和"
+"<literal>Notification</literal>事件对象, <literal>NotificationBroadcaster</"
+"literal>事件发送者, 以及<literal>NotificationListener</literal> 事件接收者接"
+"口. 这个规格也定义了MBean服务器上允许notification listeners注册的操作. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:234
+#, no-c-format
+msgid "MBean Metadata Classes"
+msgstr "MBean Metadata Classes"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:235
+#, fuzzy, no-c-format
+msgid ""
+"There is a collection of metadata classes that describe the management "
+"interface of an MBean. Users can obtain a common metadata view of any of the "
+"four MBean types by querying the MBean server with which the MBeans are "
+"registered. The metadata classes cover an MBean's attributes, "
+"operations, notifications, and constructors. For each of these, the metadata "
+"includes a name, a description, and its particular characteristics. For "
+"example, one characteristic of an attribute is whether it is readable, "
+"writable, or both. The metadata for an operation contains the signature of "
+"its parameter and return types."
+msgstr ""
+"这是一个元数据类(metadata classes)的集合, 它描述了MBean的管理接口. 通过查询"
+"MBeans所注册的 MBean服务器, 用户可以获得任何四种MBean 类型之一的通用元数据"
+"(metadata)视图. 元数据类包含了MBean的属性, 操作, 通知, 和构造函数, 以及它们的"
+"名字, 描述以及独有的特性. 例如, 某属性的一个特性是是否可读的, 可写还是两者都"
+"可的. 操作(operation)的元数据包含了自身参数和返回类型的签名. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:238
+#, no-c-format
+msgid ""
+"The different types of MBeans extend the metadata classes to be able to "
+"provide additional information as required. This common inheritance makes "
+"the standard information available regardless of the type of MBean. A "
+"management application that knows how to access the extended information of "
+"a particular type of MBean is able to do so."
+msgstr ""
+"不同类型的MBeans扩展了元数据类(metadata classes)来提供其他所需的信息. 这个常"
+"见的继承使标准信息成为可用的而不需要顾及MBean的类型. 懂得怎样访问特定类型"
+"MBean 的扩展信息的管理应用程序能够做到这一点. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:244
+#, no-c-format
+msgid "MBean Server"
+msgstr "MBean 服务器"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:245
+#, no-c-format
+msgid ""
+"A key component of the agent level is the managed bean server. Its "
+"functionality is exposed through an instance of the <literal>javax."
+"management.MBeanServer</literal>. An MBean server is a registry for MBeans "
+"that makes the MBean management interface available for use by management "
+"applications. The MBean never directly exposes the MBean object itself; "
+"rather, its management interface is exposed through metadata and operations "
+"available in the MBean server interface. This provides a loose coupling "
+"between management applications and the MBeans they manage."
+msgstr ""
+"代理层的一个关键组件是managed bean服务器. 它的功能是通过 <literal>javax."
+"management.MBeanServer</literal>的实例来开放的. MBean服务器是MBeans 的注册"
+"表, 它让管理应用程序可以使用MBean 管理接口. MBean 从来都不会自己来直接开放"
+"MBean对象; 相反, 它的管理接口通过MBean服务器接口里可用的元数据和操作来开放. "
+"这在管理应用程序和它们所管理的MBeans之间提供了一个松耦合(loose coupling)."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:248
+#, no-c-format
+msgid ""
+"MBeans can be instantiated and registered with the MBeanServer by the "
+"following:"
+msgstr "MBeans可以用MBeanServer实例化和注册, 如下所示:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:253
+#, no-c-format
+msgid "Another MBean"
+msgstr "另一个MBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:258
+#, no-c-format
+msgid "The agent itself"
+msgstr "代理自己"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:263
+#, no-c-format
+msgid "A remote management application (through the distributed services)"
+msgstr "远程管理应用程序(通过分布式服务)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:268
+#, no-c-format
+msgid ""
+"When you register an MBean, you must assign it a unique object name. The "
+"object name then becomes the unique handle by which management applications "
+"identify the object on which to perform management operations. The "
+"operations available on MBeans through the MBean server include the "
+"following:"
+msgstr ""
+"当你注册一个MBean, 你必需给它分配一个唯一的对象名. 然后这个对象名就成为管理应"
+"用程序识别执行管理操作的对象的唯一句柄. MBeans 上通过MBean服务器的可用操作如"
+"下: "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:273
+#, no-c-format
+msgid "Discovering the management interface of MBeans"
+msgstr "发现(Discovering) MBeans的管理接口"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:278
+#, no-c-format
+msgid "Reading and writing attribute values"
+msgstr "读和写属性的值"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:283
+#, no-c-format
+msgid "Invoking operations defined by MBeans"
+msgstr "MBeans定义的调用操作"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:288
+#, no-c-format
+msgid "Registering for notifications events"
+msgstr "为通知事件(notifications events)注册"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:293
+#, no-c-format
+msgid "Querying MBeans based on their object name or their attribute values"
+msgstr "基于MBeans的对象名和属性值的查询"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:298
+#, fuzzy, no-c-format
+msgid ""
+"Protocol adaptors and connectors are required to access the MBeanServer from "
+"outside the agent's JVM. Each adaptor provides a view via its protocol "
+"of all MBeans registered in the MBean server the adaptor connects to. An "
+"example adaptor is an HTML adaptor that allows for the inspection and "
+"editing of MBeans using a Web browser. As was indicated in <xref linkend="
+"\"An_Introduction_to_JMX-"
+"The_Relationship_between_the_components_of_the_JMX_architecture\"/>, there "
+"are no protocol adaptors defined by the current JMX specification. Later "
+"versions of the specification will address the need for remote access "
+"protocols in standard ways."
+msgstr ""
+"协议适配器和连接器被要求在代理的JVM之外来访问MBeanServer. 每个适配器通过它的"
+"协议提供一个它所连接的MBean服务器上注册的所有的MBeans的视图. 允许用Web浏览器"
+"查看和编辑MBeans 的HTML适配器就是一个适配器的例子. 如<xref linkend=\"ch2."
+"jmxrel.fig\"/>所指出的, 目前的JMX规格并没有定义协议适配器. 这个规格的后续版本"
+"将解决关于使用标准方法的远程访问协议的需求."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:301
+#, no-c-format
+msgid ""
+"A connector is an interface used by management applications to provide a "
+"common API for accessing the MBean server in a manner that is independent of "
+"the underlying communication protocol. Each connector type provides the same "
+"remote interface over a different protocol. This allows a remote management "
+"application to connect to an agent transparently through the network, "
+"regardless of the protocol. The specification of the remote management "
+"interface will be addressed in a future version of the JMX specification."
+msgstr "连接器(connector)是管理应用程序使用的来提供公用API的接口, "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:304
+#, no-c-format
+msgid ""
+"Adaptors and connectors make all MBean server operations available to a "
+"remote management application. For an agent to be manageable from outside of "
+"its JVM, it must include at least one protocol adaptor or connector. JBoss "
+"currently includes a custom HTML adaptor implementation and a custom JBoss "
+"RMI adaptor."
+msgstr ""
+"适配器(Adaptors)和连接器(connectors)使所有MBean服务器操作对于远程管理应用程序"
+"可用. 对于可从JVM外部管理的代理, 它必须包含至少一个协议适配器或者连接器. "
+"JBoss目前包含了一个自定义的HTML适配器实现和JBoss RMI适配器."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:310
+#, no-c-format
+msgid "Agent Services"
+msgstr "代理服务"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:311
+#, no-c-format
+msgid ""
+"The JMX agent services are objects that support standard operations on the "
+"MBeans registered in the MBean server. The inclusion of supporting "
+"management services helps you build more powerful management solutions. "
+"Agent services are often themselves MBeans, which allow the agent and their "
+"functionality to be controlled through the MBean server. The JMX "
+"specification defines the following agent services:"
+msgstr ""
+"JMX代理服务是支持MBean服务器里注册的MBeans上标准操作的对象. 对管理服务的支"
+"持, 可以帮助你建立更强大的管理解决方案. 代理服务经常就是MBeans自己, 它允许通"
+"过MBean服务器来控制代理和它们的功能. JMX规格定义了下列的代理服务:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:316
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">A dynamic class loading MLet (management applet) "
+"service</emphasis>: This allows for the retrieval and instantiation of new "
+"classes and native libraries from an arbitrary network location."
+msgstr ""
+"<emphasis role=\"bold\">A dynamic class loading MLet (management applet) "
+"service</emphasis>: 这允许对任何网络位置的新类和native libraries的获取和实例"
+"化."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:321
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Monitor services</emphasis>: These observe an MBean "
+"attribute's numerical or string value, and can notify other objects of "
+"several types of changes in the target."
+msgstr ""
+"<emphasis role=\"bold\">Monitor services</emphasis>: 它们观察MBean属性的数字"
+"或字符串值, 而且能够向其他对象通知目标的不同类型的变化. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:326
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Timer services</emphasis>: These provide a "
+"scheduling mechanism based on a one-time alarm-clock notification or on a "
+"repeated, periodic notification."
+msgstr ""
+"<emphasis role=\"bold\">Timer services</emphasis>: 它们基于一次性的闹钟式的通"
+"知或者重复的,定期的通知来提供时序安排机制."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:331
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">The relation service</emphasis>: This service "
+"defines associations between MBeans and enforces consistency on the "
+"relationships."
+msgstr ""
+"<emphasis role=\"bold\">The relation service</emphasis>: 这个服务定义了MBeans"
+"和关系的强制一致性之间的联系."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:336
+#, no-c-format
+msgid ""
+"Any JMX-compliant implementation will provide all of these agent services. "
+"However, JBoss does not rely on any of these standard agent services."
+msgstr ""
+"任何JMX兼容的实现都将提供所有这些代理服务. 然而, JBoss不依赖于这些标准的代理"
+"服务."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:346
+#, no-c-format
+msgid "JBoss JMX Implementation Architecture"
+msgstr "JBoss JMX 实现架构"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:348
+#, no-c-format
+msgid "The JBoss ClassLoader Architecture"
+msgstr "JBoss 类加载器架构"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:349
+#, fuzzy, no-c-format
+msgid ""
+"JBoss employs a class loading architecture that facilitates sharing of "
+"classes across deployment units and hot deployment of services and "
+"applications. Before discussing the JBoss specific class loading model, we "
+"need to understand the nature of Java's type system and how class "
+"loaders fit in."
+msgstr ""
+"JBoss 采用了一个利用部署单元和服务及应用程序热部署之间共享的类加载架构. 在讨"
+"论JBoss特定的类加载模型之前, 我们需要理解Java的类型体系的性质和类加载器怎样适"
+"应它."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:355
+#, no-c-format
+msgid "Class Loading and Types in Java"
+msgstr "Java里的类加载和类型"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:356
+#, no-c-format
+msgid ""
+"Class loading is a fundamental part of all server architectures. Arbitrary "
+"services and their supporting classes must be loaded into the server "
+"framework. This can be problematic due to the strongly typed nature of Java. "
+"Most developers know that the type of a class in Java is a function of the "
+"fully qualified name of the class. However the type is also a function of "
+"the <literal>java.lang.ClassLoader</literal> that is used to define that "
+"class. This additional qualification of type is necessary to ensure that "
+"environments in which classes may be loaded from arbitrary locations would "
+"be type-safe."
+msgstr ""
+"类加载(Class loading)是所有服务器架构的基础部分. 任何服务和它们的支持类必须装"
+"载到服务器框架里. 由于Java的强类型(strongly typed)性质, 这可能会是个问题. 大"
+"部分开发者知道Java里类的类型是一个类全名的函数. 然而这个类型也是用来定义"
+"<literal>java.lang.ClassLoader</literal>的一个函数. 类型的这种额外的限制对于"
+"确保类从任何位置加载都很安全(type-safe)来说是必要的."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:359
+#, fuzzy, no-c-format
+msgid ""
+"However, in a dynamic environment like an application server, and especially "
+"JBoss with its support for hot deployment are that class cast exceptions, "
+"linkage errors and illegal access errors can show up in ways not seen in "
+"more static class loading contexts. Let's take a look at the meaning of "
+"each of these exceptions and how they can happen."
+msgstr ""
+"然而, 在应用程序服务器这样的动态的环境里, 特别是支持热部署的JBoss里, 会出现类"
+"转换异常, 链接错误和非法访问错误, 这些在其他静态的类加载上下文里是看不到的. "
+"让我们看看这些异常的含义以及它们是怎样发生的."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:363
+#, fuzzy, no-c-format
+msgid "ClassCastExceptions - I'm Not Your Type"
+msgstr "ClassCastExceptions - I'm Not Your Type"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:364
+#, no-c-format
+msgid ""
+"A <literal>java.lang.ClassCastException</literal> results whenever an "
+"attempt is made to cast an instance to an incompatible type. A simple "
+"example is trying to obtain a <literal>String</literal> from a "
+"<literal>List</literal> into which a <literal>URL</literal> was placed:"
+msgstr ""
+"<literal>java.lang.ClassCastException</literal> 在试图转换不兼容类型的实例时"
+"发生. 一个简单的示例就是试图从存放<literal>URL</literal>的<literal>List</"
+"literal>里获取一个<literal>String</literal>:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:367
+#, fuzzy, no-c-format
+msgid ""
+"ArrayList array = new ArrayList();\n"
+"array.add(new URL(\"file:/tmp\"));\n"
+"String url = (String) array.get(0);\n"
+"\n"
+"java.lang.ClassCastException: java.net.URL\n"
+"at org.jboss.book.jmx.ex0.ExCCEa.main(Ex1CCE.java:16)"
+msgstr ""
+"ArrayList array = new ArrayList();\n"
+"array.add(new URL(\"file:/tmp\"));\n"
+"String url = (String) array.get(0);\n"
+"\n"
+"java.lang.ClassCastException: java.net.URL\n"
+"at org.jboss.chap2.ex0.ExCCEa.main(Ex1CCE.java:16)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:368
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>ClassCastException</literal> tells you that the attempt to cast "
+"the array element to a <literal>String</literal> failed because the actual "
+"type was <literal>URL</literal>. This trivial case is not what we are "
+"interested in however. Consider the case of a JAR being loaded by different "
+"class loaders. Although the classes loaded through each class loader are "
+"identical in terms of the bytecode, they are completely different types as "
+"viewed by the Java type system. An example of this is illustrated by the "
+"code shown in <xref linkend=\"ClassCastExceptions___Im_Not_Your_Type-"
+"The_ExCCEc_class_used_to_demonstrate_ClassCastException_due_to_duplicate_class_loaders"
+"\"/>."
+msgstr ""
+"<literal>ClassCastException</literal> 告诉当你试图把数组元素转换到"
+"<literal>String</literal>时失败, 因为实际的类型是<literal>URL</literal>. 然而"
+"这个示例并不是我们感兴趣的. 来考虑一个被不同类加载器加载的JAR文件. 虽然通过不"
+"同的类加载器加载的类从字节码来说是一样的, 但是它们被Java 类型体系视作完全不同"
+"的类型. <xref linkend=\"ch2.duploader.ex\"/>里的代码说明了这种情况下的一个例"
+"子."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:371
+#, no-c-format
+msgid ""
+"The ExCCEc class used to demonstrate ClassCastException due to duplicate "
+"class loaders"
+msgstr "ExCCEc类过去常常用来演示由重复的类加载器引起的ClassCastException."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:372
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.io.File;\n"
+"import java.net.URL;\n"
+"import java.net.URLClassLoader;\n"
+"import java.lang.reflect.Method;\n"
+"\n"
+"import org.apache.log4j.Logger;\n"
+"\n"
+"import org.jboss.util.ChapterExRepository;\n"
+"import org.jboss.util.Debug;\n"
+"\n"
+"/**\n"
+" * An example of a ClassCastException that\n"
+" * results from classes loaded through\n"
+" * different class loaders.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExCCEc\n"
+"{\n"
+" public static void main(String[] args) throws Exception\n"
+" {\n"
+" ChapterExRepository.init(ExCCEc.class);\n"
+"\n"
+" String chapDir = System.getProperty(\"j2eechapter.dir\");\n"
+" Logger ucl0Log = Logger.getLogger(\"UCL0\");\n"
+" File jar0 = new File(chapDir+\"/j0.jar\");\n"
+" ucl0Log.info(\"jar0 path: \"+jar0.toString());\n"
+" URL[] cp0 = {jar0.toURL()};\n"
+" URLClassLoader ucl0 = new URLClassLoader(cp0);\n"
+" Thread.currentThread().setContextClassLoader(ucl0);\n"
+" Class objClass = ucl0.loadClass(\"org.jboss.book.jmx.ex0.ExObj\");\n"
+" StringBuffer buffer = new\n"
+" StringBuffer(\"ExObj Info\");\n"
+" Debug.displayClassInfo(objClass, buffer, false);\n"
+" ucl0Log.info(buffer.toString());\n"
+" Object value = objClass.newInstance();\n"
+" \n"
+" File jar1 = new File(chapDir+\"/j0.jar\");\n"
+" Logger ucl1Log = Logger.getLogger(\"UCL1\");\n"
+" ucl1Log.info(\"jar1 path: \"+jar1.toString());\n"
+" URL[] cp1 = {jar1.toURL()};\n"
+" URLClassLoader ucl1 = new URLClassLoader(cp1);\n"
+" Thread.currentThread().setContextClassLoader(ucl1);\n"
+" Class ctxClass2 = ucl1.loadClass(\"org.jboss.book.jmx.ex0.ExCtx\");\n"
+" buffer.setLength(0);\n"
+" buffer.append(\"ExCtx Info\");\n"
+" Debug.displayClassInfo(ctxClass2, buffer, false);\n"
+" ucl1Log.info(buffer.toString());\n"
+" Object ctx2 = ctxClass2.newInstance();\n"
+" \n"
+" try {\n"
+" Class[] types = {Object.class};\n"
+" Method useValue =\n"
+" ctxClass2.getMethod(\"useValue\", types);\n"
+" Object[] margs = {value};\n"
+" useValue.invoke(ctx2, margs);\n"
+" } catch(Exception e) {\n"
+" ucl1Log.error(\"Failed to invoke ExCtx.useValue\", e);\n"
+" throw e;\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:373
+#, no-c-format
+msgid "The ExCtx, ExObj, and ExObj2 classes used by the examples"
+msgstr "示例所使用的 ExCtx, ExObj, 和 ExObj2 类."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:374
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.io.IOException;\n"
+"import org.apache.log4j.Logger;\n"
+"import org.jboss.util.Debug;\n"
+"\n"
+"/**\n"
+" * A classes used to demonstrate various class\n"
+" * loading issues\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExCtx\n"
+"{\n"
+" ExObj value;\n"
+" \n"
+" public ExCtx() \n"
+" throws IOException\n"
+" {\n"
+" value = new ExObj();\n"
+" Logger log = Logger.getLogger(ExCtx.class);\n"
+" StringBuffer buffer = new StringBuffer(\"ctor.ExObj\");\n"
+" Debug.displayClassInfo(value.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+" ExObj2 obj2 = value.ivar;\n"
+" buffer.setLength(0);\n"
+" buffer = new StringBuffer(\"ctor.ExObj.ivar\");\n"
+" Debug.displayClassInfo(obj2.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+" }\n"
+"\n"
+" public Object getValue()\n"
+" {\n"
+" return value;\n"
+" }\n"
+"\n"
+" public void useValue(Object obj) \n"
+" throws Exception\n"
+" {\n"
+" Logger log = Logger.getLogger(ExCtx.class);\n"
+" StringBuffer buffer = new\n"
+" StringBuffer(\"useValue2.arg class\");\n"
+" Debug.displayClassInfo(obj.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+" buffer.setLength(0);\n"
+" buffer.append(\"useValue2.ExObj class\");\n"
+" Debug.displayClassInfo(ExObj.class, buffer, false);\n"
+" log.info(buffer.toString());\n"
+" ExObj ex = (ExObj) obj;\n"
+" }\n"
+"\n"
+" void pkgUseValue(Object obj) \n"
+" throws Exception\n"
+" {\n"
+" Logger log = Logger.getLogger(ExCtx.class);\n"
+" log.info(\"In pkgUseValue\");\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:375
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.io.Serializable;\n"
+"\n"
+"/**\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExObj\n"
+" implements Serializable\n"
+"{\n"
+" public ExObj2 ivar = new ExObj2();\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:376
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.io.Serializable;\n"
+"\n"
+"/**\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExObj2 \n"
+" implements Serializable\n"
+"{\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:377
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>ExCCEc.main</literal> method uses reflection to isolate the "
+"classes that are being loaded by the class loaders <literal>ucl0</literal> "
+"and <literal>ucl1</literal> from the application class loader. Both are "
+"setup to load classes from the <literal>output/jmx/j0.jar</literal>, the "
+"contents of which are:"
+msgstr ""
+"<literal>ExCCEc.main</literal>方法使用了reflection 来隔离由类加载器"
+"<literal>ucl0</literal> 和 <literal>ucl1</literal>从应用程序类加载器里加载的"
+"类. 它们都设置成从<literal>output/chap2/j0.jar</literal>里加载类, 内容如下:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:380
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ jar -tf output/jmx/j0.jar\n"
+"...\n"
+"org/jboss/book/jmx/ex0/ExCtx.class\n"
+"org/jboss/book/jmx/ex0/ExObj.class\n"
+"org/jboss/book/jmx/ex0/ExObj2.class"
+msgstr ""
+"[examples]$ jar -tf output/chap2/j0.jar\n"
+"...\n"
+"org/jboss/chap2/ex0/ExCtx.class\n"
+"org/jboss/chap2/ex0/ExObj.class\n"
+"org/jboss/chap2/ex0/ExObj2.class"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:381
+#, fuzzy, no-c-format
+msgid ""
+"We will run an example that demonstrates how a class cast exception can "
+"occur and then look at the specific issue with the example. See <xref "
+"linkend=\"Book_Example_Installation\"/> for instructions on installing the "
+"examples accompanying the book, and then run the example from within the "
+"examples directory using the following command:"
+msgstr ""
+"我们将运行一个示例来演示类转换异常是怎样发生的, 然后再来看看这个示例的其他问"
+"题. 请参考<xref linkend=\"appendix-install\"/>来安装本书所带的示例, 然后用下"
+"面的命令来运行examples 目录里的示例:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:384
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=0c run-example\n"
+"...\n"
+" [java] java.lang.reflect.InvocationTargetException\n"
+" [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native "
+"Method)\n"
+" [java] at sun.reflect.NativeMethodAccessorImpl.invoke"
+"(NativeMethodAccessorImpl.java:39)\n"
+" [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke"
+"(DelegatingMethodAccessorImpl\n"
+" .java:25)\n"
+" [java] at java.lang.reflect.Method.invoke(Method.java:585)\n"
+" [java] at org.jboss.book.jmx.ex0.ExCCEc.main(ExCCEc.java:58)\n"
+" [java] Caused by: java.lang.ClassCastException: org.jboss.book.jmx.ex0."
+"ExObj\n"
+" [java] at org.jboss.book.jmx.ex0.ExCtx.useValue(ExCtx.java:44)\n"
+" [java] ... 5 more"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=0c run-example\n"
+"...\n"
+" [java] [ERROR,UCL1] Failed to invoke ExCtx.useValue\n"
+" [java] java.lang.reflect.InvocationTargetException\n"
+" [java] at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n"
+" [java] at sun.reflect.NativeMethodAccessorImpl.invoke"
+"(NativeMethodAccessorImpl.java:39)\n"
+" [java] at sun.reflect.DelegatingMethodAccessorImpl.invoke"
+"(DelegatingMethodAccessorImpl\n"
+".java:25)\n"
+" [java] at java.lang.reflect.Method.invoke(Method.java:324)\n"
+" [java] at org.jboss.chap2.ex0.ExCCEc.main(ExCCEc.java:58)\n"
+" [java] Caused by: java.lang.ClassCastException\n"
+" [java] at org.jboss.chap2.ex0.ExCtx.useValue(ExCtx.java:44)\n"
+" [java] ... 5 more"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:385
+#, fuzzy, no-c-format
+msgid ""
+"Only the exception is shown here. The full output can be found in the "
+"<literal>logs/jmx-ex0c.log</literal> file. At line 55 of <literal>ExCCEc."
+"java</literal> we are invoking <literal>ExcCCECtx.useValue(Object)</literal> "
+"on the instance loaded and created in lines 37-48 using <literal>ucl1</"
+"literal>. The <literal>ExObj</literal> passed in is the one loaded and "
+"created in lines 25-35 via <literal>ucl0</literal>. The exception results "
+"when the <literal>ExCtx.useValue</literal> code attempts to cast the "
+"argument passed in to a <literal>ExObj</literal>. To understand why this "
+"fails consider the debugging output from the <literal>jmx-ex0c.log</literal> "
+"file shown in <xref linkend=\"ClassCastExceptions___Im_Not_Your_Type-"
+"The_jmx_ex0c.log_debugging_output_for_the_ExObj_classes_seen\"/>."
+msgstr ""
+"这里只显示了异常信息. 完整的输出可以在<literal>logs/chap2-ex0c.log</literal>"
+"文件里找到. 在<literal>ExCCEc.java</literal>的第55行, 我们在第37-48行用"
+"<literal>ucl1</literal>加载和创建的实例上调用了<literal>ExcCCECtx.useValue"
+"(Object)</literal>. 传入的<literal>ExObj</literal>是第25-35行用"
+"<literal>ucl0</literal>创建的实例. 当<literal>ExCtx.useValue</literal>代码试"
+"图转换传入<literal>ExObj</literal>的参数时, 异常发生了. 要理解这个为什么会失"
+"败, 你可以参考<xref linkend=\"ch2.debug.ex\"/>里显示的<literal>chap2-ex0c."
+"log</literal>文件里的调试信息. "
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:388
+#, fuzzy, no-c-format
+msgid "The jmx-ex0c.log debugging output for the ExObj classes seen"
+msgstr "chap2-ex0c.log里关于ExObj类的调试信息"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:389
+#, fuzzy, no-c-format
+msgid ""
+"[INFO,UCL0] ExObj Info\n"
+"org.jboss.book.jmx.ex0.ExObj(f8968f).ClassLoader=java.net."
+"URLClassLoader at 2611a7\n"
+"..java.net.URLClassLoader at 2611a7\n"
+"....file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/jmx/"
+"j0.jar\n"
+"++++CodeSource: (file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/"
+"output/\n"
+" jmx/j0.jar <no signer certificates>)\n"
+"Implemented Interfaces:\n"
+"++interface java.io.Serializable(41b571)\n"
+"++++ClassLoader: null\n"
+"++++Null CodeSource\n"
+"[INFO,ExCtx] useValue2.ExObj class\n"
+"org.jboss.book.jmx.ex0.ExObj(bc8e1e).ClassLoader=java.net."
+"URLClassLoader at 6bd8ea\n"
+"..java.net.URLClassLoader at 6bd8ea\n"
+"....file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/output/jmx/"
+"j0.jar\n"
+"++++CodeSource: (file:/Users/orb/proj/jboss/jboss-docs/jbossas/j2ee/examples/"
+"output/\n"
+" jmx/j0.jar <no signer certificates>)\n"
+"Implemented Interfaces:\n"
+"++interface java.io.Serializable(41b571)\n"
+"++++ClassLoader: null\n"
+"++++Null CodeSource"
+msgstr ""
+"[INFO,UCL0] ExObj Info\n"
+"org.jboss.chap2.ex0.ExObj(113fe2).ClassLoader=java.net."
+"URLClassLoader at 6e3914\n"
+"..java.net.URLClassLoader at 6e3914\n"
+"....file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/"
+"examples/output/\n"
+" chap2/j0.jar\n"
+"++++CodeSource:\n"
+" (file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/"
+"examples/output/\n"
+" chap2/j0.jar <no certificates>)\n"
+"Implemented Interfaces:\n"
+"++interface java.io.Serializable(7934ad)\n"
+"++++ClassLoader: null\n"
+"++++Null CodeSource\n"
+" \n"
+"[INFO,ExCtx] useValue2.ExObj class\n"
+"org.jboss.chap2.ex0.ExObj(415de6).ClassLoader=java.net."
+"URLClassLoader at 30e280\n"
+"..java.net.URLClassLoader at 30e280\n"
+"....file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/"
+"examples/output/\n"
+" chap2/j0.jar\n"
+"++++CodeSource:\n"
+" (file:/C:/Scott/JBoss/Books/AdminDevel/education/books/admin-devel/"
+"examples/output/\n"
+" chap2/j0.jar <no certificates>)\n"
+"Implemented Interfaces:\n"
+"++interface java.io.Serializable(7934ad)\n"
+"++++ClassLoader: null\n"
+"++++Null CodeSource"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:390
+#, fuzzy, no-c-format
+msgid ""
+"The first output prefixed with <literal>[INFO,UCL0]</literal> shows that the "
+"<literal>ExObj</literal> class loaded at line <literal>ExCCEc.java:31</"
+"literal> has a hash code of <literal>f8968f</literal> and an associated "
+"<literal>URLClassLoader</literal> instance with a hash code of "
+"<literal>2611a7</literal>, which corresponds to ucl0. This is the class used "
+"to create the instance passed to the <literal>ExCtx.useValue</literal> "
+"method. The second output prefixed with <literal>[INFO,ExCtx]</literal> "
+"shows that the <literal>ExObj</literal> class as seen in the context of the "
+"<literal>ExCtx.useValue</literal> method has a hash code of <literal>bc8e1e "
+"</literal> and a <literal>URLClassLoader</literal> instance with an "
+"associated hash code of <literal>6bd8ea</literal>, which corresponds to "
+"<literal>ucl1</literal>. So even though the <literal>ExObj</literal> classes "
+"are the same in terms of actual bytecode since it comes from the same "
+"<literal>j0.jar</literal>, the classes are different as seen by both the "
+"<literal>ExObj</literal> class hash codes, and the associated "
+"<literal>URLClassLoader</literal> instances. Hence, attempting to cast an "
+"instance of <literal>ExObj</literal> from one scope to the other results in "
+"the <literal>ClassCastException</literal>."
+msgstr ""
+"以<literal>[INFO,UCL0]</literal>为前缀的输出显示了在<literal>ExCCEc.java:31</"
+"literal>行加载的<literal>ExObj</literal>类有一个为<literal>113fe2</literal>的"
+"哈希代码, 和有着对应ucl0的哈希代码为<literal>6e3914</literal>的相关"
+"<literal>URLClassLoader</literal>实例. 这是用来创建传入<literal>ExCtx."
+"useValue</literal>方法的实例的类. 第二部分以<literal>[INFO,ExCtx]</literal>为"
+"前缀的输出显示了如<literal>ExCtx.useValue</literal>方法的上下文里看到的"
+"<literal>ExObj</literal>有一个为<literal>415de6</literal>的哈希代码, 和和有着"
+"对应ucl1的哈希代码为<literal>30e280</literal>的<literal>URLClassLoader</"
+"literal>实例. 所以即使<literal>ExObj</literal>类从实际字节码来说是相同的, 因"
+"为都是从同一<literal>j0.jar</literal>而来, 我们可以看到<literal>ExObj</"
+"literal>列的哈希代码和相关的<literal>URLClassLoader</literal>实例都不一样. 因"
+"此, 试图把<literal>ExObj</literal>的实例相互转换都会导致"
+"<literal>ClassCastException</literal>."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:393
+#, no-c-format
+msgid ""
+"This type of error is common when redeploying an application to which other "
+"applications are holding references to classes from the redeployed "
+"application. For example, a standalone WAR accessing an EJB. If you are "
+"redeploying an application, all dependent applications must flush their "
+"class references. Typically this requires that the dependent applications "
+"themselves be redeployed."
+msgstr ""
+"当重新部署应用程序, 而其他应用程序拥有该重部署程序的类的引用时, 这种类型的错"
+"误很常见. 例如, 访问EJB的独立的WAR. 如果你重新部署一个应用程序, 所有依赖的应"
+"用程序必须刷新它们的类引用. 典型地来讲, 这要求依赖的应用程序自己也重新部署."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:396
+#, no-c-format
+msgid ""
+"An alternate means of allowing independent deployments to interact in the "
+"presence of redeployment would be to isolate the deployments by configuring "
+"the EJB layer to use the standard call-by-value semantics rather than the "
+"call-by-reference JBoss will default to for components collocated in the "
+"same VM. An example of how to enable call-by-value semantics is presented in"
+msgstr ""
+"另一个允许独立的部署和重新部署相互作用的方法就是通过配置EJB层来使用标准的值调"
+"用(call-by-value), 而不是JBoss在同一虚拟机(VM)里缺省布置的引用调用(call-by-"
+"reference), 来隔离部署. 关于怎样启用值调用的示例如所演示的:"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:402
+#, no-c-format
+msgid "IllegalAccessException - Doing what you should not"
+msgstr "IllegalAccessException - Doing what you should not"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:403
+#, fuzzy, no-c-format
+msgid ""
+"A <literal>java.lang.IllegalAccessException</literal> is thrown when one "
+"attempts to access a method or member that visibility qualifiers do not "
+"allow. Typical examples are attempting to access private or protected "
+"methods or instance variables. Another common example is accessing package "
+"protected methods or members from a class that appears to be in the correct "
+"package, but is really not due to caller and callee classes being loaded by "
+"different class loaders. An example of this is illustrated by the code shown "
+"in <xref linkend=\"IllegalAccessException___Doing_what_you_should_not-"
+"The_ExIAEd_class_used_to_demonstrate_IllegalAccessException_due_to_duplicate_class_loaders"
+"\"/>."
+msgstr ""
+"当试图访问可见性限定符(visibility qualifiers)所不允许的方法或成员时会抛出"
+"<literal>java.lang.IllegalAccessException</literal>. 典型的例子就是试图访问"
+"private或protected方法或实例变量. 另外一个常见的例子就是访问看似正确的包里的"
+"类的包protected 方法或成员, 但实际上却由于调用者和被调用的类是由不同的类加载"
+"所加载的. <xref linkend=\"ch2.ldcon.ex\"/>里的代码说明了这样的一个例子."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:406
+#, no-c-format
+msgid ""
+"The ExIAEd class used to demonstrate IllegalAccessException due to duplicate "
+"class loaders"
+msgstr "ExIAEd类常常用来演示由于重复类加载器引起的IllegalAccessException."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:407
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.io.File;\n"
+"import java.net.URL;\n"
+"import java.net.URLClassLoader;\n"
+"import java.lang.reflect.Method;\n"
+"\n"
+"import org.apache.log4j.Logger;\n"
+"\n"
+"import org.jboss.util.ChapterExRepository;\n"
+"import org.jboss.util.Debug;\n"
+"\n"
+"/**\n"
+" * An example of IllegalAccessExceptions due to\n"
+" * classes loaded by two class loaders.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExIAEd\n"
+"{\n"
+" public static void main(String[] args) throws Exception\n"
+" {\n"
+" ChapterExRepository.init(ExIAEd.class);\n"
+"\n"
+" String chapDir = System.getProperty(\"j2eechapter.dir\");\n"
+" Logger ucl0Log = Logger.getLogger(\"UCL0\");\n"
+" File jar0 = new File(chapDir+\"/j0.jar\");\n"
+" ucl0Log.info(\"jar0 path: \"+jar0.toString());\n"
+" URL[] cp0 = {jar0.toURL()};\n"
+" URLClassLoader ucl0 = new URLClassLoader(cp0);\n"
+" Thread.currentThread().setContextClassLoader(ucl0);\n"
+" \n"
+" StringBuffer buffer = new\n"
+" StringBuffer(\"ExIAEd Info\");\n"
+" Debug.displayClassInfo(ExIAEd.class, buffer, false);\n"
+" ucl0Log.info(buffer.toString());\n"
+" \n"
+" Class ctxClass1 = ucl0.loadClass(\"org.jboss.book.jmx.ex0.ExCtx\");\n"
+" buffer.setLength(0);\n"
+" buffer.append(\"ExCtx Info\");\n"
+" Debug.displayClassInfo(ctxClass1, buffer, false);\n"
+" ucl0Log.info(buffer.toString());\n"
+" Object ctx0 = ctxClass1.newInstance();\n"
+"\n"
+" try {\n"
+" Class[] types = {Object.class};\n"
+" Method useValue =\n"
+" ctxClass1.getDeclaredMethod(\"pkgUseValue\", types);\n"
+" Object[] margs = {null};\n"
+" useValue.invoke(ctx0, margs);\n"
+" } catch(Exception e) {\n"
+" ucl0Log.error(\"Failed to invoke ExCtx.pkgUseValue\", e);\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:408
+#, no-c-format
+msgid ""
+"The <literal>ExIAEd.main</literal> method uses reflection to load the "
+"<literal>ExCtx</literal> class via the <literal>ucl0</literal> class loader "
+"while the <literal>ExIEAd</literal> class was loaded by the application "
+"class loader. We will run this example to demonstrate how the "
+"<literal>IllegalAccessException</literal> can occur and then look at the "
+"specific issue with the example. Run the example using the following command:"
+msgstr ""
+"当<literal>ExIEAd</literal>类被程序类加载器所加载时, <literal>ExIAEd.main</"
+"literal>方法使用reflection 通过<literal>ucl0</literal>类加载器来加载"
+"<literal>ExCtx</literal>类. 我们将运行这个例子来演示"
+"<literal>IllegalAccessException</literal>是怎样产生的并查看这个例子的特定问"
+"题. 用下面的命令运行这个例子:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:411
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=0d run-example\n"
+"Buildfile: build.xml\n"
+"...\n"
+"[java] java.lang.IllegalAccessException: Class org.jboss.book.jmx.ex0."
+"ExIAEd \n"
+" can not access a member of class org.jboss.book.jmx.ex0.ExCtx with "
+"modifiers \"\"\n"
+"[java] at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:65)\n"
+"[java] at java.lang.reflect.Method.invoke(Method.java:578)\n"
+"[java] at org.jboss.book.jmx.ex0.ExIAEd.main(ExIAEd.java:48)"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=0d run-example\n"
+"Buildfile: build.xml\n"
+"...\n"
+"[java] [ERROR,UCL0] Failed to invoke ExCtx.pkgUseValue\n"
+"[java] java.lang.IllegalAccessException: Class org.jboss.chap2.ex0.ExIAEd \n"
+" can not access a member of class org.jboss.chap2.ex0.ExCtx with modifiers "
+"\"\"\n"
+"[java] at sun.reflect.Reflection.ensureMemberAccess(Reflection.java:57)\n"
+"[java] at java.lang.reflect.Method.invoke(Method.java:317)\n"
+"[java] at org.jboss.chap2.ex0.ExIAEd.main(ExIAEd.java:48)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:412
+#, fuzzy, no-c-format
+msgid ""
+"The truncated output shown here illustrates the "
+"<literal>IllegalAccessException</literal>. The full output can be found in "
+"the <literal>logs/jmx-ex0d.log</literal> file. At line 48 of <literal>ExIAEd."
+"java</literal> the <literal>ExCtx.pkgUseValue(Object)</literal> method is "
+"invoked via reflection. The <literal>pkgUseValue</literal> method has "
+"package protected access and even though both the invoking class "
+"<literal>ExIAEd</literal> and the <literal>ExCtx</literal> class whose "
+"method is being invoked reside in the <literal>org.jboss.book.jmx.ex0</"
+"literal> package, the invocation is seen to be invalid due to the fact that "
+"the two classes are loaded by different class loaders. This can be seen by "
+"looking at the debugging output from the <literal>jmx-ex0d.log file</"
+"literal>."
+msgstr ""
+"整理过的输出说明了<literal>IllegalAccessException</literal>. 完整的输出可以"
+"在 <literal>logs/chap2-ex0d.log</literal>文件里找到. <literal>ExIAEd.java</"
+"literal>的第48行通过reflection调用了<literal>ExCtx.pkgUseValue(Object)</"
+"literal>方法. <literal>pkgUseValue</literal>方法有?包保护的访问, 且即使"
+"<literal>ExIAEd</literal>和<literal>ExCtx</literal>的方法是在<literal>org."
+"jboss.chap2.ex0</literal>包里被调用的, 但由于这两个类是由不同的类加载器所加载"
+"的, 所以这个调用是无效的. 这些可以通过 <literal>chap2-ex0d.log file</literal>"
+"里的调试信息看到. "
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:415
+#, fuzzy, no-c-format
+msgid ""
+"[INFO,UCL0] ExIAEd Info\n"
+"org.jboss.book.jmx.ex0.ExIAEd(7808b9).ClassLoader=sun.misc.Launcher"
+"$AppClassLoader at a9c85c\n"
+"..sun.misc.Launcher$AppClassLoader at a9c85c\n"
+"...\n"
+"[INFO,UCL0] ExCtx Info\n"
+"org.jboss.book.jmx.ex0.ExCtx(64c34e).ClassLoader=java.net."
+"URLClassLoader at a9c85c\n"
+"..java.net.URLClassLoader at 5d88a\n"
+"..."
+msgstr ""
+"[INFO,UCL0] ExIAEd Info\n"
+"org.jboss.chap2.ex0.ExIAEd(65855a).ClassLoader=sun.misc.Launcher"
+"$AppClassLoader at 3f52a5\n"
+"..sun.misc.Launcher$AppClassLoader at 3f52a5\n"
+"...\n"
+"[INFO,UCL0] ExCtx Info\n"
+"org.jboss.chap2.ex0.ExCtx(70eed6).ClassLoader=java.net."
+"URLClassLoader at 113fe2\n"
+"..java.net.URLClassLoader at 113fe2\n"
+"..."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:416
+#, fuzzy, no-c-format
+msgid ""
+"The ExIAEd class is seen to have been loaded via the default application "
+"class loader instance <literal>sun.misc.Launcher$AppClassLoader at a9c85c</"
+"literal>, while the <literal>ExCtx</literal> class was loaded by the "
+"<literal>java.net.URLClassLoader at a9c85c</literal> instance. Because the "
+"classes are loaded by different class loaders, access to the package "
+"protected method is seen to be a security violation. So, not only is type a "
+"function of both the fully qualified class name and class loader, the "
+"package scope is as well."
+msgstr ""
+"我们可以看到 ExIAEd类通过缺省的应用程序类加载器实例<literal>sun.misc.Launcher"
+"$AppClassLoader at 3f52a5</literal>被加载, 而<literal>ExCtx</literal>是由"
+"<literal>java.net.URLClassLoader at 113fe2</literal>实例来加载的. 因为它们是由不"
+"同的类加载器所加载的, 所以对包受保护的方法(package protected method)的访问就"
+"是对安全性的违反. 因此, 类型不仅是类全名和类加载器的函数, 它也是包范围的函"
+"数?. "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:419
+#, no-c-format
+msgid ""
+"An example of how this can happen in practice is to include the same classes "
+"in two different SAR deployments. If classes in the deployment have a "
+"package protected relationship, users of the SAR service may end up loading "
+"one class from SAR class loading at one point, and then load another class "
+"from the second SAR at a later time. If the two classes in question have a "
+"protected access relationship an <literal>IllegalAccessError</literal> will "
+"result. The solution is to either include the classes in a separate jar that "
+"is referenced by the SARs, or to combine the SARs into a single deployment. "
+"This can either be a single SAR, or an EAR that includes both SARs."
+msgstr ""
+"实践中的一个例子就是在两个不同的SAR部署里包括相同的类. 如果部署里的类有一个包"
+"保护的关系, SAR服务的用户可以结束从一个SAR里加载类之后, 从第二个SAR里加载另外"
+"一个类. 如果这两个类有类保护访问的关系, 那么将导致"
+"<literal>IllegalAccessError</literal>. 解决办法是把它们放在SAR所引用的独立的"
+"JAR里, 或者把两个SAR合并为单一的部署. 这个部署可以是单一的SAR或者包含这两个"
+"SAR的EAR."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:425
+#, no-c-format
+msgid "LinkageErrors - Making Sure You Are Who You Say You Are"
+msgstr "LinkageErrors - Making Sure You Are Who You Say You Are"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:426
+#, no-c-format
+msgid ""
+"Loading constraints validate type expectations in the context of class "
+"loader scopes to ensure that a class <literal>X</literal> is consistently "
+"the same class when multiple class loaders are involved. This is important "
+"because Java allows for user defined class loaders. Linkage errors are "
+"essentially an extension of the class cast exception that is enforced by the "
+"VM when classes are loaded and used."
+msgstr ""
+"加载约束(Loading constraints)在类加载器范围的上下文里确认类型, 来确保当有多个"
+"类加载器被调用时, 类<literal>X</literal>可以保持一致性. 这很重要, 因为Java允"
+"许用户定义类加载器. 链接错误(Linkage errors)本质上是类转换异常(class cast "
+"exception)的一个扩展, 它是在类被加载和使用时由虚拟机(VM)强制抛出的."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:429
+#, fuzzy, no-c-format
+msgid ""
+"To understand what loading constraints are and how they ensure type-safety "
+"we will first introduce the nomenclature of the Liang and Bracha paper along "
+"with an example from this paper. There are two type of class loaders, "
+"initiating and defining. An initiating class loader is one that a "
+"<literal>ClassLoader.loadClass</literal> method has been invoked on to "
+"initiate the loading of the named class. A defining class loader is the "
+"loader that calls one of the <literal>ClassLoader.defineClass</literal> "
+"methods to convert the class byte code into a <literal>Class</literal> "
+"instance. The most complete expression of a class is given by <literal><C,"
+"Ld><superscript>Li</superscript></literal>, where <literal>C</literal> is "
+"the fully qualified class name, <literal>Ld</literal> is the defining class "
+"loader, and <literal>Li</literal> is the initiating class loader. In a "
+"context where the initiating class loader is not important the type may be "
+"represented by <literal><C,Ld></literal>, while when the defining "
+"class loader is not important, the type may be represented by "
+"<literal>C<superscript>Li</superscript></literal>. In the latter case, there "
+"is still a defining class loader, it's just not important what the "
+"identity of the defining class loader is. Also, a type is completely defined "
+"by <literal><C,Ld></literal>. The only time the initiating loader is "
+"relevant is when a loading constraint is being validated. Now consider the "
+"classes shown in <xref linkend="
+"\"LinkageErrors___Making_Sure_You_Are_Who_You_Say_You_Are-"
+"Classes_demonstrating_the_need_for_loading_constraints\"/>."
+msgstr ""
+"为了理解加载约束(loading constraints)是什么和它怎样确保类型安全(type-"
+"safety), 我们将首先引入随本书的例子一起的 Liang and Bracha paper的术语. 有两"
+"种类型的类加载器, initiating 和 defining. initiating加载器调用"
+"<literal>ClassLoader.loadClass</literal>方法来初始化命名类的加载. defining加"
+"载器调用<literal>ClassLoader.defineClass</literal>方法来把类字节码转换到"
+"<literal>Class</literal>实例里. <literal><C,Ld><superscript>Li</"
+"superscript> </literal> 给出了最完整的类的表达方式, 在这里<literal>C</"
+"literal>是类的全名, <literal>Ld</literal>是defining类加载器, <literal>Li</"
+"literal>是initiating 类加载器. 在initiating 类加载器不是很重要的情况下, 类型"
+"可以由<literal><C,Ld></literal>来代表, 而当defining 类加载器不重要的情"
+"况下, 类型可以用<literal>C<superscript>Li</superscript> </literal>来代表. 在"
+"后面的例子里, 仍然有一个defining 类加载器, 它恰好不象它所代表的那样重要?. 而"
+"且, 类型完全是由<literal><C,Ld></literal>定义的. 唯一和initiating 类加"
+"载器有关的就是加载约束被确认(validated)的时候. 现在考虑一下<xref linkend="
+"\"ch2.ldcon.ex\"/>里的展示的类."
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:432
+#, no-c-format
+msgid "Classes demonstrating the need for loading constraints"
+msgstr "Classes demonstrating the need for loading constraints"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:433
+#, no-c-format
+msgid ""
+"class <C,L1> {\n"
+" void f() {\n"
+" <Spoofed, L1><superscript>L1</superscript>x = <Delegated, "
+"L2><superscript>L2</superscript>\n"
+" x.secret_value = 1; // Should not be allowed\n"
+" }\n"
+"}"
+msgstr ""
+"class <C,L1> {\n"
+" void f() {\n"
+" <Spoofed, L1><superscript>L1</superscript>x = <Delegated, "
+"L2><superscript>L2</superscript>\n"
+" x.secret_value = 1; // Should not be allowed\n"
+" }\n"
+"}"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:434
+#, no-c-format
+msgid ""
+"class <Delegated,L2> {\n"
+" static <Spoofed, L2><superscript>L3</superscript> g() {...}\n"
+" }\n"
+"}"
+msgstr ""
+"class <Delegated,L2> {\n"
+" static <Spoofed, L2><superscript>L3</superscript> g() {...}\n"
+" }\n"
+"}"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:435
+#, no-c-format
+msgid ""
+"class <Spoofed, L1> {\n"
+" public int secret_value;\n"
+"}"
+msgstr ""
+"class <Spoofed, L1> {\n"
+" public int secret_value;\n"
+"}"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:436
+#, no-c-format
+msgid ""
+"class <Spoofed, L2> {\n"
+" private int secret_value;\n"
+"}"
+msgstr ""
+"class <Spoofed, L2> {\n"
+" private int secret_value;\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:437
+#, fuzzy, no-c-format
+msgid ""
+"The class <literal>C</literal> is defined by <literal>L1</literal> and so "
+"<literal>L1</literal> is used to initiate loading of the classes "
+"<literal>Spoofed</literal> and <literal>Delegated</literal> referenced in "
+"the <literal>C.f()</literal> method. The <literal>Spoofed</literal> class is "
+"defined by <literal>L1</literal>, but <literal>Delegated</literal> is "
+"defined by <literal>L2</literal> because <literal>L1</literal> delegates to "
+"<literal>L2</literal>. Since <literal>Delegated</literal> is defined by "
+"<literal>L2</literal>, <literal>L2</literal> will be used to initiate "
+"loading of <literal>Spoofed</literal> in the context of the "
+"<literal>Delegated.g()</literal> method. In this example both <literal>L1</"
+"literal> and <literal>L2</literal> define different versions of "
+"<literal>Spoofed</literal> as indicated by the two versions shown at the end "
+"of <xref linkend=\"LinkageErrors___Making_Sure_You_Are_Who_You_Say_You_Are-"
+"Classes_demonstrating_the_need_for_loading_constraints\"/>. Since <literal>C."
+"f()</literal> believes <literal>x</literal> is an instance of <literal><"
+"Spoofed,L1></literal> it is able to access the private field "
+"<literal>secret_value</literal> of <literal><Spoofed,L2></literal> "
+"returned by <literal>Delegated.g()</literal> due to the 1.1 and earlier Java "
+"VM's failure to take into account that a class type is determined by "
+"both the fully qualified name of the class and the defining class loader."
+msgstr ""
+"<literal>L1</literal>定义了<literal>C</literal>,所以<literal>L1</literal>被"
+"用来初始化<literal>C.f()</literal>方法里引用的<literal>Spoofed</literal>和 "
+"<literal>Delegated</literal>类的加载。虽然<literal>L1</literal>定义了"
+"<literal>Spoofed</literal>类,但是因为<literal>L1</literal>委托了"
+"<literal>L2</literal>,所以<literal>Delegated</literal>是由<literal>L2</"
+"literal>定义的。既然<literal>L2</literal>定义了<literal>Delegated</literal>,"
+"<literal>L2</literal>将被用来初始化<literal>Delegated.g()</literal>方法上下文"
+"里的<literal>Spoofed</literal>的加载。在这个例子里,<literal>L1</literal> 和 "
+"<literal>L2</literal>都定义了不同版本的<literal>Spoofed</literal>,如<xref "
+"linkend=\"ch2.ldcon.ex\"/>结尾处所示。既然<literal>C.f()</literal>相信"
+"<literal>x</literal>是<literal><Spoofed,L1></literal>的一个实例,它能够"
+"访问<literal>Delegated.g()</literal>返回的<literal><Spoofed,L2></"
+"literal>的私有字段<literal>secret_value</literal>,这是由于1.1和更早版本的"
+"Java VM没有考虑到类的类型既可以由类全名又可以由defining 类加载器所决定。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:440
+#, fuzzy, no-c-format
+msgid ""
+"Java addresses this problem by generating loader constraints to validate "
+"type consistency when the types being used are coming from different "
+"defining class loaders. For the <xref linkend="
+"\"LinkageErrors___Making_Sure_You_Are_Who_You_Say_You_Are-"
+"Classes_demonstrating_the_need_for_loading_constraints\"/> example, the VM "
+"generates a constraint <literal>Spoofed<superscript>L1</"
+"superscript>=Spoofed<superscript>L2</superscript></literal> when the first "
+"line of method <literal>C.f() </literal>is verified to indicate that the "
+"type <literal>Spoofed</literal> must be the same regardless of whether the "
+"load of <literal>Spoofed</literal> is initiated by <literal>L1</literal> or "
+"<literal>L2</literal>. It does not matter if <literal>L1</literal> or "
+"<literal>L2</literal>, or even some other class loader defines "
+"<literal>Spoofed</literal>. All that matters is that there is only one "
+"<literal>Spoofed</literal> class defined regardless of whether <literal>L1</"
+"literal> or <literal>L2</literal> was used to initiate the loading. If "
+"<literal>L1</literal> or <literal>L2</literal> have already defined separate "
+"versions of <literal>Spoofed</literal> when this check is made a "
+"<literal>LinkageError</literal> will be generated immediately. Otherwise, "
+"the constraint will be recorded and when <literal>Delegated.g()</literal> is "
+"executed, any attempt to load a duplicate version of <literal>Spoofed</"
+"literal> will result in a <literal>LinkageError</literal>."
+msgstr ""
+"为了解决这个问题,当被使用的类型来自于不同的defining类加载器时,Java通过生成"
+"加载器约束来确认类型一致性。对于例子<xref linkend=\"ch2.ldcon.ex\"/>,当"
+"<literal>C.f() </literal>方法的第一行指出类型<literal>Spoofed</literal>必须相"
+"同而不管<literal>Spoofed</literal>的加载是否由<literal>L1</literal>还是"
+"<literal>L2</literal>初始化时,虚拟机(VM)生成一个约束"
+"<literal>Spoofed<superscript>L1</superscript>=Spoofed<superscript>L2</"
+"superscript> </literal>。它不管是<literal>L1</literal> 还是 <literal>L2</"
+"literal>,甚至是其他的类加载器定义了<literal>Spoofed</literal>,它只关心只有"
+"一个<literal>Spoofed</literal>类被定义。如果<literal>L1</literal> 或者 "
+"<literal>L2</literal>已经定义了不同版本的<literal>Spoofed</literal>,执行这个"
+"检查时就会马上生成一个<literal>LinkageError</literal>。否则,这个约束将被记"
+"录,当<literal>Delegated.g()</literal>被执行的时候,任何试图装载重复版本的"
+"<literal>Spoofed</literal>都将导致<literal>LinkageError</literal>错误。M"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:443
+#, fuzzy, no-c-format
+msgid ""
+"Now let's take a look at how a <literal>LinkageError</literal> can occur "
+"with a concrete example. <xref linkend="
+"\"LinkageErrors___Making_Sure_You_Are_Who_You_Say_You_Are-"
+"A_concrete_example_of_a_LinkageError\"/> gives the example main class along "
+"with the custom class loader used."
+msgstr ""
+"让我们看一下在一个具体例子里<literal>LinkageError</literal>是怎样产生的。"
+"<xref linkend=\"ch2.linkerror.ex\"/>给出了所使用的 main class 和自定义类加载"
+"器的例子。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:446
+#, no-c-format
+msgid "A concrete example of a LinkageError"
+msgstr "A concrete example of a LinkageError"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:447
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"import java.io.File;\n"
+"import java.net.URL;\n"
+"\n"
+"import org.apache.log4j.Logger;\n"
+"import org.jboss.util.ChapterExRepository;\n"
+"import org.jboss.util.Debug;\n"
+"\n"
+"/** \n"
+" * An example of a LinkageError due to classes being defined by more\n"
+" * than one class loader in a non-standard class loading environment.\n"
+" *\n"
+" * @author Scott.Stark at jboss.orgn\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class ExLE\n"
+"{\n"
+" public static void main(String[] args) \n"
+" throws Exception\n"
+" {\n"
+" ChapterExRepository.init(ExLE.class);\n"
+"\n"
+" String chapDir = System.getProperty(\"j2eechapter.dir\");\n"
+" Logger ucl0Log = Logger.getLogger(\"UCL0\");\n"
+" File jar0 = new File(chapDir+\"/j0.jar\");\n"
+" ucl0Log.info(\"jar0 path: \"+jar0.toString());\n"
+" URL[] cp0 = {jar0.toURL()};\n"
+" Ex0URLClassLoader ucl0 = new Ex0URLClassLoader(cp0);\n"
+" Thread.currentThread().setContextClassLoader(ucl0);\n"
+" <emphasis role=\"bold\">Class ctxClass1 = ucl0.loadClass(\"org.jboss."
+"book.jmx.ex0.ExCtx\");</emphasis>\n"
+" <emphasis role=\"bold\">Class obj2Class1 = ucl0.loadClass(\"org."
+"jboss.book.jmx.ex0.ExObj2\");</emphasis>\n"
+" StringBuffer buffer = new StringBuffer(\"ExCtx Info\");\n"
+" Debug.displayClassInfo(ctxClass1, buffer, false);\n"
+" ucl0Log.info(buffer.toString());\n"
+" buffer.setLength(0);\n"
+" buffer.append(\"ExObj2 Info, UCL0\");\n"
+" Debug.displayClassInfo(obj2Class1, buffer, false);\n"
+" ucl0Log.info(buffer.toString());\n"
+" \n"
+" File jar1 = new File(chapDir+\"/j1.jar\");\n"
+" Logger ucl1Log = Logger.getLogger(\"UCL1\");\n"
+" ucl1Log.info(\"jar1 path: \"+jar1.toString());\n"
+" URL[] cp1 = {jar1.toURL()};\n"
+" Ex0URLClassLoader ucl1 = new Ex0URLClassLoader(cp1);\n"
+" <emphasis role=\"bold\">Class obj2Class2 = ucl1.loadClass(\"org."
+"jboss.book.jmx.ex0.ExObj2\");</emphasis>\n"
+" buffer.setLength(0);\n"
+" buffer.append(\"ExObj2 Info, UCL1\");\n"
+" Debug.displayClassInfo(obj2Class2, buffer, false);\n"
+" ucl1Log.info(buffer.toString());\n"
+" \n"
+" <emphasis role=\"bold\">ucl0.setDelegate(ucl1);</emphasis>\n"
+" try {\n"
+" ucl0Log.info(\"Try ExCtx.newInstance()\");\n"
+" <emphasis role=\"bold\">Object ctx0 = ctxClass1.newInstance();</"
+"emphasis>\n"
+" ucl0Log.info(\"ExCtx.ctor succeeded, ctx0: \"+ctx0);\n"
+" } catch(Throwable e) {\n"
+" ucl0Log.error(\"ExCtx.ctor failed\", e);\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:448
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex0;\n"
+"\n"
+"import java.net.URLClassLoader;\n"
+"import java.net.URL;\n"
+"\n"
+"import org.apache.log4j.Logger;\n"
+"\n"
+"/** \n"
+" * A custom class loader that overrides the standard parent delegation\n"
+" * model\n"
+" *\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class Ex0URLClassLoader extends URLClassLoader\n"
+"{\n"
+" private static Logger log = Logger.getLogger(Ex0URLClassLoader.class);\n"
+" private Ex0URLClassLoader delegate;\n"
+"\n"
+" public Ex0URLClassLoader(URL[] urls)\n"
+" {\n"
+" super(urls);\n"
+" }\n"
+" \n"
+" void setDelegate(Ex0URLClassLoader delegate)\n"
+" {\n"
+" this.delegate = delegate;\n"
+" }\n"
+" \n"
+" protected synchronized Class loadClass(String name, boolean resolve)\n"
+" throws ClassNotFoundException\n"
+" {\n"
+" Class clazz = null;\n"
+" if (delegate != null) {\n"
+" log.debug(Integer.toHexString(hashCode()) +\n"
+" \"; Asking delegate to loadClass: \" + name);\n"
+" clazz = delegate.loadClass(name, resolve);\n"
+" log.debug(Integer.toHexString(hashCode()) +\n"
+" \"; Delegate returned: \"+clazz);\n"
+" } else {\n"
+" log.debug(Integer.toHexString(hashCode()) + \n"
+" \"; Asking super to loadClass: \"+name);\n"
+" clazz = super.loadClass(name, resolve);\n"
+" log.debug(Integer.toHexString(hashCode()) + \n"
+" \"; Super returned: \"+clazz);\n"
+" }\n"
+" return clazz;\n"
+" }\n"
+"\n"
+" protected Class findClass(String name)\n"
+" throws ClassNotFoundException\n"
+" {\n"
+" Class clazz = null;\n"
+" log.debug(Integer.toHexString(hashCode()) + \n"
+" \"; Asking super to findClass: \"+name);\n"
+" clazz = super.findClass(name);\n"
+" log.debug(Integer.toHexString(hashCode()) + \n"
+" \"; Super returned: \"+clazz);\n"
+" return clazz;\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:449
+#, fuzzy, no-c-format
+msgid ""
+"The key component in this example is the <literal>URLClassLoader</literal> "
+"subclass <literal>Ex0URLClassLoader</literal>. This class loader "
+"implementation overrides the default parent delegation model to allow the "
+"<literal>ucl0</literal> and <literal>ucl1</literal> instances to both load "
+"the <literal>ExObj2</literal> class and then setup a delegation relationship "
+"from <literal>ucl0</literal> to <literal>ucl1</literal>. At lines 30 and 31. "
+"the <literal>ucl0</literal><literal>Ex0URLClassLoader</literal> is used to "
+"load the <literal>ExCtx</literal> and <literal>ExObj2</literal> classes. At "
+"line 45 of <literal>ExLE.main</literal> the <literal>ucl1</"
+"literal><literal>Ex0URLClassLoader</literal> is used to load the "
+"<literal>ExObj2</literal> class again. At this point both the <literal>ucl0</"
+"literal> and <literal>ucl1</literal> class loaders have defined the "
+"<literal>ExObj2</literal> class. A delegation relationship from "
+"<literal>ucl0</literal> to <literal>ucl1</literal> is then setup at line 51 "
+"via the <literal>ucl0.setDelegate(ucl1)</literal> method call. Finally, at "
+"line 54 of <literal>ExLE.main</literal> an instance of <literal>ExCtx</"
+"literal> is created using the class loaded via <literal>ucl0</literal>. The "
+"<literal>ExCtx</literal> class is the same as presented in <xref linkend="
+"\"IllegalAccessException___Doing_what_you_should_not-"
+"The_ExIAEd_class_used_to_demonstrate_IllegalAccessException_due_to_duplicate_class_loaders"
+"\"/>, and the constructor was:"
+msgstr ""
+"这个例子里的关键部件是<literal>URLClassLoader</literal>的子类"
+"<literal>Ex0URLClassLoader</literal>。这个类加载器实现覆盖了缺省的父委托模型"
+"来允许<literal>ucl0</literal> 和 <literal>ucl1</literal>实例加载"
+"<literal>ExObj2</literal>类并设立从<literal>ucl0</literal> 到 <literal>ucl1</"
+"literal>的委托关系。在30和31行里,<literal>ucl0</literal> "
+"<literal>Ex0URLClassLoader</literal> 被用来加载<literal>ExCtx</literal> 和 "
+"<literal>ExObj2</literal> 类。在<literal>ExLE.main</literal>的第45行,"
+"<literal>ucl1</literal><literal>Ex0URLClassLoader</literal>被用来再次加载 "
+"<literal>ExObj2</literal>类。这时<literal>ucl0</literal> 和 <literal>ucl1</"
+"literal>类加载器已经定义了<literal>ExObj2</literal> 类。从<literal>ucl0</"
+"literal>到<literal>ucl1</literal>的委托关系在51行通过<literal>ucl0."
+"setDelegate(ucl1)</literal>方法调用被设立。最后,在<literal>ExLE.main</"
+"literal>的第54行,<literal>ExCtx</literal>的实例通过用<literal>ucl0</literal>"
+"加载的类被创建。<literal>ExCtx</literal>类和<xref linkend=\"ch2.threeclasses."
+"ex\"/>里出现的一样,构造函数是:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:452
+#, no-c-format
+msgid ""
+"public ExCtx() \n"
+" throws IOException\n"
+"{\n"
+" value = new ExObj();\n"
+" Logger log = Logger.getLogger(ExCtx.class);\n"
+" StringBuffer buffer = new StringBuffer(\"ctor.ExObj\");\n"
+" Debug.displayClassInfo(value.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+" ExObj2 obj2 = value.ivar;\n"
+" buffer.setLength(0);\n"
+" buffer = new StringBuffer(\"ctor.ExObj.ivar\");\n"
+" Debug.displayClassInfo(obj2.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+"}"
+msgstr ""
+"public ExCtx() \n"
+" throws IOException\n"
+"{\n"
+" value = new ExObj();\n"
+" Logger log = Logger.getLogger(ExCtx.class);\n"
+" StringBuffer buffer = new StringBuffer(\"ctor.ExObj\");\n"
+" Debug.displayClassInfo(value.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+" ExObj2 obj2 = value.ivar;\n"
+" buffer.setLength(0);\n"
+" buffer = new StringBuffer(\"ctor.ExObj.ivar\");\n"
+" Debug.displayClassInfo(obj2.getClass(), buffer, false);\n"
+" log.info(buffer.toString());\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:453
+#, no-c-format
+msgid ""
+"Now, since the <literal>ExCtx</literal> class was defined by the "
+"<literal>ucl0</literal> class loader, and at the time the <literal>ExCtx</"
+"literal> constructor is executed, <literal>ucl0</literal> delegates to "
+"<literal>ucl1</literal>, line 24 of the <literal>ExCtx</literal> constructor "
+"involves the following expression which has been rewritten in terms of the "
+"complete type expressions:"
+msgstr ""
+"现在,既然<literal>ExCtx</literal>类由<literal>ucl0</literal>类加载器定义,在"
+"<literal>ExCtx</literal>构造函数被执行的时候,<literal>ucl0</literal>委托给"
+"<literal>ucl1</literal>,<literal>ExCtx</literal>构造函数的第24行调用了下面的"
+"已经按照完整类型表达式重写的表达式:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:456
+#, no-c-format
+msgid ""
+"<ExObj2,ucl0><superscript>ucl0</superscript> obj2 = <ExObj,ucl1>"
+"<superscript>ucl0</superscript> value * ivar"
+msgstr ""
+"<ExObj2,ucl0><superscript>ucl0</superscript> obj2 = <ExObj,ucl1>"
+"<superscript>ucl0</superscript> value * ivar"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:459
+#, fuzzy, no-c-format
+msgid ""
+"This generates a loading constraint of <literal>ExObj2<superscript>ucl0</"
+"superscript> = ExObj2<superscript>ucl1</superscript></literal> since the "
+"<literal>ExObj2</literal> type must be consistent across the <literal>ucl0</"
+"literal> and <literal>ucl1</literal> class loader instances. Because we have "
+"loaded <literal>ExObj2</literal> using both <literal>ucl0</literal> and "
+"<literal>ucl1</literal> prior to setting up the delegation relationship, the "
+"constraint will be violated and should generate a <literal>LinkageError</"
+"literal> when run. Run the example using the following command:"
+msgstr ""
+"既然<literal>ExObj2</literal>类型必须在<literal>ucl0</literal> and "
+"<literal>ucl1</literal>类加载器实例里保持一致性,这生成了一个"
+"<literal>ExObj2<superscript>ucl0</superscript> = ExObj2<superscript>ucl1</"
+"superscript> </literal>的加载约束。因为我们在设立委托关系前已经用"
+"<literal>ucl0</literal> 和<literal>ucl1</literal>加载了<literal>ExObj2</"
+"literal>,运行时将违反这个约束并产生<literal>LinkageError</literal>。用下面的"
+"命令运行这个例子:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:462
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=0e run-example\n"
+"Buildfile: build.xml\n"
+"...\n"
+"[java] java.lang.LinkageError: loader constraints violated when linking \n"
+" org/jboss/book/jmx/ex0/ExObj2 class\n"
+"[java] at org.jboss.book.jmx.ex0.ExCtx.<init>(ExCtx.java:24)\n"
+"[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native "
+"Method)\n"
+"[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance"
+"(NativeConstructorAccessor\n"
+" Impl.java:39) \n"
+"[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance"
+"(DelegatingConstructor\n"
+" AccessorImpl.java:27)\n"
+"[java] at java.lang.reflect.Constructor.newInstance(Constructor."
+"java:494)\n"
+"[java] at java.lang.Class.newInstance0(Class.java:350)\n"
+"[java] at java.lang.Class.newInstance(Class.java:303)\n"
+"[java] at org.jboss.book.jmx.ex0.ExLE.main(ExLE.java:53)"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=0e run-example\n"
+"Buildfile: build.xml\n"
+"...\n"
+"[java] java.lang.LinkageError: loader constraints violated when linking org/"
+"jboss/chap2/ex0/E\n"
+"xObj2 class\n"
+"[java] at org.jboss.chap2.ex0.ExCtx.<init>(ExCtx.java:24)\n"
+"[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native "
+"Method)\n"
+"[java] at sun.reflect.NativeConstructorAccessorImpl.newInstance"
+"(NativeConstructorAccessorImpl\n"
+".java:39)\n"
+"[java] at sun.reflect.DelegatingConstructorAccessorImpl.newInstance"
+"(DelegatingConstructorAcce\n"
+"ssorImpl.java:27)\n"
+"[java] at java.lang.reflect.Constructor.newInstance(Constructor.java:274)\n"
+"[java] at java.lang.Class.newInstance0(Class.java:308)\n"
+"[java] at java.lang.Class.newInstance(Class.java:261)\n"
+"[java] at org.jboss.chap2.ex0.ExLE.main(ExLE.java:53)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:463
+#, no-c-format
+msgid ""
+"As expected, a LinkageError is thrown while validating the loader "
+"constraints required by line 24 of the <literal>ExCtx</literal> constructor."
+msgstr ""
+"如我们所期望的,当确认<literal>ExCtx</literal>构造函数的第24行里要求的加载器"
+"约束时,LinkageError 被抛出。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:467
+#, no-c-format
+msgid "Debugging Class Loading Issues"
+msgstr "Debugging Class Loading Issues"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:468
+#, fuzzy, no-c-format
+msgid ""
+"Debugging class loading issues comes down to finding out where a class was "
+"loaded from. A useful tool for this is the code snippet shown in <xref "
+"linkend=\"Debugging_Class_Loading_Issues-"
+"Obtaining_debugging_information_for_a_Class\"/> taken from the org.jboss."
+"util.Debug class of the book examples."
+msgstr ""
+"Debugging class loading issues的目的是找出类是从什么地方加载的。本书例子的"
+"org.jboss.util.Debug类里的<xref linkend=\"ch2.debuginfo.ex\"/>所展示的代码片"
+"段是一个很有用的工具。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:471
+#, no-c-format
+msgid "Obtaining debugging information for a Class"
+msgstr "Obtaining debugging information for a Class"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:472
+#, no-c-format
+msgid ""
+"Class clazz =...;\n"
+"StringBuffer results = new StringBuffer();\n"
+"\n"
+"ClassLoader cl = clazz.getClassLoader();\n"
+"results.append(\"\\n\" + clazz.getName() + \"(\" + \n"
+" Integer.toHexString(clazz.hashCode()) + \").ClassLoader=\" + "
+"cl);\n"
+"ClassLoader parent = cl;\n"
+"\n"
+"while (parent != null) {\n"
+" results.append(\"\\n..\"+parent);\n"
+" URL[] urls = getClassLoaderURLs(parent);\n"
+"\n"
+" int length = urls != null ? urls.length : 0;\n"
+" for(int u = 0; u < length; u ++) {\n"
+" results.append(\"\\n....\"+urls[u]);\n"
+" }\n"
+"\n"
+" if (showParentClassLoaders == false) {\n"
+" break;\n"
+" }\n"
+" if (parent != null) {\n"
+" parent = parent.getParent();\n"
+" }\n"
+"}\n"
+"\n"
+"CodeSource clazzCS = clazz.getProtectionDomain().getCodeSource();\n"
+"if (clazzCS != null) {\n"
+" results.append(\"\\n++++CodeSource: \"+clazzCS);\n"
+"} else {\n"
+" results.append(\"\\n++++Null CodeSource\");\n"
+"}"
+msgstr ""
+"Class clazz =...;\n"
+"StringBuffer results = new StringBuffer();\n"
+"\n"
+"ClassLoader cl = clazz.getClassLoader();\n"
+"results.append(\"\\n\" + clazz.getName() + \"(\" + \n"
+" Integer.toHexString(clazz.hashCode()) + \").ClassLoader=\" + "
+"cl);\n"
+"ClassLoader parent = cl;\n"
+"\n"
+"while (parent != null) {\n"
+" results.append(\"\\n..\"+parent);\n"
+" URL[] urls = getClassLoaderURLs(parent);\n"
+"\n"
+" int length = urls != null ? urls.length : 0;\n"
+" for(int u = 0; u < length; u ++) {\n"
+" results.append(\"\\n....\"+urls[u]);\n"
+" }\n"
+"\n"
+" if (showParentClassLoaders == false) {\n"
+" break;\n"
+" }\n"
+" if (parent != null) {\n"
+" parent = parent.getParent();\n"
+" }\n"
+"}\n"
+"\n"
+"CodeSource clazzCS = clazz.getProtectionDomain().getCodeSource();\n"
+"if (clazzCS != null) {\n"
+" results.append(\"\\n++++CodeSource: \"+clazzCS);\n"
+"} else {\n"
+" results.append(\"\\n++++Null CodeSource\");\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:473
+#, fuzzy, no-c-format
+msgid ""
+"Firstly, every Class object knows its defining <literal>ClassLoader</"
+"literal> and this is available via the <literal>getClassLoader()</literal> "
+"method. This defines the scope in which the <literal>Class</literal> type is "
+"known as we have just seen in the previous sections on class cast "
+"exceptions, illegal access exceptions and linkage errors. From the "
+"<literal>ClassLoader</literal> you can view the hierarchy of class loaders "
+"that make up the parent delegation chain. If the class loader is a "
+"<literal>URLClassLoader</literal> you can also see the URLs used for class "
+"and resource loading."
+msgstr ""
+"关键的内容用黑体标出。第一个是每个Class 对象都知道它的defining "
+"<literal>ClassLoader</literal>和可以通过<literal>getClassLoader()</literal>方"
+"法来获得。 <literal>Class</literal>类型的作用域和我们在前面关于类转换异常,非"
+"法的访问异常和链接错误的内容里的一样。从<literal>ClassLoader</literal>里,你"
+"可以看到组成父委托的类加载器的层次。如果类加载器是一个"
+"<literal>URLClassLoader</literal>,你也可以看到用于类和资源加载的URLs."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:476
+#, no-c-format
+msgid ""
+"The defining <literal>ClassLoader</literal> of a <literal>Class</literal> "
+"cannot tell you from what location that <literal>Class</literal> was loaded. "
+"To determine this you must obtain the <literal>java.security."
+"ProtectionDomain</literal> and then the <literal>java.security.CodeSource</"
+"literal>. It is the <literal>CodeSource</literal> that has the URL p "
+"location from which the class originated. Note that not every "
+"<literal>Class</literal> has a <literal>CoPdeSource</literal>. If a class is "
+"loaded by the bootstrap class loader then its <literal>CodeSource</literal> "
+"will be null. This will be the case for all classes in the <literal>java.*</"
+"literal> and <literal>javax.*</literal> packages, for example."
+msgstr ""
+"<literal>Class</literal>的defining <literal>ClassLoader</literal>不能够告诉你"
+"<literal>Class</literal>在什么位置被加载。你必须获得<literal>java.security."
+"ProtectionDomain</literal>和<literal>java.security.CodeSource</literal>来知道"
+"这个位置。<literal>CodeSource</literal>含有类起始的URL位置。注意并不是每个"
+"<literal>Class</literal>都有<literal>CoPdeSource</literal>。如果类是由启动类"
+"加载器所加载的,它的<literal>CodeSource</literal>将为空。<literal>java.*</"
+"literal> 和 <literal>javax.*</literal>包里的所有类都是这种情况,例如:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:479
+#, fuzzy, no-c-format
+msgid ""
+"Beyond that it may be useful to view the details of classes being loaded "
+"into the JBoss server. You can enable verbose logging of the JBoss class "
+"loading layer using a Log4j configuration fragment like that shown in <xref "
+"linkend=\"Debugging_Class_Loading_Issues-An_example_log4j."
+"xml_configuration_fragment_for_enabling_verbose_class_loading_logging\"/>."
+msgstr ""
+"如<xref linkend=\"ch2.log4j.ex\"/>所示,你可以用Log4j配置片段来启用JBoss类加"
+"载层的verbose logging。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:482
+#, no-c-format
+msgid ""
+"An example log4j.xml configuration fragment for enabling verbose class "
+"loading logging"
+msgstr ""
+"An example log4j.xml configuration fragment for enabling verbose class "
+"loading logging"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:483
+#, no-c-format
+msgid ""
+"<appender name=\"UCL\" class=\"org.apache.log4j.FileAppender\">\n"
+" <param name=\"File\" value=\"${jboss.server.home.dir}/log/ucl.log\"/"
+">\n"
+" <param name=\"Append\" value=\"false\"/>\n"
+" <layout class=\"org.apache.log4j.PatternLayout\">\n"
+" <param name=\"ConversionPattern\" value=\"[%r,%c{1},%t] %m%n\"/"
+">\n"
+" </layout>\n"
+"</appender>\n"
+" \n"
+"<category name=\"org.jboss.mx.loading\" additivity=\"false\">\n"
+" <priority value=\"TRACE\" class=\"org.jboss.logging.XLevel\"/>\n"
+" <appender-ref ref=\"UCL\"/>\n"
+"</category>"
+msgstr ""
+"<appender name=\"UCL\" class=\"org.apache.log4j.FileAppender\">\n"
+" <param name=\"File\" value=\"${jboss.server.home.dir}/log/ucl.log\"/"
+">\n"
+" <param name=\"Append\" value=\"false\"/>\n"
+" <layout class=\"org.apache.log4j.PatternLayout\">\n"
+" <param name=\"ConversionPattern\" value=\"[%r,%c{1},%t] %m%n\"/"
+">\n"
+" </layout>\n"
+"</appender>\n"
+" \n"
+"<category name=\"org.jboss.mx.loading\" additivity=\"false\">\n"
+" <priority value=\"TRACE\" class=\"org.jboss.logging.XLevel\"/>\n"
+" <appender-ref ref=\"UCL\"/>\n"
+"</category>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:484
+#, no-c-format
+msgid ""
+"This places the output from the classes in the <literal>org.jboss.mx."
+"loading</literal> package into the <literal>ucl.log</literal> file of the "
+"server configurations log directory. Although it may not be meaningful if "
+"you have not looked at the class loading code, it is vital information "
+"needed for submitting bug reports or questions regarding class loading "
+"problems."
+msgstr ""
+"这把al>org.jboss.mx.loading</literal>包里的类的输出放入服务器配置日志目录下的"
+"<literal>ucl.log</literal>文件里。如果你还没有阅读类加载的代码,这可能没什么"
+"意义,但这是提交关于类加载的程序错误报告和疑问所需的关键信息。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:492
+#, no-c-format
+msgid "Inside the JBoss Class Loading Architecture"
+msgstr "Inside the JBoss Class Loading Architecture"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:493
+#, fuzzy, no-c-format
+msgid ""
+"Now that we have the role of class loaders in the Java type system defined, "
+"let's take a look at the JBoss class loading architecture. <xref linkend="
+"\"Inside_the_JBoss_Class_Loading_Architecture-"
+"The_core_JBoss_class_loading_components\"/>."
+msgstr ""
+"既然我们已经了解了Java类型体系里的类加载器的地位,让我们看看JBoss的类加载架"
+"构。<xref linkend=\"ch2.loadarch.fig\"/>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:497
+#, no-c-format
+msgid "The core JBoss class loading components"
+msgstr "The core JBoss class loading components"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:504
+#, fuzzy, no-c-format
+msgid ""
+"The central component is the <literal>org.jboss.mx.loading."
+"UnifiedClassLoader3</literal> (UCL) class loader. This is an extension of "
+"the standard <literal>java.net.URLClassLoader</literal> that overrides the "
+"standard parent delegation model to use a shared repository of classes and "
+"resources. This shared repository is the <literal>org.jboss.mx.loading."
+"UnifiedLoaderRepository3</literal>. Every UCL is associated with a single "
+"<literal>UnifiedLoaderRepository3</literal>, and a "
+"<literal>UnifiedLoaderRepository3</literal> typically has many UCLs. A UCL "
+"may have multiple URLs associated with it for class and resource loading. "
+"Deployers use the top-level deployment's UCL as a shared class loader "
+"and all deployment archives are assigned to this class loader. We will talk "
+"about the JBoss deployers and their interaction with the class loading "
+"system in more detail later in <xref linkend=\"Using_JMX_as_a_Microkernel-"
+"JBoss_MBean_Services\"/>."
+msgstr ""
+"<literal>org.jboss.mx.loading.UnifiedClassLoader3</literal> (UCL) class "
+"loader是中心部件。它是<literal>java.net.URLClassLoader</literal>的扩展,它覆"
+"盖(Overrides)了标准父委托模型来使用类和资源的共享库(repository)。这个共享库是"
+"<literal>org.jboss.mx.loading.UnifiedLoaderRepository3</literal>。每个UCL都和"
+"单个的<literal>UnifiedLoaderRepository3</literal>相关联,而"
+"<literal>UnifiedLoaderRepository3</literal>通常对应许多的UCL。为了加载类和资"
+"源,UCL可以有多个URL与之关联。部署者(Deployers)把顶级部署的UCL作为共享的类加"
+"载器,所有的部署档案文件都分配给这个类加载器。我们将会在后面的<xref linkend="
+"\"ch2.mbeanservice.sect\"/>里详细地讨论JBoss部署者和它们与类加载系统的关系。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:507
+#, no-c-format
+msgid ""
+"When a UCL is asked to load a class, it first looks to the repository cache "
+"it is associated with to see if the class has already been loaded. Only if "
+"the class does not exist in the repository will it be loaded into the "
+"repository by the UCL. By default, there is a single "
+"<literal>UnifiedLoaderRepository3</literal> shared across all UCL instances. "
+"This means the UCLs form a single flat class loader namespace. The complete "
+"sequence of steps that occur when a <literal>UnfiedClassLoader3.loadClass"
+"(String, boolean)</literal> method is called is:"
+msgstr ""
+"当UCL被要求加载一个类时,它首先会查看它所关联的库缓存(repository cache),看看"
+"这个类是否已经被加载了。只有库里没有这个类时,UCL才会把它加载进去。缺省来说,"
+"会有单一的<literal>UnifiedLoaderRepository3</literal>在所有UCL实例中共享。这"
+"意味着这些UCL组成了一个单一的类加载器命名空间。调用"
+"<literal>UnfiedClassLoader3.loadClass(String, boolean)</literal>方法的完整次"
+"序是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:512
+#, no-c-format
+msgid ""
+"Check the <literal>UnifiedLoaderRepository3</literal> classes cache "
+"associated with the <literal>UnifiedClassLoader3</literal>. If the class is "
+"found in the cache it is returned."
+msgstr ""
+"检查和<literal>UnifiedClassLoader3</literal>相关的"
+"<literal>UnifiedLoaderRepository3</literal>类缓存。如果在缓存里找到这个类,就"
+"返回它。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:517
+#, no-c-format
+msgid ""
+"Else, ask the <literal>UnfiedClassLoader3</literal> if it can load the "
+"class. This is essentially a call to the superclass <literal>URLClassLoader."
+"loadClass(String, boolean)</literal> method to see if the class is among the "
+"URLs associated with the class loader, or visible to the parent class "
+"loader. If the class is found it is placed into the repository classes cache "
+"and returned."
+msgstr ""
+"然后,询问<literal>UnfiedClassLoader3</literal>是否能够加载这个类。这本质上是"
+"一个对超级类<literal>URLClassLoader.loadClass(String, boolean)</literal>方法"
+"的调用,它可以知道这个类是否在和类加载器相关的URL里,或者对于父类加载器可见。"
+"如果这个类被找到的话,它会被放入库缓存并被返回。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:522
+#, no-c-format
+msgid ""
+"Else, the repository is queried for all UCLs that are capable of providing "
+"the class based on the repository package name to UCL map. When a UCL is "
+"added to a repository an association between the package names available in "
+"the URLs associated with the UCL is made, and a mapping from package names "
+"to the UCLs with classes in the package is updated. This allows for a quick "
+"determination of which UCLs are capable of loading the class. The UCLs are "
+"then queried for the requested class in the order in which the UCLs were "
+"added to the repository. If a UCL is found that can load the class it is "
+"returned, else a <literal>java.lang.ClassNotFoundException</literal> is "
+"thrown."
+msgstr ""
+"再然后,按照包名(package name)和UCL的映射关系查询库(repository)里所有能够提供"
+"这个类的UCL。当UCL被加入到库里时,将建立和UCL相关的URL里可用的包名之间的联"
+"系,而且从包名到关联包里的类的UCL的映射关系会被更新。这可以很快地决定哪个UCL"
+"能够加载这个类。然后按照UCL加入到repository的顺序来查询所请求的类。如果UCL可"
+"以加载这个类,就会返回它,否则将抛出<literal>java.lang."
+"ClassNotFoundException</literal>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:528
+#, no-c-format
+msgid "Viewing Classes in the Loader Repository"
+msgstr "Viewing Classes in the Loader Repository"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:529
+#, fuzzy, no-c-format
+msgid ""
+"Another useful source of information on classes is the "
+"UnifiedLoaderRepository itself. This is an MBean that contains operations to "
+"display class and package information. The default repository is located "
+"under a standard JMX name of <literal>JMImplementation:name=Default,"
+"service=LoaderRepository</literal>, and its MBean can be accessed via the "
+"JMX console by following its link from the front page. The JMX console view "
+"of this MBean is shown in <xref linkend="
+"\"Viewing_Classes_in_the_Loader_Repository-"
+"The_default_class_LoaderRepository_MBean_view_in_the_JMX_console\"/>."
+msgstr ""
+"另外一个关于类的信息的有用资源就是UnifiedLoaderRepository自己。它是一个包含显"
+"示类和包信息的操作的MBean。缺省的库存在于标准的JMX名"
+"<literal>JMImplementation:name=Default,service=LoaderRepository</literal>下,"
+"它的MBean可以通过JMX控制台主页里的链接来访问。<xref linkend=\"ch2.loaderjmx."
+"fig\"/>展示了这个MBean的JMX控制台视图。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:533
+#, no-c-format
+msgid "The default class LoaderRepository MBean view in the JMX console"
+msgstr "The default class LoaderRepository MBean view in the JMX console"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:540
+#, no-c-format
+msgid ""
+"Two useful operations you will find here are <literal>getPackageClassLoaders"
+"(String)</literal> and <literal>displayClassInfo(String)</literal>. The "
+"<literal>getPackageClassLoaders</literal> operation returns a set of class "
+"loaders that have been indexed to contain classes or resources for the given "
+"package name. The package name must have a trailing period. If you type in "
+"the package name <literal>org.jboss.ejb.</literal>, the following "
+"information is displayed:"
+msgstr ""
+"你可以在这里找到两个有用的操作:<literal>getPackageClassLoaders(String)</"
+"literal> 和 <literal>displayClassInfo(String)</literal>。"
+"<literal>getPackageClassLoaders</literal>返回一个类加载器集,并编入索引来包含"
+"用于给定包名的类和资源。包名字必须含有一个句号。如果你输入<literal>org.jboss."
+"ejb.</literal>,将显示下面的信息:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:543
+#, no-c-format
+msgid ""
+"[org.jboss.mx.loading.UnifiedClassLoader3 at 1950198{ \n"
+" url=null ,addedOrder=2}, \n"
+" org.jboss.mx.loading.UnifiedClassLoader3 at 89e2f1{\n"
+" url=file:/home/vrenish/jboss-eap-4.3/jboss-as/server/production/deploy/"
+"ejb3.deployer/ ,addedOrder=3},\n"
+" org.jboss.mx.loading.UnifiedClassLoader3 at 1555185{ \n"
+" url=file:/home/vrenish/jboss-eap-4.3/jboss-as/server/production/deploy/"
+"jboss-messaging.sar/ ,addedOrder=12}]"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:544
+#, fuzzy, no-c-format
+msgid ""
+"This is the string representation of the set. It shows three "
+"<literal>UnifiedClassLoader3</literal> instances. The primary url is "
+"indicated by the value shown in <literal>url</literal>. The order in which "
+"the class loader is added to the repository is indicated by the value shown "
+"in <literal>addedOrder</literal>. It is the class loader that owns all of "
+"the JARs in the <literal>lib</literal> directory of the server configuration "
+"(e.g., <literal>server/production/lib</literal>)."
+msgstr ""
+"这是集合的字符串表示。它展示了一个主URL指向<literal>jboss-service.xml</"
+"literal>描述符的<literal>UnifiedClassLoader3</literal>实例。这是加入到库"
+"(repository)里的第二个类加载器(如<literal>addedOrder=2</literal>所示)。它也是"
+"拥有所有服务器配置的<literal>lib</literal>目录下(如<literal>server/default/"
+"lib</literal>)的JAR文件的类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:547
+#, no-c-format
+msgid ""
+"The view the information for a given class, use the "
+"<literal>displayClassInfo</literal> operation, passing in the fully "
+"qualified name of the class to view. For example, if we use <literal>org."
+"jboss.jmx.adaptor.html.HtmlAdaptorServlet</literal> which is from the "
+"package we just looked at, the following description is displayed:"
+msgstr ""
+"要查看给定类的信息,你可以使用<literal>server/default/lib</literal>操作,传入"
+"类的全名来查看。例如,如果我们使用刚才看过的包里的<literal>org.jboss.jmx."
+"adaptor.html.HtmlAdaptorServlet</literal>,下面的描述符将会显示:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:550
+#, no-c-format
+msgid ""
+"org.jboss.jmx.adaptor.html.HtmlAdaptorServlet Information\n"
+"Not loaded in repository cache\n"
+"\n"
+"\n"
+"### Instance0 via UCL: WebappClassLoader\n"
+" delegate: false\n"
+" repositories:\n"
+" /WEB-INF/classes/\n"
+"----------> Parent Classloader:\n"
+"java.net.FactoryURLClassLoader at 2f5dda"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:556
+#, no-c-format
+msgid ""
+"The information is a dump of the information for the Class instance in the "
+"loader repository if one has been loaded, followed by the class loaders that "
+"are seen to have the class file available. If a class is seen to have more "
+"than one class loader associated with it, then there is the potential for "
+"class loading related errors."
+msgstr ""
+"如果一个类有多于一个类加载与之关联,那么就有潜在的与类加载相关的错误存在。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:562
+#, no-c-format
+msgid "Scoping Classes"
+msgstr "类的作用域"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:563
+#, fuzzy, no-c-format
+msgid ""
+"If you need to deploy multiple versions of an application you need to use "
+"deployment based scoping. With deployment based scoping, each deployment "
+"creates its own class loader repository in the form of a "
+"<literal>HeirarchicalLoaderRepository3</literal> that looks first to the "
+"<literal>UnifiedClassLoader3</literal> instances of the deployment units "
+"included in the EAR before delegating to the default "
+"<literal>UnifiedLoaderRepository3</literal>. To enable an EAR specific "
+"loader repository, you need to create a <literal>META-INF/jboss-app.xml</"
+"literal> descriptor as shown in <xref linkend=\"Scoping_Classes-"
+"An_example_jboss_app."
+"xml_descriptor_for_enabled_scoped_class_loading_at_the_EAR_level.\"/>."
+msgstr ""
+"如果你要部署一个应用程序的多个版本,你需要使用基于部署的作用域(deployment "
+"based scoping)。每个部署都以如<literal>HeirarchicalLoaderRepository3</"
+"literal>的形式创建自己的类加载器库,EAR里的部署单元的"
+"<literal>UnifiedClassLoader3</literal>实例在委托给缺省的"
+"<literal>UnifiedLoaderRepository3</literal>之前,会先查看它。要启用与EAR相关"
+"的的加载器库,你需要建立一个如<xref linkend=\"ch2.scopedapp.ex\"/>所示的"
+"<literal>META-INF/jboss-app.xml</literal>描述符。o"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:566
+#, no-c-format
+msgid ""
+"An example jboss-app.xml descriptor for enabled scoped class loading at the "
+"EAR level."
+msgstr ""
+"An example jboss-app.xml descriptor for enabled scoped class loading at the "
+"EAR level."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:567
+#, no-c-format
+msgid ""
+"<jboss-app>\n"
+" <loader-repository>some.dot.com:loader=webtest.ear</loader-"
+"repository>\n"
+"</jboss-app>"
+msgstr ""
+"<jboss-app>\n"
+" <loader-repository>some.dot.com:loader=webtest.ear</loader-"
+"repository>\n"
+"</jboss-app>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:568
+#, no-c-format
+msgid ""
+"The value of the <literal>loader-repository</literal> element is the JMX "
+"object name to assign to the repository created for the EAR. This must be "
+"unique and valid JMX ObjectName, but the actual name is not important."
+msgstr ""
+"<literal>loader-repository</literal>元素的值是分配给为EAR创建的库的JMX对象"
+"名。它必须是唯一和有效的JMX对象名,但取什么名字并不重要。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:572
+#, no-c-format
+msgid ""
+"JDK provided classes cannot be scoped. Meaning that a deployment cannot "
+"contain any JDK classes or (when using a war deployment) they must be "
+"excluded via the <property>FilteredPackages</property> atribute within the "
+"<filename>jboss-service.xml</filename> file."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:579
+#, no-c-format
+msgid "The Complete Class Loading Model"
+msgstr "完整的类加载模型"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:580
+#, fuzzy, no-c-format
+msgid ""
+"The previous discussion of the core class loading components introduced the "
+"custom <literal>UnifiedClassLoader3</literal> and "
+"<literal>UnifiedLoaderRepository3</literal> classes that form a shared class "
+"loading space. The complete class loading picture must also include the "
+"parent class loader used by <literal>UnifiedClassLoader3</literal>s as well "
+"as class loaders introduced for scoping and other specialty class loading "
+"purposes. <xref linkend=\"The_Complete_Class_Loading_Model-"
+"A_complete_class_loader_view\"/> shows an outline of the class hierarchy "
+"that would exist for an EAR deployment containing EJBs and WARs."
+msgstr ""
+"前面关于核心类加载部件的讨论引入了自定义的<literal>UnifiedClassLoader3</"
+"literal>和<literal>UnifiedLoaderRepository3</literal>类,它们组成了一个共享的"
+"类加载空间。完整的类加载也必须包括<literal>UnifiedClassLoader3</literal>使用"
+"的父类加载器,以及为作用域(scoping)和其他特别的目的而引入的类加载器。<xref "
+"linkend=\"ch2.classloaderview.fig\"/>展示了类层次的概要,对于包含EJB和WAR的"
+"EAR部署来说,它都会存在。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:584
+#, no-c-format
+msgid "A complete class loader view"
+msgstr "A complete class loader view"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:591
+#, no-c-format
+msgid "The following points apply to this figure:"
+msgstr "在这个图例里:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:596
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">System ClassLoaders</emphasis>: The System "
+"ClassLoaders node refers to either the thread context class loader (TCL) of "
+"the VM main thread or of the thread of the application that is loading the "
+"JBoss server if it is embedded."
+msgstr ""
+"<emphasis role=\"bold\">System ClassLoaders</emphasis>:System ClassLoaders节"
+"点指的是VM主线程或者是加载JBoss服务器的应用程序线程的线程上下文类加载器"
+"(TCL)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:601
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerLoader</emphasis>: The ServerLoader node "
+"refers to the a <literal>URLClassLoader</literal> that delegates to the "
+"System ClassLoaders and contains the following boot URLs:"
+msgstr ""
+"<emphasis role=\"bold\">ServerLoader</emphasis>:ServerLoader节点指的是委托给"
+"系统ClassLoaders的 <literal>URLClassLoader</literal>,它包含下面的启动URL:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:606
+#, no-c-format
+msgid ""
+"All URLs referenced via the <literal>jboss.boot.library.list</literal> "
+"system property. These are path specifications relative to the "
+"<literal>libraryURL</literal> defined by the <literal>jboss.lib.url</"
+"literal> property. If there is no <literal>jboss.lib.url</literal> property "
+"specified, it defaults to <literal>jboss.home.url + /lib/</literal>. If "
+"there is no <literal>jboss.boot.library</literal> property specified, it "
+"defaults to <literal>jaxp.jar</literal>, <literal>log4j-boot.jar</literal>, "
+"<literal>jboss-common.jar</literal>, and <literal>jboss-system.jar</literal>."
+msgstr ""
+"所有的URL都通过<literal>jboss.boot.library.list</literal>系统库来引用。它们是"
+"和由<literal>jboss.lib.url</literal>属性定义的<literal>libraryURL</literal>的"
+"相对路径规格。如果没有指定<lteral>jboss.lib.url</literal>,缺省会使用"
+"<literal>jboss.home.url + /lib/</literal>。如果没有指定<literal>jboss.boot."
+"library</literal>,它会缺省为<literal>jaxp.jar</literal>,<literal>log4j-"
+"boot.jar</literal>,<literal>jboss-common.jar</literal>和<literal>jboss-"
+"system.jar</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:611
+#, no-c-format
+msgid ""
+"The JAXP JAR which is either <literal>crimson.jar</literal> or "
+"<literal>xerces.jar</literal> depending on the <literal>-j</literal> option "
+"to the <literal>Main</literal> entry point. The default is <literal>crimson."
+"jar</literal>."
+msgstr ""
+"JAXP JAR是<literal>crimson.jar</literal>还是 <literal>xerces.jar</literal>依"
+"赖于<literal>Main</literal>入口的<literal>-j</literal>选项。缺省是"
+"<literal>crimson.jar</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:616
+#, no-c-format
+msgid ""
+"The JBoss JMX jar and GNU regex jar, <literal>jboss-jmx.jar</literal> and "
+"<literal>gnu-regexp.jar</literal>."
+msgstr ""
+"JBoss JMX jar 和 GNU regex jar, <literal>jboss-jmx.jar</literal> 和 "
+"<literal>gnu-regexp.jar</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:621
+#, no-c-format
+msgid "Oswego concurrency classes JAR, <literal>concurrent.jar</literal>"
+msgstr "Oswego concurrency classes JAR, <literal>concurrent.jar</literal>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:626
+#, no-c-format
+msgid ""
+"Any JARs specified as libraries via <literal>-L</literal> command line "
+"options"
+msgstr "任何通过<literal>-L</literal>命令行选项指定为库(libraries)的JAR。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:631
+#, no-c-format
+msgid ""
+"Any other JARs or directories specified via <literal>-C</literal> command "
+"line options"
+msgstr "任何其他通过<literal>-C</literal>命令行选项指定的JAR或目录。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:638
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Server</emphasis>: The Server node represent a "
+"collection of UCLs created by the <literal>org.jboss.system.server.Server</"
+"literal> interface implementation. The default implementation creates UCLs "
+"for the <literal>patchDir</literal> entries as well as the server "
+"<literal>conf</literal> directory. The last UCL created is set as the JBoss "
+"main thread context class loader. This will be combined into a single UCL "
+"now that multiple URLs per UCL are supported."
+msgstr ""
+"<emphasis role=\"bold\">Server</emphasis>:Server节点代表了<literal>org."
+"jboss.system.server.Server</literal>接口实现所创建的UCL的集合。缺省的实现为"
+"<literal>patchDir</literal>入口和服务器<literal>conf</literal>目录创建UCL。最"
+"后创建的UCL由JBoss主线程上下文类加载器来设定。它会合并到支持一个UCL对应多个"
+"URL的单一的UCL里。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:643
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">All UnifiedClassLoader3s</emphasis>: The "
+"<emphasis>All UnifiedClassLoader3</emphasis> node represents the UCLs "
+"created by deployers. This covers EARs, jars, WARs, SARs and directories "
+"seen by the deployment scanner as well as JARs referenced by their manifests "
+"and any nested deployment units they may contain. This is a flat namespace "
+"and there should not be multiple instances of a class in different "
+"deployment JARs. If there are, only the first loaded will be used and the "
+"results may not be as expected. There is a mechanism for scoping visibility "
+"based on EAR deployment units that we discussed in <xref linkend="
+"\"Inside_the_JBoss_Class_Loading_Architecture-Scoping_Classes\"/>. Use this "
+"mechanism if you need to deploy multiple versions of a class in a given "
+"JBoss server."
+msgstr ""
+"<emphasis role=\"bold\">All UnifiedClassLoader3s</emphasis>:<emphasis>All "
+"UnifiedClassLoader3</emphasis>节点代表了部署者所创建的UCL。它覆盖了EAR,JAR,"
+"WAR,SAR和部署扫描器(deployment scanner)能见到的目录,还有它们的manifests和包"
+"含的任何嵌套的部署单元所引用的JAR。它是一个简单的命名空间,在不同的部署JAR里"
+"不应该有同一个类的多个实例。如果有的话,只有第一个被加载的会被使用,而且可能"
+"得不到所期望的结果。这里有一个关于作用域可见性(scoping visibility)的机制,它"
+"基于我们在<xref linkend=\"ch2.scoping.sect\"/>里讨论的EAR部署单元。在给定的"
+"JBoss服务器里,如果你需要部署同一个类的多个版本的话,你可以使用这个机制。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:648
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EJB DynClassLoader</emphasis>: The EJB "
+"<literal>DynClassLoader</literal> node is a subclass of "
+"<literal>URLClassLoader</literal> that is used to provide RMI dynamic class "
+"loading via the simple HTTP WebService. It specifies an empty <literal>URL[]"
+"</literal> and delegates to the TCL as its parent class loader. If the "
+"WebService is configured to allow system level classes to be loaded, all "
+"classes in the <literal>UnifiedLoaderRepository3</literal> as well as the "
+"system classpath are available via HTTP."
+msgstr ""
+"<emphasis role=\"bold\">EJB DynClassLoader</emphasis>:EJB "
+"<literal>DynClassLoader</literal>节点是<literal>URLClassLoader</literal>的一"
+"个子类,它通过简单的HTTP WebService提供RMI动态类加载。它指定一个空的"
+"<literal>URL[]</literal>并委托TCL作为它的父类加载器。如果我们配置WebService来"
+"允许系统级的类被加载,<literal>UnifiedLoaderRepository3</literal>和system "
+"classpath里的所有类都通过HTTP而成为可用的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:653
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EJB ENCLoader</emphasis>: The <emphasis>EJB "
+"ENCLoader</emphasis> node is a <literal>URLClassLoader</literal> that exists "
+"only to provide a unique context for an EJB deployment's <literal>java:"
+"comp</literal> JNDI context. It specifies an empty <literal>URL[]</literal> "
+"and delegates to the EJB <literal>DynClassLoader</literal> as its parent "
+"class loader."
+msgstr ""
+"<emphasis role=\"bold\">EJB ENCLoader</emphasis>:<emphasis>EJB ENCLoader</"
+"emphasis>节点是一个只为EJB部署的<literal>java:comp</literal>JNDI上下文提供唯"
+"一上下文的<literal>URLClassLoader</literal>。它指定一个空的<literal>URL[]</"
+"literal>并委托EJB <literal>DynClassLoader</literal>作为它的父类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:658
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Web ENCLoader</emphasis>: The Web "
+"<literal>ENCLoader</literal> node is a URLClassLoader that exists only to "
+"provide a unique context for a web deployment's <literal>java:comp</"
+"literal> JNDI context. It specifies an empty <literal>URL[]</literal> and "
+"delegates to the TCL as its parent class loader."
+msgstr ""
+"<emphasis role=\"bold\">Web ENCLoader</emphasis>:<literal>ENCLoader</"
+"literal>节点是只为web 部署的<literal>java:comp</literal> JNDI上下文提供唯一上"
+"下文的URLClassLoader。它指定一个空的<literal>URL[]</literal>并委托TCL作为它的"
+"父类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:663
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">WAR Loader</emphasis>: The <emphasis>WAR Loader</"
+"emphasis> is a servlet container specific classloader that delegates to the "
+"Web ENCLoader as its parent class loader. The default behavior is to load "
+"from its parent class loader and then the WAR <literal>WEB-INF</"
+"literal><literal>classes</literal> and <literal>lib</literal> directories. "
+"If the servlet 2.3 class loading model is enabled it will first load from "
+"the its <literal>WEB-INF</literal> directories and then the parent class "
+"loader."
+msgstr ""
+"<emphasis role=\"bold\">WAR Loader</emphasis>:<emphasis>WAR Loader</"
+"emphasis>是一个与servlet容器相关的类加载器,它委托Web ENCLoader作为它的父类加"
+"载器。它的缺省行为是从它的父加载器里加载,然后是WAR <literal>WEB-INF</"
+"literal> <literal>classes</literal> 和 <literal>lib</literal> 目录。如果启用"
+"了servlet 2.3类加载模型,它将首先从它的<literal>WEB-INF</literal>目录里加载,"
+"之后才是父加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:668
+#, no-c-format
+msgid ""
+"In its current form there are some advantages and disadvantages to the JBoss "
+"class loading architecture. Advantages include:"
+msgstr "按照目前的形式,JBoss的类加载架构既有优势也有劣势。它的优势包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:673
+#, no-c-format
+msgid ""
+"Classes do not need to be replicated across deployment units in order to "
+"have access to them."
+msgstr "类不需要在部署单元间复制来进行访问。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:678
+#, no-c-format
+msgid ""
+"Many future possibilities including novel partitioning of the repositories "
+"into domains, dependency and conflict detection, etc."
+msgstr "许多未来的可能性,包括库的域划分,相关性和冲突检测,等等。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:683
+#, no-c-format
+msgid "Disadvantages include:"
+msgstr "劣势包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:688
+#, no-c-format
+msgid ""
+"Existing deployments may need to be repackaged to avoid duplicate classes. "
+"Duplication of classes in a loader repository can lead to class cast "
+"exceptions and linkage errors depending on how the classes are loaded."
+msgstr ""
+"现存的部署可能需要重新打包来避免类的重复。在加载器库里类的重复会导致类转换异"
+"常或链接错误,这依赖于类是如何加载的而定。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:693
+#, no-c-format
+msgid ""
+"Deployments that depend on different versions of a given class need to be "
+"isolated in separate EARs and a unique "
+"<literal>HeirarchicalLoaderRepository3</literal> defined using a "
+"<literal>jboss-app.xml</literal> descriptor."
+msgstr ""
+"依赖于给定类的不同版本的部署需要在各自的EAR里和用<literal>jboss-app.xml</"
+"literal>定义的唯一的<literal>HeirarchicalLoaderRepository3</literal>里隔离。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:705
+#, no-c-format
+msgid "JBoss XMBeans"
+msgstr "JBoss XMBeans"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:706
+#, fuzzy, no-c-format
+msgid ""
+"XMBeans are the JBoss JMX implementation version of the JMX model MBean. "
+"XMBeans have the richness of the dynamic MBean metadata without the tedious "
+"programming required by a direct implementation of the "
+"<literal>DynamicMBean</literal> interface. The JBoss model MBean "
+"implementation allows one to specify the management interface of a component "
+"through a XML descriptor, hence the X in XMBean. In addition to providing a "
+"simple mechanism for describing the metadata required for a dynamic MBean, "
+"XMBeans also allow for the specification of attribute persistence, caching "
+"behavior, and even advanced customizations like the MBean implementation "
+"interceptors. The high level elements of the <literal>jboss_xmbean_1_2.dtd</"
+"literal> for the XMBean descriptor is given in <xref linkend=\"JBoss_XMBeans-"
+"The_JBoss_1.0_XMBean_DTD_Overview_jboss_xmbean_1_2.dtd\"/>."
+msgstr ""
+"XMBeans是JMX model MBean实现的JBoss版本。XMBeans具有动态MBean元数据的丰富内"
+"容,而不需要沉闷地编程来直接实现<literal>DynamicMBean</literal>接口。JBoss "
+"model MBean实现允许你通过XML描述符来指定部件的管理接口,这就是XMBean里的X的来"
+"历。除了提供一个用来描述动态MBean所需的元数据的简单机制,XMBean也考虑到了属性"
+"持久化,缓存行为和更高级的自定义如MBean实现拦截器(implementation "
+"interceptors)的规格。<xref linkend=\"ch2.xmbeandtd.fig\"/>给出了"
+"<literal>jboss_xmbean_1_2.dtd</literal>里关于XMBean描述符的高级别元素"
+"(elements)。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:710
+#, no-c-format
+msgid "The JBoss 1.0 XMBean DTD Overview (jboss_xmbean_1_2.dtd)"
+msgstr "The JBoss 1.0 XMBean DTD Overview (jboss_xmbean_1_2.dtd)"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:717
+#, no-c-format
+msgid ""
+"The <literal>mbean</literal> element is the root element of the document "
+"containing the required elements for describing the management interface of "
+"one MBean (constructors, attributes, operations and notifications). It also "
+"includes an optional description element, which can be used to describe the "
+"purpose of the MBean, as well as an optional descriptors element which "
+"allows for persistence policy specification, attribute caching, etc."
+msgstr ""
+"<literal>mbean</literal>元素是包含描述MBean(constructors, attributes, "
+"operations 和 notifications)的管理接口的元素的文档的根元素。它也包括了一个可"
+"选的用来描述MBean的目的的描述符元素,以及考虑到持久化策略规格,属性缓存等的可"
+"选的描述符元素。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:721
+#, no-c-format
+msgid "Descriptors"
+msgstr "描述符"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:722
+#, fuzzy, no-c-format
+msgid ""
+"The descriptors element contains all the descriptors for a containing "
+"element, as subelements. The descriptors suggested in the JMX specification "
+"as well as those used by JBoss have predefined elements and attributes, "
+"whereas custom descriptors have a generic descriptor element with name and "
+"value attributes as show in <xref linkend=\"Descriptors-"
+"_The_descriptors_element_content_model\"/>."
+msgstr ""
+"描述符元素把内含元素的所有描述符作为子元素。JMX规格里提出的和JBoss所使用的描"
+"述符都含有预定义的元素和属性,而自定义的描述符有一个共用的有着名字和值属性的"
+"descriptor元素,如<xref linkend=\"ch2.descriptorselem.fig\"/>所示。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:726
+#, no-c-format
+msgid "The descriptors element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:733
+#, no-c-format
+msgid "The key descriptors child elements include:"
+msgstr "关键的描述符子元素包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:738
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">interceptors</emphasis>: The <literal>interceptors</"
+"literal> element specifies a customized stack of interceptors that will be "
+"used in place of the default stack. Currently this is only used when "
+"specified at the MBean level, but it could define a custom attribute or "
+"operation level interceptor stack in the future. The content of the "
+"interceptors element specifies a custom interceptor stack. If no "
+"interceptors element is specified the standard <literal>ModelMBean</literal> "
+"interceptors will be used. The standard interceptors are:"
+msgstr ""
+"<emphasis role=\"bold\">interceptors</emphasis>:<literal>interceptors</"
+"literal>元素指定了拦截器的自定义栈,用来代替缺省的栈。目前它只在使用在MBean"
+"级,但将来它可以定义一个自定义属性或者操作级(operation level)的拦截器栈。"
+"interceptors元素的内容指定了自定义的拦截器绽。如果没有指定interceptors元素,"
+"标准的<literal>ModelMBean</literal>拦截器将被使用。标准的拦截器是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:743
+#, no-c-format
+msgid "org.jboss.mx.interceptor.PersistenceInterceptor"
+msgstr "org.jboss.mx.interceptor.PersistenceInterceptor"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:748
+#, no-c-format
+msgid "org.jboss.mx.interceptor.MBeanAttributeInterceptor"
+msgstr "org.jboss.mx.interceptor.MBeanAttributeInterceptor"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:753
+#, no-c-format
+msgid "org.jboss.mx.interceptor.ObjectReferenceInterceptor"
+msgstr "org.jboss.mx.interceptor.ObjectReferenceInterceptor"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:758
+#, no-c-format
+msgid ""
+"When specifying a custom interceptor stack you would typically include the "
+"standard interceptors along with your own unless you are replacing the "
+"corresponding standard interceptor."
+msgstr ""
+"当指定一个自定义的拦截器栈时,你通常也要包括标准的拦截器,除非你要代替相应的"
+"标准拦截器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:761
+#, no-c-format
+msgid ""
+"Each interceptor element content value specifies the fully qualified class "
+"name of the interceptor implementation. The class must implement the "
+"<literal>org.jboss.mx.interceptor.Interceptor</literal> interface. The "
+"interceptor class must also have either a no-arg constructor, or a "
+"constructor that accepts a <literal>javax.management.MBeanInfo</literal>."
+msgstr ""
+"每个interceptor元素值指定了拦截器实现的类全名(fully qualified class name)。这"
+"个拦截器类必须实现<literal>org.jboss.mx.interceptor.Interceptor</literal> "
+"interface。它也必须具有不带参数的或者接受<literal>javax.management."
+"MBeanInfo</literal>的构造函数。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:764
+#, no-c-format
+msgid ""
+"The interceptor elements may have any number of attributes that correspond "
+"to JavaBean style properties on the interceptor class implementation. For "
+"each <literal>interceptor</literal> element attribute specified, the "
+"interceptor class is queried for a matching setter method. The attribute "
+"value is converted to the true type of the interceptor class property using "
+"the <literal>java.beans.PropertyEditor</literal> associated with the type. "
+"It is an error to specify an attribute for which there is no setter or "
+"<literal>PropertyEditor</literal>."
+msgstr ""
+"interceptor元素可能有对应于拦截器类实现的JavaBean风格属性的任何属性。对于每个"
+"指定的<literal>interceptor</literal>元素属性,拦截器类都会寻找匹配的setter方"
+"法。属性值都会被转换成拦截器类属性的真正类型,这是由与这个类型相关的"
+"<literal>java.beans.PropertyEditor</literal>来完成的。指定一个没有setter或"
+"<literal>PropertyEditor</literal>的属性是错误的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:769
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistence</emphasis>: The <literal>persistence</"
+"literal> element allows the specification of the <literal>persistPolicy</"
+"literal>, <literal>persistPeriod</literal>, <literal>persistLocation</"
+"literal>, and <literal>persistName</literal> persistence attributes "
+"suggested by the JMX specification. The persistence element attributes are:"
+msgstr ""
+"<emphasis role=\"bold\">persistence</emphasis>:<literal>persistence</"
+"literal>元素支持JMX规格提出的<literal>persistPolicy</literal>,"
+"<literal>persistPeriod</literal>,<literal>persistLocation</literal>和"
+"<literal>persistName</literal>持久化属性规格。persistence元素属性是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:774
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistPolicy</emphasis>: The "
+"<literal>persistPolicy</literal> attribute defines when attributes should be "
+"persisted and its value must be one of"
+msgstr ""
+"<emphasis role=\"bold\">persistPolicy</emphasis>:<literal>persistPolicy</"
+"literal>属性定义属性什么时候应该持久化,它的值必须是下列之一:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:779
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Never</emphasis>: attribute values are transient "
+"values that are never persisted"
+msgstr "<emphasis role=\"bold\">Never</emphasis>:属性值永远都不要持久化"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:784
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">OnUpdate</emphasis>: attribute values are persisted "
+"whenever they are updated"
+msgstr ""
+"<emphasis role=\"bold\">OnUpdate</emphasis>:属性值只要有变动,就进行持久化"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:789
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">OnTimer</emphasis>: attribute values are persisted "
+"based on the time given by the <literal>persistPeriod</literal>."
+msgstr ""
+"<emphasis role=\"bold\">OnTimer</emphasis>:属性值依据"
+"<literal>persistPeriod</literal>给定的时间来持久化。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:794
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NoMoreOftenThan</emphasis>: attribute values are "
+"persisted when updated but no more often than the <literal>persistPeriod</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">NoMoreOftenThan</emphasis>:当属性值发生变动,但不比"
+"<literal>persistPeriod</literal>所指定的更频繁时被持久化。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:801
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistPeriod</emphasis>: The "
+"<literal>persistPeriod</literal> attribute gives the update frequency in "
+"milliseconds if the <literal>perisitPolicy</literal> attribute is "
+"<literal>NoMoreOftenThan</literal> or <literal>OnTimer</literal>."
+msgstr ""
+"<emphasis role=\"bold\">persistPeriod</emphasis>:如果"
+"<literal>perisitPolicy</literal>属性是<literal>NoMoreOftenThan</literal> 或"
+"者 <literal>OnTimer</literal>,<literal>persistPeriod</literal>属性指定更新的"
+"频率(毫秒)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:806
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistLocation</emphasis>: The "
+"<literal>persistLocation</literal> attribute specifies the location of the "
+"persistence store. Its form depends on the JMX persistence implementation. "
+"Currently this should refer to a directory into which the attributes will be "
+"serialized if using the default JBoss persistence manager."
+msgstr ""
+"<emphasis role=\"bold\">persistLocation</emphasis>:"
+"<literal>persistLocation</literal>属性指定了persistence store的位置。它的形式"
+"依赖于JMX持久化实现。目前它应该指的是属性被串形化的目录,如果使用缺省的JBoss"
+"持久化管理者(persistence manager)的话。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:811
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistName</emphasis>: The <literal>persistName</"
+"literal> attribute can be used in conjunction with the "
+"<literal>persistLocation</literal> attribute to further qualify the "
+"persistent store location. For a directory <literal>persistLocation</"
+"literal> the <literal>persistName</literal> specifies the file to which the "
+"attributes are stored within the directory."
+msgstr ""
+"<emphasis role=\"bold\">persistName</emphasis>:<literal>persistName</"
+"literal>属性可以和<literal>persistLocation</literal>属性一起使用来进一步限定"
+"persistent store的位置。对于目录<literal>persistLocation</literal>,"
+"<literal>persistName</literal>指定了属性被存储的文件。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:818
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">currencyTimeLimit</emphasis>: The "
+"<literal>currencyTimeLimit</literal> element specifies the time in seconds "
+"that a cached value of an attribute remains valid. Its value attribute gives "
+"the time in seconds. A value of 0 indicates that an attribute value should "
+"always be retrieved from the MBean and never cached. A value of -1 indicates "
+"that a cache value is always valid."
+msgstr ""
+"<emphasis role=\"bold\">currencyTimeLimit</emphasis>:"
+"<literal>currencyTimeLimit</literal>元素指定了属性的缓存值保持有效的时间(以秒"
+"为单位)。如果为0,表示属性值应该总是从MBean里获取而不会被缓存。如果为-1,表示"
+"缓存值是一直有效的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:823
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">display-name</emphasis>: The <literal>display-name</"
+"literal> element specifies the human friendly name of an item."
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:828
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">default</emphasis>: The <literal>default</literal> "
+"element specifies a default value to use when a field has not been set. Note "
+"that this value is not written to the MBean on startup as is the case with "
+"the <literal>jboss-service.xml</literal> attribute element content value. "
+"Rather, the default value is used only if there is no attribute accessor "
+"defined, and there is no value element defined."
+msgstr ""
+"<emphasis role=\"bold\">default</emphasis>:<literal>default</literal>元素指"
+"定字段的缺省值。注意这个值在启动的时候并没有写入MBean,就象<literal>jboss-"
+"service.xml</literal>属性元素内容的值。它只有在没有定义属性存取器(accessor)以"
+"及value元素的情况下才使用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:833
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">value</emphasis>: The <literal>value</literal> "
+"element specifies a management attribute's current value. Unlike the "
+"<literal>default</literal> element, the <literal>value</literal> element is "
+"written through to the MBean on startup provided there is a setter method "
+"available."
+msgstr ""
+"<emphasis role=\"bold\">value</emphasis>:<literal>value</literal>元素指定当"
+"前value的管理属性。不象<literal>default</literal>元素,如果setter方法可用的"
+"话,<literal>value</literal>元素在启动时就写入到MBean里。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:838
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">persistence-manager</emphasis>: The "
+"<literal>persistence-manager</literal> element gives the name of a class to "
+"use as the persistence manager. The <literal>value</literal> attribute "
+"specifies the class name that supplies the <literal>org.jboss.mx.persistence."
+"PersistenceManager</literal> interface implementation. The only "
+"implementation currently supplied by JBoss is the <literal>org.jboss.mx."
+"persistence.ObjectStreamPersistenceManager</literal> which serializes the "
+"<literal>ModelMBeanInfo</literal> content to a file using Java serialization."
+msgstr ""
+"<emphasis role=\"bold\">persistence-manager</emphasis>:<literal>persistence-"
+"manager</literal>元素指定用作持久化管理者(persistence manager)的类。"
+"<literal>value</literal>属性指定用于<literal>org.jboss.mx.persistence."
+"PersistenceManager</literal>接口实现的类名。目前JBoss唯一提供的实现是"
+"<literal>org.jboss.mx.persistence.ObjectStreamPersistenceManager</literal>,"
+"它使用Java串形化把<literal>ModelMBeanInfo</literal>的内容串形化到一个文件里。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:843
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">descriptor</emphasis>: The <literal>descriptor</"
+"literal> element specifies an arbitrary descriptor not known to JBoss. Its "
+"<literal>name</literal> attribute specifies the type of the descriptor and "
+"its <literal>value</literal> attribute specifies the descriptor value. The "
+"<literal>descriptor</literal> element allows for the attachment of arbitrary "
+"management metadata."
+msgstr ""
+"<emphasis role=\"bold\">descriptor</emphasis>:<literal>descriptor</literal>"
+"元素指定JBoss所不知道的任何描述符。它的<literal>name</literal>属性指定描述符"
+"的类型,它的<literal>value</literal>属性指定了描述符的值。"
+"<literal>descriptor</literal>元素允许有任意管理元数据的附件。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:848
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">injection</emphasis>: The <literal>injection</"
+"literal> element describes an injection point for receiving information from "
+"the microkernel. Each injection point specifies the type and the set method "
+"to use to inject the information into the resource. The <literal>injection</"
+"literal> element supports type attributes:"
+msgstr ""
+"<emphasis role=\"bold\">injection</emphasis>:<literal>injection</literal>元"
+"素描述从微内核接受信息的一个注入点(injection point)。每个注入点指定把信息注入"
+"到资源里的类型和set方法。<literal>injection</literal>元素支持类型属性:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:853
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">id</emphasis>: The <literal>id</literal> attribute "
+"specifies the injection point type. The current injection point types are:"
+msgstr ""
+"<emphasis role=\"bold\">id</emphasis>:<literal>id</literal>属性指定注入点的"
+"类型。目前的类型是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:858
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MBeanServerType</emphasis>: An "
+"<emphasis>MBeanServerType</emphasis> injection point receives a reference to "
+"the <emphasis>MBeanServer</emphasis> that the XMBean is registered with."
+msgstr ""
+"<emphasis role=\"bold\">MBeanServerType</emphasis>:"
+"<emphasis>MBeanServerType</emphasis>注入点接收XMBean所注册的"
+"<emphasis>MBeanServer</emphasis>的引用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:863
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MBeanInfoType</emphasis>: An "
+"<emphasis>MBeanInfoType</emphasis> injection point receives a reference to "
+"the XMBean <emphasis>ModelMBeanInfo</emphasis> metadata."
+msgstr ""
+"<emphasis role=\"bold\">MBeanInfoType</emphasis>:<emphasis>MBeanInfoType</"
+"emphasis>注入点接收对XMBean <emphasis>ModelMBeanInfo</emphasis>元数据的引用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:868
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ObjectNameType</emphasis>: The <emphasis>ObjectName</"
+"emphasis> injection point receives the <emphasis>ObjectName</emphasis> that "
+"the XMBean is registered under."
+msgstr ""
+"<emphasis role=\"bold\">ObjectNameType</emphasis>:<emphasis>ObjectName</"
+"emphasis>注入点接收XMBean所注册的<emphasis>ObjectName</emphasis>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:877
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">setMethod</emphasis>: The <emphasis>setMethod</"
+"emphasis> attribute gives the name of the method used to set the injection "
+"value on the resource. The set method should accept values of the type "
+"corresponding to the injection point type."
+msgstr ""
+"<emphasis role=\"bold\">setMethod</emphasis>:<emphasis>setMethod</emphasis>"
+"属性指定用于指定资源的注入值的方法名。set方法应该接受对应注入点类型的类型值。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:882
+#, no-c-format
+msgid ""
+"Note that any of the constructor, attribute, operation or notification "
+"elements may have a <literal>descriptors</literal> element to specify the "
+"specification defined descriptors as well as arbitrary extension descriptor "
+"settings."
+msgstr ""
+"注意,任何constructor,attribute,operation 或 notification 元素都可能有"
+"<literal>descriptors</literal>属性来指定描述符定义的规格,以及描述符设定的任"
+"何扩展。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:888
+#, no-c-format
+msgid "The Management Class"
+msgstr "管理类"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:889
+#, no-c-format
+msgid ""
+"The <literal>class</literal> element specifies the fully qualified name of "
+"the managed object whose management interface is described by the XMBean "
+"descriptor."
+msgstr ""
+"<literal>class</literal>元素指定管理接口由XMBean描述符描述的被管理的对象的类"
+"全名。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:895
+#, no-c-format
+msgid "The Constructors"
+msgstr "构造函数"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:896
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>constructor</literal> element(s) specifies the constructors "
+"available for creating an instance of the managed object. The constructor "
+"element and its content model are shown in <xref linkend=\"The_Constructors-"
+"The_XMBean_constructor_element_and_its_content_model\"/>."
+msgstr ""
+"<literal>constructor</literal>元素指定用来建立被管理对象的实例的可用构造函"
+"数。<xref linkend=\"ch2.xmcons.fig\"/>展示了constructor元素和它的内容模型。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:900
+#, no-c-format
+msgid "The XMBean constructor element and its content model"
+msgstr "The XMBean constructor element and its content model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:907
+#, no-c-format
+msgid "The key child elements are:"
+msgstr "子元素是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:912
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: A description of the "
+"constructor."
+msgstr "<emphasis role=\"bold\">description</emphasis>:构造函数的描述"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:917
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: The name of the constructor, which "
+"must be the same as the implementation class."
+msgstr ""
+"<emphasis role=\"bold\">name</emphasis>:构造函数的名字,它必须和实现类名一"
+"致。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:922
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">parameter</emphasis>: The parameter element "
+"describes a constructor parameter. The parameter element has the following "
+"attributes:"
+msgstr ""
+"<emphasis role=\"bold\">parameter</emphasis>:parameter元素描述构造函数的参"
+"数。parameter元素有下列的属性:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:927
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: An optional description of "
+"the parameter."
+msgstr "<emphasis role=\"bold\">description</emphasis>:参数的可选描述。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:932
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: The required variable name of the "
+"parameter."
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:937
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">type</emphasis>: The required fully qualified class "
+"name of the parameter type."
+msgstr "<emphasis role=\"bold\">type</emphasis>:要求的参数类型的类全名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:944
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">descriptors</emphasis>: Any descriptors to associate "
+"with the constructor metadata."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:任何与构造函数元数据关联的描"
+"述符。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:952
+#, no-c-format
+msgid "The Attributes"
+msgstr "The Attributes"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:953
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>attribute</literal> element(s) specifies the management "
+"attributes exposed by the MBean. The attribute element and its content model "
+"are shown in <xref linkend=\"The_Attributes-"
+"The_XMBean_attribute_element_and_its_content_model\"/>."
+msgstr ""
+"<literal>attribute</literal>元素指定MBean开放的管理属性。<xref linkend=\"ch2."
+"xmattr.fig\"/>展示了attribute元素和它的内容模型。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:957
+#, no-c-format
+msgid "The XMBean attribute element and its content model"
+msgstr "The XMBean attribute element and its content model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:964
+#, no-c-format
+msgid "The <literal>attribute</literal> element supported attributes include:"
+msgstr "<literal>attribute</literal>元素所支持的属性包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:969
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">access</emphasis>: The optional <literal>access</"
+"literal> attribute defines the read/write access modes of an attribute. It "
+"must be one of:"
+msgstr ""
+"<emphasis role=\"bold\">access</emphasis>:可选的<literal>access</literal>属"
+"性定义属性的读/写访问模式。它必须是下列选项之一:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:974
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-only</emphasis>: The attribute may only be read."
+msgstr "<emphasis role=\"bold\">read-only</emphasis>:只读。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:979
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">write-only</emphasis>: The attribute may only be "
+"written."
+msgstr "<emphasis role=\"bold\">write-only</emphasis>:只写。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:984
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-write</emphasis>: The attribute is both "
+"readable and writable. This is the implied default."
+msgstr ""
+"<emphasis role=\"bold\">read-write</emphasis>:既可读又可写。这是缺省选项。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:991
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">getMethod</emphasis>: The <literal>getMethod</"
+"literal> attribute defines the name of the method which reads the named "
+"attribute. This must be specified if the managed attribute should be "
+"obtained from the MBean instance."
+msgstr ""
+"<emphasis role=\"bold\">getMethod</emphasis>:<literal>getMethod</literal>属"
+"性定义读取命名属性的方法名。如果被管理的属性应该从MBean实例获得,它必须被指"
+"定。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:996
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">setMethod</emphasis>: The <literal>setMethod</"
+"literal> attribute defines the name of the method which writes the named "
+"attribute. This must be specified if the managed attribute should be "
+"obtained from the MBean instance."
+msgstr ""
+"<emphasis role=\"bold\">setMethod</emphasis>:<literal>setMethod</literal>属"
+"性定义写命名属性的方法名。如果被管理的属性应该从MBean实例获得,它必须被指定。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1001
+#, no-c-format
+msgid "The key child elements of the attribute element include:"
+msgstr "attribute元素的关键子元素包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1006
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: A description of the "
+"attribute."
+msgstr "<emphasis role=\"bold\">description</emphasis>:对attribute的描述"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1011
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: The name of the attribute as would "
+"be used in the <literal>MBeanServer.getAttribute()</literal> operation."
+msgstr ""
+"<emphasis role=\"bold\">name</emphasis>:attribute的名字,在"
+"<literal>MBeanServer.getAttribute()</literal>操作里使用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1016
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">type</emphasis>: The fully qualified class name of "
+"the attribute type."
+msgstr "<emphasis role=\"bold\">type</emphasis>:attribute类型的类全名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1021
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">descriptors</emphasis>: Any additional descriptors "
+"that affect the attribute persistence, caching, default value, etc."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:影响attribute持久化,缓存,缺"
+"省等的任意描述符。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1029
+#, no-c-format
+msgid "The Operations"
+msgstr "The Operations"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1030
+#, fuzzy, no-c-format
+msgid ""
+"The management operations exposed by the XMBean are specified via one or "
+"more operation elements. The operation element and its content model are "
+"shown in <xref linkend=\"The_Operations-"
+"The_XMBean_operation_element_and_its_content_model\"/>."
+msgstr ""
+"XMBean开放的管理操作由一个或多个operation元素指定。<xref linkend=\"ch2.xmops."
+"fig\"/>展示了operation元素和它的内容模型。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1034
+#, no-c-format
+msgid "The XMBean operation element and its content model"
+msgstr "The XMBean operation element and its content model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1041
+#, no-c-format
+msgid ""
+"The impact attribute defines the impact of executing the operation and must "
+"be one of:"
+msgstr "impact属性定义执行操作的影响,它必须是下列值之一:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1046
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ACTION</emphasis>: The operation changes the state "
+"of the MBean component (write operation)"
+msgstr ""
+"<emphasis role=\"bold\">ACTION</emphasis>:操作改变MBean组件的状态(写操作)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1051
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">INFO</emphasis>: The operation should not alter the "
+"state of the MBean component (read operation)."
+msgstr ""
+"<emphasis role=\"bold\">INFO</emphasis>:操作不应该修改MBean组件的状态(读操"
+"作)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1056
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ACTION_INFO</emphasis>: The operation behaves like a "
+"read/write operation."
+msgstr "<emphasis role=\"bold\">ACTION_INFO</emphasis>:读/写操作。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1061 J2EE_Reference_Introduction.xml:1106
+#, no-c-format
+msgid "The child elements are:"
+msgstr "子元素是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1066
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: This element specifies a "
+"human readable description of the operation."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1071
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: This element contains the "
+"operation's name"
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含操作的名字。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1076
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">parameter</emphasis>: This element describes the "
+"operation's signature."
+msgstr ""
+"<emphasis role=\"bold\">parameter</emphasis>:这个元素描述了操作的签名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1081
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">return-type</emphasis>: This element contains a "
+"fully qualified class name of the return type from this operation. If not "
+"specified, it defaults to void."
+msgstr ""
+"<emphasis role=\"bold\">return-type</emphasis>:这个元素包含这个操作的返回类"
+"型的类全名。如果没指定的话,缺省为void。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1086
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">descriptors</emphasis>: Any descriptors to associate "
+"with the operation metadata."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:与操作元数据关联的任何描述"
+"符。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1094
+#, no-c-format
+msgid "Notifications"
+msgstr "Notifications"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1095
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>notification</literal> element(s) describes the management "
+"notifications that may be emitted by the XMBean. The notification element "
+"and its content model is shown in <xref linkend=\"Notifications-"
+"The_XMBean_notification_element_and_content_model\"/>."
+msgstr ""
+"<literal>notification</literal>元素描述可以被XMBean发送的管理通知(management "
+"notifications)。<xref linkend=\"ch2.xmnot.fig\"/>展示了notification元素和它的"
+"内容模型。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1099
+#, no-c-format
+msgid "The XMBean notification element and content model"
+msgstr "The XMBean notification element and content model"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1111
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: This element gives a human "
+"readable description of the notification."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定通知的易读的描"
+"述。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1116
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: This element contains the fully "
+"qualified name of the notification class."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1121
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">notification-type</emphasis>: This element contains "
+"the dot-separated notification type string."
+msgstr ""
+"<emphasis role=\"bold\">notification-type</emphasis>:这个元素包含用逗号隔开"
+"的通知类型串。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1126
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">descriptors</emphasis>: Any descriptors to associate "
+"with the notification metadata."
+msgstr ""
+"<emphasis role=\"bold\">descriptors</emphasis>:与通知元数据相关联的任何描述"
+"符。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1138
+#, no-c-format
+msgid "Connecting to the JMX Server"
+msgstr "连接到JMX服务器"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1139
+#, no-c-format
+msgid ""
+"JBoss includes adaptors that allow access to the JMX MBeanServer from "
+"outside of the JBoss server VM. The current adaptors include HTML, an RMI "
+"interface, and an EJB."
+msgstr ""
+"JBoss包含允许从JBoss服务器VM外部访问JMX MBeanServer的适配器。目前的适配器包括"
+"HTML,RMI接口和EJB。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1143
+#, no-c-format
+msgid "Inspecting the Server - the JMX Console Web Application"
+msgstr "查看服务器 - JMX控制台Web应用程序"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1144
+#, fuzzy, no-c-format
+msgid ""
+"JBoss comes with its own implementation of a JMX HTML adaptor that allows "
+"one to view the server's MBeans using a standard web browser. The "
+"default URL for the console web application is <ulink url=\"http://"
+"localhost:8080/jmx-console/\"></ulink>. If you browse this location you will "
+"see something similar to that presented in <xref linkend="
+"\"Inspecting_the_Server___the_JMX_Console_Web_Application-"
+"The_JBoss_JMX_console_web_application_agent_view\"/>."
+msgstr ""
+"JBoss带有自己的JMX HTML适配器的实现,它允许使用标准的web浏览器来查看服务器的"
+"MBean。控制台web应用程序的缺省URL是<ulink url=\"http://localhost:8080/jmx-"
+"console/\"></ulink>。你可以类似于<xref linkend=\"ch2.console1.fig\"/>的内容。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1148
+#, no-c-format
+msgid "The JBoss JMX console web application agent view"
+msgstr "The JBoss JMX console web application agent view"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1155
+#, fuzzy, no-c-format
+msgid ""
+"The top view is called the agent view and it provides a listing of all "
+"MBeans registered with the <literal>MBeanServer</literal> sorted by the "
+"domain portion of the MBean's <literal>ObjectName</literal>. Under each "
+"domain are the MBeans under that domain. When you select one of the MBeans "
+"you will be taken to the MBean view. This allows one to view and edit an "
+"MBean's attributes as well as invoke operations. As an example, <xref "
+"linkend=\"Inspecting_the_Server___the_JMX_Console_Web_Application-"
+"The_MBean_view_for_the_jboss.systemtypeServer_MBean\"/> shows the MBean view "
+"for the <literal>jboss.system:type=Server</literal> MBean."
+msgstr ""
+"顶层的视图被称作代理视图,它提供所有在<literal>MBeanServer</literal>注册的"
+"MBean的列表,并根据MBean的<literal>ObjectName</literal>的域名部分来排序。域名"
+"下面是该域名的MBean。当你选择其中一个MBean时,你将会进入MBean视图。它允许你查"
+"看和编辑MBean的属性以及调用操作。例如,<xref linkend=\"ch2.console2.fig\"/>展"
+"示了<literal>jboss.system:type=Server</literal>MBean的MBean视图。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1159
+#, no-c-format
+msgid "The MBean view for the \"jboss.system:type=Server\" MBean"
+msgstr "The MBean view for the \"jboss.system:type=Server\" MBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1166
+#, no-c-format
+msgid ""
+"The source code for the JMX console web application is located in the "
+"<literal>varia</literal> module under the <literal>src/main/org/jboss/jmx</"
+"literal> directory. Its web pages are located under <literal>varia/src/"
+"resources/jmx</literal>. The application is a simple MVC servlet with JSP "
+"views that utilize the MBeanServer."
+msgstr ""
+"JMX控制台web应用程序的源码放在<literal>src/main/org/jboss/jmx</literal>目录下"
+"的<literal>varia</literal>模块里。它的web页面存放在<literal>varia/src/"
+"resources/jmx</literal>下。它是一个简单的有着利用MBeanServer的JSP的MVC "
+"servlet。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1170
+#, no-c-format
+msgid "Securing the JMX Console"
+msgstr "Securing the JMX Console"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1171
+#, fuzzy, no-c-format
+msgid ""
+"Since the JMX console web application is just a standard servlet, it may be "
+"secured using standard J2EE role based security. The <literal>jmx-console."
+"war</literal> that is deployed as an unpacked WAR that includes template "
+"settings for quickly enabling simple username and password based access "
+"restrictions. If you look at the <literal>jmx-console.war</literal> in the "
+"<literal>server/production/deploy</literal> directory you will find the "
+"<literal>web.xml</literal> and <literal>jboss-web.xml</literal> descriptors "
+"in the <literal>WEB-INF</literal> directory. The <literal>jmx-console-roles."
+"properties</literal> and <literal>jmx-console-users.properties</literal> "
+"files are located in the <literal>server/production/conf/props</literal> "
+"directory."
+msgstr ""
+"既然JMX控制台应用程序是一个标准的servlet,它可以使用标准的J2EE基于角色的安全"
+"性。作为未封装的WAR部署的<literal>jmx-console.war</literal> 包括了快速启用简"
+"单用户名和密码访问限制的模板设定。如果你看一下<literal>server/default/"
+"deploy</literal>目录下的<literal>jmx-console.war</literal>,你会找到"
+"<literal>WEB-INF</literal>目录下的<literal>web.xml</literal> 和 "
+"<literal>jboss-web.xml</literal>描述符。<literal>jmx-console-roles."
+"properties</literal> 和 <literal>jmx-console-users.properties</literal> 都在"
+"<literal>server/default/conf/props</literal>目录下。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1174
+#, fuzzy, no-c-format
+msgid ""
+"By uncommenting the security sections of the <literal>web.xml</literal> and "
+"<literal>jboss-web.xml</literal> descriptors as shown in <xref linkend="
+"\"Securing_the_JMX_Console-The_jmx_console.war_web."
+"xml_descriptors_with_the_security_elements_uncommented.\"/>, you enable HTTP "
+"basic authentication that restricts access to the JMX Console application to "
+"the user <literal>admin</literal> with password <literal>admin</literal>. "
+"The username and password are determined by the <literal>admin=admin </"
+"literal>line in the <literal>jmx-console-users.properties</literal> file."
+msgstr ""
+"如果去掉<xref linkend=\"ch2.secureconsole.ex\"/>所展示的<literal>web.xml</"
+"literal> 和 <literal>jboss-web.xml</literal>描述符里安全性设置部分的注释,你"
+"可以启用基本的HTTP认证,只允许密码为<literal>admin</literal>的用户"
+"<literal>admin</literal>访问JMX控制台应用程序。用户名和密码由<literal>jmx-"
+"console-users.properties</literal>文件里的<literal>admin=admin </literal>行来"
+"决定。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1177
+#, no-c-format
+msgid ""
+"The jmx-console.war web.xml descriptors with the security elements "
+"uncommented."
+msgstr ""
+"The jmx-console.war web.xml descriptors with the security elements "
+"uncommented."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1178
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app>\n"
+" <!-- ... -->\n"
+" \n"
+" <!-- A security constraint that restricts access to the HTML JMX "
+"console\n"
+" to users with the role JBossAdmin. Edit the roles to what you want "
+"and\n"
+" uncomment the WEB-INF/jboss-web.xml/security-domain element to "
+"enable\n"
+" secured access to the HTML JMX console.\n"
+" -->\n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HtmlAdaptor</web-resource-name>\n"
+" <description> An example security config that only allows "
+"users with\n"
+" the role JBossAdmin to access the HTML JMX console web\n"
+" application </description>\n"
+" <url-pattern>/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>JBoss JMX Console</realm-name>\n"
+" </login-config>\n"
+" <security-role>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+msgstr ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app>\n"
+" <!-- ... -->\n"
+" \n"
+" <!-- A security constraint that restricts access to the HTML JMX "
+"console\n"
+" to users with the role JBossAdmin. Edit the roles to what you want "
+"and\n"
+" uncomment the WEB-INF/jboss-web.xml/security-domain element to "
+"enable\n"
+" secured access to the HTML JMX console.\n"
+" -->\n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HtmlAdaptor</web-resource-name>\n"
+" <description> An example security config that only allows "
+"users with\n"
+" the role JBossAdmin to access the HTML JMX console web\n"
+" application </description>\n"
+" <url-pattern>/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>JBoss JMX Console</realm-name>\n"
+" </login-config>\n"
+" <security-role>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1179
+#, no-c-format
+msgid ""
+"The jmx-console.war jboss-web.xml descriptors with the security elements "
+"uncommented."
+msgstr ""
+"The jmx-console.war jboss-web.xml descriptors with the security elements "
+"uncommented."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1180
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss-web\n"
+" PUBLIC \"-//JBoss//DTD Web Application 2.3//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd\">\n"
+"<jboss-web>\n"
+" <!-- \n"
+" Uncomment the security-domain to enable security. You will\n"
+" need to edit the htmladaptor login configuration to setup the\n"
+" login modules used to authentication users. \n"
+" -->\n"
+" <security-domain>java:/jaas/jmx-console</security-domain>\n"
+"</jboss-web>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jboss-web\n"
+" PUBLIC \"-//JBoss//DTD Web Application 2.3//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss-web_3_0.dtd\">\n"
+"<jboss-web>\n"
+" <!-- \n"
+" Uncomment the security-domain to enable security. You will\n"
+" need to edit the htmladaptor login configuration to setup the\n"
+" login modules used to authentication users. \n"
+" -->\n"
+" <security-domain>java:/jaas/jmx-console</security-domain>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1181
+#, fuzzy, no-c-format
+msgid ""
+"Make these changes and then when you try to access the JMX Console URL, you "
+"will see a dialog similar to that shown in <xref linkend="
+"\"Securing_the_JMX_Console-The_JMX_Console_basic_HTTP_login_dialog.\"/>."
+msgstr ""
+"做了这些修改后,当你试图访问JXM控制台URL时,你将看到和<xref linkend=\"ch2."
+"basicauth.fig\"/>相似的对话框。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1185
+#, no-c-format
+msgid "The JMX Console basic HTTP login dialog."
+msgstr "The JMX Console basic HTTP login dialog."
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1192
+#, fuzzy, no-c-format
+msgid ""
+"You probably to use the properties files for securing access to the JMX "
+"console application. To see how to properly configure the security settings "
+"of web applications see <xref linkend=\"Security_on_JBoss\"/>."
+msgstr ""
+"你可能使用属性文件来设定访问JMX控制台应用程序的安全性。关于怎样正确配置web应"
+"用程序的安全设置,请参考<xref linkend=\"ch8.chapter\"/>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1200
+#, no-c-format
+msgid "Connecting to JMX Using RMI"
+msgstr "使用RMI连接JMX"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1201
+#, no-c-format
+msgid ""
+"JBoss supplies an RMI interface for connecting to the JMX MBeanServer. This "
+"interface is <literal>org.jboss.jmx.adaptor.rmi.RMIAdaptor</literal>. The "
+"<literal>RMIAdaptor</literal> interface is bound into JNDI in the default "
+"location of <literal>jmx/invoker/RMIAdaptor</literal> as well as "
+"<literal>jmx/rmi/RMIAdaptor</literal> for backwards compatibility with older "
+"clients."
+msgstr ""
+"JBoss提供一个RMI接口来连接JMX MBeanServer。这个接口是<literal>org.jboss.jmx."
+"adaptor.rmi.RMIAdaptor</literal>。<literal>RMIAdaptor</literal>接口在"
+"<literal>jmx/invoker/RMIAdaptor</literal>和<literal>jmx/rmi/RMIAdaptor</"
+"literal>(为了向后的兼容性)的缺省位置绑定到JNDI。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1204
+#, fuzzy, no-c-format
+msgid ""
+"shows a client that makes use of the <literal>RMIAdaptor</literal> interface "
+"to query the <literal>MBeanInfo</literal> for the <literal>JNDIView</"
+"literal> MBean. It also invokes the MBean's <literal>list(boolean)</"
+"literal> method and displays the result."
+msgstr ""
+"展示了一个客户用<literal>RMIAdaptor</literal>接口来为<literal>JNDIView</"
+"literal> MBean查询<literal>MBeanInfo</literal>。它也调用了MBean的"
+"<literal>list(boolean)</literal>方法并显示最后的结果。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1207
+#, no-c-format
+msgid "A JMX client that uses the RMIAdaptor"
+msgstr "A JMX client that uses the RMIAdaptor"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1208
+#, fuzzy, no-c-format
+msgid ""
+"public class JMXBrowser\n"
+"{\n"
+" /**\n"
+" * @param args the command line arguments\n"
+" */\n"
+" public static void main(String[] args) throws Exception\n"
+" {\n"
+" InitialContext ic = new InitialContext();\n"
+" RMIAdaptor server = (RMIAdaptor) ic.lookup(\"jmx/invoker/RMIAdaptor"
+"\");\n"
+" \n"
+" // Get the MBeanInfo for the JNDIView MBean\n"
+" ObjectName name = new ObjectName(\"jboss:service=JNDIView\");\n"
+" MBeanInfo info = server.getMBeanInfo(name);\n"
+" System.out.println(\"JNDIView Class: \" + info.getClassName());\n"
+"\n"
+" MBeanOperationInfo[] opInfo = info.getOperations();\n"
+" System.out.println(\"JNDIView Operations: \");\n"
+" for(int o = 0; o < opInfo.length; o ++) {\n"
+" MBeanOperationInfo op = opInfo[o];\n"
+"\n"
+" String returnType = op.getReturnType();\n"
+" String opName = op.getName();\n"
+" System.out.print(\" + \" + returnType + \" \" + opName + "
+"\"(\");\n"
+"\n"
+" MBeanParameterInfo[] params = op.getSignature();\n"
+" for(int p = 0; p < params.length; p++) {\n"
+" MBeanParameterInfo paramInfo = params[p];\n"
+"\n"
+" String pname = paramInfo.getName();\n"
+" String type = paramInfo.getType();\n"
+"\n"
+" if (pname.equals(type)) {\n"
+" System.out.print(type);\n"
+" } else {\n"
+" System.out.print(type + \" \" + name);\n"
+" }\n"
+"\n"
+" if (p < params.length-1) {\n"
+" System.out.print(','); \n"
+" }\n"
+" }\n"
+" System.out.println(\")\");\n"
+" }\n"
+" \n"
+" // Invoke the list(boolean) op\n"
+" String[] sig = {\"boolean\"};\n"
+" Object[] opArgs = {Boolean.TRUE};\n"
+" Object result = server.invoke(name, \"list\", opArgs, sig);\n"
+"\n"
+" System.out.println(\"JNDIView.list(true) output:\\n\"+result);\n"
+" }\n"
+"}"
+msgstr ""
+"public class JMXBrowser\n"
+"{\n"
+" /**\n"
+" * @param args the command line arguments\n"
+" */\n"
+" public static void main(String[] args) throws Exception\n"
+" {\n"
+" InitialContext ic = new InitialContext();\n"
+" RMIAdaptor server = (RMIAdaptor) ic.lookup(\"jmx/invoker/RMIAdaptor"
+"\");\n"
+" \n"
+" // Get the MBeanInfo for the JNDIView MBean\n"
+" ObjectName name = new ObjectName(\"jboss:service=JNDIView\");\n"
+" MBeanInfo info = server.getMBeanInfo(name);\n"
+" System.out.println(\"JNDIView Class: \" + info.getClassName());\n"
+"\n"
+" MBeanOperationInfo[] opInfo = info.getOperations();\n"
+" System.out.println(\"JNDIView Operations: \");\n"
+" for(int o = 0; o < opInfo.length; o ++) {\n"
+" MBeanOperationInfo op = opInfo[o];\n"
+"\n"
+" String returnType = op.getReturnType();\n"
+" String opName = op.getName();\n"
+" System.out.print(\" + \" + returnType + \" \" + opName + "
+"\"(\");\n"
+"\n"
+" MBeanParameterInfo[] params = op.getSignature();\n"
+" for(int p = 0; p < params.length; p++) {\n"
+" MBeanParameterInfo paramInfo = params[p];\n"
+"\n"
+" String pname = paramInfo.getName();\n"
+" String type = paramInfo.getType();\n"
+"\n"
+" if (pname.equals(type)) {\n"
+" System.out.print(type);\n"
+" } else {\n"
+" System.out.print(type + \" \" + name);\n"
+" }\n"
+"\n"
+" if (p < params.length-1) {\n"
+" System.out.print(','); \n"
+" }\n"
+" }\n"
+" System.out.println(\")\");\n"
+" }\n"
+" \n"
+" // Invoke the list(boolean) op\n"
+" String[] sig = {\"boolean\"};\n"
+" Object[] opArgs = {Boolean.TRUE};\n"
+" Object result = server.invoke(name, \"list\", opArgs, sig);\n"
+"\n"
+" System.out.println(\"JNDIView.list(true) output:\\n\"+result);\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1209
+#, no-c-format
+msgid ""
+"To test the client access using the <literal>RMIAdaptor</literal>, run the "
+"following:"
+msgstr "用<literal>RMIAdaptor</literal>来测试客户段访问,运行下面的:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1212
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=4 run-example\n"
+"...\n"
+" \n"
+"run-example4:\n"
+" [java] JNDIView Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIView Operations: \n"
+" [java] + java.lang.String list(boolean jboss:service=JNDIView)\n"
+" [java] + java.lang.String listXML()\n"
+" [java] + void create()\n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void destroy()\n"
+" [java] + void jbossInternalLifecycle(java.lang.String jboss:"
+"service=JNDIView)\n"
+" [java] + java.lang.String getName()\n"
+" [java] + int getState()\n"
+" [java] + java.lang.String getStateString()\n"
+" [java] JNDIView.list(true) output:\n"
+" [java] <h1>java: Namespace</h1>\n"
+" [java] <pre>\n"
+" [java] +- XAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- DefaultDS (class: javax.sql.DataSource)\n"
+" [java] +- SecurityProxyFactory (class: org.jboss.security."
+"SubjectSecurityProxyFactory)\n"
+" [java] +- DefaultJMSProvider (class: org.jboss.jms.jndi."
+"JNDIProviderAdapter)\n"
+" [java] +- comp (class: javax.naming.Context)\n"
+" [java] +- JmsXA (class: org.jboss.resource.adapter.jms."
+"JmsConnectionFactoryImpl)\n"
+" [java] +- ConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- jaas (class: javax.naming.Context)\n"
+" [java] | +- JmsXARealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] | +- jbossmq (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] | +- HsqlDbRealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] +- timedCacheFactory (class: javax.naming.Context)\n"
+" [java] Failed to lookup: timedCacheFactory, errmsg=null\n"
+" [java] +- TransactionPropagationContextExporter (class: org.jboss.tm."
+"TransactionPropag\n"
+"ationContextFactory)\n"
+" [java] +- StdJMSPool (class: org.jboss.jms.asf."
+"StdServerSessionPoolFactory)\n"
+" [java] +- Mail (class: javax.mail.Session)\n"
+" [java] +- TransactionPropagationContextImporter (class: org.jboss.tm."
+"TransactionPropag\n"
+"ationContextImporter)\n"
+" [java] +- TransactionManager (class: org.jboss.tm.TxManager)\n"
+" [java] </pre>\n"
+" [java] <h1>Global JNDI Namespace</h1>\n"
+" [java] <pre>\n"
+" [java] +- XAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: "
+"javax.naming.Lin\n"
+"kRef)\n"
+" [java] +- UserTransactionSessionFactory (proxy: $Proxy11 implements "
+"interface org.jbos\n"
+"s.tm.usertx.interfaces.UserTransactionSessionFactory)\n"
+" [java] +- HTTPConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- console (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- PluginManager (proxy: $Proxy36 implements interface org."
+"jboss.console.ma\n"
+"nager.PluginManagerMBean)\n"
+" [java] +- UIL2XAConnectionFactory[link -> XAConnectionFactory] "
+"(class: javax.naming\n"
+".LinkRef)\n"
+" [java] +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins."
+"keygenerator.uuid.UUID\n"
+"KeyGeneratorFactory)\n"
+" [java] +- HTTPXAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- topic (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- testDurableTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] | +- testTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] | +- securedTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] +- queue (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- A (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- testQueue (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- ex (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- DLQ (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- D (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- C (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- B (class: org.jboss.mq.SpyQueue)\n"
+" [java] +- ConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- UserTransaction (class: org.jboss.tm.usertx.client."
+"ClientUserTransaction)\n"
+" [java] +- jmx (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- invoker (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | | +- RMIAdaptor (proxy: $Proxy35 implements interface "
+"org.jboss.jmx.adapt\n"
+"or.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)\n"
+" [java] | +- rmi (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] "
+"(class: javax.naming.L\n"
+"inkRef)\n"
+" [java] +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins."
+"keygenerator.hilo.HiLo\n"
+"KeyGeneratorFactory)\n"
+" [java] +- UILXAConnectionFactory[link -> XAConnectionFactory] "
+"(class: javax.naming.\n"
+"LinkRef)\n"
+" [java] +- UILConnectionFactory[link -> ConnectionFactory] (class: "
+"javax.naming.Link\n"
+"Ref)\n"
+" [java] </pre>"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=4 run-example\n"
+"...\n"
+" \n"
+"run-example4:\n"
+" [java] JNDIView Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIView Operations: \n"
+" [java] + java.lang.String list(boolean jboss:service=JNDIView)\n"
+" [java] + java.lang.String listXML()\n"
+" [java] + void create()\n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void destroy()\n"
+" [java] + void jbossInternalLifecycle(java.lang.String jboss:"
+"service=JNDIView)\n"
+" [java] + java.lang.String getName()\n"
+" [java] + int getState()\n"
+" [java] + java.lang.String getStateString()\n"
+" [java] JNDIView.list(true) output:\n"
+" [java] <h1>java: Namespace</h1>\n"
+" [java] <pre>\n"
+" [java] +- XAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- DefaultDS (class: javax.sql.DataSource)\n"
+" [java] +- SecurityProxyFactory (class: org.jboss.security."
+"SubjectSecurityProxyFactory)\n"
+" [java] +- DefaultJMSProvider (class: org.jboss.jms.jndi."
+"JNDIProviderAdapter)\n"
+" [java] +- comp (class: javax.naming.Context)\n"
+" [java] +- JmsXA (class: org.jboss.resource.adapter.jms."
+"JmsConnectionFactoryImpl)\n"
+" [java] +- ConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- jaas (class: javax.naming.Context)\n"
+" [java] | +- JmsXARealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] | +- jbossmq (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] | +- HsqlDbRealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" [java] +- timedCacheFactory (class: javax.naming.Context)\n"
+" [java] Failed to lookup: timedCacheFactory, errmsg=null\n"
+" [java] +- TransactionPropagationContextExporter (class: org.jboss.tm."
+"TransactionPropag\n"
+"ationContextFactory)\n"
+" [java] +- StdJMSPool (class: org.jboss.jms.asf."
+"StdServerSessionPoolFactory)\n"
+" [java] +- Mail (class: javax.mail.Session)\n"
+" [java] +- TransactionPropagationContextImporter (class: org.jboss.tm."
+"TransactionPropag\n"
+"ationContextImporter)\n"
+" [java] +- TransactionManager (class: org.jboss.tm.TxManager)\n"
+" [java] </pre>\n"
+" [java] <h1>Global JNDI Namespace</h1>\n"
+" [java] <pre>\n"
+" [java] +- XAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: "
+"javax.naming.Lin\n"
+"kRef)\n"
+" [java] +- UserTransactionSessionFactory (proxy: $Proxy11 implements "
+"interface org.jbos\n"
+"s.tm.usertx.interfaces.UserTransactionSessionFactory)\n"
+" [java] +- HTTPConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- console (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- PluginManager (proxy: $Proxy36 implements interface org."
+"jboss.console.ma\n"
+"nager.PluginManagerMBean)\n"
+" [java] +- UIL2XAConnectionFactory[link -> XAConnectionFactory] "
+"(class: javax.naming\n"
+".LinkRef)\n"
+" [java] +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins."
+"keygenerator.uuid.UUID\n"
+"KeyGeneratorFactory)\n"
+" [java] +- HTTPXAConnectionFactory (class: org.jboss.mq."
+"SpyXAConnectionFactory)\n"
+" [java] +- topic (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- testDurableTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] | +- testTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] | +- securedTopic (class: org.jboss.mq.SpyTopic)\n"
+" [java] +- queue (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- A (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- testQueue (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- ex (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- DLQ (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- D (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- C (class: org.jboss.mq.SpyQueue)\n"
+" [java] | +- B (class: org.jboss.mq.SpyQueue)\n"
+" [java] +- ConnectionFactory (class: org.jboss.mq."
+"SpyConnectionFactory)\n"
+" [java] +- UserTransaction (class: org.jboss.tm.usertx.client."
+"ClientUserTransaction)\n"
+" [java] +- jmx (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | +- invoker (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | | +- RMIAdaptor (proxy: $Proxy35 implements interface "
+"org.jboss.jmx.adapt\n"
+"or.rmi.RMIAdaptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)\n"
+" [java] | +- rmi (class: org.jnp.interfaces.NamingContext)\n"
+" [java] | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] "
+"(class: javax.naming.L\n"
+"inkRef)\n"
+" [java] +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins."
+"keygenerator.hilo.HiLo\n"
+"KeyGeneratorFactory)\n"
+" [java] +- UILXAConnectionFactory[link -> XAConnectionFactory] "
+"(class: javax.naming.\n"
+"LinkRef)\n"
+" [java] +- UILConnectionFactory[link -> ConnectionFactory] (class: "
+"javax.naming.Link\n"
+"Ref)\n"
+" [java] </pre>"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1216
+#, no-c-format
+msgid "Command Line Access to JMX"
+msgstr "用命令行访问JMX"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1217
+#, no-c-format
+msgid ""
+"JBoss provides a simple command line tool that allows for interaction with a "
+"remote JMX server instance. This tool is called twiddle (for twiddling bits "
+"via JMX) and is located in the <literal>bin</literal> directory of the "
+"distribution. Twiddle is a command execution tool, not a general command "
+"shell. It is run using either the <literal>twiddle.sh</literal> or "
+"<literal>twiddle.bat</literal> scripts, and passing in a <literal>-h</"
+"literal>(<literal>--help</literal>) argument provides the basic syntax, and "
+"<literal>--help-commands</literal> shows what you can do with the tool:"
+msgstr ""
+"JBoss提供了简单的命令行工具和远程的JMX服务器实例交互。这个工具是twiddle (for "
+"twiddling bits via JMX),它放在发行版本的<literal>bin</literal>目录下。"
+"Twiddle是一个命令行工具,不是普通的命令脚本。它可以用<literal>twiddle.sh</"
+"literal> 或者<literal>twiddle.bat</literal>运行,<literal>-h</literal>"
+"(<literal>--help</literal>)参数提供基本的语法,<literal>--help-commands</"
+"literal>列出所有的命令。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1220
+#, fuzzy, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -h\n"
+"A JMX client to 'twiddle' with a remote JBoss server.\n"
+"\n"
+"usage: twiddle.sh [options] <command> [command_arguments]\n"
+"\n"
+"options:\n"
+" -h, --help Show this help message\n"
+" --help-commands Show a list of commands\n"
+" -H=<command> Show command specific help\n"
+" -c=command.properties Specify the command.properties file to use\n"
+" -D<name>[=<value>] Set a system property\n"
+" -- Stop processing options\n"
+" -s, --server=<url> The JNDI URL of the remote server\n"
+" -a, --adapter=<name> The JNDI name of the RMI adapter to use\n"
+" -q, --quiet Be somewhat more quiet"
+msgstr ""
+"[bin]$ ./twiddle.sh -h\n"
+"A JMX client to 'twiddle' with a remote JBoss server.\n"
+"\n"
+"usage: twiddle.sh [options] <command> [command_arguments]\n"
+"\n"
+"options:\n"
+" -h, --help Show this help message\n"
+" --help-commands Show a list of commands\n"
+" -H=<command> Show command specific help\n"
+" -c=command.properties Specify the command.properties file to use\n"
+" -D<name>[=<value>] Set a system property\n"
+" -- Stop processing options\n"
+" -s, --server=<url> The JNDI URL of the remote server\n"
+" -a, --adapter=<name> The JNDI name of the RMI adapter to use\n"
+" -q, --quiet Be somewhat more quiet"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1222
+#, no-c-format
+msgid "Connecting twiddle to a Remote Server"
+msgstr "使用twiddle连接到远程服务器"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1223
+#, no-c-format
+msgid ""
+"By default the twiddle command will connect to the localhost at port 1099 to "
+"lookup the default <literal>jmx/rmi/RMIAdaptor</literal> binding of the "
+"<literal>RMIAdaptor</literal> service as the connector for communicating "
+"with the JMX server. To connect to a different server/port combination you "
+"can use the <literal>-s</literal> (<literal>--server</literal>) option:"
+msgstr ""
+"在缺省情况下,twiddle将连接本机的1099端口,它会查找缺省的作为与JMX服务器通信"
+"的连接器的对<literal>RMIAdaptor</literal>服务的<literal>jmx/rmi/RMIAdaptor</"
+"literal>绑定。为了连接一个不同的主机/端口,你可以使用<literal>-s</literal> "
+"(<literal>--server</literal>)选项:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1226
+#, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -s toki serverinfo -d jboss\n"
+"[bin]$ ./twiddle.sh -s toki:1099 serverinfo -d jboss"
+msgstr ""
+"[bin]$ ./twiddle.sh -s toki serverinfo -d jboss\n"
+"[bin]$ ./twiddle.sh -s toki:1099 serverinfo -d jboss"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1227
+#, no-c-format
+msgid ""
+"To connect using a different RMIAdaptor binding use the <literal>-a</"
+"literal> (--<literal>adapter</literal>) option:"
+msgstr ""
+"用不同的RMIAdaptor绑定来连接,使用<literal>-a</literal> (--<literal>adapter</"
+"literal>)选项:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1230
+#, no-c-format
+msgid "[bin]$ ./twiddle.sh -s toki -a jmx/rmi/RMIAdaptor serverinfo -d jboss"
+msgstr "[bin]$ ./twiddle.sh -s toki -a jmx/rmi/RMIAdaptor serverinfo -d jboss"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1234
+#, no-c-format
+msgid "Sample twiddle Command Usage"
+msgstr "twiddle命令使用示例"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1235
+#, no-c-format
+msgid ""
+"To access basic information about a server, use the <literal>serverinfo</"
+"literal> command. This currently supports:"
+msgstr ""
+"要访问服务器的基本信息,使用<literal>serverinfo</literal>命令。它目前支持:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1238
+#, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -H serverinfo\n"
+"Get information about the MBean server\n"
+"\n"
+"usage: serverinfo [options]\n"
+"\n"
+"options:\n"
+" -d, --domain Get the default domain\n"
+" -c, --count Get the MBean count\n"
+" -l, --list List the MBeans\n"
+" -- Stop processing options\n"
+"[bin]$ ./twiddle.sh --server=toki serverinfo --count\n"
+"460\n"
+"[bin]$ ./twiddle.sh --server=toki serverinfo --domain\n"
+"jboss"
+msgstr ""
+"[bin]$ ./twiddle.sh -H serverinfo\n"
+"Get information about the MBean server\n"
+"\n"
+"usage: serverinfo [options]\n"
+"\n"
+"options:\n"
+" -d, --domain Get the default domain\n"
+" -c, --count Get the MBean count\n"
+" -l, --list List the MBeans\n"
+" -- Stop processing options\n"
+"[bin]$ ./twiddle.sh --server=toki serverinfo --count\n"
+"460\n"
+"[bin]$ ./twiddle.sh --server=toki serverinfo --domain\n"
+"jboss"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1239
+#, no-c-format
+msgid ""
+"To query the server for the name of MBeans matching a pattern, use the "
+"<literal>query</literal> command. This currently supports:"
+msgstr ""
+"要查询服务器来获得匹配某一模式的MBean的名字,使用<literal>serverinfo</"
+"literal>命令。它目前支持:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1242
+#, fuzzy, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -H query\n"
+"Query the server for a list of matching MBeans\n"
+"\n"
+"usage: query [options] <query>\n"
+"options:\n"
+" -c, --count Display the matching MBean count\n"
+" -- Stop processing options\n"
+"Examples:\n"
+" query all mbeans: query '*:*'\n"
+" query all mbeans in the jboss.j2ee domain: query 'jboss.j2ee:*'\n"
+"[bin]$ ./twiddle.sh -s toki query 'jboss:service=invoker,*'\n"
+"jboss:readonly=true,service=invoker,target=Naming,type=http\n"
+"jboss:service=invoker,type=jrmp\n"
+"jboss:service=invoker,type=local\n"
+"jboss:service=invoker,type=pooled\n"
+"jboss:service=invoker,type=http\n"
+"jboss:service=invoker,target=Naming,type=http"
+msgstr ""
+"[bin]$ ./twiddle.sh -H query\n"
+"Query the server for a list of matching MBeans\n"
+" \n"
+"usage: query [options] <query>\n"
+"options:\n"
+" -c, --count Display the matching MBean count\n"
+" -- Stop processing options\n"
+"Examples:\n"
+" query all mbeans: query '*:*'\n"
+" query all mbeans in the jboss.j2ee domain: query 'jboss.j2ee:*'\n"
+"[bin]$ ./twiddle.sh -s toki query 'jboss:service=invoker,*'\n"
+"jboss:readonly=true,service=invoker,target=Naming,type=http\n"
+"jboss:service=invoker,type=jrmp\n"
+"jboss:service=invoker,type=local\n"
+"jboss:service=invoker,type=pooled\n"
+"jboss:service=invoker,type=http\n"
+"jboss:service=invoker,target=Naming,type=http"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1243
+#, no-c-format
+msgid "To get the attributes of an MBean, use the get command:"
+msgstr "要得到MBean的属性,使用get命令:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1246
+#, fuzzy, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -H get\n"
+"Get the values of one or more MBean attributes\n"
+"\n"
+"usage: get [options] <name> [<attr>+]\n"
+" If no attribute names are given all readable attributes are retrieved\n"
+"options:\n"
+" --noprefix Do not display attribute name prefixes\n"
+" -- Stop processing options\n"
+"[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp RMIObjectPort "
+"StateString\n"
+"RMIObjectPort=4444\n"
+"StateString=Started\n"
+"[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp\n"
+"ServerAddress=0.0.0.0\n"
+"RMIClientSocketFactoryBean=null\n"
+"StateString=Started\n"
+"State=3\n"
+"RMIServerSocketFactoryBean=org.jboss.net.sockets."
+"DefaultSocketFactory at ad093076\n"
+"EnableClassCaching=false\n"
+"SecurityDomain=null\n"
+"RMIServerSocketFactory=null\n"
+"Backlog=200\n"
+"RMIObjectPort=4444\n"
+"Name=JRMPInvoker\n"
+"RMIClientSocketFactory=null"
+msgstr ""
+"[bin]$ ./twiddle.sh -H get\n"
+"Get the values of one or more MBean attributes\n"
+" \n"
+"usage: get [options] <name> [<attr>+]\n"
+" If no attribute names are given all readable attributes are retrieved\n"
+"options:\n"
+" --noprefix Do not display attribute name prefixes\n"
+" -- Stop processing options\n"
+"[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp RMIObjectPort "
+"StateString\n"
+"RMIObjectPort=4444\n"
+"StateString=Started\n"
+"[bin]$ ./twiddle.sh get jboss:service=invoker,type=jrmp\n"
+"ServerAddress=0.0.0.0\n"
+"RMIClientSocketFactoryBean=null\n"
+"StateString=Started\n"
+"State=3\n"
+"RMIServerSocketFactoryBean=org.jboss.net.sockets."
+"DefaultSocketFactory at ad093076\n"
+"EnableClassCaching=false\n"
+"SecurityDomain=null\n"
+"RMIServerSocketFactory=null\n"
+"Backlog=200\n"
+"RMIObjectPort=4444\n"
+"Name=JRMPInvoker\n"
+"RMIClientSocketFactory=null"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1247
+#, no-c-format
+msgid "To query the MBeanInfo for an MBean, use the info command:"
+msgstr "要查询MBeanInfo来获得MBean的信息,使用info命令:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1250
+#, fuzzy, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -H info\n"
+"Get the metadata for an MBean\n"
+"\n"
+"usage: info <mbean-name>\n"
+" Use '*' to query for all attributes\n"
+"[bin]$ Description: Management Bean.\n"
+"+++ Attributes:\n"
+" Name: ServerAddress\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: RMIClientSocketFactoryBean\n"
+" Type: java.rmi.server.RMIClientSocketFactory\n"
+" Access: rw\n"
+" Name: StateString\n"
+" Type: java.lang.String\n"
+" Access: r-\n"
+" Name: State\n"
+" Type: int\n"
+" Access: r-\n"
+" Name: RMIServerSocketFactoryBean\n"
+" Type: java.rmi.server.RMIServerSocketFactory\n"
+" Access: rw\n"
+" Name: EnableClassCaching\n"
+" Type: boolean\n"
+" Access: rw\n"
+" Name: SecurityDomain\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: RMIServerSocketFactory\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: Backlog\n"
+" Type: int\n"
+" Access: rw\n"
+" Name: RMIObjectPort\n"
+" Type: int\n"
+" Access: rw\n"
+" Name: Name\n"
+" Type: java.lang.String\n"
+" Access: r-\n"
+" Name: RMIClientSocketFactory\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+"+++ Operations:\n"
+" void start()\n"
+" void jbossInternalLifecycle(java.lang.String java.lang.String)\n"
+" void create()\n"
+" void stop()\n"
+" void destroy()"
+msgstr ""
+"[bin]$ ./twiddle.sh -H info\n"
+"Get the metadata for an MBean\n"
+" \n"
+"usage: info <mbean-name>\n"
+" Use '*' to query for all attributes\n"
+"[bin]$ Description: Management Bean.\n"
+"+++ Attributes:\n"
+" Name: ServerAddress\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: RMIClientSocketFactoryBean\n"
+" Type: java.rmi.server.RMIClientSocketFactory\n"
+" Access: rw\n"
+" Name: StateString\n"
+" Type: java.lang.String\n"
+" Access: r-\n"
+" Name: State\n"
+" Type: int\n"
+" Access: r-\n"
+" Name: RMIServerSocketFactoryBean\n"
+" Type: java.rmi.server.RMIServerSocketFactory\n"
+" Access: rw\n"
+" Name: EnableClassCaching\n"
+" Type: boolean\n"
+" Access: rw\n"
+" Name: SecurityDomain\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: RMIServerSocketFactory\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+" Name: Backlog\n"
+" Type: int\n"
+" Access: rw\n"
+" Name: RMIObjectPort\n"
+" Type: int\n"
+" Access: rw\n"
+" Name: Name\n"
+" Type: java.lang.String\n"
+" Access: r-\n"
+" Name: RMIClientSocketFactory\n"
+" Type: java.lang.String\n"
+" Access: rw\n"
+"+++ Operations:\n"
+" void start()\n"
+" void jbossInternalLifecycle(java.lang.String java.lang.String)\n"
+" void create()\n"
+" void stop()\n"
+" void destroy()"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1251
+#, no-c-format
+msgid "To invoke an operation on an MBean, use the invoker command:"
+msgstr "要调用MBean上的一个操作,使用invoker命令:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1254
+#, fuzzy, no-c-format
+msgid ""
+"[bin]$ ./twiddle.sh -H invoke\n"
+"Invoke an operation on an MBean\n"
+"\n"
+"usage: invoke [options] <query> <operation> (<arg>)*\n"
+"\n"
+"options:\n"
+" -q, --query-type[=<type>] Treat object name as a query\n"
+" -- Stop processing options\n"
+"\n"
+"query type:\n"
+" f[irst] Only invoke on the first matching name [default]\n"
+" a[ll] Invoke on all matching names\n"
+"[bin]$ ./twiddle.sh invoke jboss:service=JNDIView list true\n"
+"<h1>java: Namespace</h1>\n"
+"<pre>\n"
+" +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- DefaultDS (class: javax.sql.DataSource)\n"
+" +- SecurityProxyFactory (class: org.jboss.security."
+"SubjectSecurityProxyFactory)\n"
+" +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)\n"
+" +- comp (class: javax.naming.Context)\n"
+" +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)\n"
+" +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- jaas (class: javax.naming.Context)\n"
+" | +- JmsXARealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)\n"
+" | +- HsqlDbRealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" +- timedCacheFactory (class: javax.naming.Context)\n"
+"Failed to lookup: timedCacheFactory, errmsg=null\n"
+" +- TransactionPropagationContextExporter (class: org.jboss.tm."
+"TransactionPropagationContext\n"
+"Factory)\n"
+" +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)\n"
+" +- Mail (class: javax.mail.Session)\n"
+" +- TransactionPropagationContextImporter (class: org.jboss.tm."
+"TransactionPropagationContext\n"
+"Importer)\n"
+" +- TransactionManager (class: org.jboss.tm.TxManager)\n"
+"</pre>\n"
+"<h1>Global JNDI Namespace</h1>\n"
+"<pre>\n"
+" +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org."
+"jboss.tm.usertx.\n"
+"interfaces.UserTransactionSessionFactory)\n"
+" +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- console (class: org.jnp.interfaces.NamingContext)\n"
+" | +- PluginManager (proxy: $Proxy36 implements interface org.jboss."
+"console.manager.Plugin\n"
+"ManagerMBean)\n"
+" +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid."
+"UUIDKeyGenerator\n"
+"Factory)\n"
+" +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- topic (class: org.jnp.interfaces.NamingContext)\n"
+" | +- testDurableTopic (class: org.jboss.mq.SpyTopic)\n"
+" | +- testTopic (class: org.jboss.mq.SpyTopic)\n"
+" | +- securedTopic (class: org.jboss.mq.SpyTopic)\n"
+" +- queue (class: org.jnp.interfaces.NamingContext)\n"
+" | +- A (class: org.jboss.mq.SpyQueue)\n"
+" | +- testQueue (class: org.jboss.mq.SpyQueue)\n"
+" | +- ex (class: org.jboss.mq.SpyQueue)\n"
+" | +- DLQ (class: org.jboss.mq.SpyQueue)\n"
+" | +- D (class: org.jboss.mq.SpyQueue)\n"
+" | +- C (class: org.jboss.mq.SpyQueue)\n"
+" | +- B (class: org.jboss.mq.SpyQueue)\n"
+" +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- UserTransaction (class: org.jboss.tm.usertx.client."
+"ClientUserTransaction)\n"
+" +- jmx (class: org.jnp.interfaces.NamingContext)\n"
+" | +- invoker (class: org.jnp.interfaces.NamingContext)\n"
+" | | +- RMIAdaptor (proxy: $Proxy35 implements interface org.jboss.jmx."
+"adaptor.rmi.RMIAd\n"
+"aptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)\n"
+" | +- rmi (class: org.jnp.interfaces.NamingContext)\n"
+" | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax."
+"naming.LinkRef)\n"
+" +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo."
+"HiLoKeyGenerator\n"
+"Factory)\n"
+" +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming."
+"LinkRef)\n"
+"</pre>"
+msgstr ""
+"[bin]$ ./twiddle.sh -H invoke\n"
+"Invoke an operation on an MBean\n"
+" \n"
+"usage: invoke [options] <query> <operation> (<arg>)*\n"
+"\n"
+"options:\n"
+" -q, --query-type[=<type>] Treat object name as a query\n"
+" -- Stop processing options\n"
+"\n"
+"query type:\n"
+" f[irst] Only invoke on the first matching name [default]\n"
+" a[ll] Invoke on all matching names\n"
+"[bin]$ ./twiddle.sh invoke jboss:service=JNDIView list true\n"
+"<h1>java: Namespace</h1>\n"
+"<pre>\n"
+" +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- DefaultDS (class: javax.sql.DataSource)\n"
+" +- SecurityProxyFactory (class: org.jboss.security."
+"SubjectSecurityProxyFactory)\n"
+" +- DefaultJMSProvider (class: org.jboss.jms.jndi.JNDIProviderAdapter)\n"
+" +- comp (class: javax.naming.Context)\n"
+" +- JmsXA (class: org.jboss.resource.adapter.jms.JmsConnectionFactoryImpl)\n"
+" +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- jaas (class: javax.naming.Context)\n"
+" | +- JmsXARealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" | +- jbossmq (class: org.jboss.security.plugins.SecurityDomainContext)\n"
+" | +- HsqlDbRealm (class: org.jboss.security.plugins."
+"SecurityDomainContext)\n"
+" +- timedCacheFactory (class: javax.naming.Context)\n"
+"Failed to lookup: timedCacheFactory, errmsg=null\n"
+" +- TransactionPropagationContextExporter (class: org.jboss.tm."
+"TransactionPropagationContext\n"
+"Factory)\n"
+" +- StdJMSPool (class: org.jboss.jms.asf.StdServerSessionPoolFactory)\n"
+" +- Mail (class: javax.mail.Session)\n"
+" +- TransactionPropagationContextImporter (class: org.jboss.tm."
+"TransactionPropagationContext\n"
+"Importer)\n"
+" +- TransactionManager (class: org.jboss.tm.TxManager)\n"
+"</pre>\n"
+"<h1>Global JNDI Namespace</h1>\n"
+"<pre>\n"
+" +- XAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- UIL2ConnectionFactory[link -> ConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UserTransactionSessionFactory (proxy: $Proxy11 implements interface org."
+"jboss.tm.usertx.\n"
+"interfaces.UserTransactionSessionFactory)\n"
+" +- HTTPConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- console (class: org.jnp.interfaces.NamingContext)\n"
+" | +- PluginManager (proxy: $Proxy36 implements interface org.jboss."
+"console.manager.Plugin\n"
+"ManagerMBean)\n"
+" +- UIL2XAConnectionFactory[link -> XAConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UUIDKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.uuid."
+"UUIDKeyGenerator\n"
+"Factory)\n"
+" +- HTTPXAConnectionFactory (class: org.jboss.mq.SpyXAConnectionFactory)\n"
+" +- topic (class: org.jnp.interfaces.NamingContext)\n"
+" | +- testDurableTopic (class: org.jboss.mq.SpyTopic)\n"
+" | +- testTopic (class: org.jboss.mq.SpyTopic)\n"
+" | +- securedTopic (class: org.jboss.mq.SpyTopic)\n"
+" +- queue (class: org.jnp.interfaces.NamingContext)\n"
+" | +- A (class: org.jboss.mq.SpyQueue)\n"
+" | +- testQueue (class: org.jboss.mq.SpyQueue)\n"
+" | +- ex (class: org.jboss.mq.SpyQueue)\n"
+" | +- DLQ (class: org.jboss.mq.SpyQueue)\n"
+" | +- D (class: org.jboss.mq.SpyQueue)\n"
+" | +- C (class: org.jboss.mq.SpyQueue)\n"
+" | +- B (class: org.jboss.mq.SpyQueue)\n"
+" +- ConnectionFactory (class: org.jboss.mq.SpyConnectionFactory)\n"
+" +- UserTransaction (class: org.jboss.tm.usertx.client."
+"ClientUserTransaction)\n"
+" +- jmx (class: org.jnp.interfaces.NamingContext)\n"
+" | +- invoker (class: org.jnp.interfaces.NamingContext)\n"
+" | | +- RMIAdaptor (proxy: $Proxy35 implements interface org.jboss.jmx."
+"adaptor.rmi.RMIAd\n"
+"aptor,interface org.jboss.jmx.adaptor.rmi.RMIAdaptorExt)\n"
+" | +- rmi (class: org.jnp.interfaces.NamingContext)\n"
+" | | +- RMIAdaptor[link -> jmx/invoker/RMIAdaptor] (class: javax."
+"naming.LinkRef)\n"
+" +- HiLoKeyGeneratorFactory (class: org.jboss.ejb.plugins.keygenerator.hilo."
+"HiLoKeyGenerator\n"
+"Factory)\n"
+" +- UILXAConnectionFactory[link -> XAConnectionFactory] (class: javax."
+"naming.LinkRef)\n"
+" +- UILConnectionFactory[link -> ConnectionFactory] (class: javax.naming."
+"LinkRef)\n"
+"</pre>"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1260
+#, no-c-format
+msgid "Connecting to JMX Using Any Protocol"
+msgstr "使用任何协议连接JMX"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1261
+#, fuzzy, no-c-format
+msgid ""
+"With the detached invokers and a somewhat generalized proxy factory "
+"capability, you can really talk to the JMX server using the "
+"<literal>InvokerAdaptorService</literal> and a proxy factory service to "
+"expose an <literal>RMIAdaptor</literal> or similar interface over your "
+"protocol of choice. We will introduce the detached invoker notion along with "
+"proxy factories in <xref linkend=\"The_JBoss_JMX_Microkernel-"
+"Remote_Access_to_Services_Detached_Invokers\"/>. See <xref linkend="
+"\"Remote_Access_to_Services_Detached_Invokers-"
+"A_Detached_Invoker_Example_the_MBeanServer_Invoker_Adaptor_Service\"/> for "
+"an example of an invoker service that allows one to access the MBean server "
+"using to the <literal>RMIAdaptor</literal> interface over any protocol for "
+"which a proxy factory service exists."
+msgstr ""
+"用脱管调用者(detached invokers)和有几分普遍的proxy factory能力,你实际上可以"
+"用<literal>InvokerAdaptorService</literal>和proxy factory服务在你选择的协议上"
+"来开放<literal>RMIAdaptor</literal>或类似的接口。我们将在<xref linkend=\"ch2."
+"remoteaccess\"/>里介绍detached invoker和proxy factory。请参考<xref linkend="
+"\"ch2.detinv.sect\"/>里的一个关于invoker服务的例子,它允许在proxy factory服务"
+"存在的任何协议上用<literal>RMIAdaptor</literal>接口访问MBean服务器。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1269
+#, no-c-format
+msgid "Using JMX as a Microkernel"
+msgstr "把JMX用作微内核"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1270
+#, no-c-format
+msgid ""
+"When JBoss starts up, one of the first steps performed is to create an MBean "
+"server instance (<literal>javax.management.MBeanServer</literal>). The JMX "
+"MBean server in the JBoss architecture plays the role of a microkernel. All "
+"other manageable MBean components are plugged into JBoss by registering with "
+"the MBean server. The kernel in that sense is only an framework, and not a "
+"source of actual functionality. The functionality is provided by MBeans, and "
+"in fact all major JBoss components are manageable MBeans interconnected "
+"through the MBean server."
+msgstr ""
+"当JBoss启动时,最现执行步骤之一就是建立一个MBean服务器实例(<literal>javax."
+"management.MBeanServer</literal>)。JBoss架构里的JMX MBean服务器充当微内核的作"
+"用。所有其他可管理的MBean组件都通过在MBean服务器上注册来插入JBoss。这个意义上"
+"的内核只是一个框架,而并非实际的功能。MBean提供具体的功能,而且事实上所有"
+"JBoss的主要组件都是通过MBean服务器相互连接的可管理的MBean。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1274
+#, no-c-format
+msgid "The Startup Process"
+msgstr "启动过程"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1275
+#, no-c-format
+msgid ""
+"In this section we will describe the JBoss server startup process. A summary "
+"of the steps that occur during the JBoss server startup sequence is:"
+msgstr ""
+"在这个部分,我们将描述JBoss服务器的启动过程。JBoss服务器启动的主要步骤是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1280
+#, no-c-format
+msgid ""
+"The run start script initiates the boot sequence using the <literal>org."
+"jboss.Main.main(String[])</literal> method entry point."
+msgstr ""
+"run start脚本用<literal>org.jboss.Main.main(String[])</literal>方法入口初始化"
+"启动次序。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1285
+#, no-c-format
+msgid ""
+"The <literal>Main.main</literal> method creates a thread group named "
+"<literal>jboss</literal> and then starts a thread belonging to this thread "
+"group. This thread invokes the Main.boot method."
+msgstr ""
+"<literal>Main.main</literal>方法创建一个叫<literal>jboss</literal>的线程组,"
+"然后启动其中一个线程。这个线程调用Main.boot方法。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1290
+#, no-c-format
+msgid ""
+"The <literal>Main.boot</literal> method processes the <literal>Main.main</"
+"literal> arguments and then creates an <literal>org.jboss.system.server."
+"ServerLoader</literal> using the system properties along with any additional "
+"properties specified as arguments."
+msgstr ""
+"<literal>Main.boot</literal>方法处理<literal>Main.main</literal>参数,然后用"
+"系统属性和参数所指定的其他属性创建一个<literal>org.jboss.system.server."
+"ServerLoader</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1295
+#, no-c-format
+msgid ""
+"The XML parser libraries, <literal>jboss-jmx.jar</literal>, "
+"<literal>concurrent.jar</literal> and extra libraries and classpaths given "
+"as arguments are registered with the <literal>ServerLoader</literal> ."
+msgstr ""
+" XML parser库,<literal>jboss-jmx.jar</literal>, <literal>concurrent.jar</"
+"literal>和额外的库以及作为参数的classpaths,都向<literal>ServerLoader</"
+"literal>注册。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1300
+#, no-c-format
+msgid ""
+"The JBoss server instance is created using the <literal>ServerLoader.load"
+"(ClassLoader)</literal> method with the current thread context class loader "
+"passed in as the <literal>ClassLoader</literal> argument. The returned "
+"server instance is an implementation of the <literal>org.jboss.system.server."
+"Server</literal> interface. The creation of the server instance entails:"
+msgstr ""
+"JBoss服务器实例是用<literal>ServerLoader.load(ClassLoader)</literal>方法和被"
+"类加载器当做参数传入的当前线程上下文创建的。返回的服务器实例是<literal>org."
+"jboss.system.server.Server</literal>接口的实现。服务器实例的创建需要:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1305
+#, no-c-format
+msgid ""
+"Creating a <literal>java.net.URLClassLoader</literal> with the URLs of the "
+"jars and directories registered with the <literal>ServerLoader</literal> . "
+"This <literal>URLClassLoader</literal> uses the <literal>ClassLoader</"
+"literal> passed in as its parent and it is pushed as the thread context "
+"class loader."
+msgstr ""
+"用在<literal>ServerLoader</literal>注册的jars和目录的URL创建一个"
+"<literal>java.net.URLClassLoader</literal>。这个<literal>URLClassLoader</"
+"literal>把传入的<literal>ClassLoader</literal>作为父类,它也被当成线程上下文"
+"类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1310
+#, no-c-format
+msgid ""
+"The class name of the implementation of the <literal>Server</literal> "
+"interface to use is determined by the <literal>jboss.server.type</literal> "
+"property. This defaults to <literal>org.jboss.system.server.ServerImpl</"
+"literal>."
+msgstr ""
+"<literal>Server</literal>接口的实现使用的类名,它由<literal>jboss.server."
+"type</literal>属性决定。它的缺省值是<literal>org.jboss.system.server."
+"ServerImpl</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1315
+#, no-c-format
+msgid ""
+"The <literal>Server</literal> implementation class is loaded using the "
+"<literal>URLClassLoader</literal> created in step 6 and instantiated using "
+"its no-arg constructor. The thread context class loader present on entry "
+"into the <literal>ServerLoader.load</literal> method is restored and the "
+"server instance is returned."
+msgstr ""
+"<literal>Server</literal>实现类用步骤6里创建的<literal>URLClassLoader</"
+"literal>加载,而且用无参数构造函数实例化。<literal>ServerLoader.load</"
+"literal>方法入口的线程上下文类加载器被重置,服务器实例被返回。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1322
+#, no-c-format
+msgid ""
+"The server instance is initialized with the properties passed to the "
+"<literal>ServerLoader</literal> constructor using the <literal>Server.init"
+"(Properties)</literal> method."
+msgstr ""
+"服务器实例用<literal>Server.init(Properties)</literal>方法初始化,并把属性传"
+"入<literal>ServerLoader</literal>构造函数。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1327
+#, no-c-format
+msgid ""
+"The server instance is then started using the <literal>Server.start()</"
+"literal> method. The default implementation performs the following steps:"
+msgstr ""
+"然后服务器实例开始使用<literal>Server.start()</literal>方法。缺省的实现执行下"
+"面的步骤:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1332
+#, no-c-format
+msgid ""
+"Set the thread context class loader to the class loader used to load the "
+"<literal>ServerImpl</literal> class."
+msgstr ""
+"把线程上下文类装载器设置为用来加载<literal>ServerImpl</literal>的类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1337
+#, no-c-format
+msgid ""
+"Create an <literal>MBeanServer</literal> under the <literal>jboss</literal> "
+"domain using the <literal>MBeanServerFactory.createMBeanServer(String)</"
+"literal> method."
+msgstr ""
+"使用<literal>MBeanServerFactory.createMBeanServer(String)</literal>方法在"
+"<literal>jboss</literal>域建立一个<literal>MBeanServer</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1342
+#, no-c-format
+msgid ""
+"Register the <literal>ServerImpl</literal> and <literal>ServerConfigImpl</"
+"literal> MBeans with the MBean server."
+msgstr ""
+"向MBean服务器注册<literal>ServerImpl</literal> 和 <literal>ServerConfigImpl</"
+"literal> MBean。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1347
+#, fuzzy, no-c-format
+msgid ""
+"Initialize the unified class loader repository to contain all JARs in the "
+"optional patch directory as well as the server configuration file conf "
+"directory, for example, <literal>server/production/conf</literal>. For each "
+"JAR and directory an <literal>org.jboss.mx.loading.UnifiedClassLoader</"
+"literal> is created and registered with the unified repository. One of these "
+"<literal>UnifiedClassLoader</literal> is then set as the thread context "
+"class loader. This effectively makes all <literal>UnifiedClassLoader</"
+"literal>s available through the thread context class loader."
+msgstr ""
+"初始化统一类加载器库(unified class loader repository)来包含在可选的patch目录"
+"和服务器配置文件conf目录下的所有JAR,如:<literal>server/default/conf</"
+"literal>。 对于每个JAR和目录,都将建立一个<literal>org.jboss.mx.loading."
+"UnifiedClassLoader</literal>,并向统一库注册。然后,"
+"<literal>UnifiedClassLoader</literal>中的一个被设置为线程上下文类加载器。这有"
+"效地使所有<literal>UnifiedClassLoader</literal>成为可用的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1352
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.system.ServiceController</literal> MBean is created. "
+"The <literal>ServiceController</literal> manages the JBoss MBean services "
+"life cycle. We will discuss the JBoss MBean services notion in detail in "
+"<xref linkend=\"Using_JMX_as_a_Microkernel-JBoss_MBean_Services\"/>."
+msgstr ""
+"<literal>org.jboss.system.ServiceController</literal> MBean被建立了。"
+"<literal>ServiceController</literal>管理JBoss MBean服务的生命周期。我们将在"
+"<xref linkend=\"ch2.mbeanservice.sect\"/>详细讨论JBoss MBean服务。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1357
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.deployment.MainDeployer</literal> is created and "
+"started. The <literal>MainDeployer</literal> manages deployment dependencies "
+"and directing deployments to the correct deployer."
+msgstr ""
+"<literal>org.jboss.deployment.MainDeployer</literal>被建立并启动。"
+"<literal>MainDeployer</literal>管理部署相关性(deployment dependencies)和把部"
+"署指引到正确的部署者。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1362
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.deployment.JARDeployer</literal> is created and "
+"started. The <literal>JARDeployer</literal> handles the deployment of JARs "
+"that are simple library JARs."
+msgstr ""
+"<literal>org.jboss.deployment.JARDeployer</literal>被创建并启动。"
+"<literal>JARDeployer</literal>处理简单库JAR的部署。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1367
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.deployment.SARDeployer</literal> is created and "
+"started. The SARDeployer handles the deployment of JBoss MBean services."
+msgstr ""
+"<literal>org.jboss.deployment.SARDeployer</literal>被创建并启动。SARDeployer"
+"处理JBoss MBean服务的部署。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1372
+#, no-c-format
+msgid ""
+"The <literal>MainDeployer</literal> is invoked to deploy the services "
+"defined in the <literal>conf/jboss-service.xml</literal> of the current "
+"server file set."
+msgstr ""
+"调用<literal>MainDeployer</literal>来部署在当前服务器文件集里的<literal>conf/"
+"jboss-service.xml</literal>定义的服务。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1377
+#, no-c-format
+msgid "Restore the thread context class loader."
+msgstr "重置线程上下文类加载器(thread context class loader)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1384
+#, no-c-format
+msgid ""
+"The JBoss server starts out as nothing more than a container for the JMX "
+"MBean server, and then loads its personality based on the services defined "
+"in the <literal>jboss-service.xml</literal> MBean configuration file from "
+"the named configuration set passed to the server on the command line. "
+"Because MBeans define the functionality of a JBoss server instance, it is "
+"important to understand how the core JBoss MBeans are written, and how you "
+"should integrate your existing services into JBoss using MBeans. This is the "
+"topic of the next section."
+msgstr ""
+"JBoss服务器刚启动时并不比一个JMX MBean服务器容器多什么东西,然后它会加载从命"
+"令行传入服务器的配置集里的<literal>jboss-service.xml</literal> MBean配置文件"
+"里定义的服务。因为MBean定义了JBoss服务器实例的功能,所以理解核心JBoss MBeans"
+"是怎样编写的以及你怎样把现有的服务用MBean集成到JBoss里就很重要。这是后面内容"
+"的主题。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1390
+#, no-c-format
+msgid "JBoss MBean Services"
+msgstr "JBoss MBean 服务"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1391
+#, fuzzy, no-c-format
+msgid ""
+"As we have seen, JBoss relies on JMX to load in the MBean services that make "
+"up a given server instance's personality. All of the bundled "
+"functionality provided with the standard JBoss distribution is based on "
+"MBeans. The best way to add services to the JBoss server is to write your "
+"own JMX MBeans."
+msgstr ""
+"如我们已经看到的,JBoss依赖JMX来加载MBean服务,组成服务器实例的特定功能。所有"
+"标准JBoss发行版本捆绑的功能都是基于MBean的。把服务加入到JBoss服务器的最好方法"
+"就是编写你自己的JMX MBean。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1394
+#, no-c-format
+msgid ""
+"There are two classes of MBeans: those that are independent of JBoss "
+"services, and those that are dependent on JBoss services. MBeans that are "
+"independent of JBoss services are the trivial case. They can be written per "
+"the JMX specification and added to a JBoss server by adding an mbean tag to "
+"the <literal>deploy/user-service.xml</literal> file. Writing an MBean that "
+"relies on a JBoss service such as naming requires you to follow the JBoss "
+"service pattern. The JBoss MBean service pattern consists of a set of life "
+"cycle operations that provide state change notifications. The notifications "
+"inform an MBean service when it can create, start, stop, and destroy itself. "
+"The management of the MBean service life cycle is the responsibility of "
+"three JBoss MBeans: <literal>SARDeployer</literal>, "
+"<literal>ServiceConfigurator</literal> and <literal>ServiceController</"
+"literal>."
+msgstr ""
+"有两种类型的MBeans:独立于JBoss服务的和依赖于JBoss服务的。独立于JBoss服务的"
+"MBean不很重要。你可以依据JMX规格编写这些MBean,然后在<literal>deploy/user-"
+"service.xml</literal>文件里放入一个mbean标签就可以把它们加入到JBoss服务器里。"
+"编写依赖于JBoss服务的MBean,如naming,要求你遵循JBoss服务模式(pattern)。"
+"JBoss MBean服务模式由提供状态变化通知(state change notifications)的一系列的生"
+"命周期操作(life cycle operations)组成。notifications通知MBean服务什么时候可以"
+"创建,停止和删除(destroy)它自己。MBean服务生命周期的管理由三个JBoss MBean负"
+"责:<literal>SARDeployer</literal>, <literal>ServiceConfigurator</literal> "
+"和 <literal>ServiceController</literal>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1398
+#, no-c-format
+msgid "The SARDeployer MBean"
+msgstr "The SARDeployer MBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1399
+#, no-c-format
+msgid ""
+"JBoss manages the deployment of its MBean services via a custom MBean that "
+"loads an XML variation of the standard JMX MLet configuration file. This "
+"custom MBean is implemented in the <literal>org.jboss.deployment."
+"SARDeployer</literal> class. The <literal>SARDeployer</literal> MBean is "
+"loaded when JBoss starts up as part of the bootstrap process. The SAR "
+"acronym stands for <emphasis>service archive</emphasis>."
+msgstr ""
+"JBoss通过一个自定义的MBean管理MBean服务的部署,这个MBean加载标准XML MLet配置"
+"文件的XML variation。这个自定义的MBean是在<literal>org.jboss.deployment."
+"SARDeployer</literal>类里实现的。当JBoss启动的时候,<literal>SARDeployer</"
+"literal> MBean作为引导过程的一部分被加载。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1402
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>SARDeployer</literal> handles services archives. A service "
+"archive can be either a jar that ends with a <literal>.sar</literal> suffix "
+"and contains a <literal>META-INF/jboss-service.xml</literal> descriptor, or "
+"a standalone XML descriptor with a naming pattern that matches <literal>*-"
+"service.xml</literal>. The DTD for the service descriptor is <literal>jboss-"
+"service_4.2.dtd</literal> and is shown in <xref linkend="
+"\"The_SARDeployer_MBean-"
+"The_DTD_for_the_MBean_service_descriptor_parsed_by_the_SARDeployer\"/>."
+msgstr ""
+"<literal>SARDeployer</literal>处理服务档案文件。服务档案文件可以是以"
+"<literal>.sar</literal>结尾并包含一个<literal>META-INF/jboss-service.xml</"
+"literal>描述符的JAR,也可以是独立的命名模式为<literal>*-service.xml</literal>"
+"的XML描述符。服务描述符的DTD是<literal>jboss-service_4.0.dtd</literal>,如"
+"<xref linkend=\"ch2.sardtd.fig\"/>所示。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1406
+#, no-c-format
+msgid "The DTD for the MBean service descriptor parsed by the SARDeployer"
+msgstr "The DTD for the MBean service descriptor parsed by the SARDeployer"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1413
+#, no-c-format
+msgid "The elements of the DTD are:"
+msgstr "DTD的元素是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1418
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loader-repository</emphasis>: This element specifies "
+"the name of the <literal>UnifiedLoaderRepository</literal> MBean to use for "
+"the SAR to provide SAR level scoping of classes deployed in the sar. It is a "
+"unique JMX <literal>ObjectName</literal> string. It may also specify an "
+"arbitrary configuration by including a <literal>loader-repository-config</"
+"literal> element. The optional <literal>loaderRepositoryClass</literal> "
+"attribute specifies the fully qualified name of the loader repository "
+"implementation class. It defaults to <literal>org.jboss.mx.loading."
+"HeirachicalLoaderRepository3</literal>."
+msgstr ""
+"<emphasis role=\"bold\">loader-repository</emphasis>:这个元素指定了"
+"<literal>UnifiedLoaderRepository</literal> MBean的名字,为SAR提供了在SAR里部"
+"署的类的SAR级作用域。它是一个唯一的JMX <literal>ObjectName</literal>字符串。"
+"它也可以通过包含<literal>loader-repository-config</literal>元素来指定任意的配"
+"置。可选的<literal>loaderRepositoryClass</literal>属性指定了加载者库实现类的"
+"类全名。它缺省为<literal>org.jboss.mx.loading.HeirachicalLoaderRepository3</"
+"literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1423
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">loader-repository-config</emphasis>: This optional "
+"element specifies an arbitrary configuration that may be used to configure "
+"the <literal>loadRepositoryClass</literal>. The optional "
+"<literal>configParserClass</literal> attribute gives the fully qualified "
+"name of the <literal>org.jboss.mx.loading.LoaderRepositoryFactory."
+"LoaderRepositoryConfigParser</literal> implementation to use to parse the "
+"<literal>loader-repository-config</literal> content."
+msgstr ""
+"<emphasis role=\"bold\">loader-repository-config</emphasis>:这个可选元素指定"
+"可以用于配置<literal>loadRepositoryClass</literal>的任意配置。可选的"
+"<literal>configParserClass</literal>属性给出用于分析<literal>loader-"
+"repository-config</literal>的内容的<literal>org.jboss.mx.loading."
+"LoaderRepositoryFactory.LoaderRepositoryConfigParser</literal>实现的类全名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1430
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">local-directory</emphasis>: This element specifies a "
+"path within the deployment archive that should be copied to the "
+"<literal>server/<config>/db</literal> directory for use by the MBean. "
+"The path attribute is the name of an entry within the deployment archive."
+msgstr ""
+"<emphasis role=\"bold\">local-directory</emphasis>:这个元素指定应该拷贝至"
+"<literal>server/<config>/db</literal>目录给MBean使用的部署档案里的路"
+"径。这个path属性是部署档案里一个条目的名字。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1435
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">classpath</emphasis>: This element specifies one or "
+"more external JARs that should be deployed with the MBean(s). The optional "
+"archives attribute specifies a comma separated list of the JAR names to "
+"load, or the <literal>*</literal> wild card to signify that all jars should "
+"be loaded. The wild card only works with file URLs, and http URLs if the web "
+"server supports the WEBDAV protocol. The codebase attribute specifies the "
+"URL from which the JARs specified in the archive attribute should be loaded. "
+"If the codebase is a path rather than a URL string, the full URL is built by "
+"treating the codebase value as a path relative to the JBoss distribution "
+"<literal>server/<config></literal> directory. The order of JARs "
+"specified in the archives as well as the ordering across multiple classpath "
+"element is used as the classpath ordering of the JARs. Therefore, if you "
+"have patches or inconsistent versions of classes that require a certain "
+"ordering, use this feature to ensure the correct ordering."
+msgstr ""
+"<emphasis role=\"bold\">classpath</emphasis>:这个元素指定一个或多个应该部署"
+"在MBean里的外部JAR。可选的archives属性指定要加载的用逗号隔开的JAR名字的列表,"
+"或者用<literal>*</literal>通配符来表示所有的JAR都应该加载。这个通配符只用于文"
+"件URL,如果web服务器支持WEBDAV协议的话,也可以用于HTTP URLs。codebase属性指定"
+"archives属性里提及的JAR应该从哪个URL加载。如果这个codebase属性是一个路径而不"
+"是URL字符串,会用JBoss发行版本的<literal>server/<config></literal>目录"
+"的相关路径来凑成完整的URL。archives属性指定的JAR和多个classpath元素的顺序会被"
+"用作JAR的classpath顺序。因此,如果你有某种顺序要求的补丁或者不一致版本的类,"
+"你可以使用这个特征来保证正确的顺序。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1440
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mbean</emphasis>: This element specifies an MBean "
+"service. The required code attribute gives the fully qualified name of the "
+"MBean implementation class. The required name attribute gives the JMX "
+"<literal>ObjectName</literal> of the MBean. The optional <literal>xmbean-dd</"
+"literal> attribute specifies the path to the XMBean resource if this MBean "
+"service uses the JBoss XMBean descriptor to define a Model MBean management "
+"interface."
+msgstr ""
+"<emphasis role=\"bold\">mbean</emphasis>:这个元素指定一个MBean服务。必需的"
+"code属性给出MBean实现类的类全名。必需的name属性给出MBean的"
+"JMX<literal>ObjectName</literal>。如果XMBean服务使用了JBoss XMBean描述符来定"
+"义模型MBean管理接口,可选的<literal>xmbean-dd</literal>属性指定这个XMBean资源"
+"的路径。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1445
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">constructor</emphasis>: The <literal>constructor</"
+"literal> element defines a non-default constructor to use when instantiating "
+"the MBean The <literal>arg</literal> element specify the constructor "
+"arguments in the order of the constructor signature. Each <literal>arg</"
+"literal> has a <literal>type</literal> and <literal>value</literal> "
+"attribute."
+msgstr ""
+"<emphasis role=\"bold\">constructor</emphasis>:<literal>constructor</"
+"literal>元素定义实例化MBean时的非缺省的构造函数。<literal>arg</literal>元素以"
+"构造函数签名的顺序指定构造函数的参数。每个<literal>arg</literal>都有一个"
+"<literal>type</literal> 和 <literal>value</literal> 属性。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1450
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">attribute</emphasis>: Each attribute element "
+"specifies a name/value pair of the attribute of the MBean. The name of the "
+"attribute is given by the name attribute, and the attribute element body "
+"gives the value. The body may be a text representation of the value, or an "
+"arbitrary element and child elements if the type of the MBean attribute is "
+"<literal>org.w3c.dom.Element</literal>. For text values, the text is "
+"converted to the attribute type using the JavaBean <literal>java.beans."
+"PropertyEditor</literal> mechanism."
+msgstr ""
+"<emphasis role=\"bold\">attribute</emphasis>:每个attribute元素指定了MBean的"
+"一对name/value属性。attribute的名字由name属性给出,attribute元素体则指定了"
+"value属性。 元素体可以是value的文本表示,如果MBean属性的类型是<literal>org."
+"w3c.dom.Element</literal>,它也可以是任意的元素和子元素。对于文本值,文本会用"
+"JavaBean <literal>java.beans.PropertyEditor</literal>机制转换成attribute类"
+"型。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1455
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">server/mbean/depends</emphasis> and <emphasis role="
+"\"bold\">server/mbean/depends-list</emphasis>: these elements specify a "
+"dependency from the MBean using the element to the MBean(s) named by the "
+"<literal>depends</literal> or <literal>depends-list</literal> elements. "
+"<xref linkend=\"JBoss_MBean_Services-Specifying_Service_Dependencies\"/>. "
+"Note that the dependency value can be another mbean element which defines a "
+"nested mbean."
+msgstr ""
+"<emphasis role=\"bold\">server/mbean/depends</emphasis> 和 <emphasis role="
+"\"bold\">server/mbean/depends-list</emphasis>:指定了从使用这些元素的 MBean "
+"到 <literal>depends</literal> 或者 <literal>depends-list</literal> 命名的 "
+"MBean 的依赖性。<xref linkend=\"ch2.servicedep.fig\"/>。注意这个依赖值可以是"
+"定义了嵌套 MBean 的另外一个 MBean 元素。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1462
+#, fuzzy, no-c-format
+msgid ""
+"MBean attribute values don't need to be hardcoded literal strings. "
+"Service files may contain references to system properties using the <literal>"
+"${name}</literal> notation, where <literal>name</literal> is the name of a "
+"Java system property. The value of this system property, as would be "
+"returned from the call <literal>System.getProperty(\"name\")</literal>. "
+"Multiple properties can be specified separated by commas like <literal>"
+"${name1,name2,name3}</literal>. If there is no system property named "
+"<literal>name1</literal>, <literal>name2</literal> will be tried and then "
+"<literal>name3</literal>. This allows multiple levels of substitution to be "
+"used. Finally, a default value can be added using a colon separator. The "
+"substitution <literal>${name:default value}</literal> would substitute the "
+"the text \"<literal>default value</literal>\" if the system property "
+"<literal>name</literal> didn't exist. If none of the listed properties "
+"exist and no default value is given, no substitution will occur."
+msgstr ""
+"MBean 属性值不需要直接写(hardcode)成字符串。服务文件可以用 <literal>${name}</"
+"literal> 来包含系统属性的引用,<literal>name</literal> 在这里是 Java 系统属性"
+"的名字。这个系统属性的值,可以调用 <literal>System.getProperty(\"name\")</"
+"literal> 来获得。多个属性可以用逗号隔开来指定,如 <literal>${name1,name2,"
+"name3}</literal>。如果系统属性 <literal>name1</literal>不存在,将尝试 "
+"<literal>name2</literal> 然后是 <literal>name3</literal>。这允许了多层替代值"
+"的使用。最后,可以用冒号来加入一个缺省值。如果系统属性 <literal>name</"
+"literal> 不存在的话,<literal>${name:default value}</literal> 将替代文本 "
+"\"<literal>default value</literal>\"。如果列出的属性都不存在且没有指定缺省"
+"值,将不会有替代发生。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1465
+#, fuzzy, no-c-format
+msgid ""
+"When the <literal>SARDeployer</literal> is asked to deploy a service "
+"performs several steps. <xref linkend=\"The_SARDeployer_MBean-"
+"A_sequence_diagram_highlighting_the_main_activities_performed_by_the_SARDeployer_to_start_a_JBoss_MBean_service"
+"\"/> is a sequence diagram that shows the init through start phases of a "
+"service."
+msgstr ""
+"当 <literal>SARDeployer</literal> 被要求部署一个服务时,它要执行几个步骤。"
+"<xref linkend=\"ch2.sardepstart.fig\"/> 是一个展示服务的初始启动阶段的序列"
+"图。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1469
+#, no-c-format
+msgid ""
+"A sequence diagram highlighting the main activities performed by the "
+"SARDeployer to start a JBoss MBean service"
+msgstr ""
+"A sequence diagram highlighting the main activities performed by the "
+"SARDeployer to start a JBoss MBean service"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1476
+#, fuzzy, no-c-format
+msgid ""
+"In <xref linkend=\"The_SARDeployer_MBean-"
+"A_sequence_diagram_highlighting_the_main_activities_performed_by_the_SARDeployer_to_start_a_JBoss_MBean_service"
+"\"/> the following is illustrated:"
+msgstr ""
+"A sequence diagram highlighting the main activities performed by the "
+"SARDeployer to start a JBoss MBean service"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1481
+#, no-c-format
+msgid ""
+"Methods prefixed with 1.1 correspond to the load and parse of the XML "
+"service descriptor."
+msgstr "以1.1开头的方法对应XML服务描述符的加载和分析。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1486
+#, no-c-format
+msgid ""
+"Methods prefixed with 1.2 correspond to processing each classpath element in "
+"the service descriptor to create an independent deployment that makes the "
+"jar or directory available through a <literal>UnifiedClassLoader</literal> "
+"registered with the unified loader repository."
+msgstr ""
+"以1.2开头的方法对应对服务描述符里的每个classpath元素的处理,来创建一个通过在"
+"统一加载器库里注册的<literal>UnifiedClassLoader</literal>使JAR或目录可用的独"
+"立的部署。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1491
+#, no-c-format
+msgid ""
+"Methods prefixed with 1.3 correspond to processing each <literal>local-"
+"directory</literal> element in the service descriptor. This does a copy of "
+"the SAR elements specified in the path attribute to the <literal>server/<"
+"config>/db</literal> directory."
+msgstr ""
+"以1.3开头的方法对应对服务描述符里的<literal>local-directory</literal>元素的处"
+"理。它复制相对<literal>server/<config>/db</literal>目录的path属性指定的"
+"SAR元素。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1496
+#, no-c-format
+msgid ""
+"Method 1.4. Process each deployable unit nested in the service a child "
+"deployment is created and added to the service deployment info subdeployment "
+"list."
+msgstr ""
+"以1.4开头的方法处理嵌套在服务里的每个可部署单元,子部署被创建并加入到服务"
+"deployment info subdeployment列表。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1501
+#, no-c-format
+msgid ""
+"Method 2.1. The <literal>UnifiedClassLoader</literal> of the SAR deployment "
+"unit is registered with the MBean Server so that is can be used for loading "
+"of the SAR MBeans."
+msgstr ""
+"方法2.1,SAR部署单元的<literal>UnifiedClassLoader</literal>被注册到MBean服务"
+"器,它可以用于SAR MBean的加载。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1506
+#, no-c-format
+msgid ""
+"Method 2.2. For each MBean element in the descriptor, create an instance and "
+"initialize its attributes with the values given in the service descriptor. "
+"This is done by calling the <literal>ServiceController.install</literal> "
+"method."
+msgstr ""
+"方法2.2,对于描述符里的每个MBean元素,创建一实例并用服务描述符里给出的值初始"
+"化它的属性。这是通过调用<literal>ServiceController.install</literal>方法来完"
+"成的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1511
+#, fuzzy, no-c-format
+msgid ""
+"Method 2.4.1. For each MBean instance created, obtain its JMX "
+"<literal>ObjectName</literal> and ask the ServiceController to handle the "
+"create step of the service life cycle. The <literal>ServiceController</"
+"literal> handles the dependencies of the MBean service. Only if the "
+"service's dependencies are satisfied is the service create method "
+"invoked."
+msgstr ""
+"Method 2.4.1,对于创建的每个MBean实例,获得它的JMX <literal>ObjectName</"
+"literal>并请求ServiceController来处理服务生命周期的create步骤。"
+"<literal>ServiceController</literal>处理MBean服务的相关性(dependencies)。只有"
+"满足了服务的相关性,create方法才会被调用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1516
+#, fuzzy, no-c-format
+msgid ""
+"Methods prefixed with 3.1 correspond to the start of each MBean service "
+"defined in the service descriptor. For each MBean instance created, obtain "
+"its JMX ObjectName and ask the <literal>ServiceController</literal> to "
+"handle the start step of the service life cycle. The "
+"<literal>ServiceController</literal> handles the dependencies of the MBean "
+"service. Only if the service's dependencies are satisfied is the service "
+"start method invoked."
+msgstr ""
+"以3.1开头的方法对应服务描述符里定义的每个MBean服务的开始。对于创建的每个MBean"
+"实例,获取它的MX ObjectName并请求<literal>ServiceController</literal>来处理服"
+"务生命周期的start步骤。<literal>ServiceController</literal>处理MBean服务的相"
+"关性。只有满足了服务的相关性,服务的start方法才会被调用。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1524
+#, no-c-format
+msgid "The Service Life Cycle Interface"
+msgstr "服务生命周期接口"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1525
+#, no-c-format
+msgid ""
+"The JMX specification does not define any type of life cycle or dependency "
+"management for MBeans. The JBoss ServiceController MBean introduces this "
+"notion. A JBoss MBean is an extension of the JMX MBean in that an MBean is "
+"expected to decouple creation from the life cycle of its service duties. "
+"This is necessary to implement any type of dependency management. For "
+"example, if you are writing an MBean that needs a JNDI naming service to be "
+"able to function, your MBean needs to be told when its dependencies are "
+"satisfied. This ranges from difficult to impossible to do if the only life "
+"cycle event is the MBean constructor. Therefore, JBoss introduces a service "
+"life cycle interface that describes the events a service can use to manage "
+"its behavior. The following listing shows the <literal>org.jboss.system."
+"Service</literal> interface:"
+msgstr ""
+"JMX规格不为MBean定义任何类型的生命周期(life cycle)或者相关性管理(dependency "
+"management)。JBoss ServiceController MBean接口引入了这个概念。JBoss MBean是"
+"JMX MBean的扩展,它需要把MBean的创建从服务的生命周期里分离出来。这对于实现任"
+"何类型的相关性管理都是必需的。例如,如果你在编写需要利用JNDI命名服务的MBean"
+"时,你的MBean需要知道什么时候可以满足它的相关性,而如果仅有的生命周期事件是"
+"MBean构造函数的话,这根本就做不到。因此,JBoss引入了一个服务生命周期接口,来"
+"描述这个服务管理它的行为所需的事件。下面的列表展示了<literal>org.jboss."
+"system.Service</literal>接口:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1528
+#, no-c-format
+msgid ""
+"package org.jboss.system;\n"
+"public interface Service\n"
+"{\n"
+" public void create() throws Exception;\n"
+" public void start() throws Exception;\n"
+" public void stop();\n"
+" public void destroy();\n"
+"}"
+msgstr ""
+"package org.jboss.system;\n"
+"public interface Service\n"
+"{\n"
+" public void create() throws Exception;\n"
+" public void start() throws Exception;\n"
+" public void stop();\n"
+" public void destroy();\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1529
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>ServiceController</literal> MBean invokes the methods of the "
+"<literal>Service</literal> interface at the appropriate times of the service "
+"life cycle. We'll discuss the methods in more detail in the "
+"<literal>ServiceController</literal> section."
+msgstr ""
+"<literal>ServiceController</literal> MBean 在服务生命周期的合适时候调用"
+"<literal>Service</literal>接口的方法。我们将在<literal>ServiceController</"
+"literal>部分讨论这个方法的更多细节。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1535
+#, no-c-format
+msgid "The ServiceController MBean"
+msgstr "The ServiceController MBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1536
+#, fuzzy, no-c-format
+msgid ""
+"JBoss manages dependencies between MBeans via the <literal>org.jboss.system."
+"ServiceController</literal> custom MBean. The SARDeployer delegates to the "
+"ServiceController when initializing, creating, starting, stopping and "
+"destroying MBean services. <xref linkend=\"The_ServiceController_MBean-"
+"The_interaction_between_the_SARDeployer_and_ServiceController_to_start_a_service"
+"\"/> shows a sequence diagram that highlights interaction between the "
+"<literal>SARDeployer</literal> and <literal>ServiceController</literal>."
+msgstr ""
+"JBoss通过<literal>org.jboss.system.ServiceController</literal>自定义MBean管理"
+"MBean之间的相关性。当初始化,创建,启动,停止和删除MBean服务时,SARDeployer委"
+"托给ServiceController。<xref linkend=\"ch2.servicecontroller.fig\"/> 是一个着"
+"重说明<literal>SARDeployer</literal> 和 <literal>ServiceController</literal>"
+"之间相互作用的序列图。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1540
+#, no-c-format
+msgid ""
+"The interaction between the SARDeployer and ServiceController to start a "
+"service"
+msgstr ""
+"The interaction between the SARDeployer and ServiceController to start a "
+"service"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1547
+#, no-c-format
+msgid ""
+"The <literal>ServiceController</literal> MBean has four key methods for the "
+"management of the service life cycle: <literal>create</literal>, "
+"<literal>start</literal>, <literal>stop</literal> and <literal>destroy</"
+"literal>."
+msgstr ""
+"<literal>ServiceController</literal> MBean有四个用于服务生命周期管理的关键方"
+"法:<literal>create</literal>,<literal>start</literal>,<literal>stop</"
+"literal> 和 <literal>destroy</literal>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1551
+#, no-c-format
+msgid "The create(ObjectName) method"
+msgstr "create(ObjectName)方法"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1552
+#, no-c-format
+msgid ""
+"The <literal>create(ObjectName)</literal> method is called whenever an event "
+"occurs that affects the named services state. This could be triggered by an "
+"explicit invocation by the <literal>SARDeployer</literal>, a notification of "
+"a new class, or another service reaching its created state."
+msgstr ""
+"当有影响服务状态的事件发生时,<literal>create(ObjectName)</literal>方法被调"
+"用。它可以用<literal>SARDeployer</literal>的显性调用,新类的通知,或另外的服"
+"务变为已创建的状态来触发。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1555
+#, fuzzy, no-c-format
+msgid ""
+"When a service's <literal>create</literal> method is called, all "
+"services on which the service depends have also had their create method "
+"invoked. This gives an MBean an opportunity to check that required MBeans or "
+"resources exist. A service cannot utilize other MBean services at this "
+"point, as most JBoss MBean services do not become fully functional until "
+"they have been started via their <literal>start</literal> method. Because of "
+"this, service implementations often do not implement <literal>create</"
+"literal> in favor of just the <literal>start</literal> method because that "
+"is the first point at which the service can be fully functional."
+msgstr ""
+"当服务的<literal>create</literal>方法被调用时,这个服务依赖的所有服务也会调用"
+"它们自己的create方法。这给予MBean一个机会来检查要求的MBean或服务是否存在。在"
+"这个时候服务不能利用其他MBean服务,因为大部分JBoss MBean服务直到用"
+"<literal>start</literal>方法开始时才具有全部的功能。因此,服务的实现经常不实"
+"现<literal>create</literal>而仅仅实现<literal>start</literal>方法,因为它才是"
+"服务完全可用的第一入口。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1561
+#, no-c-format
+msgid "The start(ObjectName) method"
+msgstr "start(ObjectName)方法"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1562
+#, no-c-format
+msgid ""
+"The <literal>start(ObjectName)</literal> method is called whenever an event "
+"occurs that affects the named services state. This could be triggered by an "
+"explicit invocation by the <literal>SARDeployer</literal>, a notification of "
+"a new class, or another service reaching its started state."
+msgstr ""
+"当有影响服务状态的事件发生时,<literal>start(ObjectName)</literal>方法被调"
+"用。它可以用<literal>SARDeployer</literal>的显性调用,新类的通知,或另外的服"
+"务变为已启动的状态来触发。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1565
+#, fuzzy, no-c-format
+msgid ""
+"When a service's <literal>start</literal> method is called, all services "
+"on which the service depends have also had their <literal>start</literal> "
+"method invoked. Receipt of a <literal>start</literal> method invocation "
+"signals a service to become fully operational since all services upon which "
+"the service depends have been created and started."
+msgstr ""
+"当服务的<literal>start</literal>方法被调用时,这个服务依赖的所有服务也会调用"
+"它们自己的<literal>start</literal>方法。既然所依赖的服务都已经被创建和启动"
+"了,<literal>start</literal>方法的调用就标志着这个服务是完全可操作的了。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1571
+#, no-c-format
+msgid "The stop(ObjectName) method"
+msgstr "stop(ObjectName)方法"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1572
+#, no-c-format
+msgid ""
+"The <literal>stop(ObjectName)</literal> method is called whenever an event "
+"occurs that affects the named services state. This could be triggered by an "
+"explicit invocation by the <literal>SARDeployer</literal>, notification of a "
+"class removal, or a service on which other services depend reaching its "
+"stopped state."
+msgstr ""
+"当有影响服务状态的事件发生时,<literal>stop(ObjectName)</literal>方法被调用。"
+"它可以用<literal>SARDeployer</literal>的显性调用,类删除的通知,或另外的服务"
+"所依赖的服务变为已停止的状态来触发。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1578
+#, no-c-format
+msgid "The destroy(ObjectName) method"
+msgstr "destroy(ObjectName)方法"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1579
+#, no-c-format
+msgid ""
+"The <literal>destroy(ObjectName)</literal> method is called whenever an "
+"event occurs that affects the named services state. This could be triggered "
+"by an explicit invocation by the <literal>SARDeployer</literal>, "
+"notification of a class removal, or a service on which other services depend "
+"reaching its destroyed state."
+msgstr ""
+"当有影响服务状态的事件发生时,<literal>destroy(ObjectName)</literal>方法被调"
+"用。它可以用<literal>SARDeployer</literal>的显性调用,类被删除的通知,或另外"
+"的服务所依赖的服务变为已删除的状态来触发。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1582
+#, no-c-format
+msgid ""
+"Service implementations often do not implement <literal>destroy</literal> in "
+"favor of simply implementing the <literal>stop</literal> method, or neither "
+"<literal>stop</literal> nor <literal>destroy</literal> if the service has no "
+"state or resources that need cleanup."
+msgstr ""
+"服务的实现经常不实现<literal>destroy</literal>而仅仅实现<literal>stop</"
+"literal>方法,或这个服务不需要清除状态和资源的时候,两个都不实现。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1590
+#, no-c-format
+msgid "Specifying Service Dependencies"
+msgstr "指定服务的相关性"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1591
+#, fuzzy, no-c-format
+msgid ""
+"To specify that an MBean service depends on other MBean services you need to "
+"declare the dependencies in the mbean element of the service descriptor. "
+"This is done using the <literal>depends</literal> and <literal>depends-list</"
+"literal> elements. One difference between the two elements relates to the "
+"<literal>optional-attribute-name</literal> attribute usage. If you track the "
+"<literal>ObjectName</literal>s of dependencies using single valued "
+"attributes you should use the depends element. If you track the "
+"<literal>ObjectName</literal>s of dependencies using <literal>java.util."
+"List</literal> compatible attributes you would use the <literal>depends-"
+"list</literal> element. If you only want to specify a dependency and don'"
+"t care to have the associated service <literal>ObjectName</literal> bound to "
+"an attribute of your MBean then use whatever element is easiest. The "
+"following listing shows example service descriptor fragments that illustrate "
+"the usage of the dependency related elements."
+msgstr ""
+"要指定MBean服务依赖于另外的MBean服务,你需要在服务描述符的mbean元素里声明这种"
+"依赖性。这可以用<literal>depends</literal> 和 <literal>depends-list</literal>"
+"元素来完成。两者的区别和<literal>optional-attribute-name</literal>属性的使用"
+"相关。如果你用单一值属性来跟踪<literal>ObjectName</literal>的依赖性,你应该使"
+"用depends元素。如果你用<literal>java.util.List</literal>兼容的属性来跟踪"
+"<literal>ObjectName</literal>的依赖性,你就应该使用<literal>depends-list</"
+"literal>元素。如果你只想指定依赖性,而不在乎关联的服务<literal>ObjectName</"
+"literal>绑定到你的MBean的属性上,你可以使用任意一个,依哪个更容易而定。下面是"
+"服务描述符示例的片段,它说明了和依赖性相关的元素的使用。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1594
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.mq.server.jmx.Topic\"\n"
+" name=\"jms.topic:service=Topic,name=testTopic\">\n"
+" <!-- Declare a dependency on the \"jboss.mq:service=DestinationManager"
+"\" and\n"
+" bind this name to the DestinationManager attribute -->\n"
+" <depends optional-attribute-name=\"DestinationManager\">\n"
+" jboss.mq:service=DestinationManager \n"
+" </depends>\n"
+"\n"
+" <!-- Declare a dependency on the \"jboss.mq:service=SecurityManager\" "
+"and\n"
+" bind this name to the SecurityManager attribute -->\n"
+" <depends optional-attribute-name=\"SecurityManager\">\n"
+" jboss.mq:service=SecurityManager\n"
+" </depends>\n"
+"\n"
+" <!-- ... -->\n"
+"\n"
+" <!-- Declare a dependency on the\n"
+" \"jboss.mq:service=CacheManager\" without\n"
+" any binding of the name to an attribute-->\n"
+" <depends>jboss.mq:service=CacheManager</depends>\n"
+"</mbean>\n"
+"\n"
+"<mbean code=\"org.jboss.mq.server.jmx.TopicMgr\" \n"
+" name=\"jboss.mq.destination:service=TopicMgr\">\n"
+" <!-- Declare a dependency on the given topic destination mbeans and\n"
+" bind these names to the Topics attribute -->\n"
+" <depends-list optional-attribute-name=\"Topics\">\n"
+" <depends-list-element>jms.topic:service=Topic,name=A</"
+"depends-list-element>\n"
+" <depends-list-element>jms.topic:service=Topic,name=B</"
+"depends-list-element>\n"
+" <depends-list-element>jms.topic:service=Topic,name=C</"
+"depends-list-element>\n"
+" </depends-list>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.mq.server.jmx.Topic\"\n"
+" name=\"jms.topic:service=Topic,name=testTopic\">\n"
+" <!-- Declare a dependency on the \"jboss.mq:service=DestinationManager"
+"\" and\n"
+" bind this name to the DestinationManager attribute -->\n"
+" <depends optional-attribute-name=\"DestinationManager\">\n"
+" jboss.mq:service=DestinationManager \n"
+" </depends>\n"
+"\n"
+" <!-- Declare a dependency on the \"jboss.mq:service=SecurityManager\" "
+"and\n"
+" bind this name to the SecurityManager attribute -->\n"
+" <depends optional-attribute-name=\"SecurityManager\">\n"
+" jboss.mq:service=SecurityManager\n"
+" </depends>\n"
+"\n"
+" <!-- ... -->\n"
+"\n"
+" <!-- Declare a dependency on the\n"
+" \"jboss.mq:service=CacheManager\" without\n"
+" any binding of the name to an attribute-->\n"
+" <depends>jboss.mq:service=CacheManager</depends>\n"
+"</mbean>\n"
+"\n"
+"<mbean code=\"org.jboss.mq.server.jmx.TopicMgr\" \n"
+" name=\"jboss.mq.destination:service=TopicMgr\">\n"
+" <!-- Declare a dependency on the given topic destination mbeans and\n"
+" bind these names to the Topics attribute -->\n"
+" <depends-list optional-attribute-name=\"Topics\">\n"
+" <depends-list-element>jms.topic:service=Topic,name=A</"
+"depends-list-element>\n"
+" <depends-list-element>jms.topic:service=Topic,name=B</"
+"depends-list-element>\n"
+" <depends-list-element>jms.topic:service=Topic,name=C</"
+"depends-list-element>\n"
+" </depends-list>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1595
+#, fuzzy, no-c-format
+msgid ""
+"Another difference between the <literal>depends</literal> and "
+"<literal>depends-list</literal> elements is that the value of the depends "
+"element may be a complete MBean service configuration rather than just the "
+"<literal>ObjectName</literal> of the service. <xref linkend="
+"\"Specifying_Service_Dependencies-"
+"An_example_of_using_the_depends_element_to_specify_the_complete_configuration_of_a_depended_on_service."
+"\"/> shows an example from the <literal>hsqldb-service.xml</literal> "
+"descriptor. In this listing the <literal>org.jboss.resource."
+"connectionmanager.RARDeployment</literal> service configuration is defined "
+"using a nested <literal>mbean</literal> element as the <literal>depends</"
+"literal> element value. This indicates that the <literal>org.jboss.resource."
+"connectionmanager.LocalTxConnectionManager</literal> MBean depends on this "
+"service. The <literal>jboss.jca:service=LocalTxDS,name=hsqldbDS</"
+"literal><literal>ObjectName</literal> will be bound to the "
+"<literal>ManagedConnectionFactoryName</literal> attribute of the "
+"<literal>LocalTxConnectionManager</literal> class."
+msgstr ""
+"<literal>depends</literal> 和 <literal>depends-list</literal>元素的另外一个区"
+"别就是,depends元素的值可能是完整的MBean服务配置,而不是服务的"
+"<literal>ObjectName</literal>。<xref linkend=\"ch2.dependon.ex\"/>是关于"
+"<literal>hsqldb-service.xml</literal>描述符里的一个示例。在这个例子里,定义了"
+"<literal>org.jboss.resource.connectionmanager.RARDeployment</literal>服务的配"
+"置,这里使用嵌套的 <literal>mbean</literal>元素作为<literal>depends</literal>"
+"元素的值。这表示<literal>org.jboss.resource.connectionmanager."
+"LocalTxConnectionManager</literal> MBean依赖于这个服务。<literal>jboss.jca:"
+"service=LocalTxDS,name=hsqldbDS</literal> <literal>ObjectName</literal>将被绑"
+"定到<literal>LocalTxConnectionManager</literal>类的"
+"<literal>ManagedConnectionFactoryName</literal>属性上。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1598
+#, no-c-format
+msgid ""
+"An example of using the depends element to specify the complete "
+"configuration of a depended on service."
+msgstr ""
+"An example of using the depends element to specify the complete "
+"configuration of a depended on service."
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1599
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.resource.connectionmanager."
+"LocalTxConnectionManager\" \n"
+" name=\"jboss.jca:service=LocalTxCM,name=hsqldbDS\">\n"
+" <depends optional-attribute-name=\"ManagedConnectionFactoryName"
+"\">\n"
+" <!--embedded mbean-->\n"
+" <mbean code=\"org.jboss.resource.connectionmanager.RARDeployment"
+"\" \n"
+" name=\"jboss.jca:service=LocalTxDS,name=hsqldbDS\">\n"
+" <attribute name=\"JndiName\">DefaultDS</attribute>\n"
+" <attribute name=\"ManagedConnectionFactoryProperties\">\n"
+" <properties>\n"
+" <config-property name=\"ConnectionURL\"\n"
+" type=\"java.lang.String\"> \n"
+" jdbc:hsqldb:hsql://localhost:1476\n"
+" </config-property>\n"
+" <config-property name=\"DriverClass\" type=\"java."
+"lang.String\">\n"
+" org.hsqldb.jdbcDriver\n"
+" </config-property>\n"
+" <config-property name=\"UserName\" type=\"java.lang."
+"String\">\n"
+" sa\n"
+" </config-property>\n"
+" <config-property name=\"Password\" type=\"java.lang."
+"String\"/>\n"
+" </properties>\n"
+" </attribute>\n"
+" <!-- ... -->\n"
+" </mbean>\n"
+" </depends>\n"
+" <!-- ... -->\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.resource.connectionmanager."
+"LocalTxConnectionManager\" \n"
+" name=\"jboss.jca:service=LocalTxCM,name=hsqldbDS\">\n"
+" <depends optional-attribute-name=\"ManagedConnectionFactoryName"
+"\">\n"
+" <!--embedded mbean-->\n"
+" <mbean code=\"org.jboss.resource.connectionmanager.RARDeployment"
+"\" \n"
+" name=\"jboss.jca:service=LocalTxDS,name=hsqldbDS\">\n"
+" <attribute name=\"JndiName\">DefaultDS</attribute>\n"
+" <attribute name=\"ManagedConnectionFactoryProperties\">\n"
+" <properties>\n"
+" <config-property name=\"ConnectionURL\"\n"
+" type=\"java.lang.String\"> \n"
+" jdbc:hsqldb:hsql://localhost:1476\n"
+" </config-property>\n"
+" <config-property name=\"DriverClass\" type=\"java."
+"lang.String\">\n"
+" org.hsqldb.jdbcDriver\n"
+" </config-property>\n"
+" <config-property name=\"UserName\" type=\"java.lang."
+"String\">\n"
+" sa\n"
+" </config-property>\n"
+" <config-property name=\"Password\" type=\"java.lang."
+"String\"/>\n"
+" </properties>\n"
+" </attribute>\n"
+" <!-- ... -->\n"
+" </mbean>\n"
+" </depends>\n"
+" <!-- ... -->\n"
+"</mbean>"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1604
+#, no-c-format
+msgid "Identifying Unsatisfied Dependencies"
+msgstr "识别未满足的依赖性"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1605
+#, no-c-format
+msgid ""
+"The <literal>ServiceController</literal> MBean supports two operations that "
+"can help determine which MBeans are not running due to unsatisfied "
+"dependencies. The first operation is <literal>listIncompletelyDeployed</"
+"literal>. This returns a <literal>java.util.List</literal> of <literal>org."
+"jboss.system.ServiceContext</literal> objects for the MBean services that "
+"are not in the <literal>RUNNING</literal> state."
+msgstr ""
+"<literal>ServiceController</literal> MBean 支持两种操作来帮助决定哪些MBean由"
+"于未满足的依赖性而没有运行。第一个操作是<literal>listIncompletelyDeployed</"
+"literal>。它为状态不是<literal>RUNNING</literal>的MBean服务返回一个"
+"<literal>org.jboss.system.ServiceContext</literal>对象的<literal>java.util."
+"List</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1608
+#, no-c-format
+msgid ""
+"The second operation is <literal>listWaitingMBeans</literal>. This operation "
+"returns a <literal>java.util.List</literal> of the JMX <literal>ObjectName</"
+"literal>s of MBean services that cannot be deployed because the class "
+"specified by the code attribute is not available."
+msgstr ""
+"第二个操作是<literal>listWaitingMBeans</literal>。这个操作返回MBean服务的JMX "
+"<literal>ObjectName</literal>的一个<literal>java.util.List</literal>,这些"
+"MBean服务都是因为code属性指定的类不可用而不能够部署。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1614
+#, no-c-format
+msgid "Hot Deployment of Components, the URLDeploymentScanner"
+msgstr "组件的热部署,the URLDeploymentScanner"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1615
+#, no-c-format
+msgid ""
+"The <literal>URLDeploymentScanner</literal> MBean service provides the JBoss "
+"hot deployment capability. This service watches one or more URLs for "
+"deployable archives and deploys the archives as they appear or change. It "
+"also undeploys previously deployed applications if the archive from which "
+"the application was deployed is removed. The configurable attributes include:"
+msgstr ""
+"<literal>URLDeploymentScanner</literal> MBean服务提供JBoss的热部署能力。这个"
+"服务为可部署档案文件观察一个或多个URL,在它们出现或改变时部署这些档案。如果之"
+"前部署的应用程序的档案被删除了,它也卸载这些应用程序。它的可配置属性包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1620
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">URLs</emphasis>: A comma separated list of URL "
+"strings for the locations that should be watched for changes. Strings that "
+"do not correspond to valid URLs are treated as file paths. Relative file "
+"paths are resolved against the server home URL, for example, "
+"<literal>JBOSS_DIST/server/production</literal> for the production config "
+"file set. If a URL represents a file then the file is deployed and watched "
+"for subsequent updates or removal. If a URL ends in <literal>/</literal> to "
+"represent a directory, then the contents of the directory are treated as a "
+"collection of deployables and scanned for content that are to be watched for "
+"updates or removal. The requirement that a URL end in a <literal>/</literal> "
+"to identify a directory follows the RFC2518 convention and allows "
+"discrimination between collections and directories that are simply unpacked "
+"archives."
+msgstr ""
+"<emphasis role=\"bold\">URLs</emphasis>:是一个用逗号隔开的URL字符串的列表,"
+"MBean服务会观察这些位置的变化。不对应有效URL的字符串被视作文件路径。相对文件"
+"路径根据服务器的主URL解析,例如,<literal>JBOSS_DIST/server/default</literal>"
+"是缺省的配置文件集。如果URL代表了一个文件,这个文件会被部署并观察随后的更新或"
+"删除。如果URL以<literal>/</literal>结尾,它代表一个目录,这个目录的内容被视作"
+"可部署的集合而且被观察发生的更新或删除。以<literal>/</literal>结尾来识别一个"
+"目录的要求遵循RFC2518规则,它允许集合和是简单的未封装档案的目录之间的区别。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1623
+#, no-c-format
+msgid ""
+"The default value for the URLs attribute is <literal>deploy/</literal> which "
+"means that any SARs, EARs, JARs, WARs, RARs, etc. dropped into the "
+"<literal>server/<name>/deploy</literal> directory will be "
+"automatically deployed and watched for updates."
+msgstr ""
+"URLs属性的缺省值是<literal>deploy/</literal>,它意味着<literal>server/<"
+"name>/deploy</literal>目录下的任何SARs,EARs,JARs,WARs,RARs等将被自动部"
+"署并观察发生的更新。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1626
+#, no-c-format
+msgid "Example URLs include:"
+msgstr "URL示例包括:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1631
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">deploy/</emphasis> scans <literal>${jboss.server."
+"url}/deploy/</literal>, which is local or remote depending on the URL used "
+"to boot the server"
+msgstr ""
+"<emphasis role=\"bold\">deploy/</emphasis>扫描<literal>${jboss.server.url}/"
+"deploy/</literal>,本地还是远程依赖于启动服务器的URL。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1636
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">${jboss.server.home.dir}/deploy/</emphasis> scans "
+"<emphasis>${jboss.server.home.dir)/deploy</emphasis>, which is always local"
+msgstr ""
+"<emphasis role=\"bold\">${jboss.server.home.dir}/deploy/</emphasis>扫描"
+"<emphasis>${jboss.server.home.dir)/deploy</emphasis>,它总是本地的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1641
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">file:/var/opt/myapp.ear</emphasis> deploys "
+"<literal>myapp.ear</literal> from a local location"
+msgstr ""
+"<emphasis role=\"bold\">file:/var/opt/myapp.ear</emphasis>从本地位置部署"
+"<literal>myapp.ear</literal>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1646
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">file:/var/opt/apps/</emphasis> scans the specified "
+"directory"
+msgstr "<emphasis role=\"bold\">file:/var/opt/apps/</emphasis>扫描指定的目录"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1651
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">http://www.test.com/netboot/myapp.ear</emphasis> "
+"deploys <literal>myapp.ear</literal> from a remote location"
+msgstr ""
+"<emphasis role=\"bold\">http://www.test.com/netboot/myapp.ear</emphasis> 从一"
+"个远程位置部署<literal>myapp.ear</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1656
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">http://www.test.com/netboot/apps/</emphasis> scans "
+"the specified remote location using WebDAV. This will only work if the "
+"remote http server supports the WebDAV PROPFIND command."
+msgstr ""
+"<emphasis role=\"bold\">http://www.test.com/netboot/apps/</emphasis>用WebDAV"
+"扫描指定的远程位置。它只有当远程HTTP服务器支持WebDAV PROPFIND命令才可用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1663
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis>: The time in milliseconds "
+"between runs of the scanner thread. The default is 5000 (5 seconds)."
+msgstr ""
+"<emphasis role=\"bold\">ScanPeriod</emphasis>:运行scanner线程间隔的毫秒数。"
+"它的缺省值是5000(5秒)。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1668
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">URLComparator</emphasis>: The class name of a "
+"<literal>java.util.Comparator</literal> implementation used to specify a "
+"deployment ordering for deployments found in a scanned directory. The "
+"implementation must be able to compare two <literal>java.net.URL</literal> "
+"objects passed to its compare method. The default setting is the "
+"<literal>org.jboss.deployment.DeploymentSorter</literal> class which orders "
+"based on the deployment URL suffix. The ordering of suffixes is: "
+"<literal>deployer</literal>, <literal>deployer.xml</literal>, <literal>sar</"
+"literal>, <literal>rar</literal>, <literal>ds.xml</literal>, "
+"<literal>service.xml</literal>, <literal>har</literal>, <literal>jar</"
+"literal>, <literal>war</literal>, <literal>wsr</literal>, <literal>ear</"
+"literal>, <literal>zip</literal>, <literal>bsh</literal>, <literal>last</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">URLComparator</emphasis>:为扫描目录里发现的部署指定"
+"部署顺序的<literal>java.util.Comparator</literal>实现的类的名字。这个实现必需"
+"能够比较传入到它的compare 方法的两个<literal>java.net.URL</literal>对象。缺省"
+"的设定是<literal>org.jboss.deployment.DeploymentSorter</literal>类,它根据部"
+"署URL的后缀排序。后缀的顺序是:<literal>deployer</literal>,"
+"<literal>deployer.xml</literal>,<literal>sar</literal>,<literal>rar</"
+"literal>,<literal>ds.xml</literal>,<literal>service.xml</literal>,"
+"<literal>har</literal>,<literal>jar</literal>,<literal>war</literal>,"
+"<literal>wsr</literal>,<literal>ear</literal>,<literal>zip</literal>,"
+"<literal>bsh</literal>,<literal>last</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1671
+#, no-c-format
+msgid ""
+"An alternate implementation is the <literal>org.jboss.deployment.scanner."
+"PrefixDeploymentSorter</literal> class. This orders the URLs based on "
+"numeric prefixes. The prefix digits are converted to an int (ignoring "
+"leading zeroes), smaller prefixes are ordered ahead of larger numbers. "
+"Deployments that do not start with any digits will be deployed after all "
+"numbered deployments. Deployments with the same prefix value are further "
+"sorted by the <literal>DeploymentSorter</literal> logic."
+msgstr ""
+"另外的一个实现是<literal>org.jboss.deployment.scanner."
+"PrefixDeploymentSorter</literal>类。它按照数字的前缀排序。前缀都被转换成一个"
+"整数(忽略前面的0),数字小的前缀排在大的前缀前面。不以任何数字开始的部署将在所"
+"有的以数字为前缀的部署之后进行部署。有相同前缀的部署将进一步用"
+"<literal>DeploymentSorter</literal>逻辑进行排序。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1676
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Filter</emphasis>: The class name of a <literal>java."
+"io.FileFilter</literal> implementation that is used to filter the contents "
+"of scanned directories. Any file not accepted by this filter will not be "
+"deployed. The default is <literal>org.jboss.deployment.scanner."
+"DeploymentFilter</literal> which is an implementation that rejects the "
+"following patterns:"
+msgstr ""
+"<emphasis role=\"bold\">Filter</emphasis>:这是<literal>java.io.FileFilter</"
+"literal>实现的类的名字,它用来过滤被扫描目录的内容。所有不被这个过滤器所接受"
+"的文件都不会被部署。它的缺省值是<literal>org.jboss.deployment.scanner."
+"DeploymentFilter</literal>,这是拒绝下列模式的一个实现:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1679
+#, no-c-format
+msgid ""
+"\"<literal>#*</literal>\", \"<literal>%*</literal>\", \"<literal>,*</literal>"
+"\", \"<literal>.*</literal>\", \"<literal>_$*</literal>\", \"<literal>*#</"
+"literal>\", \"<literal>*$</literal>\", \"<literal>*%</literal>\", "
+"\"<literal>*.BAK</literal>\", \"<literal>*.old</literal>\", \"<literal>*."
+"orig</literal>\", \"<literal>*.rej</literal>\", \"<literal>*.bak</literal>"
+"\", \"<literal>*.sh</literal>\", \"<literal>*,v</literal>\", \"<literal>*~</"
+"literal>\", \"<literal>.make.state</literal>\", \"<literal>.nse_depinfo</"
+"literal>\", \"<literal>CVS</literal>\", \"<literal>CVS.admin</literal>\", "
+"\"<literal>RCS</literal>\", \"<literal>RCSLOG</literal>\", \"<literal>SCCS</"
+"literal>\", \"<literal>TAGS</literal>\", \"<literal>core</literal>\", "
+"\"<literal>tags</literal>\""
+msgstr ""
+"\"<literal>#*</literal>\", \"<literal>%*</literal>\", \"<literal>,*</literal>"
+"\", \"<literal>.*</literal>\", \"<literal>_$*</literal>\", \"<literal>*#</"
+"literal>\", \"<literal>*$</literal>\", \"<literal>*%</literal>\", "
+"\"<literal>*.BAK</literal>\", \"<literal>*.old</literal>\", \"<literal>*."
+"orig</literal>\", \"<literal>*.rej</literal>\", \"<literal>*.bak</literal>"
+"\", \"<literal>*.sh</literal>\", \"<literal>*,v</literal>\", \"<literal>*~</"
+"literal>\", \"<literal>.make.state</literal>\", \"<literal>.nse_depinfo</"
+"literal>\", \"<literal>CVS</literal>\", \"<literal>CVS.admin</literal>\", "
+"\"<literal>RCS</literal>\", \"<literal>RCSLOG</literal>\", \"<literal>SCCS</"
+"literal>\", \"<literal>TAGS</literal>\", \"<literal>core</literal>\", "
+"\"<literal>tags</literal>\""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1684
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RecursiveSearch</emphasis>: This property indicates "
+"whether or not deploy subdirectories are seen to be holding deployable "
+"content. If this is false, deploy subdirectories that do not contain a dot "
+"(<literal>.</literal>) in their name are seen to be unpackaged JARs with "
+"nested subdeployments. If true, then deploy subdirectories are just "
+"groupings of deployable content. The difference between the two views shows "
+"is related to the depth first deployment model JBoss supports. The false "
+"setting which treats directories as unpackaged JARs with nested content "
+"triggers the deployment of the nested content as soon as the JAR directory "
+"is deployed. The true setting simply ignores the directory and adds its "
+"content to the list of deployable packages and calculates the order based on "
+"the previous filter logic. The default is true."
+msgstr ""
+"<emphasis role=\"bold\">RecursiveSearch</emphasis>:这个属性指出是否部署具有"
+"可部署内容的子目录。它如果为false,将部署名字里不含有句点(<literal>.</"
+"literal>)的子目录,它们被视作拥有嵌套子部署内容的未封装的JAR。它如果为true,"
+"就部署有可部署内容的子目录。两种情况的区别与JBoss支持的depth first部署模型相"
+"关。只要JAR目录被部署,false设定将触发嵌套内容的部署,它把目录视作拥有嵌套内"
+"容的未封装的JAR。而true设定只是简单地忽略目录,并把它的内容加到可部署包的列表"
+"里,而且根据前面的过滤器逻辑来计算顺序。它的缺省值是true。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1689
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Deployer</emphasis>: The JMX <literal>ObjectName</"
+"literal> string of the MBean that implements the <literal>org.jboss."
+"deployment.Deployer</literal> interface operations. The default setting is "
+"to use the <literal>MainDeployer</literal> created by the bootstrap startup "
+"process."
+msgstr ""
+"<emphasis role=\"bold\">Deployer</emphasis>:它是实现<literal>org.jboss."
+"deployment.Deployer</literal>接口操作的MBean的JMX <literal>ObjectName</"
+"literal>字符串。它的缺省设定是使用引导过程中创建的<literal>MainDeployer</"
+"literal>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1699
+#, no-c-format
+msgid "Writing JBoss MBean Services"
+msgstr "编写JBoss MBean服务"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1700
+#, no-c-format
+msgid ""
+"Writing a custom MBean service that integrates into the JBoss server "
+"requires the use of the <literal>org.jboss.system.Service</literal> "
+"interface pattern if the custom service is dependent on other services. When "
+"a custom MBean depends on other MBean services you cannot perform any "
+"service dependent initialization in any of the <literal>javax.management."
+"MBeanRegistration</literal> interface methods since JMX has no dependency "
+"notion. Instead, you must manage dependency state using the "
+"<literal>Service</literal> interface <literal>create</literal> and/or "
+"<literal>start</literal> methods. You can do this using any one of the "
+"following approaches:"
+msgstr ""
+"如果集成到JBoss服务器里的自定义的MBean服务依赖于其他服务,那么编写这个服务要"
+"求使用<literal>org.jboss.system.Service</literal>接口模式。当自定义的MBean依"
+"赖于其他服务时,既然JMX里没有依赖性的概念,你不能够在<literal>javax."
+"management.MBeanRegistration</literal>接口方法里执行任何依赖于服务的初始化。"
+"你必须用<literal>Service</literal>接口的<literal>create</literal> 和/或"
+"<literal>start</literal>方法来管理依赖性状态。你可以使用下面的任何一种方法:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1705
+#, no-c-format
+msgid ""
+"Add any of the <literal>Service</literal> methods that you want called on "
+"your MBean to your MBean interface. This allows your MBean implementation to "
+"avoid dependencies on JBoss specific interfaces."
+msgstr ""
+"在你的MBean接口里加入任何你需要调用的<literal>Service</literal>方法。这允许你"
+"的MBean实现在JBoss相关的接口里避免依赖性。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1710
+#, no-c-format
+msgid ""
+"Have your MBean interface extend the <literal>org.jboss.system.Service</"
+"literal> interface."
+msgstr "使你的MBean接口扩展<literal>org.jboss.system.Service</literal>接口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1715
+#, no-c-format
+msgid ""
+"Have your MBean interface extend the <literal>org.jboss.system.ServiceMBean</"
+"literal> interface. This is a subinterface of <literal>org.jboss.system."
+"Service</literal> that adds <literal>getName()</literal>, <literal>getState()"
+"</literal>, <literal>getStateString()</literal> methods."
+msgstr ""
+"使你的MBean接口扩展<literal>org.jboss.system.ServiceMBean</literal>接口。这是"
+"<literal>org.jboss.system.Service</literal>的一个子接口,加入了"
+"<literal>getName()</literal>,<literal>getState()</literal>,"
+"<literal>getStateString()</literal>方法。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1720
+#, fuzzy, no-c-format
+msgid ""
+"Which approach you choose depends on whether or not you want your code to be "
+"coupled to JBoss specific code. If you don't, then you would use the "
+"first approach. If you don't care about dependencies on JBoss classes, "
+"the simplest approach is to have your MBean interface extend from "
+"<literal>org.jboss.system.ServiceMBean</literal> and your MBean "
+"implementation class extend from the abstract <literal>org.jboss.system."
+"ServiceMBeanSupport</literal> class. This class implements the <literal>org."
+"jboss.system.ServiceMBean</literal> interface. <literal>ServiceMBeanSupport</"
+"literal> provides implementations of the <literal>create</literal>, "
+"<literal>start</literal>, <literal>stop</literal>, and <literal>destroy</"
+"literal> methods that integrate logging and JBoss service state management "
+"tracking. Each method delegates any subclass specific work to "
+"<literal>createService</literal>, <literal>startService</literal>, "
+"<literal>stopService</literal>, and <literal>destroyService</literal> "
+"methods respectively. When subclassing <literal>ServiceMBeanSupport</"
+"literal>, you would override one or more of the <literal>createService</"
+"literal>, <literal>startService</literal>, <literal>stopService</literal>, "
+"and <literal>destroyService</literal> methods as required"
+msgstr ""
+"使用哪种方法取决于你是否想要你的代码和JBoss相关的代码相关。如果你不希望这样,"
+"你可以用第一个方法。如果你不介意对JBoss类的依赖,最简单的方法就是从"
+"<literal>org.jboss.system.ServiceMBean</literal>扩展你的MBean接口,并且从绝"
+"对 <literal>org.jboss.system.ServiceMBeanSupport</literal>类扩展你的MBean实"
+"现。这个类实现了<literal>org.jboss.system.ServiceMBean</literal>接口。"
+"<literal>ServiceMBeanSupport</literal>提供了<literal>create</literal>,"
+"<literal>start</literal>,<literal>stop</literal>,和 <literal>destroy</"
+"literal>方法的实现,这可以集成logging和JBoss服务的状态管理跟踪。每个方法把和"
+"子类相关的工作分别委托给<literal>createService</literal>,"
+"<literal>startService</literal>,<literal>stopService</literal>,和 "
+"<literal>destroyService</literal>。当建立<literal>ServiceMBeanSupport</"
+"literal>的子类时,你将根据要求来覆盖(override) <literal>createService</"
+"literal>,<literal>startService</literal>,<literal>stopService</literal>,"
+"和 <literal>destroyService</literal> 中的一个或多个方法。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1724
+#, no-c-format
+msgid "A Standard MBean Example"
+msgstr "一个标准MBean的示例"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1725
+#, no-c-format
+msgid ""
+"This section develops a simple MBean that binds a <literal>HashMap</literal> "
+"into the JBoss JNDI namespace at a location determined by its "
+"<literal>JndiName</literal> attribute to demonstrate what is required to "
+"create a custom MBean. Because the MBean uses JNDI, it depends on the JBoss "
+"naming service MBean and must use the JBoss MBean service pattern to be "
+"notified when the naming service is available."
+msgstr ""
+"这个部分开发了一个简单的MBean,它演示了创建自定义MBean所要求的事情。它把"
+"<literal>HashMap</literal>绑定到JBoss JNDI的命名空间,它的位置由"
+"<literal>JndiName</literal>属性决定。因为MBean使用JNDI,它依赖于JBoss的命名服"
+"务MBean,而且在命名服务可用的时候,它必须使用JBoss MBean服务模式。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1728
+#, fuzzy, no-c-format
+msgid ""
+"Version one of the classes, shown in <xref linkend="
+"\"A_Standard_MBean_Example-"
+"JNDIMapMBean_interface_and_implementation_based_on_the_service_interface_method_pattern"
+"\"/>, is based on the service interface method pattern. This version of the "
+"interface declares the <literal>start</literal> and <literal>stop</literal> "
+"methods needed to start up correctly without using any JBoss-specific "
+"classes."
+msgstr ""
+"这个类的第一版本,如<xref linkend=\"ch2.jndimap1.ex\"/>所示,是基于服务接口方"
+"法模式的。这个版本的接口声明了<literal>start</literal> 和 <literal>stop</"
+"literal>方法,这样不需要使用任何JBoss相关的类就可以正确地启动。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1731
+#, no-c-format
+msgid ""
+"JNDIMapMBean interface and implementation based on the service interface "
+"method pattern"
+msgstr ""
+"JNDIMapMBean interface and implementation based on the service interface "
+"method pattern"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1732
+#, fuzzy, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex1;\n"
+" \n"
+"// The JNDIMap MBean interface\n"
+"import javax.naming.NamingException;\n"
+" \n"
+"public interface JNDIMapMBean\n"
+"{\n"
+" public String getJndiName();\n"
+" public void setJndiName(String jndiName) throws NamingException;\n"
+" public void start() throws Exception;\n"
+" public void stop() throws Exception;\n"
+"}"
+msgstr ""
+"package org.jboss.chap2.ex1;\n"
+" \n"
+"// The JNDIMap MBean interface\n"
+"import javax.naming.NamingException;\n"
+" \n"
+"public interface JNDIMapMBean\n"
+"{\n"
+" public String getJndiName();\n"
+" public void setJndiName(String jndiName) throws NamingException;\n"
+" public void start() throws Exception;\n"
+" public void stop() throws Exception;\n"
+"}"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1733
+#, fuzzy, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex1;\n"
+"\n"
+"// The JNDIMap MBean implementation\n"
+"import java.util.HashMap;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.Name;\n"
+"import javax.naming.NamingException;\n"
+"import org.jboss.naming.NonSerializableFactory;\n"
+"\n"
+"public class JNDIMap implements JNDIMapMBean\n"
+"{\n"
+" private String jndiName;\n"
+" private HashMap contextMap = new HashMap();\n"
+" private boolean started;\n"
+" \n"
+" public String getJndiName()\n"
+" {\n"
+" return jndiName;\n"
+" }\n"
+" public void setJndiName(String jndiName) throws NamingException\n"
+" {\n"
+" String oldName = this.jndiName;\n"
+" this.jndiName = jndiName;\n"
+" if (started) {\n"
+" unbind(oldName);\n"
+" try {\n"
+" rebind();\n"
+" } catch(Exception e) {\n"
+" NamingException ne = new NamingException(\"Failedto update "
+"jndiName\");\n"
+" ne.setRootCause(e);\n"
+" throw ne;\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+" public void start() throws Exception\n"
+" {\n"
+" started = true;\n"
+" rebind();\n"
+" }\n"
+" \n"
+" public void stop()\n"
+" {\n"
+" started = false;\n"
+" unbind(jndiName);\n"
+" }\n"
+" \n"
+" private void rebind() throws NamingException\n"
+" {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" Name fullName = rootCtx.getNameParser(\"\").parse(jndiName);\n"
+" System.out.println(\"fullName=\"+fullName);\n"
+" NonSerializableFactory.rebind(fullName, contextMap, true);\n"
+" }\n"
+"\n"
+" private void unbind(String jndiName)\n"
+" {\n"
+" try {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" rootCtx.unbind(jndiName);\n"
+" NonSerializableFactory.unbind(jndiName);\n"
+" } catch(NamingException e) {\n"
+" e.printStackTrace();\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+"package org.jboss.chap2.ex1;\n"
+"\n"
+"// The JNDIMap MBean implementation\n"
+"import java.util.HashMap;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.Name;\n"
+"import javax.naming.NamingException;\n"
+"import org.jboss.naming.NonSerializableFactory;\n"
+"\n"
+"public class JNDIMap implements JNDIMapMBean\n"
+"{\n"
+" private String jndiName;\n"
+" private HashMap contextMap = new HashMap();\n"
+" private boolean started;\n"
+" \n"
+" public String getJndiName()\n"
+" {\n"
+" return jndiName;\n"
+" }\n"
+" public void setJndiName(String jndiName) throws NamingException\n"
+" {\n"
+" String oldName = this.jndiName;\n"
+" this.jndiName = jndiName;\n"
+" if (started) {\n"
+" unbind(oldName);\n"
+" try {\n"
+" rebind();\n"
+" } catch(Exception e) {\n"
+" NamingException ne = new NamingException(\"Failedto update "
+"jndiName\");\n"
+" ne.setRootCause(e);\n"
+" throw ne;\n"
+" }\n"
+" }\n"
+" }\n"
+"\n"
+" public void start() throws Exception\n"
+" {\n"
+" started = true;\n"
+" rebind();\n"
+" }\n"
+" \n"
+" public void stop()\n"
+" {\n"
+" started = false;\n"
+" unbind(jndiName);\n"
+" }\n"
+" \n"
+" private void rebind() throws NamingException\n"
+" {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" Name fullName = rootCtx.getNameParser(\"\").parse(jndiName);\n"
+" System.out.println(\"fullName=\"+fullName);\n"
+" NonSerializableFactory.rebind(fullName, contextMap, true);\n"
+" }\n"
+"\n"
+" private void unbind(String jndiName)\n"
+" {\n"
+" try {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" rootCtx.unbind(jndiName);\n"
+" NonSerializableFactory.unbind(jndiName);\n"
+" } catch(NamingException e) {\n"
+" e.printStackTrace();\n"
+" }\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1734
+#, fuzzy, no-c-format
+msgid ""
+"Version two of the classes, shown in <xref linkend="
+"\"A_Standard_MBean_Example-"
+"JNDIMapMBean_interface_and_implementation_based_on_the_service_interface_method_pattern"
+"\"/>, use the JBoss <literal>ServiceMBean</literal> interface and "
+"<literal>ServiceMBeanSupport</literal> class. In this version, the "
+"implementation class extends the <literal>ServiceMBeanSupport</literal> "
+"class and overrides the <literal>startService</literal> and "
+"<literal>stopService</literal> methods. <literal>JNDIMapMBean</literal> also "
+"implements the abstract <literal>getName</literal> method to return a "
+"descriptive name for the MBean. The <literal>JNDIMapMBean</literal> "
+"interface extends the <literal>org.jboss.system.ServiceMBean</literal> "
+"interface and only declares the setter and getter methods for the "
+"<literal>JndiName</literal> attribute because it inherits the service life "
+"cycle methods from <literal>ServiceMBean</literal>. This is the third "
+"approach mentioned at the start of the <xref linkend="
+"\"Using_JMX_as_a_Microkernel-JBoss_MBean_Services\"/>."
+msgstr ""
+"这个类的第二个版本,如<xref linkend=\"ch2.jndimap1.ex\"/>所示,使用了JBoss "
+"<literal>ServiceMBean</literal>接口和<literal>ServiceMBeanSupport</literal>"
+"类。在这个版本里,实现类扩展了<literal>ServiceMBeanSupport</literal>类并覆盖"
+"了<literal>startService</literal> 和<literal>stopService</literal>方法。"
+"<literal>JNDIMapMBean</literal>也实现了绝对<literal>getName</literal>方法来为"
+"MBean返回一个描述名。<literal>JNDIMapMBean</literal>接口扩展了<literal>org."
+"jboss.system.ServiceMBean</literal>接口,因为它从<literal>ServiceMBean</"
+"literal>继承了服务生命周期方法,所以为<literal>JndiName</literal>属性只声明了"
+"setter和getter方法。这是在<xref linkend=\"ch2.mbeanservice.sect\"/>开始部分的"
+"第三种方法。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1737
+#, no-c-format
+msgid ""
+"JNDIMap MBean interface and implementation based on the ServiceMBean "
+"interface and ServiceMBeanSupport class"
+msgstr ""
+"JNDIMap MBean interface and implementation based on the ServiceMBean "
+"interface and ServiceMBeanSupport class"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1738
+#, fuzzy, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex2;\n"
+"\n"
+"// The JNDIMap MBean interface\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"public interface JNDIMapMBean extends org.jboss.system.ServiceMBean\n"
+"{\n"
+" public String getJndiName();\n"
+" public void setJndiName(String jndiName) throws NamingException;\n"
+"}"
+msgstr ""
+"package org.jboss.chap2.ex2;\n"
+"\n"
+"// The JNDIMap MBean interface\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"public interface JNDIMapMBean extends org.jboss.system.ServiceMBean\n"
+"{\n"
+" public String getJndiName();\n"
+" public void setJndiName(String jndiName) throws NamingException;\n"
+"}"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1739
+#, fuzzy, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex2;\n"
+"// The JNDIMap MBean implementation\n"
+"import java.util.HashMap;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.Name;\n"
+"import javax.naming.NamingException;\n"
+"import org.jboss.naming.NonSerializableFactory;\n"
+"\n"
+"public class JNDIMap extends org.jboss.system.ServiceMBeanSupport\n"
+" implements JNDIMapMBean\n"
+"{\n"
+" private String jndiName;\n"
+" private HashMap contextMap = new HashMap();\n"
+" \n"
+" public String getJndiName()\n"
+" {\n"
+" return jndiName;\n"
+" }\n"
+"\n"
+" public void setJndiName(String jndiName) \n"
+" throws NamingException\n"
+" {\n"
+" String oldName = this.jndiName;\n"
+" this.jndiName = jndiName;\n"
+" if (super.getState() == STARTED) {\n"
+" unbind(oldName);\n"
+" try {\n"
+" rebind();\n"
+" } catch(Exception e) {\n"
+" NamingException ne = new NamingException(\"Failed to update "
+"jndiName\");\n"
+" ne.setRootCause(e);\n"
+" throw ne;\n"
+" }\n"
+" }\n"
+" }\n"
+" \n"
+" public void startService() throws Exception\n"
+" {\n"
+" rebind();\n"
+" }\n"
+"\n"
+" public void stopService()\n"
+" {\n"
+" unbind(jndiName);\n"
+" }\n"
+" \n"
+" private void rebind() throws NamingException\n"
+" {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" Name fullName = rootCtx.getNameParser(\"\").parse(jndiName);\n"
+" log.info(\"fullName=\"+fullName);\n"
+" NonSerializableFactory.rebind(fullName, contextMap, true);\n"
+" }\n"
+"\n"
+" private void unbind(String jndiName)\n"
+" {\n"
+" try {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" rootCtx.unbind(jndiName);\n"
+" NonSerializableFactory.unbind(jndiName);\n"
+" } catch(NamingException e) {\n"
+" log.error(\"Failed to unbind map\", e);\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+"package org.jboss.chap2.ex2;\n"
+"// The JNDIMap MBean implementation\n"
+"import java.util.HashMap;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.Name;\n"
+"import javax.naming.NamingException;\n"
+"import org.jboss.naming.NonSerializableFactory;\n"
+"\n"
+"public class JNDIMap extends org.jboss.system.ServiceMBeanSupport\n"
+" implements JNDIMapMBean\n"
+"{\n"
+" private String jndiName;\n"
+" private HashMap contextMap = new HashMap();\n"
+" \n"
+" public String getJndiName()\n"
+" {\n"
+" return jndiName;\n"
+" }\n"
+"\n"
+" public void setJndiName(String jndiName) \n"
+" throws NamingException\n"
+" {\n"
+" String oldName = this.jndiName;\n"
+" this.jndiName = jndiName;\n"
+" if (super.getState() == STARTED) {\n"
+" unbind(oldName);\n"
+" try {\n"
+" rebind();\n"
+" } catch(Exception e) {\n"
+" NamingException ne = new NamingException(\"Failed to update "
+"jndiName\");\n"
+" ne.setRootCause(e);\n"
+" throw ne;\n"
+" }\n"
+" }\n"
+" }\n"
+" \n"
+" public void startService() throws Exception\n"
+" {\n"
+" rebind();\n"
+" }\n"
+"\n"
+" public void stopService()\n"
+" {\n"
+" unbind(jndiName);\n"
+" }\n"
+" \n"
+" private void rebind() throws NamingException\n"
+" {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" Name fullName = rootCtx.getNameParser(\"\").parse(jndiName);\n"
+" log.info(\"fullName=\"+fullName);\n"
+" NonSerializableFactory.rebind(fullName, contextMap, true);\n"
+" }\n"
+"\n"
+" private void unbind(String jndiName)\n"
+" {\n"
+" try {\n"
+" InitialContext rootCtx = new InitialContext();\n"
+" rootCtx.unbind(jndiName);\n"
+" NonSerializableFactory.unbind(jndiName);\n"
+" } catch(NamingException e) {\n"
+" log.error(\"Failed to unbind map\", e);\n"
+" }\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1740
+#, fuzzy, no-c-format
+msgid ""
+"The source code for these MBeans along with the service descriptors is "
+"located in the <literal>examples/src/main/org/jboss/book/jmx/{ex1,ex2}</"
+"literal> directories."
+msgstr ""
+"这些MBean的源码以及服务描述符在<literal>examples/src/main/org/jboss/chap2/"
+"{ex1,ex2}</literal>目录下。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1743
+#, no-c-format
+msgid "The jboss-service.xml descriptor for the first version is shown below."
+msgstr "第一个版本的jboss-service.xml描述符如下所示。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1746
+#, fuzzy, no-c-format
+msgid ""
+"<!-- The SAR META-INF/jboss-service.xml descriptor -->\n"
+"<server>\n"
+" <mbean code=\"org.jboss.book.jmx.ex1.JNDIMap\" \n"
+" name=\"j2eechap2.ex1:service=JNDIMap\">\n"
+" <attribute name=\"JndiName\">inmemory/maps/MapTest</"
+"attribute>\n"
+" <depends>jboss:service=Naming</depends>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+"<!-- The SAR META-INF/jboss-service.xml descriptor -->\n"
+"<server>\n"
+" <mbean code=\"org.jboss.chap2.ex1.JNDIMap\" \n"
+" name=\"chap2.ex1:service=JNDIMap\">\n"
+" <attribute name=\"JndiName\">inmemory/maps/MapTest</"
+"attribute>\n"
+" <depends>jboss:service=Naming</depends>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1747
+#, no-c-format
+msgid ""
+"The JNDIMap MBean binds a <literal>HashMap</literal> object under the "
+"<literal>inmemory/maps/MapTest</literal> JNDI name and the client code "
+"fragment demonstrates retrieving the HashMap object from the "
+"<literal>inmemory/maps/MapTest</literal> location. The corresponding client "
+"code is shown below."
+msgstr ""
+"JNDIMap MBean 绑定了<literal>inmemory/maps/MapTest</literal> JNDI 名字下的"
+"<literal>HashMap</literal>对象,客户端代码片段演示了从<literal>inmemory/maps/"
+"MapTest</literal>里取出HashMap对象。相应的客户端代码如下所示。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1750
+#, no-c-format
+msgid ""
+"// Sample lookup code\n"
+"InitialContext ctx = new InitialContext();\n"
+"HashMap map = (HashMap) ctx.lookup(\"inmemory/maps/MapTest\");"
+msgstr ""
+"// Sample lookup code\n"
+"InitialContext ctx = new InitialContext();\n"
+"HashMap map = (HashMap) ctx.lookup(\"inmemory/maps/MapTest\");"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1754
+#, no-c-format
+msgid "XMBean Examples"
+msgstr "XMBean示例"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1755
+#, no-c-format
+msgid ""
+"In this section we will develop a variation of the <literal>JNDIMap</"
+"literal> MBean introduced in the preceding section that exposes its "
+"management metadata using the JBoss XMBean framework. Our core managed "
+"component will be exactly the same core code from the <literal>JNDIMap</"
+"literal> class, but it will not implement any specific management related "
+"interface. We will illustrate the following capabilities not possible with a "
+"standard MBean:"
+msgstr ""
+"在这个部分,我们将开发在前面内容介绍的<literal>JNDIMap</literal> MBean的一个"
+"变种,它用JBoss XMBean框架开放了它的管理元数据。我们的核心管理组件将和"
+"<literal>JNDIMap</literal>类里的核心代码完全一样,但它不会实现任何特定的与管"
+"理相关的接口。下面我们将说明标准MBean不会有的能力:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1760
+#, no-c-format
+msgid "The ability to add rich descriptions to attribute and operations"
+msgstr "把丰富的描述加入到属性和操作里的能力"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1765
+#, no-c-format
+msgid "The ability to expose notification information"
+msgstr "开放通知信息的能力"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1770
+#, no-c-format
+msgid "The ability to add persistence of attributes"
+msgstr "加入属性持久化的能力"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1775
+#, no-c-format
+msgid ""
+"The ability to add custom interceptors for security and remote access "
+"through a typed interface"
+msgstr "通过类型接口(typed interface)为安全性和远程访问加入自定义拦截器的能力"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1781
+#, no-c-format
+msgid "Version 1, The Annotated JNDIMap XMBean"
+msgstr "Version 1, The Annotated JNDIMap XMBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1782
+#, fuzzy, no-c-format
+msgid ""
+"Let's start with a simple XMBean variation of the standard MBean version "
+"of the JNDIMap that adds the descriptive information about the attributes "
+"and operations and their arguments. The following listing shows the "
+"<literal>jboss-service.xml</literal> descriptor and the <literal>jndimap-"
+"xmbean1.xml</literal> XMBean descriptor. The source can be found in the "
+"<literal>src/main/org/jboss/book/jmx/xmbean</literal> directory of the book "
+"examples."
+msgstr ""
+"让我们从一个简单的JNDIMap的标准XMBean版本的变体开始,然后加入属性,操作和参数"
+"的描述信息。下面的列表显示了<literal>jboss-service.xml</literal>描述符和"
+"<literal>jndimap-xmbean1.xml</literal> XMBean描述符。源码可以在本书示例的"
+"<literal>src/main/org/jboss/chap2/xmbean</literal>目录下找到。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1785
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version='1.0' encoding='UTF-8' ?>\n"
+"<!DOCTYPE server PUBLIC \n"
+" \"-//JBoss//DTD MBean Service 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"
+"\">\n"
+"<server>\n"
+" <mbean code=\"org.jboss.book.jmx.xmbean.JNDIMap\"\n"
+" name=\"j2eechap2.xmbean:service=JNDIMap\" \n"
+" xmbean-dd=\"META-INF/jndimap-xmbean.xml\">\n"
+" <attribute name=\"JndiName\">inmemory/maps/MapTest</"
+"attribute>\n"
+" <depends>jboss:service=Naming</depends>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+"<?xml version='1.0' encoding='UTF-8' ?>\n"
+"<!DOCTYPE server PUBLIC \n"
+" \"-//JBoss//DTD MBean Service 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss-service_3_2.dtd"
+"\">\n"
+"<server>\n"
+" <mbean code=\"org.jboss.chap2.xmbean.JNDIMap\"\n"
+" name=\"chap2.xmbean:service=JNDIMap\" \n"
+" xmbean-dd=\"META-INF/jndimap-xmbean.xml\">\n"
+" <attribute name=\"JndiName\">inmemory/maps/MapTest</"
+"attribute>\n"
+" <depends>jboss:service=Naming</depends>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1786
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE mbean PUBLIC\n"
+" \"-//JBoss//DTD JBOSS XMBEAN 1.0//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd\">\n"
+"<mbean>\n"
+" <description>The JNDIMap XMBean Example Version 1</"
+"description>\n"
+" <descriptors>\n"
+" <persistence persistPolicy=\"Never\" persistPeriod=\"10\"\n"
+" persistLocation=\"data/JNDIMap.data\" persistName=\"JNDIMap\"/"
+">\n"
+" <currencyTimeLimit value=\"10\"/>\n"
+" <state-action-on-update value=\"keep-running\"/>\n"
+" </descriptors>\n"
+" <class>org.jboss.test.jmx.xmbean.JNDIMap</class>\n"
+" <constructor>\n"
+" <description>The default constructor</description>\n"
+" <name>JNDIMap</name>\n"
+" </constructor> \n"
+" <!-- Attributes -->\n"
+" <attribute access=\"read-write\" getMethod=\"getJndiName\" setMethod="
+"\"setJndiName\">\n"
+" <description>\n"
+" The location in JNDI where the Map we manage will be bound\n"
+" </description>\n"
+" <name>JndiName</name>\n"
+" <type>java.lang.String</type>\n"
+" <descriptors>\n"
+" <default value=\"inmemory/maps/MapTest\"/>\n"
+" </descriptors>\n"
+" </attribute>\n"
+" <attribute access=\"read-write\" getMethod=\"getInitialValues\"\n"
+" setMethod=\"setInitialValues\">\n"
+" <description>The array of initial values that will be placed "
+"into the\n"
+" map associated with the service. The array is a collection of\n"
+" key,value pairs with elements[0,2,4,...2n] being the keys and\n"
+" elements [1,3,5,...,2n+1] the associated values. The\n"
+" \"[Ljava.lang.String;\" type signature is the VM representation "
+"of the\n"
+" java.lang.String[] type. </description>\n"
+" <name>InitialValues</name>\n"
+" <type>[Ljava.lang.String;</type>\n"
+" <descriptors>\n"
+" <default value=\"key0,value0\"/>\n"
+" </descriptors>\n"
+" </attribute> \n"
+" <!-- Operations -->\n"
+" <operation>\n"
+" <description>The start lifecycle operation</"
+"description>\n"
+" <name>start</name>\n"
+" </operation>\n"
+" <operation>\n"
+" <description>The stop lifecycle operation</description>\n"
+" <name>stop</name>\n"
+" </operation>\n"
+" <operation impact=\"ACTION\">\n"
+" <description>Put a value into the map</description>\n"
+" <name>put</name>\n"
+" <parameter>\n"
+" <description>The key the value will be store under</"
+"description>\n"
+" <name>key</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <parameter>\n"
+" <description>The value to place into the map</"
+"description>\n"
+" <name>value</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" </operation>\n"
+" <operation impact=\"INFO\">\n"
+" <description>Get a value from the map</description>\n"
+" <name>get</name>\n"
+" <parameter>\n"
+" <description>The key to lookup in the map</"
+"description>\n"
+" <name>get</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <return-type>java.lang.Object</return-type>\n"
+" </operation> \n"
+" <!-- Notifications -->\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is get "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.get</"
+"notification-type>\n"
+" </notification>\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is put "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.put</"
+"notification-type>\n"
+" </notification>\n"
+"</mbean>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE mbean PUBLIC\n"
+" \"-//JBoss//DTD JBOSS XMBEAN 1.0//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd\">\n"
+"<mbean>\n"
+" <description>The JNDIMap XMBean Example Version 1</"
+"description>\n"
+" <descriptors>\n"
+" <persistence persistPolicy=\"Never\" persistPeriod=\"10\"\n"
+" persistLocation=\"data/JNDIMap.data\" persistName=\"JNDIMap\"/"
+">\n"
+" <currencyTimeLimit value=\"10\"/>\n"
+" <state-action-on-update value=\"keep-running\"/>\n"
+" </descriptors>\n"
+" <class>org.jboss.test.jmx.xmbean.JNDIMap</class>\n"
+" <constructor>\n"
+" <description>The default constructor</description>\n"
+" <name>JNDIMap</name>\n"
+" </constructor> \n"
+" <!-- Attributes -->\n"
+" <attribute access=\"read-write\" getMethod=\"getJndiName\" setMethod="
+"\"setJndiName\">\n"
+" <description>\n"
+" The location in JNDI where the Map we manage will be bound\n"
+" </description>\n"
+" <name>JndiName</name>\n"
+" <type>java.lang.String</type>\n"
+" <descriptors>\n"
+" <default value=\"inmemory/maps/MapTest\"/>\n"
+" </descriptors>\n"
+" </attribute>\n"
+" <attribute access=\"read-write\" getMethod=\"getInitialValues\"\n"
+" setMethod=\"setInitialValues\">\n"
+" <description>The array of initial values that will be placed "
+"into the\n"
+" map associated with the service. The array is a collection of\n"
+" key,value pairs with elements[0,2,4,...2n] being the keys and\n"
+" elements [1,3,5,...,2n+1] the associated values. The\n"
+" \"[Ljava.lang.String;\" type signature is the VM representation "
+"of the\n"
+" java.lang.String[] type. </description>\n"
+" <name>InitialValues</name>\n"
+" <type>[Ljava.lang.String;</type>\n"
+" <descriptors>\n"
+" <default value=\"key0,value0\"/>\n"
+" </descriptors>\n"
+" </attribute> \n"
+" <!-- Operations -->\n"
+" <operation>\n"
+" <description>The start lifecycle operation</"
+"description>\n"
+" <name>start</name>\n"
+" </operation>\n"
+" <operation>\n"
+" <description>The stop lifecycle operation</description>\n"
+" <name>stop</name>\n"
+" </operation>\n"
+" <operation impact=\"ACTION\">\n"
+" <description>Put a value into the map</description>\n"
+" <name>put</name>\n"
+" <parameter>\n"
+" <description>The key the value will be store under</"
+"description>\n"
+" <name>key</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <parameter>\n"
+" <description>The value to place into the map</"
+"description>\n"
+" <name>value</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" </operation>\n"
+" <operation impact=\"INFO\">\n"
+" <description>Get a value from the map</description>\n"
+" <name>get</name>\n"
+" <parameter>\n"
+" <description>The key to lookup in the map</"
+"description>\n"
+" <name>get</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <return-type>java.lang.Object</return-type>\n"
+" </operation> \n"
+" <!-- Notifications -->\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is get "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.chap2.xmbean.JNDIMap.get</"
+"notification-type>\n"
+" </notification>\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is put "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.chap2.xmbean.JNDIMap.put</"
+"notification-type>\n"
+" </notification>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1787
+#, no-c-format
+msgid "You can build, deploy and test the XMBean as follows:"
+msgstr "你可以象下面这样构建(build),部署和测试这个XMBean:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1790
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=xmbean1 run-example\n"
+"...\n"
+"run-examplexmbean1: \n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object \n"
+" chap2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] name=chap2.xmbean:service=JNDIMap\n"
+" [java] listener=org.jboss.book.jmx.xmbean.TestXMBean1$Listener at f38cf0\n"
+" [java] key=key0, value=value0\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:\n"
+" service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.put]"
+"[message=]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:\n"
+" service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.get]"
+"[message=]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:\n"
+" service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.get]"
+"[message=]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:\n"
+" service=JNDIMap][type=org.jboss.book.jmx.xmbean.JNDIMap.put]"
+"[message=]\n"
+" [java] handleNotification, event: javax.management."
+"AttributeChangeNotification[source\n"
+" =chap2.xmbean:service=JNDIMap][type=jmx.attribute.change]"
+"[message=InitialValues \n"
+" changed from javax.management.Attribute at 82a72a to \n"
+" javax.management.Attribute at acdb96]"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=xmbean2 -Djboss.deploy.conf=rmi-adaptor "
+"run-example\n"
+"...\n"
+"run-examplexmbean2:\n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object cha\n"
+"p2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + java.lang.String getJndiName()\n"
+" [java] + void setJndiName(java.lang.String chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + [Ljava.lang.String; getInitialValues()\n"
+" [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] handleNotification, event: null\n"
+" [java] key=key10, value=value10\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=7,"
+"timeStamp=10986326\n"
+"93716,message=null,userData=null]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=8,"
+"timeStamp=10986326\n"
+"93857,message=null,userData=null]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=9,"
+"timeStamp=10986326\n"
+"93896,message=null,userData=null]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=10,"
+"timeStamp=1098632\n"
+"693925,message=null,userData=null]"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1791
+#, no-c-format
+msgid ""
+"The functionality is largely the same as the Standard MBean with the notable "
+"exception of the JMX notifications. A Standard MBean has no way of declaring "
+"that it will emit notifications. An XMBean may declare the notifications it "
+"emits using notification elements as is shown in the version 1 descriptor. "
+"We see the notifications from the get and put operations on the test client "
+"console output. Note that there is also an <literal>jmx.attribute.change "
+"notification</literal> emitted when the <literal>InitialValues</literal> "
+"attribute was changed. This is because the <literal>ModelMBean</literal> "
+"interface extends the <literal>ModelMBeanNotificationBroadcaster</literal> "
+"which supports <literal>AttributeChangeNotificationListeners</literal>."
+msgstr ""
+"这个功能大部分和有JMX通知的notable exception的标准MBean相同。标准MBean没有办"
+"法来声明它将反射(emit)通知。但XMBean可能用如version 1描述展示的notification元"
+"素来声明这些通知。我们可以从测试客户端的控制台输出里看到这些通知。注意当"
+"<literal>InitialValues</literal>属性被改变时,也有一个<literal>jmx.attribute."
+"change notification</literal>被反射。这是因为<literal>ModelMBean</literal>接"
+"口扩展了支持<literal>AttributeChangeNotificationListeners</literal>的"
+"<literal>ModelMBeanNotificationBroadcaster</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1794
+#, fuzzy, no-c-format
+msgid ""
+"The other major difference between the Standard and XMBean versions of "
+"JNDIMap is the descriptive metadata. Look at the <literal>chap2.xmbean:"
+"service=JNDIMap</literal> in the JMX Console, and you will see the "
+"attributes section as shown in <xref linkend="
+"\"Version_1_The_Annotated_JNDIMap_XMBean-"
+"The_Version_1_JNDIMapXMBean_jmx_console_view\"/>."
+msgstr ""
+"标准的和XMBean版本的JNDIMap之间的主要区别是描述性元数据。看看JMX控制台的"
+"<literal>chap2.xmbean:service=JNDIMap</literal>,你将看到如<xref linkend="
+"\"ch11.v1.fig\"/>所示的属性部分。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1798
+#, no-c-format
+msgid "The Version 1 JNDIMapXMBean jmx-console view"
+msgstr "版本1,JNDIMap XMBean的jmx-console视图"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1805
+#, no-c-format
+msgid ""
+"Notice that the JMX Console now displays the full attribute description as "
+"specified in the XMBean descriptor rather than <literal>MBean Attribute</"
+"literal> text seen in standard MBean implementations. Scroll down to the "
+"operations and you will also see that these now also have nice descriptions "
+"of their function and parameters."
+msgstr ""
+"注意JMX控制台现在显示了在XMBean描述符里指定的完整的属性描述,而不是在标准"
+"MBean实现里看到的<literal>MBean Attribute</literal>文本。拖动卷动条到"
+"opertions部分,你也见将看到对它们的功能和参数的很好的描述。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1811
+#, no-c-format
+msgid "Version 2, Adding Persistence to the JNDIMap XMBean"
+msgstr "版本2,把持久化加入到JNDIMap XMBean"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1812
+#, no-c-format
+msgid ""
+"In version 2 of the XMBean we add support for persistence of the XMBean "
+"attributes. The updated XMBean deployment descriptor is given below."
+msgstr ""
+"在XMBean的版本2里,我们加入了对XMBean属性的持久化的支持。下面是更新的XMBean部"
+"署描述符。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1815
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE mbean PUBLIC\n"
+" \"-//JBoss//DTD JBOSS XMBEAN 1.0//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd\">\n"
+"<mbean>\n"
+" <description>The JNDIMap XMBean Example Version 2</"
+"description>\n"
+" <descriptors>\n"
+" <persistence persistPolicy=\"OnUpdate\" persistPeriod=\"10\"\n"
+" persistLocation=\"${jboss.server.data.dir}\" persistName="
+"\"JNDIMap.ser\"/>\n"
+" <currencyTimeLimit value=\"10\"/>\n"
+" <state-action-on-update value=\"keep-running\"/>\n"
+" <persistence-manager value=\"org.jboss.mx.persistence."
+"ObjectStreamPersistenceManager\"/>\n"
+" </descriptors> <class>org.jboss.test.jmx.xmbean.JNDIMap</"
+"class>\n"
+" <constructor>\n"
+" <description>The default constructor</description>\n"
+" <name>JNDIMap</name>\n"
+" </constructor> \n"
+" <!-- Attributes -->\n"
+" <attribute access=\"read-write\" getMethod=\"getJndiName\" setMethod="
+"\"setJndiName\">\n"
+" <description>\n"
+" The location in JNDI where the Map we manage will be bound\n"
+" </description>\n"
+" <name>JndiName</name>\n"
+" <type>java.lang.String</type>\n"
+" <descriptors>\n"
+" <default value=\"inmemory/maps/MapTest\"/>\n"
+" </descriptors>\n"
+" </attribute>\n"
+" <attribute access=\"read-write\" getMethod=\"getInitialValues\"\n"
+" setMethod=\"setInitialValues\">\n"
+" <description>The array of initial values that will be placed "
+"into the\n"
+" map associated with the service. The array is a collection of\n"
+" key,value pairs with elements[0,2,4,...2n] being the keys and\n"
+" elements [1,3,5,...,2n+1] the associated values</"
+"description>\n"
+" <name>InitialValues</name>\n"
+" <type>[Ljava.lang.String;</type>\n"
+" <descriptors>\n"
+" <default value=\"key0,value0\"/>\n"
+" </descriptors>\n"
+" </attribute> \n"
+" <!-- Operations -->\n"
+" <operation>\n"
+" <description>The start lifecycle operation</"
+"description>\n"
+" <name>start</name>\n"
+" </operation>\n"
+" <operation>\n"
+" <description>The stop lifecycle operation</description>\n"
+" <name>stop</name>\n"
+" </operation>\n"
+" <operation impact=\"ACTION\">\n"
+" <description>Put a value into the nap</description>\n"
+" <name>put</name>\n"
+" <parameter>\n"
+" <description>The key the value will be store under</"
+"description>\n"
+" <name>key</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <parameter>\n"
+" <description>The value to place into the map</"
+"description>\n"
+" <name>value</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" </operation>\n"
+" <operation impact=\"INFO\">\n"
+" <description>Get a value from the map</description>\n"
+" <name>get</name>\n"
+" <parameter>\n"
+" <description>The key to lookup in the map</"
+"description>\n"
+" <name>get</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <return-type>java.lang.Object</return-type>\n"
+" </operation> \n"
+" <!-- Notifications -->\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is get "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.get</"
+"notification-type>\n"
+" </notification>\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is put "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.book.jmx.xmbean.JNDIMap.put</"
+"notification-type>\n"
+" </notification>\n"
+"</mbean>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE mbean PUBLIC\n"
+" \"-//JBoss//DTD JBOSS XMBEAN 1.0//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jboss_xmbean_1_0.dtd\">\n"
+"<mbean>\n"
+" <description>The JNDIMap XMBean Example Version 2</"
+"description>\n"
+" <descriptors>\n"
+" <persistence persistPolicy=\"OnUpdate\" persistPeriod=\"10\"\n"
+" persistLocation=\"${jboss.server.data.dir}\" persistName="
+"\"JNDIMap.ser\"/>\n"
+" <currencyTimeLimit value=\"10\"/>\n"
+" <state-action-on-update value=\"keep-running\"/>\n"
+" <persistence-manager value=\"org.jboss.mx.persistence."
+"ObjectStreamPersistenceManager\"/>\n"
+" </descriptors> <class>org.jboss.test.jmx.xmbean."
+"JNDIMap</class>\n"
+" <constructor>\n"
+" <description>The default constructor</description>\n"
+" <name>JNDIMap</name>\n"
+" </constructor> \n"
+" <!-- Attributes -->\n"
+" <attribute access=\"read-write\" getMethod=\"getJndiName\" setMethod="
+"\"setJndiName\">\n"
+" <description>\n"
+" The location in JNDI where the Map we manage will be bound\n"
+" </description>\n"
+" <name>JndiName</name>\n"
+" <type>java.lang.String</type>\n"
+" <descriptors>\n"
+" <default value=\"inmemory/maps/MapTest\"/>\n"
+" </descriptors>\n"
+" </attribute>\n"
+" <attribute access=\"read-write\" getMethod=\"getInitialValues\"\n"
+" setMethod=\"setInitialValues\">\n"
+" <description>The array of initial values that will be placed "
+"into the\n"
+" map associated with the service. The array is a collection of\n"
+" key,value pairs with elements[0,2,4,...2n] being the keys and\n"
+" elements [1,3,5,...,2n+1] the associated values</"
+"description>\n"
+" <name>InitialValues</name>\n"
+" <type>[Ljava.lang.String;</type>\n"
+" <descriptors>\n"
+" <default value=\"key0,value0\"/>\n"
+" </descriptors>\n"
+" </attribute> \n"
+" <!-- Operations -->\n"
+" <operation>\n"
+" <description>The start lifecycle operation</"
+"description>\n"
+" <name>start</name>\n"
+" </operation>\n"
+" <operation>\n"
+" <description>The stop lifecycle operation</description>\n"
+" <name>stop</name>\n"
+" </operation>\n"
+" <operation impact=\"ACTION\">\n"
+" <description>Put a value into the nap</description>\n"
+" <name>put</name>\n"
+" <parameter>\n"
+" <description>The key the value will be store under</"
+"description>\n"
+" <name>key</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <parameter>\n"
+" <description>The value to place into the map</"
+"description>\n"
+" <name>value</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" </operation>\n"
+" <operation impact=\"INFO\">\n"
+" <description>Get a value from the map</description>\n"
+" <name>get</name>\n"
+" <parameter>\n"
+" <description>The key to lookup in the map</"
+"description>\n"
+" <name>get</name>\n"
+" <type>java.lang.Object</type>\n"
+" </parameter>\n"
+" <return-type>java.lang.Object</return-type>\n"
+" </operation> \n"
+" <!-- Notifications -->\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is get "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.chap2.xmbean.JNDIMap.get</"
+"notification-type>\n"
+" </notification>\n"
+" <notification>\n"
+" <description>The notification sent whenever a value is put "
+"into the map\n"
+" managed by the service</description>\n"
+" <name>javax.management.Notification</name>\n"
+" <notification-type>org.jboss.chap2.xmbean.JNDIMap.put</"
+"notification-type>\n"
+" </notification>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1816
+#, no-c-format
+msgid "Build, deploy and test the version 2 XMBean as follows:"
+msgstr "象下面这样构建,部署和测试XMBean的第二个版本:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1819
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=xmbean2 -Djboss.deploy.conf=default run-"
+"example\n"
+"...\n"
+"run-examplexmbean2:\n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object cha\n"
+"p2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + java.lang.String getJndiName()\n"
+" [java] + void setJndiName(java.lang.String chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + [Ljava.lang.String; getInitialValues()\n"
+" [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] handleNotification, event: null\n"
+" [java] key=key10, value=value10\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=7,"
+"timeStamp=10986326\n"
+"93716,message=null,userData=null]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=8,"
+"timeStamp=10986326\n"
+"93857,message=null,userData=null]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=9,"
+"timeStamp=10986326\n"
+"93896,message=null,userData=null]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=10,"
+"timeStamp=1098632\n"
+"693925,message=null,userData=null]"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=xmbean2 -Djboss.deploy.conf=rmi-adaptor "
+"run-example\n"
+"...\n"
+"run-examplexmbean2:\n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object cha\n"
+"p2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + java.lang.String getJndiName()\n"
+" [java] + void setJndiName(java.lang.String chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + [Ljava.lang.String; getInitialValues()\n"
+" [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] handleNotification, event: null\n"
+" [java] key=key10, value=value10\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=7,"
+"timeStamp=10986326\n"
+"93716,message=null,userData=null]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=8,"
+"timeStamp=10986326\n"
+"93857,message=null,userData=null]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=9,"
+"timeStamp=10986326\n"
+"93896,message=null,userData=null]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=10,"
+"timeStamp=1098632\n"
+"693925,message=null,userData=null]"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1820
+#, no-c-format
+msgid ""
+"There is nothing manifestly different about this version of the XMBean at "
+"this point because we have done nothing to test that changes to attribute "
+"value are actually persisted. Perform this test by running example xmbean2a "
+"several times:"
+msgstr ""
+"在这一点上,这个版本的XMBean还没有什么明显的不同,因为我们还没有测试属性值是"
+"否持久化了。运行几次 example xmbean2a 来进行测试:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1824
+#, fuzzy, no-c-format
+msgid ""
+"[examples] ant -Dchap=jmx -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=2\n"
+" [java] key=key10, value=value10"
+msgstr ""
+"[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=2\n"
+" [java] key=key10, value=value10"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1825
+#, fuzzy, no-c-format
+msgid ""
+"[examples] ant -Dchap=jmx -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=4\n"
+" [java] key=key10, value=value10\n"
+" [java] key=key2, value=value2"
+msgstr ""
+"[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=4\n"
+" [java] key=key10, value=value10\n"
+" [java] key=key2, value=value2"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1828
+#, fuzzy, no-c-format
+msgid ""
+"[examples] ant -Dchap=jmx -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=6\n"
+" [java] key=key10, value=value10\n"
+" [java] key=key2, value=value2\n"
+" [java] key=key3, value=value3"
+msgstr ""
+"[examples] ant -Dchap=chap2 -Dex=xmbean2a run-example\n"
+"...\n"
+" [java] InitialValues.length=6\n"
+" [java] key=key10, value=value10\n"
+" [java] key=key2, value=value2\n"
+" [java] key=key3, value=value3"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1830
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.book.jmx.xmbean.TestXMBeanRestart</literal> used in "
+"this example obtains the current <literal>InitialValues</literal> attribute "
+"setting, and then adds another key/value pair to it. The client code is "
+"shown below."
+msgstr ""
+"这个例子里使用的<literal>org.jboss.chap2.xmbean.TestXMBeanRestart</literal>获"
+"取了当前的<literal>InitialValues</literal>属性设置,然后加入了另外一对key/"
+"value。下面是客户端的代码。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1833
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.xmbean;\n"
+"\n"
+"import javax.management.Attribute;\n"
+"import javax.management.ObjectName;\n"
+"import javax.naming.InitialContext;\n"
+"\n"
+"import org.jboss.jmx.adaptor.rmi.RMIAdaptor;\n"
+"\n"
+"/**\n"
+" * A client that demonstrates the persistence of the xmbean\n"
+" * attributes. Every time it run it looks up the InitialValues\n"
+" * attribute, prints it out and then adds a new key/value to the\n"
+" * list.\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class TestXMBeanRestart\n"
+"{\n"
+" /**\n"
+" * @param args the command line arguments\n"
+" */\n"
+" public static void main(String[] args) throws Exception\n"
+" {\n"
+" InitialContext ic = new InitialContext();\n"
+" RMIAdaptor server = (RMIAdaptor) ic.lookup(\"jmx/rmi/RMIAdaptor\");\n"
+" \n"
+" // Get the InitialValues attribute\n"
+" ObjectName name = new ObjectName(\"j2eechap2.xmbean:service=JNDIMap"
+"\");\n"
+" String[] initialValues = (String[])\n"
+" server.getAttribute(name, \"InitialValues\");\n"
+" System.out.println(\"InitialValues.length=\"+initialValues.length);\n"
+" int length = initialValues.length;\n"
+" for (int n = 0; n < length; n += 2) {\n"
+" String key = initialValues[n];\n"
+" String value = initialValues[n+1];\n"
+" \n"
+" System.out.println(\"key=\"+key+\", value=\"+value);\n"
+" }\n"
+" // Add a new key/value pair\n"
+" String[] newInitialValues = new String[length+2];\n"
+" System.arraycopy(initialValues, 0, newInitialValues,\n"
+" 0, length);\n"
+" newInitialValues[length] = \"key\"+(length/2+1);\n"
+" newInitialValues[length+1] = \"value\"+(length/2+1);\n"
+" \n"
+" Attribute ivalues = new\n"
+" Attribute(\"InitialValues\", newInitialValues);\n"
+" server.setAttribute(name, ivalues);\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1834
+#, no-c-format
+msgid ""
+"At this point you may even shutdown the JBoss server, restart it and then "
+"rerun the initial example to see if the changes are persisted across server "
+"restarts:"
+msgstr ""
+"这时,你甚至可以关掉JBoss服务器,重启,然后回到开始的例子里,看经历服务器重启"
+"后这些变化是否都已经持久化了:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1837
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=jmx -Dex=xmbean2 run-example\n"
+"...\n"
+"\n"
+"run-examplexmbean2:\n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object cha\n"
+"p2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + java.lang.String getJndiName()\n"
+" [java] + void setJndiName(java.lang.String chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + [Ljava.lang.String; getInitialValues()\n"
+" [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] handleNotification, event: null\n"
+" [java] <emphasis role=\"bold\">key=key10, value=value10</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key2, value=value2</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key3, value=value3</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key4, value=value4</emphasis>\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=3,"
+"timeStamp=10986\n"
+"33664712,message=null,userData=null]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.get,sequenceNumber=4,"
+"timeStamp=10986\n"
+"33664821,message=null,userData=null]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.get,sequenceNumber=5,"
+"timeStamp=10986\n"
+"33664860,message=null,userData=null]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=6,"
+"timeStamp=10986\n"
+"33664877,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=7,"
+"timeStamp=10986\n"
+"33664895,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=8,"
+"timeStamp=10986\n"
+"33664899,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.book.jmx.xmbean.JNDIMap.put,sequenceNumber=9,"
+"timeStamp=10986\n"
+"33665614,message=null,userData=null]"
+msgstr ""
+"[examples]$ ant -Dchap=chap2 -Dex=xmbean2 run-example\n"
+"...\n"
+" \n"
+"run-examplexmbean2:\n"
+" [java] JNDIMap Class: org.jboss.mx.modelmbean.XMBean\n"
+" [java] JNDIMap Operations: \n"
+" [java] + void start()\n"
+" [java] + void stop()\n"
+" [java] + void put(java.lang.Object chap2.xmbean:service=JNDIMap,java."
+"lang.Object cha\n"
+"p2.xmbean:service=JNDIMap)\n"
+" [java] + java.lang.Object get(java.lang.Object chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + java.lang.String getJndiName()\n"
+" [java] + void setJndiName(java.lang.String chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] + [Ljava.lang.String; getInitialValues()\n"
+" [java] + void setInitialValues([Ljava.lang.String; chap2.xmbean:"
+"service=JNDIMap)\n"
+" [java] handleNotification, event: null\n"
+" [java] <emphasis role=\"bold\">key=key10, value=value10</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key2, value=value2</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key3, value=value3</emphasis>\n"
+" [java] <emphasis role=\"bold\">key=key4, value=value4</emphasis>\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=3,"
+"timeStamp=10986336\n"
+"64712,message=null,userData=null]\n"
+" [java] JNDIMap.put(key1, value1) successful\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=4,"
+"timeStamp=10986336\n"
+"64821,message=null,userData=null]\n"
+" [java] JNDIMap.get(key0): null\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.get,sequenceNumber=5,"
+"timeStamp=10986336\n"
+"64860,message=null,userData=null]\n"
+" [java] JNDIMap.get(key1): value1\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=6,"
+"timeStamp=10986336\n"
+"64877,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=7,"
+"timeStamp=10986336\n"
+"64895,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=8,"
+"timeStamp=10986336\n"
+"64899,message=null,userData=null]\n"
+" [java] handleNotification, event: javax.management.Notification"
+"[source=chap2.xmbean:s\n"
+"ervice=JNDIMap,type=org.jboss.chap2.xmbean.JNDIMap.put,sequenceNumber=9,"
+"timeStamp=10986336\n"
+"65614,message=null,userData=null]"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1838
+#, no-c-format
+msgid ""
+"You see that the last <literal>InitialValues</literal> attribute setting is "
+"in fact visible."
+msgstr "你看到最后的<literal>InitialValues</literal>属性设置其实是可见的。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1848
+#, no-c-format
+msgid "Deployment Ordering and Dependencies"
+msgstr "部署顺序和依赖性"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1849
+#, no-c-format
+msgid ""
+"We have seen how to manage dependencies using the service descriptor "
+"<literal>depends</literal> and <literal>depends-list</literal> tags. The "
+"deployment ordering supported by the deployment scanners provides a coarse-"
+"grained dependency management in that there is an order to deployments. If "
+"dependencies are consistent with the deployment packages then this is a "
+"simpler mechanism than having to enumerate the explicit MBean-MBean "
+"dependencies. By writing your own filters you can change the coarse grained "
+"ordering performed by the deployment scanner."
+msgstr ""
+"我们已经看到怎样用服务描述符<literal>depends</literal>和<literal>depends-"
+"list</literal>标签管理依赖性。部署扫描器(deployment scanners)支持的部署顺序提"
+"供了粗颗粒度的依赖性管理。如果依赖性和部署包是一致的,它就是一个更简单枚举显"
+"性的MBean-MBean依赖性的机制。通过编写你自己的过滤器,你可以用部署扫描器来改变"
+"粗颗粒度的顺序。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1852
+#, fuzzy, no-c-format
+msgid ""
+"When a component archive is deployed, its nested deployment units are "
+"processed in a depth first ordering. Structuring of components into an "
+"archive hierarchy is yet another way to manage deployment ordering.You will "
+"need to explicitly state your MBean dependencies if your packaging structure "
+"does not happen to resolve the dependencies. Let's consider an example "
+"component deployment that consists of an MBean that uses an EJB. Here is the "
+"structure of the example EAR."
+msgstr ""
+"当部署一个组件档案时,它的嵌套部署单元由深度优先(depth first)顺序来处理。把组"
+"件构造到一个档案层次里是另外一个管理部署顺序的方法。如果包结构没有解析依赖性"
+"的话,你将需要显性地说明你的MBean依赖性。让我们考虑一个组件部署的例子,它由一"
+"个使用EJB的MBean组成。这里是EAR示例的结构。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1855
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">output/jmx/jmx-ex3.ear</emphasis>\n"
+"+- META-INF/MANIFEST.MF\n"
+"+- META-INF/jboss-app.xml\n"
+"+- jmx-ex3.jar (archive) [EJB jar]\n"
+"| +- META-INF/MANIFEST.MF\n"
+"| +- META-INF/ejb-jar.xml\n"
+"| +- org/jboss/book/jmx/ex3/EchoBean.class\n"
+"| +- org/jboss/book/jmx/ex3/EchoLocal.class\n"
+"| +- org/jboss/book/jmx/ex3/EchoLocalHome.class\n"
+"+- jmx-ex3.sar (archive) [MBean sar]\n"
+"| +- META-INF/MANIFEST.MF\n"
+"| +- META-INF/jboss-service.xml\n"
+"| +- org/jboss/book/jmx/ex3/EjbMBeanAdaptor.class\n"
+"+- META-INF/application.xml"
+msgstr ""
+"<emphasis role=\"bold\">output/chap2/chap2-ex3.ear</emphasis>\n"
+"+- META-INF/MANIFEST.MF\n"
+"+- META-INF/jboss-app.xml\n"
+"+- chap2-ex3.jar (archive) [EJB jar]\n"
+"| +- META-INF/MANIFEST.MF\n"
+"| +- META-INF/ejb-jar.xml\n"
+"| +- org/jboss/chap2/ex3/EchoBean.class\n"
+"| +- org/jboss/chap2/ex3/EchoLocal.class\n"
+"| +- org/jboss/chap2/ex3/EchoLocalHome.class\n"
+"+- chap2-ex3.sar (archive) [MBean sar]\n"
+"| +- META-INF/MANIFEST.MF\n"
+"| +- META-INF/jboss-service.xml\n"
+"| +- org/jboss/chap2/ex3/EjbMBeanAdaptor.class\n"
+"+- META-INF/application.xml"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1856
+#, fuzzy, no-c-format
+msgid ""
+"The EAR contains a <literal>jmx-ex3.jar</literal> and <literal>jmx-ex3.sar</"
+"literal>. The <literal>jmx-ex3.jar</literal> is the EJB archive and the "
+"<literal>jmx-ex3.sar</literal> is the MBean service archive. We have "
+"implemented the service as a Dynamic MBean to provide an illustration of "
+"their use."
+msgstr ""
+"这个EAR包含<literal>chap2-ex3.jar</literal> 和 <literal>chap2-ex3.sar</"
+"literal>。<literal>chap2-ex3.jar</literal>是EJB档案,<literal>chap2-ex3.sar</"
+"literal>是MBean服务档案文件。我们已经把这个服务实现为Dynamic MBean,来提供了"
+"它们的使用说明。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1859
+#, no-c-format
+msgid ""
+"package org.jboss.book.jmx.ex3;\n"
+" \n"
+"import java.lang.reflect.Method;\n"
+"import javax.ejb.CreateException;\n"
+"import javax.management.Attribute;\n"
+"import javax.management.AttributeList;\n"
+"import javax.management.AttributeNotFoundException;\n"
+"import javax.management.DynamicMBean;\n"
+"import javax.management.InvalidAttributeValueException;\n"
+"import javax.management.JMRuntimeException;\n"
+"import javax.management.MBeanAttributeInfo;\n"
+"import javax.management.MBeanConstructorInfo;\n"
+"import javax.management.MBeanInfo;\n"
+"import javax.management.MBeanNotificationInfo;\n"
+"import javax.management.MBeanOperationInfo;\n"
+"import javax.management.MBeanException;\n"
+"import javax.management.MBeanServer;\n"
+"import javax.management.ObjectName;\n"
+"import javax.management.ReflectionException;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"import org.jboss.system.ServiceMBeanSupport;\n"
+"\n"
+"/** \n"
+" * An example of a DynamicMBean that exposes select attributes and\n"
+" * operations of an EJB as an MBean.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.1 $\n"
+" */\n"
+"public class EjbMBeanAdaptor extends ServiceMBeanSupport\n"
+" implements DynamicMBean\n"
+"{\n"
+" private String helloPrefix;\n"
+" private String ejbJndiName;\n"
+" private EchoLocalHome home;\n"
+" \n"
+" /** These are the mbean attributes we expose\n"
+" */\n"
+" private MBeanAttributeInfo[] attributes = {\n"
+" new MBeanAttributeInfo(\"HelloPrefix\", \"java.lang.String\",\n"
+" \"The prefix message to append to the session "
+"echo reply\",\n"
+" true, // isReadable\n"
+" true, // isWritable\n"
+" false), // isIs\n"
+" new MBeanAttributeInfo(\"EjbJndiName\", \"java.lang.String\",\n"
+" \"The JNDI name of the session bean local home"
+"\",\n"
+" true, // isReadable\n"
+" true, // isWritable\n"
+" false) // isIs\n"
+" };\n"
+"\n"
+" /** \n"
+" * These are the mbean operations we expose\n"
+" */\n"
+" private MBeanOperationInfo[] operations;\n"
+" \n"
+" /** \n"
+" * We override this method to setup our echo operation info. It\n"
+" * could also be done in a ctor.\n"
+" */\n"
+" public ObjectName preRegister(MBeanServer server,\n"
+" ObjectName name)\n"
+" throws Exception\n"
+" {\n"
+" log.info(\"preRegister notification seen\");\n"
+" \n"
+" operations = new MBeanOperationInfo[5];\n"
+" \n"
+" Class thisClass = getClass();\n"
+" Class[] parameterTypes = {String.class};\n"
+" Method echoMethod =\n"
+" thisClass.getMethod(\"echo\", parameterTypes);\n"
+" String desc = \"The echo op invokes the session bean echo method and"
+"\"\n"
+" + \" returns its value prefixed with the helloPrefix attribute "
+"value\";\n"
+" operations[0] = new MBeanOperationInfo(desc, echoMethod);\n"
+" \n"
+" // Add the Service interface operations from our super class\n"
+" parameterTypes = new Class[0];\n"
+" Method createMethod =\n"
+" thisClass.getMethod(\"create\", parameterTypes);\n"
+" operations[1] = new MBeanOperationInfo(\"The\n"
+" JBoss Service.create\", createMethod);\n"
+" Method startMethod =\n"
+" thisClass.getMethod(\"start\", parameterTypes);\n"
+" operations[2] = new MBeanOperationInfo(\"The\n"
+" JBoss Service.start\", startMethod);\n"
+" Method stopMethod =\n"
+" thisClass.getMethod(\"stop\", parameterTypes);\n"
+" operations[3] = new MBeanOperationInfo(\"The\n"
+" JBoss Service.stop\", startMethod);\n"
+" Method destroyMethod =\n"
+" thisClass.getMethod(\"destroy\", parameterTypes);\n"
+" operations[4] = new MBeanOperationInfo(\"The\n"
+" JBoss Service.destroy\", startMethod);\n"
+" return name;\n"
+" }\n"
+" \n"
+" \n"
+" // --- Begin ServiceMBeanSupport overides\n"
+" protected void createService() throws Exception\n"
+" {\n"
+" log.info(\"Notified of create state\");\n"
+" }\n"
+"\n"
+" protected void startService() throws Exception\n"
+" {\n"
+" log.info(\"Notified of start state\");\n"
+" InitialContext ctx = new InitialContext();\n"
+" home = (EchoLocalHome) ctx.lookup(ejbJndiName);\n"
+" }\n"
+"\n"
+" protected void stopService()\n"
+" {\n"
+" log.info(\"Notified of stop state\");\n"
+" }\n"
+"\n"
+" // --- End ServiceMBeanSupport overides\n"
+" \n"
+" public String getHelloPrefix()\n"
+" {\n"
+" return helloPrefix;\n"
+" }\n"
+" public void setHelloPrefix(String helloPrefix)\n"
+" {\n"
+" this.helloPrefix = helloPrefix;\n"
+" }\n"
+" \n"
+" public String getEjbJndiName()\n"
+" {\n"
+" return ejbJndiName;\n"
+" }\n"
+" public void setEjbJndiName(String ejbJndiName)\n"
+" {\n"
+" this.ejbJndiName = ejbJndiName;\n"
+" }\n"
+" \n"
+" public String echo(String arg)\n"
+" throws CreateException, NamingException\n"
+" {\n"
+" log.debug(\"Lookup EchoLocalHome@\"+ejbJndiName);\n"
+" EchoLocal bean = home.create();\n"
+" String echo = helloPrefix + bean.echo(arg);\n"
+" return echo;\n"
+" }\n"
+" \n"
+" // --- Begin DynamicMBean interface methods\n"
+" /** \n"
+" * Returns the management interface that describes this dynamic\n"
+" * resource. It is the responsibility of the implementation to\n"
+" * make sure the description is accurate.\n"
+" *\n"
+" * @return the management interface descriptor.\n"
+" */\n"
+" public MBeanInfo getMBeanInfo()\n"
+" {\n"
+" String classname = getClass().getName();\n"
+" String description = \"This is an MBean that uses a session bean in "
+"the\"\n"
+" + \" implementation of its echo operation.\";\n"
+" MBeanInfo[] constructors = null;\n"
+" MBeanNotificationInfo[] notifications = null;\n"
+" MBeanInfo mbeanInfo = new MBeanInfo(classname,\n"
+" description, attributes,\n"
+" constructors, operations,\n"
+" notifications);\n"
+" // Log when this is called so we know when in the\n"
+" lifecycle this is used\n"
+" Throwable trace = new Throwable(\"getMBeanInfo trace\");\n"
+" log.info(\"Don't panic, just a stack\n"
+" trace\", trace);\n"
+" return mbeanInfo;\n"
+" }\n"
+" \n"
+" /** \n"
+" * Returns the value of the attribute with the name matching the\n"
+" * passed string.\n"
+" *\n"
+" * @param attribute the name of the attribute.\n"
+" * @return the value of the attribute.\n"
+" * @exception AttributeNotFoundException when there is no such\n"
+" * attribute.\n"
+" * @exception MBeanException wraps any error thrown by the\n"
+" * resource when\n"
+" * getting the attribute.\n"
+" * @exception ReflectionException wraps any error invoking the\n"
+" * resource.\n"
+" */\n"
+" public Object getAttribute(String attribute)\n"
+" throws AttributeNotFoundException, \n"
+" MBeanException, \n"
+" ReflectionException\n"
+" {\n"
+" Object value = null;\n"
+" if (attribute.equals(\"HelloPrefix\")) {\n"
+" value = getHelloPrefix();\n"
+" } else if(attribute.equals(\"EjbJndiName\")) {\n"
+" value = getEjbJndiName();\n"
+" } else {\n"
+" throw new AttributeNotFoundException(\"Unknown\n"
+" attribute(\"+attribute+\") requested\");\n"
+" }\n"
+" return value;\n"
+" }\n"
+" \n"
+" /** \n"
+" * Returns the values of the attributes with names matching the\n"
+" * passed string array.\n"
+" *\n"
+" * @param attributes the names of the attribute.\n"
+" * @return an {@link AttributeList AttributeList} of name\n"
+" * and value pairs.\n"
+" */\n"
+" public AttributeList getAttributes(String[] attributes)\n"
+" {\n"
+" AttributeList values = new AttributeList();\n"
+" for (int a = 0; a < attributes.length; a++) {\n"
+" String name = attributes[a];\n"
+" try {\n"
+" Object value = getAttribute(name);\n"
+" Attribute attr = new Attribute(name, value);\n"
+" values.add(attr);\n"
+" } catch(Exception e) {\n"
+" log.error(\"Failed to find attribute: \"+name, e);\n"
+" }\n"
+" }\n"
+" return values;\n"
+" }\n"
+" \n"
+" /**\n"
+" * Sets the value of an attribute. The attribute and new value\n"
+" * are passed in the name value pair {@link Attribute\n"
+" * Attribute}.\n"
+" *\n"
+" * @see javax.management.Attribute\n"
+" *\n"
+" * @param attribute the name and new value of the attribute.\n"
+" * @exception AttributeNotFoundException when there is no such\n"
+" * attribute.\n"
+" * @exception InvalidAttributeValueException when the new value\n"
+" * cannot be converted to the type of the attribute.\n"
+" * @exception MBeanException wraps any error thrown by the\n"
+" * resource when setting the new value.\n"
+" * @exception ReflectionException wraps any error invoking the\n"
+" * resource.\n"
+" */\n"
+" public void setAttribute(Attribute attribute)\n"
+" throws AttributeNotFoundException, \n"
+" InvalidAttributeValueException,\n"
+" MBeanException, \n"
+" ReflectionException\n"
+" {\n"
+" String name = attribute.getName();\n"
+" if (name.equals(\"HelloPrefix\")) { \n"
+" String value = attribute.getValue().toString();\n"
+" setHelloPrefix(value);\n"
+" } else if(name.equals(\"EjbJndiName\")) {\n"
+" String value = attribute.getValue().toString();\n"
+" setEjbJndiName(value);\n"
+" } else {\n"
+" throw new AttributeNotFoundException(\"Unknown attribute(\"+name+"
+"\") requested\");\n"
+" }\n"
+" }\n"
+" \n"
+" /**\n"
+" * Sets the values of the attributes passed as an\n"
+" * {@link AttributeList AttributeList} of name and new\n"
+" * value pairs.\n"
+" *\n"
+" * @param attributes the name an new value pairs.\n"
+" * @return an {@link AttributeList AttributeList} of name and\n"
+" * value pairs that were actually set.\n"
+" */\n"
+" public AttributeList setAttributes(AttributeList attributes)\n"
+" {\n"
+" AttributeList setAttributes = new AttributeList();\n"
+" for(int a = 0; a < attributes.size(); a++) {\n"
+" Attribute attr = (Attribute) attributes.get(a);\n"
+" try {\n"
+" setAttribute(attr);\n"
+" setAttributes.add(attr);\n"
+" } catch(Exception ignore) {\n"
+" }\n"
+" }\n"
+" return setAttributes;\n"
+" }\n"
+" \n"
+" /**\n"
+" * Invokes a resource operation.\n"
+" *\n"
+" * @param actionName the name of the operation to perform.\n"
+" * @param params the parameters to pass to the operation.\n"
+" * @param signature the signartures of the parameters.\n"
+" * @return the result of the operation.\n"
+" * @exception MBeanException wraps any error thrown by the\n"
+" * resource when performing the operation.\n"
+" * @exception ReflectionException wraps any error invoking the\n"
+" * resource.\n"
+" */\n"
+" public Object invoke(String actionName, Object[] params,\n"
+" String[] signature)\n"
+" throws MBeanException,\n"
+" ReflectionException\n"
+" {\n"
+" Object rtnValue = null;\n"
+" log.debug(\"Begin invoke, actionName=\"+actionName);\n"
+" try {\n"
+" if (actionName.equals(\"echo\")) {\n"
+" String arg = (String) params[0];\n"
+" rtnValue = echo(arg);\n"
+" log.debug(\"Result: \"+rtnValue);\n"
+" } else if (actionName.equals(\"create\")) {\n"
+" super.create();\n"
+" } else if (actionName.equals(\"start\")) {\n"
+" super.start();\n"
+" } else if (actionName.equals(\"stop\")) {\n"
+" super.stop();\n"
+" } else if (actionName.equals(\"destroy\")) {\n"
+" super.destroy();\n"
+" } else {\n"
+" throw new JMRuntimeException(\"Invalid state,\n"
+" don't know about op=\"+actionName);\n"
+" }\n"
+" } catch(Exception e) {\n"
+" throw new ReflectionException(e, \"echo failed\");\n"
+" }\n"
+"\n"
+"\n"
+" log.debug(\"End invoke, actionName=\"+actionName);\n"
+" return rtnValue;\n"
+" }\n"
+" \n"
+" // --- End DynamicMBean interface methods\n"
+" \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1860
+#, no-c-format
+msgid ""
+"Believe it or not, this is a very trivial MBean. The vast majority of the "
+"code is there to provide the MBean metadata and handle the callbacks from "
+"the MBean Server. This is required because a Dynamic MBean is free to expose "
+"whatever management interface it wants. A Dynamic MBean can in fact change "
+"its management interface at runtime simply by returning different metadata "
+"from the <literal>getMBeanInfo</literal> method. Of course, some clients may "
+"not be happy with such a dynamic object, but the MBean Server will do "
+"nothing to prevent a Dynamic MBean from changing its interface."
+msgstr ""
+"不管你信不信,这是一个无足轻重的MBean。代码的主体是提供MBean元数据和处理MBean"
+"服务器的回滚(callbacks)。这是必需的,因为Dynamic MBean可以自由开放任何管理接"
+"口。其实,简单地从<literal>getMBeanInfo</literal>方法里返回不同的元数据,"
+"Dynamic MBean就能够在运行时改变它的管理接口。当然,某些客户可能不喜欢这样的动"
+"态对象,但是MBean服务器不会做任何事情来阻止Dynamic MBean改变它的接口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1863
+#, no-c-format
+msgid ""
+"There are two points to this example. First, demonstrate how an MBean can "
+"depend on an EJB for some of its functionality and second, how to create "
+"MBeans with dynamic management interfaces. If we were to write a standard "
+"MBean with a static interface for this example it would look like the "
+"following."
+msgstr ""
+"这个例子里有两点值得注意。首先,演示了MBean为了它的功能怎样依赖于EJB;其次,"
+"怎样用动态管理接口创建MBean。如果我们准备用静态的接口为这个例子编写一个标准的"
+"MBean,那将象下面这样。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1866
+#, no-c-format
+msgid ""
+"public interface EjbMBeanAdaptorMBean\n"
+"{\n"
+" public String getHelloPrefix();\n"
+" public void setHelloPrefix(String prefix);\n"
+" public String getEjbJndiName();\n"
+" public void setEjbJndiName(String jndiName);\n"
+" public String echo(String arg) throws CreateException, NamingException;\n"
+" public void create() throws Exception;\n"
+" public void start() throws Exception;\n"
+" public void stop();\n"
+" public void destroy();\n"
+"}"
+msgstr ""
+"public interface EjbMBeanAdaptorMBean\n"
+"{\n"
+" public String getHelloPrefix();\n"
+" public void setHelloPrefix(String prefix);\n"
+" public String getEjbJndiName();\n"
+" public void setEjbJndiName(String jndiName);\n"
+" public String echo(String arg) throws CreateException, NamingException;\n"
+" public void create() throws Exception;\n"
+" public void start() throws Exception;\n"
+" public void stop();\n"
+" public void destroy();\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1867
+#, fuzzy, no-c-format
+msgid ""
+"Moving to lines 67-83, this is where the MBean operation metadata is "
+"constructed. The <literal>echo(String)</literal>, <literal>create()</"
+"literal>, <literal>start()</literal>, <literal>stop()</literal> and "
+"<literal>destroy()</literal> operations are defined by obtaining the "
+"corresponding java.lang.reflect.Method object and adding a description. "
+"Let's go through the code and discuss where this interface "
+"implementation exists and how the MBean uses the EJB. Beginning with lines "
+"40-51, the two <literal>MBeanAttributeInfo</literal> instances created "
+"define the attributes of the MBean. These attributes correspond to the "
+"<literal>getHelloPrefix</literal>/<literal>setHelloPrefix</literal> and "
+"<literal>getEjbJndiName</literal>/<literal>setEjbJndiName</literal> of the "
+"static interface. One thing to note in terms of why one might want to use a "
+"Dynamic MBean is that you have the ability to associate descriptive text "
+"with the attribute metadata. This is not something you can do with a static "
+"interface."
+msgstr ""
+"回到67—83行,这里是MBean操作元数据构造的地方。<literal>echo(String)</"
+"literal>, <literal>create()</literal>,<literal>start()</literal>,"
+"<literal>stop()</literal> 和<literal>destroy()</literal>操作通过获取相应的"
+"java.lang.reflect.Method对象和加入描述来定义。让我们遍历这段代码,讨论这个接"
+"口实现在什么地方,而且MBean怎么使用EJB。从40-51行开始,创建的两个"
+"<literal>MBeanAttributeInfo</literal>实例定义了MBean的属性。这些属性对应静态"
+"接口的<literal>getHelloPrefix</literal>/<literal>setHelloPrefix</literal> 和 "
+"<literal>getEjbJndiName</literal>/<literal>setEjbJndiName</literal>。这里我们"
+"可以看到为什么有人愿意使用Dynamic MBean:因为你可以把属性元数据和描述性文本关"
+"联起来。如果使用静态接口,你就做不到这点。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1870
+#, no-c-format
+msgid ""
+"Lines 88-103 correspond to the JBoss service life cycle callbacks. Since we "
+"are subclassing the <literal>ServiceMBeanSupport</literal> utility class, we "
+"override the <literal>createService</literal>, <literal>startService</"
+"literal>, and <literal>stopService</literal> template callbacks rather than "
+"the <literal>create</literal>, <literal>start</literal>, and <literal>stop</"
+"literal> methods of the service interface. Note that we cannot attempt to "
+"lookup the <literal>EchoLocalHome</literal> interface of the EJB we make use "
+"of until the <literal>startService</literal> method. Any attempt to access "
+"the home interface in an earlier life cycle method would result in the name "
+"not being found in JNDI because the EJB container had not gotten to the "
+"point of binding the home interfaces. Because of this dependency we will "
+"need to specify that the MBean service depends on the EchoLocal EJB "
+"container to ensure that the service is not started before the EJB container "
+"is started. We will see this dependency specification when we look at the "
+"service descriptor."
+msgstr ""
+"88—103 行对应 JBoss 服务生命周期回滚(callback)。既然我们在子类化 "
+"<literal>ServiceMBeanSupport</literal> 类,我们覆盖(override) "
+"<literal>createService</literal>,<literal>startService</literal> 和 "
+"<literal>stopService</literal> 模板回滚,而不是服务接口的方法"
+"<literal>create</literal>,<literal>start</literal> 和 <literal>stop</"
+"literal>。注意在调用 <literal>startService</literal> 方法前,我们不能够试图去"
+"查找 EJB 的 <literal>EchoLocalHome</literal> 接口。任何在早期声明周期方法里试"
+"图访问主接口的做法,都会导致名字在 JNDI 找不到,这是因为此时 EJB 容器还没有绑"
+"定主接口。因为这个依赖性,我们将需要指定 MBean 服务依赖于 EchoLocal EJB,这样"
+"可以确保在 EJB 容器启动之前,这个服务不被启动。当我们查看服务描述符的时候,我"
+"们将看到这个依赖性规格。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1873
+#, no-c-format
+msgid ""
+"Lines 105-121 are the <literal>HelloPrefix</literal> and "
+"<literal>EjbJndiName</literal> attribute accessors implementations. These "
+"are invoked in response to <literal>getAttribute</literal>/"
+"<literal>setAttribute</literal> invocations made through the MBean Server."
+msgstr ""
+"105—121 行是 <literal>HelloPrefix</literal> 和<literal>EjbJndiName</literal> "
+"属性访问的实现。通过 MBean 服务器调用 <literal>getAttribute</literal>/"
+"<literal>setAttribute</literal> 时它们被调用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1876
+#, no-c-format
+msgid ""
+"Lines 123-130 correspond to the <literal>echo(String)</literal> operation "
+"implementation. This method invokes the <literal>EchoLocal.echo(String)</"
+"literal> EJB method. The local bean interface is created using the "
+"<literal>EchoLocalHome</literal> that was obtained in the "
+"<literal>startService</literal> method."
+msgstr ""
+"123-130 行是 <literal>echo(String)</literal> 操作的实现。这个方法调用 "
+"<literal>EchoLocal.echo(String)</literal> EJB 方法。用在 "
+"<literal>startService</literal> 方法里获得的<literal>EchoLocalHome</literal> "
+"来创建本地 bean 接口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1879
+#, no-c-format
+msgid ""
+"The remainder of the class makes up the Dynamic MBean interface "
+"implementation. Lines 133-152 correspond to the MBean metadata accessor "
+"callback. This method returns a description of the MBean management "
+"interface in the form of the <literal>javax.management.MBeanInfo</literal> "
+"object. This is made up of a <literal>description</literal>, the "
+"<literal>MBeanAttributeInfo</literal> and <literal>MBeanOperationInfo</"
+"literal> metadata created earlier, as well as constructor and notification "
+"information. This MBean does not need any special constructors or "
+"notifications so this information is null."
+msgstr ""
+"这个类的剩余部分组成了 Dynamic MBean 接口实现。133-152 行是 MBean 元数据的访"
+"问器(accessor)回滚。这个方法返回 MBean 管理接口的描述,这是一个 "
+"<literal>javax.management.MBeanInfo</literal> 对象。它由之前创建的 "
+"<literal>description</literal>,<literal>MBeanAttributeInfo</literal> 和 "
+"<literal>MBeanOperationInfo</literal> 元数据组成,它还包括构造函数和通知信息"
+"(notification information)。因为这个 MBean 不需要任何特殊的构造函数或者通知,"
+"所以这个信息是空的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1882
+#, no-c-format
+msgid ""
+"Lines 154-258 handle the attribute access requests. This is rather tedious "
+"and error prone code so a toolkit or infrastructure that helps generate "
+"these methods should be used. A Model MBean framework based on XML called "
+"XBeans is currently being investigated in JBoss. Other than this, no other "
+"Dynamic MBean frameworks currently exist."
+msgstr ""
+"154-258 行处理属性访问请求。这样的代码枯燥而又容易出错,所以最好使用相关工具"
+"来生成这些方法。我们正在 JBoss 里研究一个叫 XBeans 的基于 XML 的 Model MBean "
+"框架。除此以外,还没有其他的 Dynamic MBean 框架存在。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1885
+#, no-c-format
+msgid ""
+"Lines 260-310 correspond to the operation invocation dispatch entry point. "
+"Here the request operation action name is checked against those the MBean "
+"handles and the appropriate method is invoked."
+msgstr ""
+"260-310 行对应的是操作调用的分发入口。在这里依据 MBean 所处理的名字来检查请求"
+"操作的 action name,并调用合适的方法。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1888
+#, no-c-format
+msgid ""
+"The <literal>jboss-service.xml</literal> descriptor for the MBean is given "
+"below. The dependency on the EJB container MBean is highlighted in bold. The "
+"format of the EJB container MBean ObjectName is: <literal>\"jboss.j2ee:"
+"service=EJB,jndiName=\" + <home-jndi-name></literal> where the <"
+"home-jndi-name> is the EJB home interface JNDI name."
+msgstr ""
+"下面是 MBean 的 <literal>jboss-service.xml</literal> 描述符。用黑体突出显示"
+"了 EJB 容器 MBean 的依赖性。EJB 容器 MBean ObjectName 的格式是:<literal>"
+"\"jboss.j2ee:service=EJB,jndiName=\" + <home-jndi-name></literal>,在这"
+"里 <home-jndi-name> 是 EJB 主接口的 JNDI 名。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1891
+#, fuzzy, no-c-format
+msgid ""
+"<server>\n"
+" <mbean code=\"org.jboss.book.jmx.ex3.EjbMBeanAdaptor\"\n"
+" name=\"jboss.book:service=EjbMBeanAdaptor\">\n"
+" <attribute name=\"HelloPrefix\">AdaptorPrefix</"
+"attribute>\n"
+" <attribute name=\"EjbJndiName\">local/j2ee_chap2.EchoBean</"
+"attribute>\n"
+" <depends>jboss.j2ee:service=EJB,jndiName=local/j2ee_chap2."
+"EchoBean</depends>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+"<server>\n"
+" <mbean code=\"org.jboss.chap2.ex3.EjbMBeanAdaptor\"\n"
+" name=\"jboss.book:service=EjbMBeanAdaptor\">\n"
+" <attribute name=\"HelloPrefix\">AdaptorPrefix</"
+"attribute>\n"
+" <attribute name=\"EjbJndiName\">local/chap2.EchoBean</"
+"attribute>\n"
+" <depends>jboss.j2ee:service=EJB,jndiName=local/chap2."
+"EchoBean</depends>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1892
+#, no-c-format
+msgid "Deploy the example ear by running:"
+msgstr "用下面的命令部署示例 ear:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1895
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=jmx -Dex=3 run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1896
+#, no-c-format
+msgid "On the server console there will be messages similar to the following:"
+msgstr "在服务器控制台,将有类似于下面的信息:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1899
+#, no-c-format
+msgid ""
+"14:57:12,906 INFO [EARDeployer] Init J2EE application: file:/private/tmp/"
+"jboss-eap-4.3/jboss-as/server/\n"
+" production/deploy/j2ee_chap2-ex3.ear\n"
+"14:57:13,044 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"...\n"
+"14:57:13,088 INFO [EjbMBeanAdaptor] preRegister notification seen\n"
+"14:57:13,093 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"...\n"
+"14:57:13,117 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"... \n"
+"14:57:13,140 WARN [EjbMBeanAdaptor] Unexcepted error accessing MBeanInfo "
+"for null\n"
+"java.lang.NullPointerException\n"
+" at org.jboss.system.ServiceMBeanSupport.postRegister(ServiceMBeanSupport."
+"java:418)\n"
+"...\n"
+"14:57:13,203 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"... \n"
+"14:57:13,232 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"...\n"
+"14:57:13,420 INFO [EjbModule] Deploying Chap2EchoInfoBean\n"
+"14:57:13,443 INFO [EjbModule] Deploying chap2.EchoBean\n"
+"14:57:13,488 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"...\n"
+"14:57:13,542 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"...\n"
+"14:57:13,558 INFO [EjbMBeanAdaptor] Begin invoke, actionName=create\n"
+"14:57:13,560 INFO [EjbMBeanAdaptor] Notified of create state\n"
+"14:57:13,562 INFO [EjbMBeanAdaptor] End invoke, actionName=create\n"
+"14:57:13,604 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"... \n"
+"14:57:13,621 INFO [EjbMBeanAdaptor] Don't panic, just a stack trace\n"
+"java.lang.Throwable: getMBeanInfo trace\n"
+" at org.jboss.book.jmx.ex3.EjbMBeanAdaptor.getMBeanInfo(EjbMBeanAdaptor."
+"java:153)\n"
+"14:57:13,641 INFO [EjbMBeanAdaptor] Begin invoke, actionName=getState\n"
+"14:57:13,942 INFO [EjbMBeanAdaptor] Begin invoke, actionName=start\n"
+"14:57:13,944 INFO [EjbMBeanAdaptor] Notified of start state\n"
+"14:57:13,951 INFO [EjbMBeanAdaptor] Testing Echo\n"
+"14:57:13,983 INFO [EchoBean] echo, info=echo info, arg=, arg=startService\n"
+"14:57:13,986 INFO [EjbMBeanAdaptor] echo(startService) = startService\n"
+"14:57:13,988 INFO [EjbMBeanAdaptor] End invoke, actionName=start\n"
+"14:57:13,991 INFO [EJBDeployer] Deployed: file:/tmp/jboss-eap-4.3/jboss-as/"
+"server/production/tmp/deploy\n"
+"/tmp60550jmx-ex3.ear-contents/jmx-ex3.jar \n"
+"14:57:14,075 INFO [EARDeployer] Started J2EE application: ..."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1900
+#, fuzzy, no-c-format
+msgid ""
+"The stack traces are not exceptions. They are traces coming from the "
+"<literal>EjbMBeanAdaptor</literal> code to demonstrate that clients ask for "
+"the MBean interface when they want to discover the MBean's capabilities. "
+"Notice that the EJB container (lines with [EjbModule]) is started before the "
+"example MBean (lines with [EjbMBeanAdaptor])."
+msgstr ""
+"这里的堆栈跟踪信息不是异常(exceptions)。它们来自 <literal>EjbMBeanAdaptor</"
+"literal> 代码的第 150 行,演示了当客户端想探索 MBean 的能力时请求 MBean 接"
+"口。注意 MBean 容器(有 [EjbModule] 的行)是在 example MBean (有 "
+"[EjbMBeanAdaptor] 的行)之前启动的。 "
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1903
+#, fuzzy, no-c-format
+msgid ""
+"Now, let's invoke the echo method using the JMX console web application. "
+"Go to the JMX Console (<ulink url=\"http://localhost:8080/jmx-console\"></"
+"ulink>) and find the <emphasis>service=EjbMBeanAdaptor</emphasis> in the "
+"<emphasis>jboss.book</emphasis> domain. Click on the link and scroll down to "
+"the <emphasis>echo</emphasis> operation section. The view should be like "
+"that shown in <xref linkend=\"Deployment_Ordering_and_Dependencies-"
+"The_EjbMBeanAdaptor_MBean_operations_JMX_console_view\"/>."
+msgstr ""
+"现在,让我们用 JMX 控制台 web 程序来调用 echo 方法。来到 JMX 控制台(<ulink "
+"url=\"http://localhost:8080/jmx-console\"></ulink>)并找到 <emphasis>jboss."
+"book</emphasis> 域里的 <emphasis>service=EjbMBeanAdaptor</emphasis>。点击这个"
+"链接并往下滚动到 <emphasis>echo</emphasis> 操作部分。你应该看到如 <xref "
+"linkend=\"ch2.ejbadaptor.fig\"/> 所示的视图。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1907
+#, no-c-format
+msgid "The EjbMBeanAdaptor MBean operations JMX console view"
+msgstr "The EjbMBeanAdaptor MBean operations JMX console view"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1914
+#, no-c-format
+msgid ""
+"As shown, we have already entered an argument string of <literal>-echo-arg</"
+"literal> into the ParamValue text field. Press the Invoke button and a "
+"result string of <literal>AdaptorPrefix-echo-arg</literal> is displayed on "
+"the results page. The server console will show several stack traces from the "
+"various metadata queries issues by the JMX console and the MBean invoke "
+"method debugging lines:"
+msgstr ""
+"如图所示,我们已经把参数串 <literal>-echo-arg</literal> 输入到了 ParamValue "
+"文本域。按 Invoke 按钮就可以看到 <literal>AdaptorPrefix-echo-arg</literal> 显"
+"示在结果页上。服务器控制台将显示几个不同元数据查询的堆栈跟踪信息,以及 MBean "
+"调用方法的调试信息行:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:1917
+#, fuzzy, no-c-format
+msgid ""
+"10:51:48,671 INFO [EjbMBeanAdaptor] Begin invoke, actionName=echo\n"
+"10:51:48,671 INFO [EjbMBeanAdaptor] Lookup EchoLocalHome at local/j2ee_chap2."
+"EchoBean\n"
+"10:51:48,687 INFO [EchoBean] echo, info=echo info, arg=, arg=-echo-arg\n"
+"10:51:48,687 INFO [EjbMBeanAdaptor] Result: AdaptorPrefix-echo-arg\n"
+"10:51:48,687 INFO [EjbMBeanAdaptor] End invoke, actionName=echo"
+msgstr ""
+"10:51:48,671 INFO [EjbMBeanAdaptor] Begin invoke, actionName=echo\n"
+"10:51:48,671 INFO [EjbMBeanAdaptor] Lookup EchoLocalHome at local/chap2."
+"EchoBean\n"
+"10:51:48,687 INFO [EchoBean] echo, info=echo info, arg=, arg=-echo-arg\n"
+"10:51:48,687 INFO [EjbMBeanAdaptor] Result: AdaptorPrefix-echo-arg\n"
+"10:51:48,687 INFO [EjbMBeanAdaptor] End invoke, actionName=echo"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1923
+#, no-c-format
+msgid "JBoss Deployer Architecture"
+msgstr "JBoss 部署者架构"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1924
+#, no-c-format
+msgid ""
+"JBoss has an extensible deployment architecture that allows one to "
+"incorporate components into the bare JBoss JMX microkernel. The "
+"<literal>MainDeployer</literal> is the deployment entry point. Requests to "
+"deploy a component are sent to the <literal>MainDeployer</literal> and it "
+"determines if there is a subdeployer capable of handling the deployment, and "
+"if there is, it delegates the deployment to the subdeployer. We saw an "
+"example of this when we looked at how the <literal>MainDeployer</literal> "
+"used the <literal>SARDeployer</literal> to deploy MBean services. Among the "
+"deployers provided with JBoss are:"
+msgstr ""
+"JBoss 有一个可扩展的部署架构,它允许你把组件并入 JBoss JMX 微内核里。"
+"<literal>MainDeployer</literal> 是部署的入口。部署组件的请求被发送到 "
+"<literal>MainDeployer</literal>,它决定是否有能够处理这个部署的子部署者"
+"(subdeployer),如果有,它就把这个部署委托给子部署者。在我们学习 "
+"<literal>MainDeployer</literal> 怎样用 <literal>SARDeployer</literal> 来部署 "
+"MBean 服务的时候,我们已经看到了这样的例子。JBoss 里提供的部署者是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1929
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AbstractWebDeployer</emphasis>: This subdeployer "
+"handles web application archives (WARs). It accepts deployment archives and "
+"directories whose name ends with a <literal>war</literal> suffix. WARs must "
+"have a <literal>WEB-INF/web.xml</literal> descriptor and may have a "
+"<literal>WEB-INF/jboss-web.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">AbstractWebDeployer</emphasis>:这个部署者处理 web 程"
+"序档案(WARs)。它接受名字以 <literal>war</literal> 后者结尾的部署档案和目录。"
+"WARs 必须有一个 <literal>WEB-INF/web.xml</literal> 描述符,它也可能有一个 "
+"<literal>WEB-INF/jboss-web.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1934
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EARDeployer</emphasis>: This subdeployer handles "
+"enterprise application archives (EARs). It accepts deployment archives and "
+"directories whose name ends with an <literal>ear</literal> suffix. EARs must "
+"have a <literal>META-INF/application.xml</literal> descriptor and may have a "
+"<literal>META-INF/jboss-app.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">EARDeployer</emphasis>:这个子部署者处理企业级应用程"
+"序档案(EARs)。它接受以 <literal>ear</literal> 后缀结尾的部署档案文件和目录。"
+"EARs 必须有一个 <literal>META-INF/application.xml</literal> 描述符,它也可能"
+"有一个 <literal>META-INF/jboss-app.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1939
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EJBDeployer</emphasis>: This subdeployer handles "
+"enterprise bean jars. It accepts deployment archives and directories whose "
+"name ends with a <literal>jar</literal> suffix. EJB jars must have a "
+"<literal>META-INF/ejb-jar.xml</literal> descriptor and may have a "
+"<literal>META-INF/jboss.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">EJBDeployer</emphasis>:这个子部署者处理企业级 bean "
+"jars。它接受以 <literal>jar</literal> 后缀结尾的部署档案文件和目录。EJB jars "
+"必须有一个 <literal>META-INF/ejb-jar.xml</literal> 描述符,它也可能有一个 "
+"<literal>META-INF/jboss.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1944
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JARDeployer</emphasis>: This subdeployer handles "
+"library JAR archives. The only restriction it places on an archive is that "
+"it cannot contain a <literal>WEB-INF</literal> directory."
+msgstr ""
+"<emphasis role=\"bold\">JARDeployer</emphasis>:这个子部署者处理库 JAR 档案文"
+"件。它对档案文件的唯一限制是不能包含 <literal>WEB-INF</literal> 目录。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1949
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RARDeployer</emphasis>: This subdeployer handles JCA "
+"resource archives (RARs). It accepts deployment archives and directories "
+"whose name ends with a <literal>rar</literal> suffix. RARs must have a "
+"<literal>META-INF/ra.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">RARDeployer</emphasis>:这个子部署者处理 JCA 资源档案"
+"(RARs)。它接受以 <literal>rar</literal> 后缀结尾的部署档案文件和目录。RARs 必"
+"须有一个 <literal>META-INF/ra.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1954
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SARDeployer</emphasis>: This subdeployer handles "
+"JBoss MBean service archives (SARs). It accepts deployment archives and "
+"directories whose name ends with a <literal>sar</literal> suffix, as well as "
+"standalone XML files that end with <literal>service.xml</literal>. SARs that "
+"are jars must have a <literal>META-INF/jboss-service.xml</literal> "
+"descriptor."
+msgstr ""
+"<emphasis role=\"bold\">SARDeployer</emphasis>:这个子部署者处理 JBoss MBean "
+"服务档案(SARs)。它接受以 <literal>sar</literal> 后缀结尾的部署档案文件和目"
+"录,以及以 <literal>service.xml</literal> 结尾的独立 XML 文件。SARs 必须有一"
+"个 <literal>META-INF/jboss-service.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1959
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">XSLSubDeployer</emphasis>: This subdeployer deploys "
+"arbitrary XML files. JBoss uses the XSLSubDeployer to deploy <literal>ds."
+"xml</literal> files and transform them into <literal>service.xml</literal> "
+"files for the <literal>SARDeployer</literal>. However, it is not limited to "
+"just this task."
+msgstr ""
+"<emphasis role=\"bold\">XSLSubDeployer</emphasis>: 这个子部署者部署任意的 "
+"XML 文件。JBoss 用 XSLSubDeployer 来部署 <literal>ds.xml</literal> 文件并为 "
+"<literal>SARDeployer</literal> 把他们转换到 <literal>service.xml</literal> 文"
+"件。然而,它的任务不仅限于此。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1964
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">HARDeployer</emphasis>: This subdeployer deploys "
+"hibernate archives (HARs). It accepts deployment archives and directories "
+"whose name ends with a <literal>har</literal> suffix. HARs must have a "
+"<literal>META-INF/hibernate-service.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">HARDeployer</emphasis>:这个子部署者部署 hibernate 档"
+"案(HARs)。它接受以 <literal>har</literal> 后缀结尾的部署档案文件和目录。HARs "
+"必须有一个 <literal>META-INF/hibernate-service.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1969
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AspectDeployer</emphasis>: This subdeployer deploys "
+"AOP archives. It accepts deployment archives and directories whose name ends "
+"with an <literal>aop</literal> suffix as well as <literal>aop.xml</literal> "
+"files. AOP archives must have a <literal>META-INF/jboss-aop.xml</literal> "
+"descriptor."
+msgstr ""
+"<emphasis role=\"bold\">AspectDeployer</emphasis>:这个子部署者部署 AOP 档"
+"案。它接受以 <literal>aop</literal> 后缀结尾的部署档案文件和目录,以及 "
+"<literal>aop.xml</literal> 文件。AOP 必须有一个 <literal>META-INF/jboss-aop."
+"xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1974
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientDeployer</emphasis>: This subdeployer deploys "
+"J2EE application clients. It accepts deployment archives and directories "
+"whose name ends with a <literal>jar</literal> suffix. J2EE clients must have "
+"a <literal>META-INF/application-client.xml</literal> descriptor and may have "
+"a <literal>META-INF/jboss-client.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">ClientDeployer</emphasis>:这个子部署者部署 J2EE 应用"
+"程序档案。它接受以 <literal>jar</literal> 后缀结尾的部署档案文件和目录。J2EE "
+"客户必须有 <literal>META-INF/application-client.xml</literal> 描述符,它也可"
+"能有一个 <literal>META-INF/jboss-client.xml</literal> 描述符。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1979
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BeanShellSubDeployer</emphasis>: This subdeployer "
+"deploys bean shell scripts as MBeans. It accepts files whose name ends with "
+"a <literal>bsh</literal> suffix."
+msgstr ""
+"<emphasis role=\"bold\">BeanShellSubDeployer</emphasis>:这个子部署者部署 "
+"bean shell 和 MBeans 脚本。它接受以 <literal>bsh</literal> 后缀结尾的文件。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1984
+#, no-c-format
+msgid ""
+"The MainDeployer, JARDeployer and SARDeployer are hard coded deployers in "
+"the JBoss server core. All other deployers are MBean services that register "
+"themselves as deployers with the MainDeployer using the <literal>addDeployer"
+"(SubDeployer)</literal> operation."
+msgstr ""
+"MainDeployer,JARDeployer 和 SARDeployer 都是 JBoss 服务器核心里的硬编码"
+"(hard-coded)部署者。所有其他的部署者都是 MBean 服务,它们用 "
+"<literal>addDeployer(SubDeployer)</literal> 操作在 MainDeployer 上把自己注册"
+"为部署者。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1987
+#, no-c-format
+msgid ""
+"The <literal>MainDeployer</literal> communicates information about the "
+"component to be deployed the <literal>SubDeployer</literal> using a "
+"<literal>DeploymentInfo</literal> object. The <literal>DeploymentInfo</"
+"literal> object is a data structure that encapsulates the complete state of "
+"a deployable component."
+msgstr ""
+"<literal>MainDeployer</literal> 用 <literal>DeploymentInfo</literal> 对象来"
+"和 <literal>SubDeployer</literal> 交换关于要部署的组件的信息。"
+"<literal>DeploymentInfo</literal> 对象是一个枚举可部署组件的完整状态的数据结"
+"构。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1990
+#, no-c-format
+msgid ""
+"When the <literal>MainDeployer</literal> receives a deployment request, it "
+"iterates through its registered subdeployers and invokes the <literal>accepts"
+"(DeploymentInfo)</literal> method on the subdeployer. The first subdeployer "
+"to return true is chosen. The MainDeployer will delegate the init, create, "
+"start, stop and destroy deployment life cycle operations to the subdeployer."
+msgstr ""
+"当 <literal>MainDeployer</literal> 接受到一个部署请求时,它向注册的子部署者重"
+"申这个请求并调用子部署者的 <literal>accepts(DeploymentInfo)</literal> 方法。"
+"第一个返回 true 的子部署者被选取。MainDeployer 将把 init, create,start,"
+"stop 和 destroy 部署声明周期操作委托给这个子部署者。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1994
+#, no-c-format
+msgid "Deployers and ClassLoaders"
+msgstr "部署者和类加载器"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:1995
+#, fuzzy, no-c-format
+msgid ""
+"Deployers are the mechanism by which components are brought into a JBoss "
+"server. Deployers are also the creators of the majority of UCL instances, "
+"and the primary creator is the MainDeployer. The MainDeployer creates the "
+"UCL for a deployment early on during its init method. The UCL is created by "
+"calling the DeploymentInfo.createClassLoaders() method. Only the topmost "
+"<literal>DeploymentInfo</literal> will actually create a UCL. All "
+"subdeployments will add their class paths to their parent "
+"<literal>DeploymentInfo</literal> UCL. Every deployment does have a "
+"standalone URLClassLoader that uses the deployment URL as its path. This is "
+"used to localize the loading of resources such as deployment descriptors. "
+"<xref linkend=\"Deployers_and_ClassLoaders-"
+"An_illustration_of_the_class_loaders_involved_with_an_EAR_deployment\"/> "
+"provides an illustration of the interaction between Deployers, "
+"DeploymentInfos and class loaders."
+msgstr ""
+"部署者是组件被载入 JBoss 服务器的机制。部署者也是大多数 UCL 实例的创建者,其"
+"中最主要的创建者是 MainDeployer。MainDeployer 在它的 init 方法前期就为部署创"
+"建 UCL。UCL 是通过调用 DeploymentInfo.createClassLoaders() 方法来创建的。只有"
+"顶端的 <literal>DeploymentInfo</literal> 才实际上创建 UCL。所有的子部署者将把"
+"它们的 class paths 加入到父 <literal>DeploymentInfo</literal> UCL里。每个部署"
+"都有一个独立的 URLClassLoader,它把部署 URL 作为它的路径。这被用来使资源的载"
+"入本地化,如部署描述符。<xref linkend=\"ch2.earclassloader.fig\"/> 说明了部署"
+"者,DeploymentInfos 和 类加载器之间的相互作用。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:1999
+#, no-c-format
+msgid "An illustration of the class loaders involved with an EAR deployment"
+msgstr "An illustration of the class loaders involved with an EAR deployment"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2006
+#, fuzzy, no-c-format
+msgid ""
+"The figure illustrates an EAR deployment with EJB and WAR subdeployments. "
+"The EJB deployment references the <literal>lib/util.jar</literal> utility "
+"jar via its manifest. The WAR includes classes in its <literal>WEB-INF/"
+"classes</literal> directory as well as the <literal>WEB-INF/lib/jbosstest-"
+"web-util.jar</literal>. Each deployment has a <literal>DeploymentInfo</"
+"literal> instance that has a <literal>URLClassLoader</literal> pointing to "
+"the deployment archive. The <literal>DeploymentInfo</literal> associated "
+"with <literal>some.ear</literal> is the only one to have a UCL created. The "
+"<literal>ejbs.jar</literal> and <literal>web.war</"
+"literal><literal>DeploymentInfo</literal>s add their deployment archive to "
+"the <literal>some.ear</literal> UCL classpath, and share this UCL as their "
+"deployment UCL. The <literal>EJBDeployer</literal> also adds any manifest "
+"jars to the EAR UCL."
+msgstr ""
+"这个图例说明了一个与 EJB 和 WAR 子部署一起的 EAR 部署。EJB 部署通过它的 "
+"manifest 引用 <literal>lib/util.jar</literal>。WAR 包含它的 <literal>WEB-INF/"
+"classes</literal> 目录以及 <literal>WEB-INF/lib/jbosstest-web-util.jar</"
+"literal> 里的类。 每个部署都有一个 <literal>DeploymentInfo</literal> 实例,这"
+"个实例有一个 <literal>URLClassLoader</literal> 指向部署档案文件。只有和 "
+"<literal>some.ear</literal> 相关的 <literal>DeploymentInfo</literal> 创建 "
+"UCL。<literal>ejbs.jar</literal> 和 <literal>web.war</literal> "
+"<literal>DeploymentInfo</literal> 把它们的部署档案加入到 <literal>some.ear</"
+"literal> UCL classpath 里,并且把这个 UCL 作为它们的部署 UCL 共享。"
+"<literal>EJBDeployer</literal> 也把任何 manifest jars 加入到 EAR UCL 里。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2009
+#, no-c-format
+msgid ""
+"The <literal>WARDeployer</literal> behaves differently than other deployers "
+"in that it only adds its WAR archive to the <literal>DeploymentInfo</"
+"literal> UCL classpath. The loading of classes from the WAR <literal>WEB-INF/"
+"classes</literal> and <literal>WEB-INF/lib</literal> locations is handled by "
+"the servlet container class loader. The servlet container class loaders "
+"delegate to the WAR <literal>DeploymentInfo</literal> UCL as their parent "
+"class loader, but the server container class loader is not part of the JBoss "
+"class loader repository. Therefore, classes inside of a WAR are not visible "
+"to other components. Classes that need to be shared between web application "
+"components and other components such as EJBs, and MBeans need to be loaded "
+"into the shared class loader repository either by including the classes into "
+"a SAR or EJB deployment, or by referencing a jar containing the shared "
+"classes through a manifest <literal>Class-Path</literal> entry. In the case "
+"of a SAR, the SAR classpath element in the service deployment serves the "
+"same purpose as a JAR manifest <literal>Class-Path</literal>."
+msgstr ""
+"<literal>WARDeployer</literal> 和其他的部署者不同,因为它只把 WAR 档案加入到 "
+"<literal>DeploymentInfo</literal> UCL classpath。从 WAR <literal>WEB-INF/"
+"classes</literal> 和 <literal>WEB-INF/lib</literal> 加载类由 servlet 容器类加"
+"载器处理。servlet 容器类加载器把 WAR <literal>DeploymentInfo</literal> UCL 委"
+"托给它们的父类加载器,但是服务器容器类加载器不是 JBoss 类加载器库的一部分。因"
+"此, WAR 内部的类对于其他组件并不可见。需要在 web 程序组件和其他组件如 EJBs "
+"和 MBeans之间共享的类需要加载到共享类加载器库里,这可以通过把这些类包含到 "
+"SAR 或 EJB 部署里,或者通过 manifest <literal>Class-Path</literal> 条目来引用"
+"包含共享类的 jar 来实现。如果是 SAR 档案,服务部署里的 SAR classpath 元素和 "
+"JAR manifest <literal>Class-Path</literal> 的目的是一样的。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2017
+#, no-c-format
+msgid "Remote Access to Services, Detached Invokers"
+msgstr "对服务,脱管调用者(Detached Invokers)的远程访问"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2018
+#, no-c-format
+msgid ""
+"In addition to the MBean services notion that allows for the ability to "
+"integrate arbitrary functionality, JBoss also has a detached invoker concept "
+"that allows MBean services to expose functional interfaces via arbitrary "
+"protocols for remote access by clients. The notion of a detached invoker is "
+"that remoting and the protocol by which a service is accessed is a "
+"functional aspect or service independent of the component. Thus, one can "
+"make a naming service available for use via RMI/JRMP, RMI/HTTP, RMI/SOAP, or "
+"any arbitrary custom transport."
+msgstr ""
+"除了允许集成任何功能的 MBean 服务标记外,JBoss 也有一个脱管调用者(detached "
+"invoker)的概念,它允许 MBean 服务通过任意协议来对客户的远程访问开放功能接口。"
+"脱管调用者的标记是服务被访问所用的协议,它是一个独立于组件的功能性的切面或服"
+"务。因此,你可以通过 RMI/JRMP,RMI/HTTP,RMI/SOAP 或任意自定义传输来使命名服"
+"务可用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2021
+#, fuzzy, no-c-format
+msgid ""
+"Let's begin our discussion of the detached invoker architecture with an "
+"overview of the components involved. The main components in the detached "
+"invoker architecture are shown in <xref linkend="
+"\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/>."
+msgstr ""
+"让我们开始讨论脱管调用者架构和它所涉及的组件吧。脱管调用者架构里的主要组件如 "
+"<xref linkend=\"ch2.dinv.fig\"/> 所示。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2025
+#, no-c-format
+msgid "The main components in the detached invoker architecture"
+msgstr "The main components in the detached invoker architecture"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2032
+#, fuzzy, no-c-format
+msgid ""
+"On the client side, there exists a client proxy which exposes the interface"
+"(s) of the MBean service. This is the same smart, compile-less dynamic proxy "
+"that we use for EJB home and remote interfaces. The only difference between "
+"the proxy for an arbitrary service and the EJB is the set of interfaces "
+"exposed as well as the client side interceptors found inside the proxy. The "
+"client interceptors are represented by the rectangles found inside of the "
+"client proxy. An interceptor is an assembly line type of pattern that allows "
+"for transformation of a method invocation and/or return values. A client "
+"obtains a proxy through some lookup mechanism, typically JNDI. Although RMI "
+"is indicated in <xref linkend=\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/>, the only real "
+"requirement on the exposed interface and its types is that they are "
+"serializable between the client server over JNDI as well as the transport "
+"layer."
+msgstr ""
+"在客户端有一个客户代理,它开放 MBean 服务的接口。它是一个智能的,无需编译的动"
+"态代理,和我们用在 EJB home 和 remote 接口上的相同。唯一的区别就是开放的接口"
+"集和代理内部的客户端拦截器。客户端拦截器由客户代理内部的矩形来表示。拦截器是"
+"一种装配线?的模式,它允许方法调用和/或返回值的传输。客户通过某种查找机制获得"
+"一个代理,如 JNDI。虽然 <xref linkend=\"ch2.dinv.fig\"/> 里指出了 RMI,但开放"
+"接口和类型的真正要求是,它们在 JNDI 和传输层上的客户服务器之间是可串形化的。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2035
+#, fuzzy, no-c-format
+msgid ""
+"The choice of the transport layer is determined by the last interceptor in "
+"the client proxy, which is referred to as the <emphasis>Invoker Interceptor</"
+"emphasis> in <xref linkend=\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/>. The invoker "
+"interceptor contains a reference to the transport specific stub of the "
+"server side <emphasis>Detached Invoker</emphasis> MBean service. The invoker "
+"interceptor also handles the optimization of calls that occur within the "
+"same VM as the target MBean. When the invoker interceptor detects that this "
+"is the case the call is passed to a call-by-reference invoker that simply "
+"passes the invocation along to the target MBean."
+msgstr ""
+"传输层的选择是由客户代理里最后的拦截器决定的,在 <xref linkend=\"ch2.dinv.fig"
+"\"/> 里它被称作 <emphasis>Invoker Interceptor</emphasis>。调用者拦截器"
+"(invoker interceptor)包含了服务端 <emphasis>Detached Invoker</emphasis> "
+"MBean 服务的特定传输 stub 的引用。调用者拦截器也处理和目标 MBean 相同的虚拟机"
+"内发生的调用的优化。当调用者拦截器检测到调用被传递到一个引用调用(call-by-"
+"reference)的调用者时,它简单地把这个调用传递到目标 MBean。,"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2038
+#, no-c-format
+msgid ""
+"The detached invoker service is responsible for making a generic invoke "
+"operation available via the transport the detached invoker handles. The "
+"<literal>Invoker</literal> interface illustrates the generic invoke "
+"operation."
+msgstr ""
+"脱管调用者服务通过它处理的传输来负责建立通用的调用操作。<literal>Invoker</"
+"literal> 接口说明了通用调用操作。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2041
+#, fuzzy, no-c-format
+msgid ""
+"package org.jboss.invocation;\n"
+" \n"
+"import java.rmi.Remote;\n"
+"import org.jboss.proxy.Interceptor;\n"
+"import org.jboss.util.id.GUID;\n"
+" \n"
+" \n"
+"public interface Invoker\n"
+" extends Remote\n"
+"{\n"
+" GUID ID = new GUID();\n"
+"\n"
+" String getServerHostName() throws Exception;\n"
+"\n"
+" Object invoke(Invocation invocation) throws Exception;\n"
+"}"
+msgstr ""
+"package org.jboss.invocation;\n"
+" \n"
+"import java.rmi.Remote;\n"
+"import org.jboss.proxy.Interceptor;\n"
+"import org.jboss.util.id.GUID;\n"
+" \n"
+" \n"
+"public interface Invoker\n"
+" extends Remote\n"
+"{\n"
+" GUID ID = new GUID();\n"
+"\n"
+" String getServerHostName() throws Exception;\n"
+" \n"
+" Object invoke(Invocation invocation) throws Exception;\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2042
+#, fuzzy, no-c-format
+msgid ""
+"The Invoker interface extends <literal>Remote</literal> to be compatible "
+"with RMI, but this does not mean that an invoker must expose an RMI service "
+"stub. The detached invoker service simply acts as a transport gateway that "
+"accepts invocations represented as the <literal>org.jboss.invocation."
+"Invocation</literal> object over its specific transport, unmarshalls the "
+"invocation, forwards the invocation onto the destination MBean service, "
+"represented by the <emphasis>Target MBean</emphasis> in <xref linkend="
+"\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/>, and marshalls "
+"the return value or exception resulting from the forwarded call back to the "
+"client."
+msgstr ""
+"调用者接口把 <literal>Remote</literal> 扩展为和 RMI 兼容,但这不意味着调用者"
+"必须开放一个 RMI 服务 stub。脱管调用者服务简单地担任一个传输网关,它接受它特"
+"定的传输上的以 <literal>org.jboss.invocation.Invocation</literal> 对象代表的"
+"调用,将这个调用解包(unmarshall),把这个调用转发到如 <xref linkend=\"ch2."
+"dinv.fig\"/> 里的 <emphasis>Target MBean</emphasis> 代表的目的 MBean 服务,然"
+"后将转发调用的返回值或者是异常结果打包(marshall)给客户端。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2045
+#, no-c-format
+msgid ""
+"The <literal>Invocation</literal> object is just a representation of a "
+"method invocation context. This includes the target MBean name, the method, "
+"the method arguments, a context of information associated with the proxy by "
+"the proxy factory, and an arbitrary map of data associated with the "
+"invocation by the client proxy interceptors."
+msgstr ""
+"<literal>Invocation</literal> 对象代表方法调用的上下文。它包括目标 MBean 名,"
+"方法,方法的参数,与 proxy factory 的代理相关的信息的上下文,以及和客户代理拦"
+"截器的调用关联的数据视图。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2048
+#, fuzzy, no-c-format
+msgid ""
+"The configuration of the client proxy is done by the server side proxy "
+"factory MBean service, indicated by the <emphasis>Proxy Factory</emphasis> "
+"component in <xref linkend=\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/>. The proxy "
+"factory performs the following tasks:"
+msgstr ""
+"如 <xref linkend=\"ch2.dinv.fig\"/> 里的 <emphasis>Proxy Factory</emphasis> "
+"组件所指出的那样,客户代理的配置由服务器端 proxy factory MBean 服务来完成。"
+"proxy factory 执行下面的任务:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2053
+#, no-c-format
+msgid ""
+"Create a dynamic proxy that implements the interface the target MBean wishes "
+"to expose."
+msgstr "创建动态的代理来实现目标 MBean 希望开放的接口"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2058
+#, no-c-format
+msgid "Associate the client proxy interceptors with the dynamic proxy handler."
+msgstr "把客户代理拦截器和动态代理处理程序关联"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2063
+#, no-c-format
+msgid ""
+"Associate the invocation context with the dynamic proxy. This includes the "
+"target MBean, detached invoker stub and the proxy JNDI name."
+msgstr ""
+"把调用上下文和动态代理相关联。这包括目标 MBean,脱管调用者 stub 和代理 JNDI "
+"名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2068
+#, no-c-format
+msgid "Make the proxy available to clients by binding the proxy into JNDI."
+msgstr "通过把代理绑定到 JNDI 来使代理对客户可用。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2073
+#, fuzzy, no-c-format
+msgid ""
+"The last component in <xref linkend="
+"\"Remote_Access_to_Services_Detached_Invokers-"
+"The_main_components_in_the_detached_invoker_architecture\"/> is the "
+"<emphasis>Target MBean</emphasis> service that wishes to expose an interface "
+"for invocations to remote clients. The steps required for an MBean service "
+"to be accessible through a given interface are:"
+msgstr ""
+"<xref linkend=\"ch2.dinv.fig\"/> 里的最后的组件是 <emphasis>Target MBean</"
+"emphasis> 服务,它希望为对远程客户的调用开放一个接口。MBean 服务通过给定接口"
+"而成为可访问的所需的步骤是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2078
+#, no-c-format
+msgid ""
+"Define a JMX operation matching the signature: <literal>public Object invoke"
+"(org.jboss.invocation.Invocation) throws Exception</literal>"
+msgstr ""
+"定义一个匹配签名:<literal>public Object invoke(org.jboss.invocation."
+"Invocation) throws Exception</literal> 的 JMX 操作"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2083
+#, no-c-format
+msgid ""
+"Create a <literal>HashMap<Long, Method></literal> mapping from the "
+"exposed interface <literal>java.lang.reflect.Method</literal>s to the long "
+"hash representation using the <literal>org.jboss.invocation."
+"MarshalledInvocation.calculateHash</literal> method."
+msgstr ""
+"用 <literal>org.jboss.invocation.MarshalledInvocation.calculateHash</"
+"literal> 方法创建一个从开放的接口 <literal>java.lang.reflect.Method</"
+"literal> 到 long hash representation 的 <literal>HashMap<Long, Method>"
+"</literal> 匹配。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2088
+#, no-c-format
+msgid ""
+"Implement the <literal>invoke(Invocation)</literal> JMX operation and use "
+"the interface method hash mapping to transform from the long hash "
+"representation of the invoked method to the <literal>java.lang.reflect."
+"Method</literal> of the exposed interface. Reflection is used to perform the "
+"actual invocation on the object associated with the MBean service that "
+"actually implements the exposed interface."
+msgstr ""
+"实现 <literal>invoke(Invocation)</literal> JMX 操作并使用接口方法 hash "
+"mapping 来把调用的方法的 long hash representation 转换成开放接口的 "
+"<literal>java.lang.reflect.Method</literal>。Reflection 被用来执行对与实际上"
+"实现开放接口的 MBean 服务关联的对象的实际的调用。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2094
+#, no-c-format
+msgid "A Detached Invoker Example, the MBeanServer Invoker Adaptor Service"
+msgstr "脱管调用者的示例,the MBeanServer Invoker Adaptor Service"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2095
+#, no-c-format
+msgid ""
+"In the section on connecting to the JMX server we mentioned that there was a "
+"service that allows one to access the <literal>javax.management.MBeanServer</"
+"literal> via any protocol using an invoker service. In this section we "
+"present the <literal>org.jboss.jmx.connector.invoker.InvokerAdaptorService</"
+"literal> and its configuration for access via RMI/JRMP as an example of the "
+"steps required to provide remote access to an MBean service."
+msgstr ""
+"在与 JMX 服务器相关的内容里,我们提到有一个允许你使用调用者服务通过任何协议访"
+"问 <literal>javax.management.MBeanServer</literal> 的服务。在这个部分,我们把"
+"通过 RMI/JRMP 访问的 <literal>org.jboss.jmx.connector.invoker."
+"InvokerAdaptorService</literal> 和它的配置作为一个示例,来说明给 MBean 服务提"
+"供远程访问所需要的步骤。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2098
+#, no-c-format
+msgid ""
+"The <literal>InvokerAdaptorService</literal> is a simple MBean service that "
+"only exists to fulfill the target MBean role in the detached invoker pattern."
+msgstr ""
+"<literal>InvokerAdaptorService</literal> 是一个简单的 MBean 服务,它在脱管调"
+"用者模式里只履行目标 MBean 的角色。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2101
+#, no-c-format
+msgid "The InvokerAdaptorService MBean"
+msgstr "The InvokerAdaptorService MBean"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2102
+#, no-c-format
+msgid ""
+"package org.jboss.jmx.connector.invoker;\n"
+"public interface InvokerAdaptorServiceMBean\n"
+" extends org.jboss.system.ServiceMBean\n"
+"{\n"
+" Class getExportedInterface();\n"
+" void setExportedInterface(Class exportedInterface);\n"
+"\n"
+" Object invoke(org.jboss.invocation.Invocation invocation)\n"
+" throws Exception;\n"
+"}\n"
+"\n"
+"package org.jboss.jmx.connector.invoker;\n"
+"\n"
+"import java.lang.reflect.InvocationTargetException;\n"
+"import java.lang.reflect.Method;\n"
+"import java.lang.reflect.UndeclaredThrowableException;\n"
+"import java.util.Collections;\n"
+"import java.util.HashMap;\n"
+"import java.util.Map;\n"
+"\n"
+"import javax.management.MBeanServer;\n"
+"import javax.management.ObjectName;\n"
+"\n"
+"import org.jboss.invocation.Invocation;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+"import org.jboss.mx.server.ServerConstants;\n"
+"import org.jboss.system.ServiceMBeanSupport;\n"
+"import org.jboss.system.Registry;\n"
+"\n"
+"public class InvokerAdaptorService\n"
+" extends ServiceMBeanSupport\n"
+" implements InvokerAdaptorServiceMBean, ServerConstants\n"
+"{\n"
+" private static ObjectName mbeanRegistry;\n"
+" \n"
+" static {\n"
+" try {\n"
+" mbeanRegistry = new ObjectName(MBEAN_REGISTRY);\n"
+" } catch (Exception e) {\n"
+" throw new RuntimeException(e.toString());\n"
+" }\n"
+" }\n"
+"\n"
+" private Map marshalledInvocationMapping = new HashMap();\n"
+" private Class exportedInterface;\n"
+"\n"
+" public Class getExportedInterface()\n"
+" {\n"
+" return exportedInterface;\n"
+" }\n"
+"\n"
+" public void setExportedInterface(Class exportedInterface)\n"
+" {\n"
+" this.exportedInterface = exportedInterface;\n"
+" }\n"
+"\n"
+" protected void startService()\n"
+" throws Exception\n"
+" {\n"
+" // Build the interface method map\n"
+" Method[] methods = exportedInterface.getMethods();\n"
+" HashMap tmpMap = new HashMap(methods.length);\n"
+" for (int m = 0; m < methods.length; m ++) {\n"
+" Method method = methods[m];\n"
+" Long hash = new Long(MarshalledInvocation.calculateHash"
+"(method));\n"
+" tmpMap.put(hash, method);\n"
+" }\n"
+"\n"
+" marshalledInvocationMapping = Collections.unmodifiableMap(tmpMap);\n"
+" // Place our ObjectName hash into the Registry so invokers can\n"
+" // resolve it\n"
+" Registry.bind(new Integer(serviceName.hashCode()), serviceName);\n"
+" }\n"
+"\n"
+" protected void stopService()\n"
+" throws Exception\n"
+" {\n"
+" Registry.unbind(new Integer(serviceName.hashCode()));\n"
+" }\n"
+"\n"
+"\n"
+" public Object invoke(Invocation invocation)\n"
+" throws Exception\n"
+" {\n"
+" // Make sure we have the correct classloader before unmarshalling\n"
+" Thread thread = Thread.currentThread();\n"
+" ClassLoader oldCL = thread.getContextClassLoader();\n"
+"\n"
+" // Get the MBean this operation applies to\n"
+" ClassLoader newCL = null;\n"
+" ObjectName objectName = (ObjectName) \n"
+" invocation.getValue(\"JMX_OBJECT_NAME\");\n"
+" if (objectName != null) {\n"
+" // Obtain the ClassLoader associated with the MBean deployment\n"
+" newCL = (ClassLoader) \n"
+" server.invoke(mbeanRegistry, \"getValue\",\n"
+" new Object[] { objectName, CLASSLOADER },\n"
+" new String[] { ObjectName.class.getName(),\n"
+" \"java.lang.String\" });\n"
+" }\n"
+" \n"
+" if (newCL != null && newCL != oldCL) {\n"
+" thread.setContextClassLoader(newCL);\n"
+" }\n"
+"\n"
+" try {\n"
+" // Set the method hash to Method mapping\n"
+" if (invocation instanceof MarshalledInvocation) {\n"
+" MarshalledInvocation mi = (MarshalledInvocation) "
+"invocation;\n"
+" mi.setMethodMap(marshalledInvocationMapping);\n"
+" }\n"
+"\n"
+" // Invoke the MBeanServer method via reflection\n"
+" Method method = invocation.getMethod();\n"
+" Object[] args = invocation.getArguments();\n"
+" Object value = null;\n"
+" try {\n"
+" String name = method.getName();\n"
+" Class[] sig = method.getParameterTypes();\n"
+" Method mbeanServerMethod =\n"
+" MBeanServer.class.getMethod(name, sig);\n"
+" value = mbeanServerMethod.invoke(server, args);\n"
+" } catch(InvocationTargetException e) {\n"
+" Throwable t = e.getTargetException();\n"
+" if (t instanceof Exception) {\n"
+" throw (Exception) t;\n"
+" } else {\n"
+" throw new UndeclaredThrowableException(t, method.toString"
+"());\n"
+" }\n"
+" }\n"
+"\n"
+" return value;\n"
+" } finally {\n"
+" if (newCL != null && newCL != oldCL) {\n"
+" thread.setContextClassLoader(oldCL);\n"
+" }\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+"package org.jboss.jmx.connector.invoker;\n"
+"public interface InvokerAdaptorServiceMBean\n"
+" extends org.jboss.system.ServiceMBean\n"
+"{\n"
+" Class getExportedInterface();\n"
+" void setExportedInterface(Class exportedInterface);\n"
+"\n"
+" Object invoke(org.jboss.invocation.Invocation invocation)\n"
+" throws Exception;\n"
+"}\n"
+"\n"
+"package org.jboss.jmx.connector.invoker;\n"
+"\n"
+"import java.lang.reflect.InvocationTargetException;\n"
+"import java.lang.reflect.Method;\n"
+"import java.lang.reflect.UndeclaredThrowableException;\n"
+"import java.util.Collections;\n"
+"import java.util.HashMap;\n"
+"import java.util.Map;\n"
+"\n"
+"import javax.management.MBeanServer;\n"
+"import javax.management.ObjectName;\n"
+"\n"
+"import org.jboss.invocation.Invocation;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+"import org.jboss.mx.server.ServerConstants;\n"
+"import org.jboss.system.ServiceMBeanSupport;\n"
+"import org.jboss.system.Registry;\n"
+"\n"
+"public class InvokerAdaptorService\n"
+" extends ServiceMBeanSupport\n"
+" implements InvokerAdaptorServiceMBean, ServerConstants\n"
+"{\n"
+" private static ObjectName mbeanRegistry;\n"
+" \n"
+" static {\n"
+" try {\n"
+" mbeanRegistry = new ObjectName(MBEAN_REGISTRY);\n"
+" } catch (Exception e) {\n"
+" throw new RuntimeException(e.toString());\n"
+" }\n"
+" }\n"
+"\n"
+" private Map marshalledInvocationMapping = new HashMap();\n"
+" private Class exportedInterface;\n"
+"\n"
+" public Class getExportedInterface()\n"
+" {\n"
+" return exportedInterface;\n"
+" }\n"
+"\n"
+" public void setExportedInterface(Class exportedInterface)\n"
+" {\n"
+" this.exportedInterface = exportedInterface;\n"
+" }\n"
+"\n"
+" protected void startService()\n"
+" throws Exception\n"
+" {\n"
+" // Build the interface method map\n"
+" Method[] methods = exportedInterface.getMethods();\n"
+" HashMap tmpMap = new HashMap(methods.length);\n"
+" for (int m = 0; m < methods.length; m ++) {\n"
+" Method method = methods[m];\n"
+" Long hash = new Long(MarshalledInvocation.calculateHash"
+"(method));\n"
+" tmpMap.put(hash, method);\n"
+" }\n"
+"\n"
+" marshalledInvocationMapping = Collections.unmodifiableMap(tmpMap);\n"
+" // Place our ObjectName hash into the Registry so invokers can\n"
+" // resolve it\n"
+" Registry.bind(new Integer(serviceName.hashCode()), serviceName);\n"
+" }\n"
+"\n"
+" protected void stopService()\n"
+" throws Exception\n"
+" {\n"
+" Registry.unbind(new Integer(serviceName.hashCode()));\n"
+" }\n"
+"\n"
+"\n"
+" public Object invoke(Invocation invocation)\n"
+" throws Exception\n"
+" {\n"
+" // Make sure we have the correct classloader before unmarshalling\n"
+" Thread thread = Thread.currentThread();\n"
+" ClassLoader oldCL = thread.getContextClassLoader();\n"
+"\n"
+" // Get the MBean this operation applies to\n"
+" ClassLoader newCL = null;\n"
+" ObjectName objectName = (ObjectName) \n"
+" invocation.getValue(\"JMX_OBJECT_NAME\");\n"
+" if (objectName != null) {\n"
+" // Obtain the ClassLoader associated with the MBean deployment\n"
+" newCL = (ClassLoader) \n"
+" server.invoke(mbeanRegistry, \"getValue\",\n"
+" new Object[] { objectName, CLASSLOADER },\n"
+" new String[] { ObjectName.class.getName(),\n"
+" \"java.lang.String\" });\n"
+" }\n"
+" \n"
+" if (newCL != null && newCL != oldCL) {\n"
+" thread.setContextClassLoader(newCL);\n"
+" }\n"
+"\n"
+" try {\n"
+" // Set the method hash to Method mapping\n"
+" if (invocation instanceof MarshalledInvocation) {\n"
+" MarshalledInvocation mi = (MarshalledInvocation) "
+"invocation;\n"
+" mi.setMethodMap(marshalledInvocationMapping);\n"
+" }\n"
+"\n"
+" // Invoke the MBeanServer method via reflection\n"
+" Method method = invocation.getMethod();\n"
+" Object[] args = invocation.getArguments();\n"
+" Object value = null;\n"
+" try {\n"
+" String name = method.getName();\n"
+" Class[] sig = method.getParameterTypes();\n"
+" Method mbeanServerMethod =\n"
+" MBeanServer.class.getMethod(name, sig);\n"
+" value = mbeanServerMethod.invoke(server, args);\n"
+" } catch(InvocationTargetException e) {\n"
+" Throwable t = e.getTargetException();\n"
+" if (t instanceof Exception) {\n"
+" throw (Exception) t;\n"
+" } else {\n"
+" throw new UndeclaredThrowableException(t, method.toString"
+"());\n"
+" }\n"
+" }\n"
+"\n"
+" return value;\n"
+" } finally {\n"
+" if (newCL != null && newCL != oldCL) {\n"
+" thread.setContextClassLoader(oldCL);\n"
+" }\n"
+" }\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2103
+#, fuzzy, no-c-format
+msgid ""
+"Let's go through the key details of this service. The "
+"<literal>InvokerAdaptorServiceMBean</literal> Standard MBean interface of "
+"the <literal>InvokerAdaptorService</literal> has a single "
+"<literal>ExportedInterface</literal> attribute and a single <literal>invoke"
+"(Invocation)</literal> operation. The <literal>ExportedInterface</literal> "
+"attribute allows customization of the type of interface the service exposes "
+"to clients. This has to be compatible with the <literal>MBeanServer</"
+"literal> class in terms of method name and signature. The <literal>invoke"
+"(Invocation)</literal> operation is the required entry point that target "
+"MBean services must expose to participate in the detached invoker pattern. "
+"This operation is invoked by the detached invoker services that have been "
+"configured to provide access to the <literal>InvokerAdaptorService</literal>."
+msgstr ""
+"让我们看看这个服务的关键细节。<literal>InvokerAdaptorService</literal> 的"
+"<literal>InvokerAdaptorServiceMBean</literal> 标准 MBean 接口有一个单一的 "
+"<literal>ExportedInterface</literal> 属性和 <literal>invoke(Invocation)</"
+"literal> 操作。<literal>ExportedInterface</literal> 属性允许服务开放给客户的"
+"接口类型的自定义。它得和 <literal>MBeanServer</literal> 类兼容,如方法名和签"
+"名。<literal>invoke(Invocation)</literal> 操作是被要求的入口,目标 MBean 服务"
+"必须开放它来遵循脱管调用者模式。这个操作被脱管调用者服务调用,这些服务已经被"
+"配置好来提供对 <literal>InvokerAdaptorService</literal> 的访问。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2106
+#, no-c-format
+msgid ""
+"Lines 54-64 of the InvokerAdaptorService build the HashMap<Long, "
+"Method> of the ExportedInterface Class using the <literal> org.jboss."
+"invocation.MarshalledInvocation.calculateHash(Method)</literal> utility "
+"method. Because <literal>java.lang.reflect.Method</literal> instances are "
+"not serializable, a <literal>MarshalledInvocation</literal> version of the "
+"non-serializable <literal>Invocation</literal> class is used to marshall the "
+"invocation between the client and server. The <literal>MarshalledInvocation</"
+"literal> replaces the Method instances with their corresponding hash "
+"representation. On the server side, the <literal>MarshalledInvocation</"
+"literal> must be told what the hash to Method mapping is."
+msgstr ""
+"InvokerAdaptorService 的 54-64 行用 <literal> org.jboss.invocation."
+"MarshalledInvocation.calculateHash(Method)</literal> 方法建立 "
+"ExportedInterface 类的 HashMap<Long, Method> 。因为 <literal>java.lang."
+"reflect.Method</literal> 实例不是可串形化的,非串形化的 <literal>Invocation</"
+"literal> 类的 <literal>MarshalledInvocation</literal> 版本被用来将客户端和服"
+"务器之间的调用打包(marshall)。<literal>MarshalledInvocation</literal> 用相应"
+"的 hash representation 代替了 Method 实例。在服务器端,"
+"<literal>MarshalledInvocation</literal> 必须被告知 hash 与 Method 之间的映"
+"射。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2109
+#, no-c-format
+msgid ""
+"Line 64 creates a mapping between the <literal>InvokerAdaptorService</"
+"literal> service name and its hash code representation. This is used by "
+"detached invokers to determine what the target MBean <literal>ObjectName</"
+"literal> of an <literal>Invocation</literal> is. When the target MBean name "
+"is store in the <literal>Invocation</literal>, its store as its hashCode "
+"because <literal>ObjectName</literal>s are relatively expensive objects to "
+"create. The <literal>org.jboss.system.Registry</literal> is a global map "
+"like construct that invokers use to store the hash code to "
+"<literal>ObjectName</literal> mappings in."
+msgstr ""
+"64 行创建了 <literal>InvokerAdaptorService</literal> 服务名和它的 hash code "
+"representation 之间的映射。它被脱管调用者用来决定 <literal>Invocation</"
+"literal> 的目标MBean <literal>ObjectName</literal>。当目标 MBean 名存放在 "
+"<literal>Invocation</literal> 里时,它用 hashCode 的方式存放,因为 "
+"<literal>ObjectName</literal> 相对来说是比较消耗资源的对象。<literal>org."
+"jboss.system.Registry</literal> 是一个全局的地图,就象调用者用来存储 "
+"hashCode 到 <literal>ObjectName</literal> 的映射的 construct。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2112
+#, fuzzy, no-c-format
+msgid ""
+"Lines 77-93 obtain the name of the MBean on which the MBeanServer operation "
+"is being performed and lookup the class loader associated with the MBean'"
+"s SAR deployment. This information is available via the <literal>org.jboss."
+"mx.server.registry.BasicMBeanRegistry</literal>, a JBoss JMX implementation "
+"specific class. It is generally necessary for an MBean to establish the "
+"correct class loading context because the detached invoker protocol layer "
+"may not have access to the class loaders needed to unmarshall the types "
+"associated with an invocation."
+msgstr ""
+"77-93 行获取 MBean 的名字,在这个 MBean 上执行 MBeanServer 操作和查找与 "
+"MBean 的 SAR 部署关联的类加载器。通过 JBoss JMX 实现的一个特定的类,"
+"<literal>org.jboss.mx.server.registry.BasicMBeanRegistry</literal>,可以获得"
+"这个信息。这对于建立正确的类加载上下文的 MBean 来说,通常是必需的。因为脱管调"
+"用者协议层可能不能访问用来将和调用关联的类型解包(unmarshall)的类加载器。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2115
+#, no-c-format
+msgid ""
+"Lines 101-105 install the <literal>ExposedInterface</literal> class method "
+"hash to method mapping if the invocation argument is of type "
+"<literal>MarshalledInvocation</literal>. The method mapping calculated "
+"previously at lines 54-62 is used here."
+msgstr ""
+"如果调用参数是 <literal>MarshalledInvocation</literal> 类型的,101-105 行安"
+"装 <literal>ExposedInterface</literal> 类的 method hash to method 的映射。在"
+"第 54-62 行里计算的方法映射被用在这里。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2118
+#, no-c-format
+msgid ""
+"Lines 107-114 perform a second mapping from the <literal>ExposedInterface</"
+"literal> Method to the matching method of the MBeanServer class. The "
+"<literal>InvokerServiceAdaptor</literal> decouples the "
+"<literal>ExposedInterface</literal> from the MBeanServer class in that it "
+"allows an arbitrary interface. This is needed on one hand because the "
+"standard <literal>java.lang.reflect.Proxy</literal> class can only proxy "
+"interfaces. It also allows one to only expose a subset of the MBeanServer "
+"methods and add transport specific exceptions like <literal>java.rmi."
+"RemoteException</literal> to the <literal>ExposedInterface</literal> method "
+"signatures."
+msgstr ""
+"107-114 行执行从 <literal>ExposedInterface</literal> 方法到 MBeanServer 类的"
+"映射方法的又一个映射。<literal>InvokerServiceAdaptor</literal> 把 "
+"<literal>ExposedInterface</literal> 从 MBeanServer 类分离,因为它允许任意的接"
+"口。需要它的原因,一方面因为标准的 <literal>java.lang.reflect.Proxy</"
+"literal> 类只能够代理接口。另一方面是它也允许你只开放 MBeanServer 方法的一个"
+"子集并把和传输相关的异常如 <literal>java.rmi.RemoteException</literal> 加入"
+"到 <literal>ExposedInterface</literal> 方法签名里。c"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2121
+#, no-c-format
+msgid ""
+"Line 115 dispatches the MBeanServer method invocation to the MBeanServer "
+"instance to which the <literal>InvokerAdaptorService</literal> was deployed. "
+"The server instance variable is inherited from the "
+"<literal>ServiceMBeanSupport</literal> superclass."
+msgstr ""
+"115 行把 MBeanServer 方法调用分派到 <literal>InvokerAdaptorService</literal> "
+"所部署的 MBeanServer 实例里。服务器实例变量继承自 "
+"<literal>ServiceMBeanSupport</literal> 超级类。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2124
+#, no-c-format
+msgid ""
+"Lines 117-124 handle any exceptions coming from the reflective invocation "
+"including the unwrapping of any declared exception thrown by the invocation."
+msgstr ""
+"117-124 行处理任何来自 reflective 调用的异常,包括解开调用抛出的任何声明的异"
+"常。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2127
+#, no-c-format
+msgid ""
+"Line 126 is the return of the successful MBeanServer method invocation "
+"result."
+msgstr "126 行是成功的 MBeanServer 方法调用结果的返回。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2130
+#, no-c-format
+msgid ""
+"Note that the <literal>InvokerAdaptorService</literal> MBean does not deal "
+"directly with any transport specific details. There is the calculation of "
+"the method hash to Method mapping, but this is a transport independent "
+"detail."
+msgstr ""
+"注意 <literal>InvokerAdaptorService</literal> MBean 并不直接处理任何传输相关"
+"的特定细节。虽然有 method hash to Method 映射的计算,但这是一个独立于传输的细"
+"节。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2133
+#, fuzzy, no-c-format
+msgid ""
+"Now let's take a look at how the <literal>InvokerAdaptorService</"
+"literal> may be used to expose the same <literal>org.jboss.jmx.adaptor.rmi."
+"RMIAdaptor</literal> interface via RMI/JRMP as seen in Connecting to JMX "
+"Using RMI. We will start by presenting the proxy factory and "
+"<literal>InvokerAdaptorService</literal> configurations found in the default "
+"setup in the <literal>jmx-invoker-adaptor-service.sar</literal> deployment. "
+"<xref linkend="
+"\"A_Detached_Invoker_Example_the_MBeanServer_Invoker_Adaptor_Service-"
+"The_default_jmx_invoker_adaptor_server.sar_jboss_service."
+"xml_deployment_descriptor\"/> shows the <literal>jboss-service.xml</literal> "
+"descriptor for this deployment."
+msgstr ""
+"现在让我们看看通过 Connecting to JMX Using RMI 提及的 RMI/JRMP,怎样使用 "
+"<literal>InvokerAdaptorService</literal> 来开放相同的 <literal>org.jboss.jmx."
+"adaptor.rmi.RMIAdaptor</literal> 接口。我们从 <literal>jmx-invoker-adaptor-"
+"service.sar</literal> 部署的缺省设置里找到的 proxy factory 和 "
+"<literal>InvokerAdaptorService</literal> 配置开始。<xref linkend=\"ch2."
+"jmxinvokersar.ex\"/> 展示了这个部署的 <literal>jboss-service.xml</literal> 描"
+"述符。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2136
+#, no-c-format
+msgid ""
+"The default jmx-invoker-adaptor-server.sar jboss-service.xml deployment "
+"descriptor"
+msgstr ""
+"The default jmx-invoker-adaptor-server.sar jboss-service.xml deployment "
+"descriptor"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2137
+#, fuzzy, no-c-format
+msgid ""
+"<server>\n"
+" <!-- The JRMP invoker proxy configuration for the "
+"InvokerAdaptorService -->\n"
+" <mbean code=\"org.jboss.invocation.jrmp.server.JRMPProxyFactory\"\n"
+" name=\"jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,"
+"service=proxyFactory\">\n"
+" <!-- Use the standard JRMPInvoker from conf/jboss-service.xml --"
+">\n"
+" <attribute name=\"InvokerName\">jboss:service=invoker,"
+"type=jrmp</attribute>\n"
+" <!-- The target MBean is the InvokerAdaptorService configured "
+"below -->\n"
+" <attribute name=\"TargetName\">jboss.jmx:type=adaptor,"
+"name=Invoker</attribute>\n"
+" <!-- Where to bind the RMIAdaptor proxy -->\n"
+" <attribute name=\"JndiName\">jmx/invoker/RMIAdaptor</"
+"attribute>\n"
+" <!-- The RMI compabitle MBeanServer interface -->\n"
+" <attribute name=\"ExportedInterface\">org.jboss.jmx.adaptor."
+"rmi.RMIAdaptor</attribute>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <iterceptors>\n"
+" <interceptor>org.jboss.proxy."
+"ClientMethodInterceptor</interceptor>\n"
+" <interceptor>\n"
+" org.jboss.jmx.connector.invoker.client."
+"InvokerAdaptorClientInterceptor \n"
+" </interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </iterceptors>\n"
+" </attribute>\n"
+" <depends>jboss:service=invoker,type=jrmp</depends>\n"
+" </mbean> \n"
+" <!-- This is the service that handles the RMIAdaptor invocations by "
+"routing\n"
+" them to the MBeanServer the service is deployed under. -->\n"
+" <mbean code=\"org.jboss.jmx.connector.invoker.InvokerAdaptorService"
+"\" \n"
+" name=\"jboss.jmx:type=adaptor,name=Invoker\">\n"
+" <attribute name=\"ExportedInterface\">org.jboss.jmx.adaptor."
+"rmi.RMIAdaptor</attribute>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+"<server>\n"
+" <!-- The JRMP invoker proxy configuration for the "
+"InvokerAdaptorService -->\n"
+" <mbean code=\"org.jboss.invocation.jrmp.server.JRMPProxyFactory\"\n"
+" name=\"jboss.jmx:type=adaptor,name=Invoker,protocol=jrmp,"
+"service=proxyFactory\">\n"
+" <!-- Use the standard JRMPInvoker from conf/jboss-service.xml --"
+">\n"
+" <attribute name=\"InvokerName\">jboss:service=invoker,"
+"type=jrmp</attribute>\n"
+" <!-- The target MBean is the InvokerAdaptorService configured "
+"below -->\n"
+" <attribute name=\"TargetName\">jboss.jmx:type=adaptor,"
+"name=Invoker</attribute>\n"
+" <!-- Where to bind the RMIAdaptor proxy -->\n"
+" <attribute name=\"JndiName\">jmx/invoker/RMIAdaptor</"
+"attribute>\n"
+" <!-- The RMI compabitle MBeanServer interface -->\n"
+" <attribute name=\"ExportedInterface\">org.jboss.jmx.adaptor."
+"rmi.RMIAdaptor</attribute>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <iterceptors>\n"
+" <interceptor>org.jboss.proxy."
+"ClientMethodInterceptor</interceptor>\n"
+" <interceptor>\n"
+" org.jboss.jmx.connector.invoker.client."
+"InvokerAdaptorClientInterceptor \n"
+" </interceptor>\n"
+" <interceptor>org.jboss.invocation."
+"InvokerInterceptor</interceptor>\n"
+" </iterceptors>\n"
+" </attribute>\n"
+" <depends>jboss:service=invoker,type=jrmp</depends>\n"
+" </mbean> \n"
+" <!-- This is the service that handles the RMIAdaptor invocations by "
+"routing\n"
+" them to the MBeanServer the service is deployed under. -->\n"
+" <mbean code=\"org.jboss.jmx.connector.invoker.InvokerAdaptorService"
+"\" \n"
+" name=\"jboss.jmx:type=adaptor,name=Invoker\">\n"
+" <attribute name=\"ExportedInterface\">org.jboss.jmx.adaptor."
+"rmi.RMIAdaptor</attribute>\n"
+" </mbean>\n"
+"</server>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2138
+#, fuzzy, no-c-format
+msgid ""
+"The first MBean, <literal>org.jboss.invocation.jrmp.server.JRMPProxyFactory</"
+"literal>, is the proxy factory MBean service that creates proxies for the "
+"RMI/JRMP protocol. The configuration of this service as shown in <xref "
+"linkend=\"A_Detached_Invoker_Example_the_MBeanServer_Invoker_Adaptor_Service-"
+"The_default_jmx_invoker_adaptor_server.sar_jboss_service."
+"xml_deployment_descriptor\"/> states that the JRMPInvoker will be used as "
+"the detached invoker, the <literal>InvokerAdaptorService</literal> is the "
+"target mbean to which requests will be forwarded, that the proxy will expose "
+"the <literal>RMIAdaptor</literal> interface, the proxy will be bound into "
+"JNDI under the name <literal>jmx/invoker/RMIAdaptor</literal>, and the proxy "
+"will contain 3 interceptors: <literal>ClientMethodInterceptor</literal>, "
+"<literal>InvokerAdaptorClientInterceptor</literal>, "
+"<literal>InvokerInterceptor</literal>. The configuration of the "
+"<literal>InvokerAdaptorService</literal> simply sets the RMIAdaptor "
+"interface that the service is exposing."
+msgstr ""
+"第一个 MBean,<literal>org.jboss.invocation.jrmp.server.JRMPProxyFactory</"
+"literal>,是为 RMI/JRMP 协议创建代理的 proxy factory MBean 服务。<xref "
+"linkend=\"ch2.jmxinvokersar.ex\"/> 里展示的这个服务的配置表明, JRMPInvoker "
+"将作为脱管调用者使用,<literal>InvokerAdaptorService</literal> 是所有请求被转"
+"发的目标 mbean,代理将开放 <literal>RMIAdaptor</literal> 接口,这个代理将用名"
+"字 <literal>jmx/invoker/RMIAdaptor</literal>绑定到 JNDI,而且它将包括三个拦截"
+"器:<literal>ClientMethodInterceptor</literal>,"
+"<literal>InvokerAdaptorClientInterceptor</literal>,"
+"<literal>InvokerInterceptor</literal>。<literal>InvokerAdaptorService</"
+"literal> 的配置简单地设置了这个服务所开放的 RMIAdaptor 接口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2141
+#, no-c-format
+msgid ""
+"The last piece of the configuration for exposing the "
+"<literal>InvokerAdaptorService</literal> via RMI/JRMP is the detached "
+"invoker. The detached invoker we will use is the standard RMI/JRMP invoker "
+"used by the EJB containers for home and remote invocations, and this is the "
+"<literal>org.jboss.invocation.jrmp.server.JRMPInvoker</literal> MBean "
+"service configured in the <literal>conf/jboss-service.xml</literal> "
+"descriptor. That we can use the same service instance emphasizes the "
+"detached nature of the invokers. The JRMPInvoker simply acts as the RMI/JRMP "
+"endpoint for all RMI/JRMP proxies regardless of the interface(s) the proxies "
+"expose or the service the proxies utilize."
+msgstr ""
+"通过 RMI/JRMP 来开放 <literal>InvokerAdaptorService</literal> 的配置的最后一"
+"部分是脱管调用者。我们将使用的脱管调用者是 EJB 容器用于 home 和 remote 调用的"
+"标准 RMI/JRMP 调用者,而且它是 <literal>conf/jboss-service.xml</literal> 描述"
+"符里配置的 <literal>org.jboss.invocation.jrmp.server.JRMPInvoker</literal> "
+"MBean 服务。我们能够施用相同的服务实例强调了调用者的脱管性质。JRMPInvoker 简"
+"单地为所有 RMI/JRMP 代理担任 RMI/JRMP 端点,而不管代理开放的接口或利用的服"
+"务。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2147
+#, no-c-format
+msgid "Detached Invoker Reference"
+msgstr "脱管调用者引用"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2149
+#, no-c-format
+msgid "The JRMPInvoker - RMI/JRMP Transport"
+msgstr "The JRMPInvoker - RMI/JRMP Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2150
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.jrmp.server.JRMPInvoker</literal> class is "
+"an MBean service that provides the RMI/JRMP implementation of the Invoker "
+"interface. The JRMPInvoker exports itself as an RMI server so that when it "
+"is used as the Invoker in a remote client, the JRMPInvoker stub is sent to "
+"the client instead and invocations use the RMI/JRMP protocol."
+msgstr ""
+"<literal>org.jboss.invocation.jrmp.server.JRMPInvoker</literal> 类是一个 "
+"MBean 服务,它提供调用者接口的 RMI/JRMP 实现。JRMPInvoker 把它自己作为 RMI 服"
+"务器输出,所以当它在远程客户端作为调用者使用时,JRMPInvoker stub 被发送到客户"
+"端且这个调用使用 RMI/JRMP 协议。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2153
+#, no-c-format
+msgid ""
+"The JRMPInvoker MBean supports a number of attribute to configure the RMI/"
+"JRMP transport layer. Its configurable attributes are:"
+msgstr ""
+"RMPInvoker MBean 支持许多属性来配置 RMI/JRMP 传输层。它的可配置属性是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2158
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RMIObjectPort</emphasis>: sets the RMI server socket "
+"listening port number. This is the port RMI clients will connect to when "
+"communicating through the proxy interface. The default setting in the "
+"<literal>jboss-service.xml</literal> descriptor is 4444, and if not "
+"specified, the attribute defaults to 0 to indicate an anonymous port should "
+"be used."
+msgstr ""
+"<emphasis role=\"bold\">RMIObjectPort</emphasis>:设置 RMI 服务器套接字侦听端"
+"口号码。这是当 RMI 客户通过代理接口通信时将连接的端口。<literal>jboss-"
+"service.xml</literal> 描述符里缺省的设置是 4444,如果没有指定,这个属性缺省"
+"为 0 来表示使用匿名的端口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2163
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RMIClientSocketFactory</emphasis>: specifies a fully "
+"qualified class name for the <literal>java.rmi.server."
+"RMIClientSocketFactory</literal> interface to use during export of the proxy "
+"interface."
+msgstr ""
+"<emphasis role=\"bold\">RMIClientSocketFactory</emphasis>:在输出代理接口时,"
+"指定 <literal>java.rmi.server.RMIClientSocketFactory</literal> 接口使用的类全"
+"名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2168
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RMIServerSocketFactory</emphasis>: specifies a fully "
+"qualified class name for the <literal>java.rmi.server."
+"RMIServerSocketFactory</literal> interface to use during export of the proxy "
+"interface."
+msgstr ""
+"<emphasis role=\"bold\">RMIServerSocketFactory</emphasis>:在输出代理接口时,"
+"指定 <literal>java.rmi.server.RMIServerSocketFactory</literal> 接口使用的类全"
+"名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2173
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerAddress</emphasis>: specifies the interface "
+"address that will be used for the RMI server socket listening port. This can "
+"be either a DNS hostname or a dot-decimal Internet address. Since the "
+"<literal>RMIServerSocketFactory</literal> does not support a method that "
+"accepts an InetAddress object, this value is passed to the "
+"<literal>RMIServerSocketFactory</literal> implementation class using "
+"reflection. A check for the existence of a <literal>public void "
+"setBindAddress(java.net.InetAddress addr)</literal> method is made, and if "
+"one exists the <literal>RMIServerSocketAddr</literal> value is passed to the "
+"<literal>RMIServerSocketFactory</literal> implementation. If the "
+"<literal>RMIServerSocketFactory</literal> implementation does not support "
+"such a method, the <literal>ServerAddress</literal> value will be ignored."
+msgstr ""
+"<emphasis role=\"bold\">ServerAddress</emphasis>:指定将用于 RMI 服务器套接字"
+"侦听端口的接口地址。它可以是一个 DNS 主机名或互联网地址。既然 "
+"<literal>RMIServerSocketFactory</literal> 不支持接受 InetAddress 对象的方法,"
+"这个值用 reflection 传到 <literal>RMIServerSocketFactory</literal> 实现类里。"
+"检查<literal>public void setBindAddress(java.net.InetAddress addr)</literal> "
+"方法是否存在,如果存在, <literal>RMIServerSocketAddr</literal> 值就被传入 "
+"<literal>RMIServerSocketFactory</literal> 实现。如果 "
+"<literal>RMIServerSocketFactory</literal> 实现不支持这样的方法,"
+"<literal>ServerAddress</literal> 指将被忽略。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2178
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityDomain</emphasis>: specifies the JNDI name "
+"of an <literal>org.jboss.security.SecurityDomain</literal> interface "
+"implementation to associate with the <literal>RMIServerSocketFactory</"
+"literal> implementation. The value will be passed to the "
+"<literal>RMIServerSocketFactory</literal> using reflection to locate a "
+"method with a signature of <literal>public void setSecurityDomain(org.jboss."
+"security.SecurityDomain d)</literal>. If no such method exists the "
+"<literal>SecurityDomain</literal> value will be ignored."
+msgstr ""
+"<emphasis role=\"bold\">SecurityDomain</emphasis>:指定 <literal>org.jboss."
+"security.SecurityDomain</literal> 接口实现和 "
+"<literal>RMIServerSocketFactory</literal> 实现相关联的 JNDI 名。这个值将用反"
+"射(reflection)来定位有 <literal>public void setSecurityDomain(org.jboss."
+"security.SecurityDomain d)</literal> 签名的方法,然后传入 "
+"<literal>RMIServerSocketFactory</literal>。如果这个方法不存在,"
+"<literal>SecurityDomain</literal> 值将被忽略。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2186
+#, no-c-format
+msgid "The PooledInvoker - RMI/Socket Transport"
+msgstr "The PooledInvoker - RMI/Socket Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2187
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.pooled.server.PooledInvoker</literal> is "
+"an MBean service that provides RMI over a custom socket transport "
+"implementation of the Invoker interface. The <literal>PooledInvoker</"
+"literal> exports itself as an RMI server so that when it is used as the "
+"<literal>Invoker</literal> in a remote client, the <literal>PooledInvoker</"
+"literal> stub is sent to the client instead and invocations use the custom "
+"socket protocol."
+msgstr ""
+"<literal>org.jboss.invocation.pooled.server.PooledInvoker</literal> 是一个 "
+"MBean 服务,它提供调用者接口的自定义套接字传输实现之上的 RMI。"
+"<literal>PooledInvoker</literal> 把它自己作为 RMI 服务器输出,所以当它在远程"
+"客户端被用作 <literal>Invoker</literal> 时,<literal>PooledInvoker</"
+"literal> stub 就被发送到客户端和使用自定义套接字端口协议的调用中。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2190
+#, no-c-format
+msgid ""
+"The <literal>PooledInvoker</literal> MBean supports a number of attribute to "
+"configure the socket transport layer. Its configurable attributes are:"
+msgstr ""
+"<literal>PooledInvoker</literal> MBean 支持许多属性来配置套接字传输层。它的可"
+"配置属性是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2195
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>: The number of threads "
+"that exist for accepting client connections. The default is 1."
+msgstr ""
+"<emphasis role=\"bold\">NumAcceptThreads</emphasis>:用来接受客户联接的线程的"
+"数量。它的缺省值是 1。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2200
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">MaxPoolSize</emphasis>: The number of server threads "
+"for processing client. The default is 300."
+msgstr ""
+"<emphasis role=\"bold\">MaxPoolSize</emphasis>:处理客户的服务器线程数量。它"
+"的缺省值是 300。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2205
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SocketTimeout</emphasis>: The socket timeout value "
+"passed to the <literal>Socket.setSoTimeout()</literal> method. The default "
+"is 60000."
+msgstr ""
+"<emphasis role=\"bold\">SocketTimeout</emphasis>:传入 <literal>Socket."
+"setSoTimeout()</literal> 方法的套接字超时时间。它的缺省值是 6000。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2210
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerBindPort</emphasis>: The port used for the "
+"server socket. A value of 0 indicates that an anonymous port should be "
+"chosen."
+msgstr ""
+"<emphasis role=\"bold\">ServerBindPort</emphasis>:用于服务器套接字的端口。如"
+"果为 0 则表示使用匿名端口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2215
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientConnectAddress</emphasis>: The address that "
+"the client passes to the <literal>Socket(addr, port)</literal> constructor. "
+"This defaults to the server <literal> InetAddress.getLocalHost()</literal> "
+"value."
+msgstr ""
+"<emphasis role=\"bold\">ClientConnectAddress</emphasis>:客户传入 "
+"<literal>Socket(addr, port)</literal> 构造函数的地址。它的缺省值是服务器的 "
+"<literal> InetAddress.getLocalHost()</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2220
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientConnectPort</emphasis>: The port that the "
+"client passes to the <literal>Socket(addr, port)</literal> constructor. The "
+"default is the port of the server listening socket."
+msgstr ""
+"<emphasis role=\"bold\">ClientConnectPort</emphasis>:客户传入 "
+"<literal>Socket(addr, port)</literal> 构造函数的端口。它的缺省值是服务器侦听"
+"套接字的端口号。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2225
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientMaxPoolSize</emphasis>: The client side "
+"maximum number of threads. The default is 300."
+msgstr ""
+"<emphasis role=\"bold\">ClientMaxPoolSize</emphasis>:客户端最大的线程数。它"
+"的缺省值是 300。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2230
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Backlog</emphasis>: The backlog associated with the "
+"server accept socket. The default is 200."
+msgstr ""
+"<emphasis role=\"bold\">Backlog</emphasis>:与服务器接受套接字关联的 "
+"backlog。缺省值是 200。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2235
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">EnableTcpNoDelay</emphasis>: A boolean flag "
+"indicating if client sockets will enable the <literal>TcpNoDelay</literal> "
+"flag on the socket. The default is false."
+msgstr ""
+"<emphasis role=\"bold\">EnableTcpNoDelay</emphasis>:是一个布尔值,指出客户套"
+"接字是否启用 <literal>TcpNoDelay</literal> 标记。缺省值是 false。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2240
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerBindAddress</emphasis>: The address on which "
+"the server binds its listening socket. The default is an empty value which "
+"indicates the server should be bound on all interfaces."
+msgstr ""
+"<emphasis role=\"bold\">ServerBindAddress</emphasis>:服务器用来绑定它的侦听"
+"套接字的地址。缺省为空值,表示服务器应该绑定所有的接口。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2245
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TransactionManagerService</emphasis>: The JMX "
+"ObjectName of the JTA transaction manager service."
+msgstr ""
+"<emphasis role=\"bold\">TransactionManagerService</emphasis>:JTA 事务管理服"
+"务的 JMX ObjectName。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2253
+#, no-c-format
+msgid "The IIOPInvoker - RMI/IIOP Transport"
+msgstr "The IIOPInvoker - RMI/IIOP Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2254
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.iiop.IIOPInvoker</literal> class is an "
+"MBean service that provides the RMI/IIOP implementation of the "
+"<literal>Invoker</literal> interface. The <literal>IIOPInvoker</literal> "
+"routes IIOP requests to CORBA servants. This is used by the <literal>org."
+"jboss.proxy.ejb.IORFactory</literal> proxy factory to create RMI/IIOP "
+"proxies. However, rather than creating Java proxies (as the JRMP proxy "
+"factory does), this factory creates CORBA IORs. An <literal>IORFactory</"
+"literal> is associated to a given enterprise bean. It registers with the "
+"IIOP invoker two CORBA servants: <literal>anEjbHomeCorbaServant</literal> "
+"for the bean's <literal>EJBHome</literal> and an "
+"<literal>EjbObjectCorbaServant</literal> for the bean's "
+"<literal>EJBObject</literal>s."
+msgstr ""
+"<literal>org.jboss.invocation.iiop.IIOPInvoker</literal> 类是一个 MBean 服"
+"务,它提供 <literal>Invoker</literal> 的 RMI/IIOP 实现。"
+"<literal>IIOPInvoker</literal> 把 IIOP 请求指引到 CORBA servants。这被 "
+"<literal>org.jboss.proxy.ejb.IORFactory</literal> proxy factory 用来创建 RMI/"
+"IIOP 代理。然而,还个 factory 创建 CORBA IORs,而不是 Java 代理 (如 JRMP "
+"proxy factory 所为)。<literal>IORFactory</literal> 与给定的企业级 bean 相关"
+"联。它在 IIOP 调用者上注册了两个 CORBA servants:用于 bean 的 "
+"<literal>EJBHome</literal> 的 <literal>anEjbHomeCorbaServant</literal> 和用"
+"于 bean 的 <literal>EJBObject</literal> 的 <literal>EjbObjectCorbaServant</"
+"literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2257
+#, no-c-format
+msgid ""
+"The IIOPInvoker MBean has no configurable properties, since all properties "
+"are configured from the <literal>conf/jacorb.properties</literal> property "
+"file used by the JacORB CORBA service."
+msgstr ""
+"既然所有属性都从 JacORB CORBA 服务所使用的 <literal>conf/jacorb.properties</"
+"literal> 属性文件里配置,IIOPInvoker MBean 本身没有可配置属性。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2263
+#, no-c-format
+msgid "The JRMPProxyFactory Service - Building Dynamic JRMP Proxies"
+msgstr "The JRMPProxyFactory Service - Building Dynamic JRMP Proxies"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2264
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.jrmp.server.JRMPProxyFactory</literal> "
+"MBean service is a proxy factory that can expose any interface with RMI "
+"compatible semantics for access to remote clients using JRMP as the "
+"transport."
+msgstr ""
+"<literal>org.jboss.invocation.jrmp.server.JRMPProxyFactory</literal> MBean 服"
+"务是一个代理工厂(proxy factory),它可以使用 RMI 兼容语义开放任何接口来访问远"
+"程客户,并以 JRMP 为传输方法。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2267
+#, no-c-format
+msgid "The JRMPProxyFactory supports the following attributes:"
+msgstr "JRMPProxyFactory 支持下列的属性:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2272
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerName</emphasis>: The server side JRMPInvoker "
+"MBean service JMX ObjectName string that will handle the RMI/JRMP transport."
+msgstr ""
+"<emphasis role=\"bold\">InvokerName</emphasis>:服务器端的 JRMPInvoker MBean "
+"服务的 JMX ObjectName 字符串,它将处理 RMI/JRMP 传输。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2277
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TargetName</emphasis>: The server side MBean that "
+"exposes the <literal>invoke(Invocation)</literal> JMX operation for the "
+"exported interface. This is used as the destination service for any "
+"invocations done through the proxy."
+msgstr ""
+"<emphasis role=\"bold\">TargetName</emphasis>:服务器端的 MBean,它为输出接口"
+"开放 <literal>invoke(Invocation)</literal> JMX 操作。它被用作任何通过代理的调"
+"用的目的地服务。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2282
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The JNDI name under which the "
+"proxy will be bound."
+msgstr "<emphasis role=\"bold\">JndiName</emphasis>:代理将被绑定的 JNDI 名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2287
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>: The fully qualified "
+"class name of the interface that the proxy implements. This is the typed "
+"view of the proxy that the client uses for invocations."
+msgstr ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>:代理实现的接口的类全"
+"名。它是客户用于调用的代理的类型视图。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2292
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientInterceptors</emphasis>: An XML fragment of "
+"interceptors/interceptor elements with each interceptor element body "
+"specifying the fully qualified class name of an <literal>org.jboss.proxy."
+"Interceptor</literal> implementation to include in the proxy interceptor "
+"stack. The ordering of the interceptors/interceptor elements defines the "
+"order of the interceptors."
+msgstr ""
+"<emphasis role=\"bold\">ClientInterceptors</emphasis>:interceptors/"
+"interceptor 元素的 XML 片段,每个 interceptor 元素体指定了包含在代理拦截器栈"
+"里的 <literal>org.jboss.proxy.Interceptor</literal> 实现的类全名。"
+"interceptors/interceptor 元素的顺序定义了拦截器的顺序。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2300
+#, no-c-format
+msgid "The HttpInvoker - RMI/HTTP Transport"
+msgstr "The HttpInvoker - RMI/HTTP Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2301
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.http.server.HttpInvoker</literal> MBean "
+"service provides support for making invocations into the JMX bus over HTTP. "
+"Unlike the <literal>JRMPInvoker</literal>, the <literal>HttpInvoker</"
+"literal> is not an implementation of <literal>Invoker</literal>, but it does "
+"implement the Invoker.invoke method. The HttpInvoker is accessed indirectly "
+"by issuing an HTTP POST against the <literal>org.jboss.invocation.http."
+"servlet.InvokerServlet</literal>. The <literal>HttpInvoker</literal> exports "
+"a client side proxy in the form of the <literal>org.jboss.invocation.http."
+"interfaces.HttpInvokerProxy</literal> class, which is an implementation of "
+"<literal>Invoker</literal>, and is serializable. The <literal>HttpInvoker</"
+"literal> is a drop in replacement for the <literal>JRMPInvoker</literal> as "
+"the target of the <literal>bean-invoker</literal> and <literal>home-invoker</"
+"literal> EJB configuration elements. The <literal>HttpInvoker</literal> and "
+"<literal>InvokerServlet</literal> are deployed in the <literal>http-invoker."
+"sar</literal> discussed in the JNDI chapter in the section entitled "
+"Accessing JNDI over HTTP"
+msgstr ""
+"<literal>org.jboss.invocation.http.server.HttpInvoker</literal> MBean 服务提"
+"供对基于 HTTP 的 JMX 总线调用的支持。不象 <literal>JRMPInvoker</literal>,"
+"<literal>HttpInvoker</literal> 不是 <literal>Invoker</literal> 的实现,但它实"
+"现了 Invoker.invoke 方法。通过发送 HTTP POST 到 <literal>org.jboss."
+"invocation.http.servlet.InvokerServlet</literal>,HttpInvoker 被间接地访问。"
+"<literal>HttpInvoker</literal> 用 <literal>org.jboss.invocation.http."
+"interfaces.HttpInvokerProxy</literal> 类的方式输出一个客户端代理,它是 "
+"<literal>Invoker</literal> 的一个可串形化的实现。作为 <literal>bean-invoker</"
+"literal> 和 <literal>home-invoker</literal> EJB 配置元素的目标,"
+"<literal>HttpInvoker</literal> 代替了 <literal>JRMPInvoker</literal>。"
+"<literal>HttpInvoker</literal> 和 <literal>InvokerServlet</literal> 部署在 "
+"<literal>http-invoker.sar</literal> 里,我们会在 Accessing JNDI over HTTP 部"
+"分的 JNDI 章里讨论它。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2304
+#, no-c-format
+msgid "The HttpInvoker supports the following attributes:"
+msgstr "HttpInvoker 支持下面的属性:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2309 J2EE_Reference_Introduction.xml:2377
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURL</emphasis>: This is either the http URL "
+"to the <literal>InvokerServlet</literal> mapping, or the name of a system "
+"property that will be resolved inside the client VM to obtain the http URL "
+"to the <literal>InvokerServlet</literal>."
+msgstr ""
+"<emphasis role=\"bold\">InvokerURL</emphasis>:这是 <literal>InvokerServlet</"
+"literal> 映射的 http URL 或者在客户端 VM 里解析的获取 "
+"<literal>InvokerServlet</literal> 映射的 http URL 的系统属性名。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2314 J2EE_Reference_Introduction.xml:2382
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURLPrefix</emphasis>: If there is no "
+"<literal>invokerURL</literal> set, then one will be constructed via the "
+"concatenation of <literal>invokerURLPrefix</literal> + the local host + "
+"<literal>invokerURLSuffix</literal>. The default prefix is <literal>http://</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">InvokerURLPrefix</emphasis>:如果没有 "
+"<literal>invokerURL</literal> 集,将使用 <literal>invokerURLPrefix</literal> "
+"+ the local host + <literal>invokerURLSuffix</literal> 来构建。缺省的前缀是 "
+"<literal>http://</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2319 J2EE_Reference_Introduction.xml:2387
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURLSuffix</emphasis>: If there is no "
+"<literal>invokerURL</literal> set, then one will be constructed via the "
+"concatenation of <literal>invokerURLPrefix</literal> + the local host + "
+"<literal>invokerURLSuffix</literal>. The default suffix is <literal>:8080/"
+"invoker/JMXInvokerServlet</literal>."
+msgstr ""
+"<emphasis role=\"bold\">InvokerURLSuffix</emphasis>:如果没有 "
+"<literal>invokerURL</literal> 集,将使用 <literal>invokerURLPrefix</literal> "
+"+ the local host + <literal>invokerURLSuffix</literal> 来构建。缺省的后缀是 "
+"<literal>:8080/invoker/JMXInvokerServlet</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2324
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">UseHostName</emphasis>: A boolean flag if the "
+"<literal>InetAddress.getHostName()</literal> or <literal>getHostAddress()</"
+"literal> method should be used as the host component of "
+"<literal>invokerURLPrefix</literal> + host + <literal>invokerURLSuffix</"
+"literal>. If true <literal>getHostName()</literal> is used, otherwise "
+"<literal>getHostAddress()</literal> is used."
+msgstr ""
+"<emphasis role=\"bold\">UseHostName</emphasis>:它是它个布尔值,指定 "
+"<literal>InetAddress.getHostName()</literal> 或 <literal>getHostAddress()</"
+"literal> 是否应该被用在 <literal>invokerURLPrefix</literal> + host + "
+"<literal>invokerURLSuffix</literal> 里的 host 部分。它如果为 true,将使用 "
+"<literal>getHostName()</literal>,否则使用 <literal>getHostAddress()</"
+"literal>。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2332
+#, no-c-format
+msgid "The HA JRMPInvoker - Clustered RMI/JRMP Transport"
+msgstr "The HA JRMPInvoker - Clustered RMI/JRMP Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2333
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.proxy.generic.ProxyFactoryHA</literal> service is an "
+"extension of the <literal>ProxyFactoryHA</literal> that is a cluster aware "
+"factory. The <literal>ProxyFactoryHA</literal> fully supports all of the "
+"attributes of the <literal>JRMPProxyFactory</literal>. This means that "
+"customized bindings of the port, interface and socket transport are "
+"available to clustered RMI/JRMP as well. In addition, the following cluster "
+"specific attributes are supported:"
+msgstr ""
+"<literal>org.jboss.proxy.generic.ProxyFactoryHA</literal> 服务是 cluster-"
+"aware factory <literal>ProxyFactoryHA</literal> 的一个扩展。"
+"<literal>ProxyFactoryHA</literal> 完全支持 <literal>JRMPProxyFactory</"
+"literal> 的所有属性。这意味着对端口,接口和套接字传输的自定义绑定,对于群集"
+"的 RMI/JRMP 也是可用的。此外,下面的与群集相关的属性也被支持:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2338
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>: The JMX "
+"<literal>ObjectName</literal> of the cluster service to which the proxy is "
+"to be associated with."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2343
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis>: The class name of the "
+"<literal>org.jboss.ha.framework.interfaces.LoadBalancePolicy</literal> "
+"interface implementation to associate with the proxy."
+msgstr ""
+"<emphasis role=\"bold\">LoadBalancePolicy</emphasis>:与代理关联的 "
+"<literal>org.jboss.ha.framework.interfaces.LoadBalancePolicy</literal> 接口实"
+"现的类名。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2351
+#, no-c-format
+msgid "The HA HttpInvoker - Clustered RMI/HTTP Transport"
+msgstr "The HA HttpInvoker - Clustered RMI/HTTP Transport"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2352
+#, no-c-format
+msgid ""
+"The RMI/HTTP layer allows for software load balancing of the invocations in "
+"a clustered environment. The HA capable extension of the HTTP invoker "
+"borrows much of its functionality from the HA-RMI/JRMP clustering. To enable "
+"HA-RMI/HTTP you need to configure the invokers for the EJB container. This "
+"is done through either a <literal>jboss.xml</literal> descriptor, or the "
+"<literal>standardjboss.xml</literal> descriptor."
+msgstr ""
+"RMI/HTTP 层允许群集环境里的调用的负载平衡。HTTP 调用者的具备 HA 能力的扩展借"
+"用了 HA-RMI/JRMP 群集里的大部分功能。要启用 HA-RMI/HTTP,你需要配置 EJB 容器"
+"的调用者。这可以通过 <literal>jboss.xml</literal> 描述符或 "
+"<literal>standardjboss.xml</literal> 描述符来完成。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2358
+#, no-c-format
+msgid "HttpProxyFactory - Building Dynamic HTTP Proxies"
+msgstr "HttpProxyFactory - Building Dynamic HTTP Proxies"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2359
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.invocation.http.server.HttpProxyFactory</literal> "
+"MBean service is a proxy factory that can expose any interface with RMI "
+"compatible semantics for access to remote clients using HTTP as the "
+"transport."
+msgstr ""
+"<literal>org.jboss.invocation.http.server.HttpProxyFactory</literal> MBean 服"
+"务是一个代理工厂(proxy factory),它可以开放有 RMI 兼容语义的任何接口用来 "
+"HTTP 访问远程客户。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2362
+#, no-c-format
+msgid "The HttpProxyFactory supports the following attributes:"
+msgstr "HttpProxyFactory 支持下面的属性:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2367
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerName</emphasis>: The server side MBean that "
+"exposes the invoke operation for the exported interface. The name is "
+"embedded into the <literal>HttpInvokerProxy</literal> context as the target "
+"to which the invocation should be forwarded by the <literal>HttpInvoker</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">InvokerName</emphasis>:服务器端的 MBean,它为输出的"
+"接口开放调用操作。它的名字嵌入 <literal>HttpInvokerProxy</literal> 上下文,作"
+"为 <literal>HttpInvoker</literal> 转发的调用的目标。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2372
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The JNDI name under which the "
+"<literal>HttpInvokerProxy</literal> will be bound. This is the name clients "
+"lookup to obtain the dynamic proxy that exposes the service interfaces and "
+"marshalls invocations over HTTP. This may be specified as an empty value to "
+"indicate that the proxy should not be bound into JNDI."
+msgstr ""
+"<emphasis role=\"bold\">JndiName</emphasis>:<literal>HttpInvokerProxy</"
+"literal> 将被绑定的 JNDI 名。客户通过查找它来获得开放服务接口和将 HTTP 上的调"
+"用打包的动态代理。如果它的值为空就表示这个代理不应该绑定 JNDI。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2392
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">UseHostName</emphasis>: A boolean flag indicating if "
+"the <literal>InetAddress.getHostName()</literal> or <literal>getHostAddress()"
+"</literal> method should be used as the host component of "
+"<literal>invokerURLPrefix</literal> + host + <literal>invokerURLSuffix</"
+"literal>. If true <literal>getHostName()</literal> is used, otherwise "
+"<literal>getHostAddress()</literal> is used."
+msgstr ""
+"<emphasis role=\"bold\">UseHostName</emphasis>:它是一个布尔值标记,它指出 "
+"<literal>InetAddress.getHostName()</literal> 或 <literal>getHostAddress()</"
+"literal> 方法是否应该用在 <literal>invokerURLPrefix</literal> + host + "
+"<literal>invokerURLSuffix</literal> 里的 host 部分。它如果为 true,就使用 "
+"<literal>getHostName()</literal>,否则使用 <literal>getHostAddress()</"
+"literal>。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2397
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>: The name of the RMI "
+"compatible interface that the <literal>HttpInvokerProxy</literal> implements."
+msgstr ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>:"
+"<literal>HttpInvokerProxy</literal> 实现的 RMI 兼容接口的名字。"
+
+#. Tag: title
+#: J2EE_Reference_Introduction.xml:2405
+#, no-c-format
+msgid "Steps to Expose Any RMI Interface via HTTP"
+msgstr "通过 HTTP 开放任何 RMI 接口的步骤"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2406
+#, no-c-format
+msgid ""
+"Using the <literal>HttpProxyFactory</literal> MBean and JMX, you can expose "
+"any interface for access using HTTP as the transport. The interface to "
+"expose does not have to be an RMI interface, but it does have to be "
+"compatible with RMI in that all method parameters and return values are "
+"serializable. There is also no support for converting RMI interfaces used as "
+"method parameters or return values into their stubs."
+msgstr ""
+"使用 <literal>HttpProxyFactory</literal> MBean 和 JMX,你可以为基于 HTTP 的访"
+"问开放任何接口。开放的接口不一定要是 RMI 接口,但它必须和 RMI 兼容,因此所有"
+"方法参数和返回值都是可串形化的。它也不支持把用作方法参数或返回值的 RMI 接口转"
+"换到它们的 stub 里去。"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2409
+#, no-c-format
+msgid "The three steps to making your object invocable via HTTP are:"
+msgstr "使你的对象可通过 HTTP 调用的三个步骤是:"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2414
+#, no-c-format
+msgid ""
+"Create a mapping of longs to the RMI interface methods using the "
+"<literal>MarshalledInvocation.calculateHash</literal> method. Here for "
+"example, is the procedure for an RMI <literal>SRPRemoteServerInterface</"
+"literal> interface:"
+msgstr ""
+"使用 <literal>MarshalledInvocation.calculateHash</literal> 方法创建一个 "
+"longs 到 RMI 接口方法的映射。下面的例子是一个 RMI "
+"<literal>SRPRemoteServerInterface</literal> 接口的过程:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2417
+#, fuzzy, no-c-format
+msgid ""
+"import java.lang.reflect.Method;\n"
+"import java.util.HashMap;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+"\n"
+"HashMap marshalledInvocationMapping = new HashMap();\n"
+"\n"
+"// Build the Naming interface method map\n"
+"Method[] methods = SRPRemoteServerInterface.class.getMethods();\n"
+"for(int m = 0; m < methods.length; m ++) {\n"
+" Method method = methods[m];\n"
+" Long hash = new Long(MarshalledInvocation.calculateHash(method));\n"
+" marshalledInvocationMapping.put(hash, method);\n"
+"}"
+msgstr ""
+"import java.lang.reflect.Method;\n"
+"import java.util.HashMap;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+" \n"
+"HashMap marshalledInvocationMapping = new HashMap();\n"
+" \n"
+"// Build the Naming interface method map\n"
+"Method[] methods = SRPRemoteServerInterface.class.getMethods();\n"
+"for(int m = 0; m < methods.length; m ++) {\n"
+" Method method = methods[m];\n"
+" Long hash = new Long(MarshalledInvocation.calculateHash(method));\n"
+" marshalledInvocationMapping.put(hash, method);\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2420
+#, no-c-format
+msgid ""
+"Either create or extend an existing MBean to support an invoke operation. "
+"Its signature is <literal>Object invoke(Invocation invocation) throws "
+"Exception</literal>, and the steps it performs are as shown here for the "
+"<literal>SRPRemoteServerInterface</literal> interface. Note that this uses "
+"the <literal>marshalledInvocationMapping</literal> from step 1 to map from "
+"the <literal>Long</literal> method hashes in the "
+"<literal>MarshalledInvocation</literal> to the <literal>Method</literal> for "
+"the interface."
+msgstr ""
+"创建或者扩展现存的 MBean 来支持一个调用操作。它的签名是 <literal>Object "
+"invoke(Invocation invocation) throws Exception</literal>,它为 "
+"<literal>SRPRemoteServerInterface</literal> 执行的步骤显示在这里。注意它使用"
+"了步骤 1 的 <literal>marshalledInvocationMapping</literal> 来把 "
+"<literal>MarshalledInvocation</literal> 里的 <literal>Long</literal> method "
+"hashes 映射到接口的 <literal>Method</literal>。"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2424
+#, fuzzy, no-c-format
+msgid ""
+"import org.jboss.invocation.Invocation;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+"\n"
+"public Object invoke(Invocation invocation)\n"
+" throws Exception\n"
+"{\n"
+" SRPRemoteServerInterface theServer = <"
+"the_actual_rmi_server_object>;\n"
+" // Set the method hash to Method mapping\n"
+" if (invocation instanceof MarshalledInvocation) {\n"
+" MarshalledInvocation mi = (MarshalledInvocation) invocation;\n"
+" mi.setMethodMap(marshalledInvocationMapping);\n"
+" }\n"
+"\n"
+" // Invoke the Naming method via reflection\n"
+" Method method = invocation.getMethod();\n"
+" Object[] args = invocation.getArguments();\n"
+" Object value = null;\n"
+" try {\n"
+" value = method.invoke(theServer, args);\n"
+" } catch(InvocationTargetException e) {\n"
+" Throwable t = e.getTargetException(); \n"
+" if (t instanceof Exception) {\n"
+" throw (Exception) e;\n"
+" } else {\n"
+" throw new UndeclaredThrowableException(t, method.toString());\n"
+" }\n"
+" }\n"
+"\n"
+" return value;\n"
+"}"
+msgstr ""
+"import org.jboss.invocation.Invocation;\n"
+"import org.jboss.invocation.MarshalledInvocation;\n"
+" \n"
+"public Object invoke(Invocation invocation)\n"
+" throws Exception\n"
+"{\n"
+" SRPRemoteServerInterface theServer = <"
+"the_actual_rmi_server_object>;\n"
+" // Set the method hash to Method mapping\n"
+" if (invocation instanceof MarshalledInvocation) {\n"
+" MarshalledInvocation mi = (MarshalledInvocation) invocation;\n"
+" mi.setMethodMap(marshalledInvocationMapping);\n"
+" }\n"
+"\n"
+" // Invoke the Naming method via reflection\n"
+" Method method = invocation.getMethod();\n"
+" Object[] args = invocation.getArguments();\n"
+" Object value = null;\n"
+" try {\n"
+" value = method.invoke(theServer, args);\n"
+" } catch(InvocationTargetException e) {\n"
+" Throwable t = e.getTargetException(); \n"
+" if (t instanceof Exception) {\n"
+" throw (Exception) e;\n"
+" } else {\n"
+" throw new UndeclaredThrowableException(t, method.toString());\n"
+" }\n"
+" }\n"
+" \n"
+" return value;\n"
+"}"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2428
+#, no-c-format
+msgid ""
+"Create a configuration of the <literal>HttpProxyFactory</literal> MBean to "
+"make the RMI/HTTP proxy available through JNDI. For example:"
+msgstr ""
+"创建 <literal>HttpProxyFactory</literal> MBean 的一个配置来使 RMI/HTTP 代理通"
+"过 JNDI 可用。例如:"
+
+#. Tag: programlisting
+#: J2EE_Reference_Introduction.xml:2431
+#, no-c-format
+msgid ""
+"<!-- Expose the SRP service interface via HTTP -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\"\n"
+" name=\"jboss.security.tests:service=SRP/HTTP\">\n"
+" <attribute name=\"InvokerURL\">http://localhost:8080/invoker/"
+"JMXInvokerServlet</attribute>\n"
+" <attribute name=\"InvokerName\">jboss.security.tests:"
+"service=SRPService</attribute>\n"
+" <attribute name=\"ExportedInterface\">\n"
+" org.jboss.security.srp.SRPRemoteServerInterface\n"
+" </attribute>\n"
+" <attribute name=\"JndiName\">srp-test-http/SRPServerInterface</"
+"attribute>\n"
+"</mbean>"
+msgstr ""
+"<!-- Expose the SRP service interface via HTTP -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\"\n"
+" name=\"jboss.security.tests:service=SRP/HTTP\">\n"
+" <attribute name=\"InvokerURL\">http://localhost:8080/invoker/"
+"JMXInvokerServlet</attribute>\n"
+" <attribute name=\"InvokerName\">jboss.security.tests:"
+"service=SRPService</attribute>\n"
+" <attribute name=\"ExportedInterface\">\n"
+" org.jboss.security.srp.SRPRemoteServerInterface\n"
+" </attribute>\n"
+" <attribute name=\"JndiName\">srp-test-http/SRPServerInterface</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Reference_Introduction.xml:2434
+#, no-c-format
+msgid ""
+"Any client may now lookup the RMI interface from JNDI using the name "
+"specified in the <literal>HttpProxyFactory</literal> (e.g., <literal>srp-"
+"test-http/SRPServerInterface</literal>) and use the obtain proxy in exactly "
+"the same manner as the RMI/JRMP version."
+msgstr ""
+"任何客户现在都可能用从 <literal>HttpProxyFactory</literal> (例如,"
+"<literal>srp-test-http/SRPServerInterface</literal>) 里指定的名字来对 JNDI "
+"的 RMI 接口进行查找,并使用和 RMI/JRMP 版本里一模一样的代理。"
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/J2EE_Security_On_JBOSS.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,7553 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:6
+#, fuzzy, no-c-format
+msgid "Security on JBoss"
+msgstr "Naming on JBoss"
+
+#. Tag: subtitle
+#: J2EE_Security_On_JBOSS.xml:7
+#, no-c-format
+msgid "J2EE Security Configuration and Architecture"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:8
+#, no-c-format
+msgid ""
+"Security is a fundamental part of any enterprise application. You need to be "
+"able to restrict who is allowed to access your applications and control what "
+"operations application users may perform. The J2EE specifications define a "
+"simple role-based security model for EJBs and web components. The JBoss "
+"component framework that handles security is the JBossSX extension "
+"framework. The JBossSX security extension provides support for both the role-"
+"based declarative J2EE security model and integration of custom security via "
+"a security proxy layer. The default implementation of the declarative "
+"security model is based on Java Authentication and Authorization Service "
+"(JAAS) login modules and subjects. The security proxy layer allows custom "
+"security that cannot be described using the declarative model to be added to "
+"an EJB in a way that is independent of the EJB business object. Before "
+"getting into the JBoss security implementation details, we will review EJB "
+"and servlet specification security models, as well as JAAS to establish the "
+"foundation for these details."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:12
+#, no-c-format
+msgid "J2EE Declarative Security Overview"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:13
+#, no-c-format
+msgid ""
+"The J2EE security model declarative in that you describe the security roles "
+"and permissions in a standard XML descriptor rather than embedding security "
+"into your business component. This isolates security from business-level "
+"code because security tends to be more a function of where the component is "
+"deployed than an inherent aspect of the component's business logic. For "
+"example, consider an ATM component that is to be used to access a bank "
+"account. The security requirements, roles and permissions will vary "
+"independently of how you access the bank account, based on what bank is "
+"managing the account, where the ATM is located, and so on."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:16
+#, no-c-format
+msgid ""
+"Securing a J2EE application is based on the specification of the application "
+"security requirements via the standard J2EE deployment descriptors. You "
+"secure access to EJBs and web components in an enterprise application by "
+"using the <literal>ejb-jar.xml</literal> and <literal>web.xml</literal> "
+"deployment descriptors. The following sections look at the purpose and usage "
+"of the various security elements."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:20
+#, no-c-format
+msgid "Security References"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:21
+#, no-c-format
+msgid ""
+"Both EJBs and servlets can declare one or more <literal>security-role-ref</"
+"literal> elements as shown in <xref linkend=\"Security_References-"
+"The_security_role_ref_element\"/>. This element declares that a component is "
+"using the <literal>role-name</literal> value as an argument to the "
+"<literal>isCallerInRole(String)</literal> method. By using the "
+"<literal>isCallerInRole</literal> method, a component can verify whether the "
+"caller is in a role that has been declared with a <literal>security-role-ref/"
+"role-name</literal> element. The <literal>role-name</literal> element value "
+"must link to a <literal>security-role</literal> element through the "
+"<literal>role-link</literal> element. The typical use of "
+"<literal>isCallerInRole</literal> is to perform a security check that cannot "
+"be defined by using the role-based <literal>method-permissions</literal> "
+"elements."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:25
+#, fuzzy, no-c-format
+msgid "The security-role-ref element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:32
+#, no-c-format
+msgid ""
+"shows the use of <literal>security-role-ref</literal> in an <literal>ejb-jar."
+"xml</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:35
+#, no-c-format
+msgid ""
+"An ejb-jar.xml descriptor fragment that illustrates the security-role-ref "
+"element usage."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:36
+#, no-c-format
+msgid ""
+"<!-- A sample ejb-jar.xml fragment -->\n"
+"<ejb-jar>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>ASessionBean</ejb-name>\n"
+" ...\n"
+" <security-role-ref>\n"
+" <role-name>TheRoleICheck</role-name>\n"
+" <role-link>TheApplicationRole</role-link>\n"
+" </security-role-ref>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" ...\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:37
+#, no-c-format
+msgid ""
+"shows the use of <literal>security-role-ref</literal> in a <literal>web.xml</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:40
+#, no-c-format
+msgid ""
+"An example web.xml descriptor fragment that illustrates the security-role-"
+"ref element usage."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:41
+#, no-c-format
+msgid ""
+"<web-app>\n"
+" <servlet>\n"
+" <servlet-name>AServlet</servlet-name>\n"
+" ...\n"
+" <security-role-ref>\n"
+" <role-name>TheServletRole</role-name>\n"
+" <role-link>TheApplicationRole</role-link>\n"
+" </security-role-ref>\n"
+" </servlet>\n"
+" ...\n"
+"</web-app>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:46
+#, no-c-format
+msgid "Security Identity"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:47
+#, no-c-format
+msgid ""
+"An EJB has the capability to specify what identity an EJB should use when it "
+"invokes methods on other components using the <literal>security-identity</"
+"literal> element, shown in"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:51
+#, fuzzy, no-c-format
+msgid "The security-identity element"
+msgstr "Host 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:58
+#, no-c-format
+msgid ""
+"The invocation identity can be that of the current caller, or it can be a "
+"specific role. The application assembler uses the <literal>security-"
+"identity</literal> element with a <literal>use-caller-identity</literal> "
+"child element to indicate that the current caller's identity should be "
+"propagated as the security identity for method invocations made by the EJB. "
+"Propagation of the caller's identity is the default used in the absence "
+"of an explicit <literal>security-identity</literal> element declaration."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:61
+#, no-c-format
+msgid ""
+"Alternatively, the application assembler can use the <literal>run-as/role-"
+"name</literal> child element to specify that a specific security role given "
+"by the <literal>role-name</literal> value should be used as the security "
+"identity for method invocations made by the EJB. Note that this does not "
+"change the caller's identity as seen by the <literal>EJBContext."
+"getCallerPrincipal()</literal> method. Rather, the caller's security "
+"roles are set to the single role specified by the <literal>run-as/role-name</"
+"literal> element value. One use case for the <literal>run-as</literal> "
+"element is to prevent external clients from accessing internal EJBs. You "
+"accomplish this by assigning the internal EJB <literal>method-permission</"
+"literal> elements that restrict access to a role never assigned to an "
+"external client. EJBs that need to use internal EJB are then configured with "
+"a <literal>run-as/role-name</literal> equal to the restricted role. The "
+"following descriptor fragment that illustrates <literal>security-identity</"
+"literal> element usage."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:64
+#, no-c-format
+msgid ""
+"<!-- A sample ejb-jar.xml fragment -->\n"
+"<ejb-jar>\n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>ASessionBean</ejb-name>\n"
+" <!-- ... -->\n"
+" <security-identity>\n"
+" <use-caller-identity/>\n"
+" </security-identity>\n"
+" </session>\n"
+" <session>\n"
+" <ejb-name>RunAsBean</ejb-name>\n"
+" <!-- ... -->\n"
+" <security-identity>\n"
+" <run-as>\n"
+" <description>A private internal role</"
+"description>\n"
+" <role-name>InternalRole</role-name>\n"
+" </run-as>\n"
+" </security-identity>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+" <!-- ... -->\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:65
+#, no-c-format
+msgid ""
+"When you use <literal>run-as</literal> to assign a specific role to outgoing "
+"calls, JBoss associates a principal named <literal>anonymous</literal>. If "
+"you want another principal to be associated with the call, you need to "
+"associate a <literal>run-as-principal</literal> with the bean in the "
+"<literal>jboss.xml</literal> file. The following fragment associates a "
+"principal named <literal>internal</literal> with <literal>RunAsBean</"
+"literal> from the prior example."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:68
+#, no-c-format
+msgid ""
+"<session>\n"
+" <ejb-name>RunAsBean</ejb-name>\n"
+" <security-identity>\n"
+" <run-as-principal>internal</run-as-principal>\n"
+" </security-identity>\n"
+"</session>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:69
+#, no-c-format
+msgid ""
+"The <literal>run-as</literal> element is also available in servlet "
+"definitions in a <literal>web.xml</literal> file. The following example "
+"shows how to assign the role <literal>InternalRole</literal> to a servlet:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:72
+#, fuzzy, no-c-format
+msgid ""
+"<servlet>\n"
+" <servlet-name>AServlet</servlet-name>\n"
+" <!-- ... -->\n"
+" <run-as> \n"
+" <role-name>InternalRole</role-name>\n"
+" </run-as>\n"
+"</servlet>"
+msgstr ""
+"<servlet>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <servlet-class>javax.faces.webapp.FacesServlet</servlet-"
+"class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+"</servlet>\n"
+"\n"
+"<servlet-mapping>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <url-pattern>*.jsf</url-pattern>\n"
+"</servlet-mapping>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:73
+#, no-c-format
+msgid ""
+"Calls from this servlet will be associated with the anonymous "
+"<literal>principal</literal>. The <literal>run-as-principal</literal> "
+"element is available in the <literal>jboss-web.xml</literal> file to assign "
+"a specific principal to go along with the <literal>run-as</literal> role. "
+"The following fragment shows how to associate a principal named "
+"<literal>internal</literal> to the servlet in the prior example."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:76
+#, no-c-format
+msgid ""
+"<servlet>\n"
+" <servlet-name>AServlet</servlet-name>\n"
+" <run-as-principal>internal</run-as-principal>\n"
+"</servlet>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:80
+#, no-c-format
+msgid "Security roles"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:81
+#, no-c-format
+msgid ""
+"The security role name referenced by either the <literal>security-role-ref</"
+"literal> or <literal>security-identity</literal> element needs to map to one "
+"of the application's declared roles. An application assembler defines "
+"logical security roles by declaring <literal>security-role</literal> "
+"elements. The <literal>role-name</literal> value is a logical application "
+"role name like Administrator, Architect, SalesManager, etc."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:84
+#, no-c-format
+msgid ""
+"The J2EE specifications note that it is important to keep in mind that the "
+"security roles in the deployment descriptor are used to define the logical "
+"security view of an application. Roles defined in the J2EE deployment "
+"descriptors should not be confused with the user groups, users, principals, "
+"and other concepts that exist in the target enterprise's operational "
+"environment. The deployment descriptor roles are application constructs with "
+"application domain-specific names. For example, a banking application might "
+"use role names such as BankManager, Teller, or Customer."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:88
+#, fuzzy, no-c-format
+msgid "The security-role element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:95
+#, no-c-format
+msgid ""
+"In JBoss, a <literal>security-role</literal> element is only used to map "
+"<literal>security-role-ref/role-name</literal> values to the logical role "
+"that the component role references. The user's assigned roles are a "
+"dynamic function of the application's security manager, as you will see "
+"when we discuss the JBossSX implementation details. JBoss does not require "
+"the definition of <literal>security-role</literal> elements in order to "
+"declare method permissions. However, the specification of <literal>security-"
+"role</literal> elements is still a recommended practice to ensure "
+"portability across application servers and for deployment descriptor "
+"maintenance. <xref linkend=\"Security_roles-An_ejb_jar."
+"xml_descriptor_fragment_that_illustrates_the_security_role_element_usage.\"/"
+"> shows the usage of the <literal>security-role</literal> in an <literal>ejb-"
+"jar.xml</literal> file."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:98
+#, no-c-format
+msgid ""
+"An ejb-jar.xml descriptor fragment that illustrates the security-role "
+"element usage."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:99
+#, no-c-format
+msgid ""
+"<!-- A sample ejb-jar.xml fragment -->\n"
+"<ejb-jar>\n"
+" <!-- ... -->\n"
+" <assembly-descriptor>\n"
+" <security-role>\n"
+" <description>The single application role</"
+"description>\n"
+" <role-name>TheApplicationRole</role-name>\n"
+" </security-role>\n"
+" </assembly-descriptor>\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:100
+#, no-c-format
+msgid ""
+"shows the usage of the <literal>security-role</literal> in an <literal>web."
+"xml</literal> file."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:103
+#, fuzzy, no-c-format
+msgid ""
+"An example web.xml descriptor fragment that illustrates the security-role "
+"element usage."
+msgstr ""
+"The jmx-console.war web.xml descriptors with the security elements "
+"uncommented."
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:104
+#, no-c-format
+msgid ""
+"<!-- A sample web.xml fragment -->\n"
+"<web-app>\n"
+" <!-- ... -->\n"
+" <security-role>\n"
+" <description>The single application role</description>\n"
+" <role-name>TheApplicationRole</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:109
+#, no-c-format
+msgid "EJB method permissions"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:110
+#, no-c-format
+msgid ""
+"An application assembler can set the roles that are allowed to invoke an "
+"EJB's home and remote interface methods through method-permission "
+"element declarations."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:114
+#, fuzzy, no-c-format
+msgid "The method-permissions element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:121
+#, no-c-format
+msgid ""
+"Each <literal>method-permission</literal> element contains one or more role-"
+"name child elements that define the logical roles that are allowed to access "
+"the EJB methods as identified by method child elements. You can also specify "
+"an <literal>unchecked</literal> element instead of the <literal>role-name</"
+"literal> element to declare that any authenticated user can access the "
+"methods identified by method child elements. In addition, you can declare "
+"that no one should have access to a method that has the <literal>exclude-"
+"list</literal> element. If an EJB has methods that have not been declared as "
+"accessible by a role using a <literal>method-permission</literal> element, "
+"the EJB methods default to being excluded from use. This is equivalent to "
+"defaulting the methods into the <literal>exclude-list</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:125
+#, fuzzy, no-c-format
+msgid "The method element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:132
+#, no-c-format
+msgid "There are three supported styles of method element declarations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:135
+#, no-c-format
+msgid ""
+"The first is used for referring to all the home and component interface "
+"methods of the named enterprise bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:138
+#, fuzzy, no-c-format
+msgid ""
+"<method>\n"
+" <ejb-name>EJBNAME</ejb-name>\n"
+" <method-name>*</method-name>\n"
+"</method>"
+msgstr ""
+"<login-config>\n"
+" <auth-method>DIGEST</auth-method>\n"
+" <realm-name>My Aplication</realm-name>\n"
+"</login-config>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:139
+#, no-c-format
+msgid ""
+"The second style is used for referring to a specified method of the home or "
+"component interface of the named enterprise bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:142
+#, no-c-format
+msgid ""
+"<method>\n"
+" <ejb-name>EJBNAME</ejb-name>\n"
+" <method-name>METHOD</method-name>\n"
+" </method>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:143
+#, no-c-format
+msgid ""
+"If there are multiple methods with the same overloaded name, this style "
+"refers to all of the overloaded methods."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:146
+#, no-c-format
+msgid ""
+"The third style is used to refer to a specified method within a set of "
+"methods with an overloaded name:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:149
+#, no-c-format
+msgid ""
+"<method>\n"
+" <ejb-name>EJBNAME</ejb-name>\n"
+" <method-name>METHOD</method-name>\n"
+" <method-params>\n"
+" <method-param>PARAMETER_1</method-param>\n"
+" <!-- ... -->\n"
+" <method-param>PARAMETER_N</method-param>\n"
+" </method-params>\n"
+"</method>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:150
+#, no-c-format
+msgid ""
+"The method must be defined in the specified enterprise bean's home or "
+"remote interface. The method-param element values are the fully qualified "
+"name of the corresponding method parameter type. If there are multiple "
+"methods with the same overloaded signature, the permission applies to all of "
+"the matching overloaded methods."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:153
+#, no-c-format
+msgid ""
+"The optional <literal>method-intf</literal> element can be used to "
+"differentiate methods with the same name and signature that are defined in "
+"both the home and remote interfaces of an enterprise bean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:156
+#, no-c-format
+msgid ""
+"provides complete examples of the <literal>method-permission</literal> "
+"element usage."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:159
+#, no-c-format
+msgid ""
+"An ejb-jar.xml descriptor fragment that illustrates the method-permission "
+"element usage."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:160
+#, no-c-format
+msgid ""
+"<ejb-jar>\n"
+" <assembly-descriptor>\n"
+" <method-permission>\n"
+" <description>The employee and temp-employee roles may "
+"access any\n"
+" method of the EmployeeService bean </description>\n"
+" <role-name>employee</role-name>\n"
+" <role-name>temp-employee</role-name>\n"
+" <method>\n"
+" <ejb-name>EmployeeService</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>The employee role may access the "
+"findByPrimaryKey,\n"
+" getEmployeeInfo, and the updateEmployeeInfo(String) method "
+"of\n"
+" the AardvarkPayroll bean </description>\n"
+" <role-name>employee</role-name>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>findByPrimaryKey</method-name>\n"
+" </method>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>getEmployeeInfo</method-name>\n"
+" </method>\n"
+" <method>\n"
+" <ejb-name>AardvarkPayroll</ejb-name>\n"
+" <method-name>updateEmployeeInfo</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" </method-params>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>The admin role may access any method of the\n"
+" EmployeeServiceAdmin bean </description>\n"
+" <role-name>admin</role-name>\n"
+" <method>\n"
+" <ejb-name>EmployeeServiceAdmin</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <method-permission>\n"
+" <description>Any authenticated user may access any method "
+"of the\n"
+" EmployeeServiceHelp bean</description>\n"
+" <unchecked/>\n"
+" <method>\n"
+" <ejb-name>EmployeeServiceHelp</ejb-name>\n"
+" <method-name>*</method-name>\n"
+" </method>\n"
+" </method-permission>\n"
+" <exclude-list>\n"
+" <description>No fireTheCTO methods of the EmployeeFiring "
+"bean may be\n"
+" used in this deployment</description>\n"
+" <method>\n"
+" <ejb-name>EmployeeFiring</ejb-name>\n"
+" <method-name>fireTheCTO</method-name>\n"
+" </method>\n"
+" </exclude-list>\n"
+" </assembly-descriptor>\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:165
+#, no-c-format
+msgid "Web Content Security Constraints"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:166
+#, no-c-format
+msgid ""
+"In a web application, security is defined by the roles that are allowed "
+"access to content by a URL pattern that identifies the protected content. "
+"This set of information is declared by using the <literal>web.xml</"
+"literal><literal>security-constraint</literal> element."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:170
+#, fuzzy, no-c-format
+msgid "The security-constraint element"
+msgstr "Connector 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:177
+#, no-c-format
+msgid ""
+"The content to be secured is declared using one or more <literal>web-"
+"resource-collection</literal> elements. Each <literal>web-resource-"
+"collection</literal> element contains an optional series of <literal>url-"
+"pattern</literal> elements followed by an optional series of <literal>http-"
+"method</literal> elements. The <literal>url-pattern</literal> element value "
+"specifies a URL pattern against which a request URL must match for the "
+"request to correspond to an attempt to access secured content. The "
+"<literal>http-method</literal> element value specifies a type of HTTP "
+"request to allow."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:180
+#, no-c-format
+msgid ""
+"The optional <literal>user-data-constraint</literal> element specifies the "
+"requirements for the transport layer of the client to server connection. The "
+"requirement may be for content integrity (preventing data tampering in the "
+"communication process) or for confidentiality (preventing reading while in "
+"transit). The transport-guarantee element value specifies the degree to "
+"which communication between the client and server should be protected. Its "
+"values are <literal>NONE</literal>, <literal>INTEGRAL</literal>, and "
+"<literal>CONFIDENTIAL</literal>. A value of <literal>NONE</literal> means "
+"that the application does not require any transport guarantees. A value of "
+"<literal>INTEGRAL</literal> means that the application requires the data "
+"sent between the client and server to be sent in such a way that it can'"
+"t be changed in transit. A value of <literal>CONFIDENTIAL</literal> means "
+"that the application requires the data to be transmitted in a fashion that "
+"prevents other entities from observing the contents of the transmission. In "
+"most cases, the presence of the <literal>INTEGRAL</literal> or "
+"<literal>CONFIDENTIAL</literal> flag indicates that the use of SSL is "
+"required."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:183
+#, no-c-format
+msgid ""
+"The optional <literal>login-config</literal> element is used to configure "
+"the authentication method that should be used, the realm name that should be "
+"used for rhw application, and the attributes that are needed by the form "
+"login mechanism."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:187
+#, fuzzy, no-c-format
+msgid "The login-config element"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:194
+#, no-c-format
+msgid ""
+"The <literal>auth-method</literal> child element specifies the "
+"authentication mechanism for the web application. As a prerequisite to "
+"gaining access to any web resources that are protected by an authorization "
+"constraint, a user must have authenticated using the configured mechanism. "
+"Legal <literal>auth-method</literal> values are <literal>BASIC</literal>, "
+"<literal>DIGEST</literal>, <literal>FORM</literal>, and <literal>CLIENT-"
+"CERT</literal>. The <literal>realm-name</literal> child element specifies "
+"the realm name to use in HTTP basic and digest authorization. The "
+"<literal>form-login-config</literal> child element specifies the log in as "
+"well as error pages that should be used in form-based login. If the "
+"<literal>auth-method</literal> value is not <literal>FORM</literal>, then "
+"<literal>form-login-config</literal> and its child elements are ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:197
+#, no-c-format
+msgid ""
+"As an example, the <literal>web.xml</literal> descriptor fragment given in "
+"<xref linkend=\"Web_Content_Security_Constraints-_A_web."
+"xml_descriptor_fragment_which_illustrates_the_use_of_the_security_constraint_and_related_elements."
+"\"/> indicates that any URL lying under the web application's <literal>/"
+"restricted</literal> path requires an <literal>AuthorizedUser</literal> "
+"role. There is no required transport guarantee and the authentication method "
+"used for obtaining the user identity is BASIC HTTP authentication."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:200
+#, no-c-format
+msgid ""
+"A web.xml descriptor fragment which illustrates the use of the security-"
+"constraint and related elements."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:201
+#, no-c-format
+msgid ""
+"<web-app>\n"
+" <!-- ... -->\n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>Secure Content</web-resource-"
+"name>\n"
+" <url-pattern>/restricted/*</url-pattern>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>AuthorizedUser</role-name>\n"
+" </auth-constraint>\n"
+" <user-data-constraint>\n"
+" <transport-guarantee>NONE</transport-guarantee>\n"
+" </user-data-constraint>\n"
+" </security-constraint>\n"
+" <!-- ... -->\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>The Restricted Zone</realm-name>\n"
+" </login-config>\n"
+" <!-- ... -->\n"
+" <security-role>\n"
+" <description>The role required to access restricted content "
+"</description>\n"
+" <role-name>AuthorizedUser</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:206
+#, no-c-format
+msgid "Enabling Declarative Security in JBoss"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:207
+#, no-c-format
+msgid ""
+"The J2EE security elements that have been covered so far describe the "
+"security requirements only from the application's perspective. Because "
+"J2EE security elements declare logical roles, the application deployer maps "
+"the roles from the application domain onto the deployment environment. The "
+"J2EE specifications omit these application server-specific details. In "
+"JBoss, mapping the application roles onto the deployment environment entails "
+"specifying a security manager that implements the J2EE security model using "
+"JBoss server specific deployment descriptors. The details behind the "
+"security configuration are discussed in <xref linkend=\"Security_on_JBoss-"
+"The_JBoss_Security_Model\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:215
+#, fuzzy, no-c-format
+msgid "An Introduction to JAAS"
+msgstr "JMX的简介"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:216
+#, no-c-format
+msgid ""
+"The JBossSX framework is based on the JAAS API. It is important that you "
+"understand the basic elements of the JAAS API to understand the "
+"implementation details of JBossSX. The following sections provide an "
+"introduction to JAAS to prepare you for the JBossSX architecture discussion "
+"later in this chapter."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:220
+#, no-c-format
+msgid "What is JAAS?"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:221
+#, no-c-format
+msgid ""
+"The JAAS 1.0 API consists of a set of Java packages designed for user "
+"authentication and authorization. It implements a Java version of the "
+"standard Pluggable Authentication Module (PAM) framework and compatibly "
+"extends the Java 2 Platform's access control architecture to support "
+"user-based authorization. JAAS was first released as an extension package "
+"for JDK 1.3 and is bundled with JDK 1.4+. Because the JBossSX framework uses "
+"only the authentication capabilities of JAAS to implement the declarative "
+"role-based J2EE security model, this introduction focuses on only that topic."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:224
+#, no-c-format
+msgid ""
+"JAAS authentication is performed in a pluggable fashion. This permits Java "
+"applications to remain independent from underlying authentication "
+"technologies and allows the JBossSX security manager to work in different "
+"security infrastructures. Integration with a security infrastructure can be "
+"achieved without changing the JBossSX security manager implementation. All "
+"that needs to change is the configuration of the authentication stack that "
+"JAAS uses."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:228
+#, no-c-format
+msgid "The JAAS Core Classes"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:229
+#, no-c-format
+msgid ""
+"The JAAS core classes can be broken down into three categories: common, "
+"authentication, and authorization. The following list presents only the "
+"common and authentication classes because these are the specific classes "
+"used to implement the functionality of JBossSX covered in this chapter."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:232
+#, fuzzy, no-c-format
+msgid "The are the common classes:"
+msgstr "代理层组件包括:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:237
+#, no-c-format
+msgid ""
+"<literal>Subject</literal> (<literal>javax.security.auth.Subject</literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:242
+#, no-c-format
+msgid ""
+"<literal>Principal</literal> (<literal>java.security.Principal</literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:247
+#, no-c-format
+msgid "These are the authentication classes:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:252
+#, no-c-format
+msgid ""
+"<literal>Callback</literal> (<literal>javax.security.auth.callback.Callback</"
+"literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:257
+#, no-c-format
+msgid ""
+"<literal>CallbackHandler</literal> (<literal>javax.security.auth.callback."
+"CallbackHandler</literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:262
+#, no-c-format
+msgid ""
+"<literal>Configuration</literal> (<literal>javax.security.auth.login."
+"Configuration</literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:267
+#, no-c-format
+msgid ""
+"<literal>LoginContext</literal> (<literal>javax.security.auth.login."
+"LoginContext</literal>)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:272
+#, no-c-format
+msgid ""
+"<literal>LoginModule</literal> (<literal>javax.security.auth.spi."
+"LoginModule</literal>)"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:278
+#, no-c-format
+msgid "The Subject and Principal Classes"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:279
+#, no-c-format
+msgid ""
+"To authorize access to resources, applications first need to authenticate "
+"the request's source. The JAAS framework defines the term subject to "
+"represent a request's source. The <literal>Subject</literal> class is "
+"the central class in JAAS. A <literal>Subject</literal> represents "
+"information for a single entity, such as a person or service. It encompasses "
+"the entity's principals, public credentials, and private credentials. "
+"The JAAS APIs use the existing Java 2 <literal>java.security.Principal</"
+"literal> interface to represent a principal, which is essentially just a "
+"typed name."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:282
+#, no-c-format
+msgid ""
+"During the authentication process, a subject is populated with associated "
+"identities, or principals. A subject may have many principals. For example, "
+"a person may have a name principal (John Doe), a social security number "
+"principal (123-45-6789), and a username principal (johnd), all of which help "
+"distinguish the subject from other subjects. To retrieve the principals "
+"associated with a subject, two methods are available:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:285
+#, no-c-format
+msgid ""
+"public Set getPrincipals() {...}\n"
+"public Set getPrincipals(Class c) {...}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:286
+#, no-c-format
+msgid ""
+"The first method returns all principals contained in the subject. The second "
+"method returns only those principals that are instances of class <literal>c</"
+"literal> or one of its subclasses. An empty set is returned if the subject "
+"has no matching principals. Note that the <literal>java.security.acl.Group</"
+"literal> interface is a subinterface of <literal>java.security.Principal</"
+"literal>, so an instance in the principals set may represent a logical "
+"grouping of other principals or groups of principals."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:292
+#, no-c-format
+msgid "Authentication of a Subject"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:293
+#, no-c-format
+msgid ""
+"Authentication of a subject requires a JAAS login. The login procedure "
+"consists of the following steps:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:298
+#, no-c-format
+msgid ""
+"An application instantiates a <literal>LoginContext</literal> and passes in "
+"the name of the login configuration and a <literal>CallbackHandler</literal> "
+"to populate the <literal>Callback</literal> objects, as required by the "
+"configuration <literal>LoginModule</literal>s."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:303
+#, no-c-format
+msgid ""
+"The <literal>LoginContext</literal> consults a <literal>Configuration</"
+"literal> to load all the <literal>LoginModules</literal> included in the "
+"named login configuration. If no such named configuration exists the "
+"<literal>other</literal> configuration is used as a default."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:308
+#, no-c-format
+msgid ""
+"The application invokes the <literal>LoginContext.login</literal> method."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:313
+#, no-c-format
+msgid ""
+"The login method invokes all the loaded <literal>LoginModule</literal>s. As "
+"each <literal>LoginModule</literal> attempts to authenticate the subject, it "
+"invokes the handle method on the associated <literal>CallbackHandler</"
+"literal> to obtain the information required for the authentication process. "
+"The required information is passed to the handle method in the form of an "
+"array of <literal>Callback</literal> objects. Upon success, the "
+"<literal>LoginModule</literal>s associate relevant principals and "
+"credentials with the subject."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:318
+#, no-c-format
+msgid ""
+"The <literal>LoginContext</literal> returns the authentication status to the "
+"application. Success is represented by a return from the login method. "
+"Failure is represented through a LoginException being thrown by the login "
+"method."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:323
+#, no-c-format
+msgid ""
+"If authentication succeeds, the application retrieves the authenticated "
+"subject using the <literal>LoginContext.getSubject</literal> method."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:328
+#, no-c-format
+msgid ""
+"After the scope of the subject authentication is complete, all principals "
+"and related information associated with the subject by the login method can "
+"be removed by invoking the <literal>LoginContext.logout</literal> method."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:333
+#, no-c-format
+msgid ""
+"The <literal>LoginContext</literal> class provides the basic methods for "
+"authenticating subjects and offers a way to develop an application that is "
+"independent of the underlying authentication technology. The "
+"<literal>LoginContext</literal> consults a <literal>Configuration</literal> "
+"to determine the authentication services configured for a particular "
+"application. <literal>LoginModule</literal> classes represent the "
+"authentication services. Therefore, you can plug different login modules "
+"into an application without changing the application itself. The following "
+"code shows the steps required by an application to authenticate a subject."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:336
+#, no-c-format
+msgid ""
+"CallbackHandler handler = new MyHandler();\n"
+"LoginContext lc = new LoginContext(\"some-config\", handler);\n"
+"\n"
+"try {\n"
+" lc.login();\n"
+" Subject subject = lc.getSubject();\n"
+"} catch(LoginException e) {\n"
+" System.out.println(\"authentication failed\");\n"
+" e.printStackTrace();\n"
+"}\n"
+" \n"
+"// Perform work as authenticated Subject\n"
+"// ...\n"
+"\n"
+"// Scope of work complete, logout to remove authentication info\n"
+"try {\n"
+" lc.logout();\n"
+"} catch(LoginException e) {\n"
+" System.out.println(\"logout failed\");\n"
+" e.printStackTrace();\n"
+"}\n"
+" \n"
+"// A sample MyHandler class\n"
+"class MyHandler \n"
+" implements CallbackHandler\n"
+"{\n"
+" public void handle(Callback[] callbacks) throws\n"
+" IOException, UnsupportedCallbackException\n"
+" {\n"
+" for (int i = 0; i < callbacks.length; i++) {\n"
+" if (callbacks[i] instanceof NameCallback) {\n"
+" NameCallback nc = (NameCallback)callbacks[i];\n"
+" nc.setName(username);\n"
+" } else if (callbacks[i] instanceof PasswordCallback) {\n"
+" PasswordCallback pc = (PasswordCallback)callbacks[i];\n"
+" pc.setPassword(password);\n"
+" } else {\n"
+" throw new UnsupportedCallbackException(callbacks[i],\n"
+" \"Unrecognized "
+"Callback\");\n"
+" }\n"
+" }\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:337
+#, no-c-format
+msgid ""
+"Developers integrate with an authentication technology by creating an "
+"implementation of the <literal>LoginModule</literal> interface. This allows "
+"an administrator to plug different authentication technologies into an "
+"application. You can chain together multiple <literal>LoginModule</literal>s "
+"to allow for more than one authentication technology to participate in the "
+"authentication process. For example, one <literal>LoginModule</literal> may "
+"perform username/password-based authentication, while another may interface "
+"to hardware devices such as smart card readers or biometric authenticators."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:340
+#, no-c-format
+msgid ""
+"The life cycle of a <literal>LoginModule</literal> is driven by the "
+"<literal>LoginContext</literal> object against which the client creates and "
+"issues the login method. The process consists of two phases. The steps of "
+"the process are as follows:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:345
+#, no-c-format
+msgid ""
+"The <literal>LoginContext</literal> creates each configured "
+"<literal>LoginModule</literal> using its public no-arg constructor."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:350
+#, no-c-format
+msgid ""
+"Each <literal>LoginModule</literal> is initialized with a call to its "
+"initialize method. The <literal>Subject</literal> argument is guaranteed to "
+"be non-null. The signature of the initialize method is: <literal>public void "
+"initialize(Subject subject, CallbackHandler callbackHandler, Map "
+"sharedState, Map options)</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:355
+#, no-c-format
+msgid ""
+"The <literal>login</literal> method is called to start the authentication "
+"process. For example, a method implementation might prompt the user for a "
+"username and password and then verify the information against data stored in "
+"a naming service such as NIS or LDAP. Alternative implementations might "
+"interface to smart cards and biometric devices, or simply extract user "
+"information from the underlying operating system. The validation of user "
+"identity by each <literal>LoginModule</literal> is considered phase 1 of "
+"JAAS authentication. The signature of the <literal>login</literal> method is "
+"<literal>boolean login() throws LoginException</literal>. A "
+"<literal>LoginException</literal> indicates failure. A return value of true "
+"indicates that the method succeeded, whereas a return valueof false "
+"indicates that the login module should be ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:360
+#, no-c-format
+msgid ""
+"If the <literal>LoginContext</literal>'s overall authentication "
+"succeeds, <literal>commit</literal> is invoked on each <literal>LoginModule</"
+"literal>. If phase 1 succeeds for a <literal>LoginModule</literal>, then the "
+"commit method continues with phase 2 and associates the relevant principals, "
+"public credentials, and/or private credentials with the subject. If phase 1 "
+"fails for a <literal>LoginModule</literal>, then <literal>commit</literal> "
+"removes any previously stored authentication state, such as usernames or "
+"passwords. The signature of the <literal>commit</literal> method is: "
+"<literal>boolean commit() throws LoginException</literal>. Failure to "
+"complete the commit phase is indicated by throwing a "
+"<literal>LoginException</literal>. A return of true indicates that the "
+"method succeeded, whereas a return of false indicates that the login module "
+"should be ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:365
+#, no-c-format
+msgid ""
+"If the <literal>LoginContext</literal>'s overall authentication fails, "
+"then the <literal>abort</literal> method is invoked on each "
+"<literal>LoginModule</literal>. The <literal>abort</literal> method removes "
+"or destroys any authentication state created by the login or initialize "
+"methods. The signature of the <literal>abort</literal> method is "
+"<literal>boolean abort() throws LoginException</literal>. Failure to "
+"complete the <literal>abort</literal> phase is indicated by throwing a "
+"<literal>LoginException</literal>. A return of true indicates that the "
+"method succeeded, whereas a return of false indicates that the login module "
+"should be ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:370
+#, no-c-format
+msgid ""
+"To remove the authentication state after a successful login, the application "
+"invokes <literal>logout</literal> on the <literal>LoginContext</literal>. "
+"This in turn results in a <literal>logout</literal> method invocation on "
+"each <literal>LoginModule</literal>. The <literal>logout</literal> method "
+"removes the principals and credentials originally associated with the "
+"subject during the <literal>commit</literal> operation. Credentials should "
+"be destroyed upon removal. The signature of the <literal>logout</literal> "
+"method is: <literal>boolean logout() throws LoginException</literal>. "
+"Failure to complete the logout process is indicated by throwing a "
+"<literal>LoginException</literal>. A return of true indicates that the "
+"method succeeded, whereas a return of false indicates that the login module "
+"should be ignored."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:375
+#, no-c-format
+msgid ""
+"When a <literal>LoginModule</literal> must communicate with the user to "
+"obtain authentication information, it uses a <literal>CallbackHandler</"
+"literal> object. Applications implement the <literal>CallbackHandler</"
+"literal> interface and pass it to the LoginContext, which forwards it "
+"directly to the underlying login modules. Login modules use the "
+"<literal>CallbackHandler</literal> both to gather input from users, such as "
+"a password or smart card PIN, and to supply information to users, such as "
+"status information. By allowing the application to specify the "
+"<literal>CallbackHandler</literal>, underlying <literal>LoginModule</"
+"literal>s remain independent from the different ways applications interact "
+"with users. For example, a <literal>CallbackHandler</literal>'s "
+"implementation for a GUI application might display a window to solicit user "
+"input. On the other hand, a <literal>callbackhandler</literal>'s "
+"implementation for a non-GUI environment, such as an application server, "
+"might simply obtain credential information by using an application server "
+"API. The <literal>callbackhandler</literal> interface has one method to "
+"implement:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:378
+#, no-c-format
+msgid ""
+"void handle(Callback[] callbacks)\n"
+" throws java.io.IOException, \n"
+" UnsupportedCallbackException;"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:379
+#, no-c-format
+msgid ""
+"The <literal>Callback</literal> interface is the last authentication class "
+"we will look at. This is a tagging interface for which several default "
+"implementations are provided, including the <literal>NameCallback</literal> "
+"and <literal>PasswordCallback</literal> used in an earlier example. A "
+"<literal>LoginModule</literal> uses a <literal>Callback</literal> to request "
+"information required by the authentication mechanism. <literal>LoginModule</"
+"literal>s pass an array of <literal>Callback</literal>s directly to the "
+"<literal>CallbackHandler.handle</literal> method during the "
+"authentication's login phase. If a <literal>callbackhandler</literal> "
+"does not understand how to use a <literal>Callback</literal> object passed "
+"into the handle method, it throws an <literal>UnsupportedCallbackException</"
+"literal> to abort the login call."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:391
+#, fuzzy, no-c-format
+msgid "The JBoss Security Model"
+msgstr "JBossNS 架构"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:392
+#, no-c-format
+msgid ""
+"Similar to the rest of the JBoss architecture, security at the lowest level "
+"is defined as a set of interfaces for which alternate implementations may be "
+"provided. Three basic interfaces define the JBoss server security layer: "
+"<literal>org.jboss.security.AuthenticationManager</literal>, <literal>org."
+"jboss.security.RealmMapping</literal>, and <literal>org.jboss.security."
+"SecurityProxy</literal>. <xref linkend=\"The_JBoss_Security_Model-"
+"The_key_security_model_interfaces_and_their_relationship_to_the_JBoss_server_EJB_container_elements."
+"\"/> shows a class diagram of the security interfaces and their relationship "
+"to the EJB container architecture."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:396
+#, no-c-format
+msgid ""
+"The key security model interfaces and their relationship to the JBoss server "
+"EJB container elements."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:403
+#, no-c-format
+msgid ""
+"The light blue classes represent the security interfaces while the yellow "
+"classes represent the EJB container layer. The two interfaces required for "
+"the implementation of the J2EE security model are <literal>org.jboss."
+"security.AuthenticationManager</literal> and <literal>org.jboss.security."
+"RealmMapping</literal>. The roles of the security interfaces presented in "
+"<xref linkend=\"The_JBoss_Security_Model-"
+"The_key_security_model_interfaces_and_their_relationship_to_the_JBoss_server_EJB_container_elements."
+"\"/> are summarized in the following list."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:408
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthenticationManager</emphasis>: This interface is "
+"responsible for validating credentials associated with principals. "
+"Principals are identities, such as usernames, employee numbers, and social "
+"security numbers. Credentials are proof of the identity, such as passwords, "
+"session keys, and digital signatures. The <literal>isValid</literal> method "
+"is invoked to determine whether a user identity and associated credentials "
+"as known in the operational environment are valid proof of the user's "
+"identity."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:413
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RealmMapping</emphasis>: This interface is "
+"responsible for principal mapping and role mapping. The "
+"<literal>getPrincipal</literal> method takes a user identity as known in the "
+"operational environment and returns the application domain identity. The "
+"<literal>doesUserHaveRole</literal> method validates that the user identity "
+"in the operation environment has been assigned the indicated role from the "
+"application domain."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:418
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityProxy</emphasis>: This interface describes "
+"the requirements for a custom <literal>SecurityProxyInterceptor</literal> "
+"plugin. A <literal>SecurityProxy</literal> allows for the externalization of "
+"custom security checks on a per-method basis for both the EJB home and "
+"remote interface methods."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:423
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SubjectSecurityManager</emphasis>: This is a "
+"subinterface of <literal>AuthenticationManager</literal> that adds accessor "
+"methods for obtaining the security domain name of the security manager and "
+"the current thread's authenticated <literal>Subject</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:428
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityDomain</emphasis>: This is an extension of "
+"the <literal>AuthenticationManager</literal>, <literal>RealmMapping</"
+"literal>, and <literal>SubjectSecurityManager</literal> interfaces. It is a "
+"move to a comprehensive security interface based on the JAAS Subject, a "
+"<literal>java.security.KeyStore</literal>, and the JSSE <literal>com.sun.net."
+"ssl.KeyManagerFactory</literal> and <literal>com.sun.net.ssl."
+"TrustManagerFactory</literal> interfaces. This interface is a work in "
+"progress that will be the basis of a multi-domain security architecture that "
+"will better support ASP style deployments of applications and resources."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:433
+#, no-c-format
+msgid ""
+"Note that the <literal>AuthenticationManager</literal>, "
+"<literal>RealmMapping</literal> and <literal>SecurityProxy</literal> "
+"interfaces have no association to JAAS related classes. Although the JBossSX "
+"framework is heavily dependent on JAAS, the basic security interfaces "
+"required for implementation of the J2EE security model are not. The JBossSX "
+"framework is simply an implementation of the basic security plug-in "
+"interfaces that are based on JAAS. The component diagram presented in <xref "
+"linkend=\"The_JBoss_Security_Model-"
+"The_relationship_between_the_JBossSX_framework_implementation_classes_and_the_JBoss_server_EJB_container_layer."
+"\"/> illustrates this fact. The implication of this plug-in architecture is "
+"that you are free to replace the JAAS-based JBossSX implementation classes "
+"with your own custom security manager implementation that does not make use "
+"of JAAS, if you so desire. You'll see how to do this when you look at "
+"the JBossSX MBeans available for the configuration of JBossSX in <xref "
+"linkend=\"The_JBoss_Security_Model-"
+"The_relationship_between_the_JBossSX_framework_implementation_classes_and_the_JBoss_server_EJB_container_layer."
+"\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:437
+#, no-c-format
+msgid ""
+"The relationship between the JBossSX framework implementation classes and "
+"the JBoss server EJB container layer."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:445
+#, no-c-format
+msgid "Enabling Declarative Security in JBoss Revisited"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:446
+#, no-c-format
+msgid ""
+"Earlier in this chapter, the discussion of the J2EE standard security model "
+"ended with a requirement for the use of JBoss server-specific deployment "
+"descriptor to enable security. The details of this configuration are "
+"presented here. <xref linkend="
+"\"Enabling_Declarative_Security_in_JBoss_Revisited-"
+"The_security_element_subsets_of_the_JBoss_server_jboss.xml_and_jboss_web."
+"xml_deployment_descriptors.\"/> shows the JBoss-specific EJB and web "
+"application deployment descriptor's security-related elements."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:450
+#, fuzzy, no-c-format
+msgid ""
+"The security element subsets of the JBoss server jboss.xml and jboss-web.xml "
+"deployment descriptors."
+msgstr ""
+"The default jmx-invoker-adaptor-server.sar jboss-service.xml deployment "
+"descriptor"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:457
+#, no-c-format
+msgid ""
+"The value of a <literal>security-domain</literal> element specifies the JNDI "
+"name of the security manager interface implementation that JBoss uses for "
+"the EJB and web containers. This is an object that implements both of the "
+"<literal>AuthenticationManager</literal> and <literal>RealmMapping</literal> "
+"interfaces. When specified as a top-level element it defines what security "
+"domain in effect for all EJBs in the deployment unit. This is the typical "
+"usage because mixing security managers within a deployment unit complicates "
+"inter-component operation and administration."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:460
+#, no-c-format
+msgid ""
+"To specify the security domain for an individual EJB, you specify the "
+"<literal>security-domain</literal> at the container configuration level. "
+"This will override any top-level security-domain element."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:463
+#, no-c-format
+msgid ""
+"The <literal>unauthenticated-principal</literal> element specifies the name "
+"to use for the <literal>Principal</literal> object returned by the "
+"<literal>EJBContext.getUserPrincipal</literal> method when an "
+"unauthenticated user invokes an EJB. Note that this conveys no special "
+"permissions to an unauthenticated caller. Its primary purpose is to allow "
+"unsecured servlets and JSP pages to invoke unsecured EJBs and allow the "
+"target EJB to obtain a non-null <literal>Principal</literal> for the caller "
+"using the <literal>getUserPrincipal</literal> method. This is a J2EE "
+"specification requirement."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:466
+#, no-c-format
+msgid ""
+"The <literal>security-proxy</literal> element identifies a custom security "
+"proxy implementation that allows per-request security checks outside the "
+"scope of the EJB declarative security model without embedding security logic "
+"into the EJB implementation. This may be an implementation of the "
+"<literal>org.jboss.security.SecurityProxy</literal> interface, or just an "
+"object that implements methods in the home, remote, local home or local "
+"interfaces of the EJB to secure without implementing any common interface. "
+"If the given class does not implement the <literal>SecurityProxy</literal> "
+"interface, the instance must be wrapped in a <literal>SecurityProxy</"
+"literal> implementation that delegates the method invocations to the object. "
+"The <literal>org.jboss.security.SubjectSecurityProxy</literal> is an example "
+"<literal>SecurityProxy</literal> implementation used by the default JBossSX "
+"installation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:469
+#, no-c-format
+msgid ""
+"Take a look at a simple example of a custom <literal>SecurityProxy</literal> "
+"in the context of a trivial stateless session bean. The custom "
+"<literal>SecurityProxy</literal> validates that no one invokes the bean'"
+"s <literal>echo</literal> method with a four-letter word as its argument. "
+"This is a check that is not possible with role-based security; you cannot "
+"define a <literal>FourLetterEchoInvoker</literal> role because the security "
+"context is the method argument, not a property of the caller. The code for "
+"the custom <literal>SecurityProxy</literal> is given in <xref linkend="
+"\"Enabling_Declarative_Security_in_JBoss_Revisited-"
+"The_example_1_custom_EchoSecurityProxy_implementation_that_enforces_the_echo_argument_based_security_constraint."
+"\"/>, and the full source code is available in the <literal>src/main/org/"
+"jboss/book/security/ex1</literal> directory of the book examples."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:472
+#, no-c-format
+msgid ""
+"The example 1 custom EchoSecurityProxy implementation that enforces the echo "
+"argument-based security constraint."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:473
+#, no-c-format
+msgid ""
+"package org.jboss.book.security.ex1;\n"
+" \n"
+"import java.lang.reflect.Method;\n"
+"import javax.ejb.EJBContext;\n"
+" \n"
+"import org.apache.log4j.Category;\n"
+" \n"
+"import org.jboss.security.SecurityProxy;\n"
+" \n"
+"/** A simple example of a custom SecurityProxy implementation\n"
+" * that demonstrates method argument based security checks.\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.4 $\n"
+" */\n"
+"public class EchoSecurityProxy implements SecurityProxy\n"
+"{\n"
+" Category log = Category.getInstance(EchoSecurityProxy.class);\n"
+" Method echo;\n"
+" \n"
+" public void init(Class beanHome, Class beanRemote,\n"
+" Object securityMgr)\n"
+" throws InstantiationException\n"
+" {\n"
+" log.debug(\"init, beanHome=\"+beanHome\n"
+" + \", beanRemote=\"+beanRemote\n"
+" + \", securityMgr=\"+securityMgr);\n"
+" // Get the echo method for equality testing in invoke\n"
+" try {\n"
+" Class[] params = {String.class};\n"
+" echo = beanRemote.getDeclaredMethod(\"echo\", params);\n"
+" } catch(Exception e) {\n"
+" String msg = \"Failed to finde an echo(String) method\";\n"
+" log.error(msg, e);\n"
+" throw new InstantiationException(msg);\n"
+" }\n"
+" }\n"
+" \n"
+" public void setEJBContext(EJBContext ctx)\n"
+" {\n"
+" log.debug(\"setEJBContext, ctx=\"+ctx);\n"
+" }\n"
+" \n"
+" public void invokeHome(Method m, Object[] args)\n"
+" throws SecurityException\n"
+" {\n"
+" // We don't validate access to home methods\n"
+" }\n"
+"\n"
+" public void invoke(Method m, Object[] args, Object bean)\n"
+" throws SecurityException\n"
+" {\n"
+" log.debug(\"invoke, m=\"+m);\n"
+" // Check for the echo method\n"
+" if (m.equals(echo)) {\n"
+" // Validate that the msg arg is not 4 letter word\n"
+" String arg = (String) args[0];\n"
+" if (arg == null || arg.length() == 4)\n"
+" throw new SecurityException(\"No 4 letter words\");\n"
+" }\n"
+" // We are not responsible for doing the invoke\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:474
+#, no-c-format
+msgid ""
+"The <literal>EchoSecurityProxy</literal> checks that the method to be "
+"invoked on the bean instance corresponds to the <literal>echo(String)</"
+"literal> method loaded the init method. If there is a match, the method "
+"argument is obtained and its length compared against 4 or null. Either case "
+"results in a <literal>SecurityException</literal> being thrown. Certainly "
+"this is a contrived example, but only in its application. It is a common "
+"requirement that applications must perform security checks based on the "
+"value of method arguments. The point of the example is to demonstrate how "
+"custom security beyond the scope of the standard declarative security model "
+"can be introduced independent of the bean implementation. This allows the "
+"specification and coding of the security requirements to be delegated to "
+"security experts. Since the security proxy layer can be done independent of "
+"the bean implementation, security can be changed to match the deployment "
+"environment requirements."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:477
+#, no-c-format
+msgid ""
+"The associated <literal>jboss.xml</literal> descriptor that installs the "
+"<literal>EchoSecurityProxy</literal> as the custom proxy for the "
+"<literal>EchoBean</literal> is given in <xref linkend="
+"\"Enabling_Declarative_Security_in_JBoss_Revisited-The_jboss."
+"xml_descriptor_which_configures_the_EchoSecurityProxy_as_the_custom_security_proxy_for_the_EchoBean."
+"\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:480
+#, no-c-format
+msgid ""
+"The jboss.xml descriptor, which configures the EchoSecurityProxy as the "
+"custom security proxy for the EchoBean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:481
+#, no-c-format
+msgid ""
+"<jboss>\n"
+" <security-domain>java:/jaas/other</security-domain>\n"
+" \n"
+" <enterprise-beans>\n"
+" <session>\n"
+" <ejb-name>EchoBean</ejb-name>\n"
+" <security-proxy>org.jboss.book.security.ex1."
+"EchoSecurityProxy</security-proxy>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:482
+#, no-c-format
+msgid ""
+"Now test the custom proxy by running a client that attempts to invoke the "
+"<literal>EchoBean.echo</literal> method with the arguments <literal>Hello</"
+"literal> and <literal>Four</literal> as illustrated in this fragment:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:485
+#, no-c-format
+msgid ""
+"public class ExClient\n"
+"{\n"
+" public static void main(String args[])\n"
+" throws Exception\n"
+" {\n"
+" Logger log = Logger.getLogger(\"ExClient\");\n"
+" log.info(\"Looking up EchoBean\");\n"
+"\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object ref = iniCtx.lookup(\"EchoBean\");\n"
+" EchoHome home = (EchoHome) ref;\n"
+" Echo echo = home.create();\n"
+"\n"
+" log.info(\"Created Echo\");\n"
+" log.info(\"Echo.echo('Hello') = \"+echo.echo(\"Hello\"));\n"
+" log.info(\"Echo.echo('Four') = \"+echo.echo(\"Four\"));\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:486
+#, no-c-format
+msgid ""
+"The first call should succeed, while the second should fail due to the fact "
+"that <literal>Four</literal> is a four-letter word. Run the client as "
+"follows using Ant from the examples directory:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:489
+#, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=security -Dex=1 run-example\n"
+"run-example1:\n"
+"...\n"
+" [echo] Waiting for 5 seconds for deploy...\n"
+" [java] [INFO,ExClient] Looking up EchoBean\n"
+" [java] [INFO,ExClient] Created Echo\n"
+" [java] [INFO,ExClient] Echo.echo('Hello') = Hello\n"
+" [java] Exception in thread \"main\" java.rmi.AccessException: "
+"SecurityException; nested exception is: \n"
+" [java] java.lang.SecurityException: No 4 letter words\n"
+"...\n"
+" [java] Caused by: java.lang.SecurityException: No 4 letter words\n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:490
+#, no-c-format
+msgid ""
+"The result is that the <literal>echo('Hello')</literal> method call "
+"succeeds as expected and the <literal>echo('Four')</literal> method "
+"call results in a rather messy looking exception, which is also expected. "
+"The above output has been truncated to fit in the book. The key part to the "
+"exception is that the <literal>SecurityException(\"No 4 letter words\")</"
+"literal> generated by the <literal>EchoSecurityProxy</literal> was thrown to "
+"abort the attempted method invocation as desired."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:498
+#, fuzzy, no-c-format
+msgid "The JBoss Security Extension Architecture"
+msgstr "JBossNS 架构"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:499
+#, no-c-format
+msgid ""
+"The preceding discussion of the general JBoss security layer has stated that "
+"the JBossSX security extension framework is an implementation of the "
+"security layer interfaces. This is the primary purpose of the JBossSX "
+"framework. The details of the implementation are interesting in that it "
+"offers a great deal of customization for integration into existing security "
+"infrastructures. A security infrastructure can be anything from a database "
+"or LDAP server to a sophisticated security software suite. The integration "
+"flexibility is achieved using the pluggable authentication model available "
+"in the JAAS framework."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:502
+#, no-c-format
+msgid ""
+"The heart of the JBossSX framework is <literal>org.jboss.security.plugins."
+"JaasSecurityManager</literal>. This is the default implementation of the "
+"<literal>AuthenticationManager</literal> and <literal>RealmMapping</literal> "
+"interfaces. <xref linkend=\"The_JBoss_Security_Extension_Architecture-"
+"The_relationship_between_the_security_domain_component_deployment_descriptor_value_the_component_container_and_the_JaasSecurityManager."
+"\"/> shows how the <literal>JaasSecurityManager</literal> integrates into "
+"the EJB and web container layers based on the <literal>security-domain</"
+"literal> element of the corresponding component deployment descriptor."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:506
+#, no-c-format
+msgid ""
+"The relationship between the security-domain component deployment descriptor "
+"value, the component container and the JaasSecurityManager."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:513
+#, no-c-format
+msgid ""
+"depicts an enterprise application that contains both EJBs and web content "
+"secured under the security domain <literal>jwdomain</literal>. The EJB and "
+"web containers have a request interceptor architecture that includes a "
+"security interceptor, which enforces the container security model. At "
+"deployment time, the <literal>security-domain</literal> element value in the "
+"<literal>jboss.xml</literal> and <literal>jboss-web.xml</literal> "
+"descriptors is used to obtain the security manager instance associated with "
+"the container. The security interceptor then uses the security manager to "
+"perform its role. When a secured component is requested, the security "
+"interceptor delegates security checks to the security manager instance "
+"associated with the container."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:516
+#, no-c-format
+msgid ""
+"The JBossSX <literal>JaasSecurityManager</literal> implementation performs "
+"security checks based on the information associated with the "
+"<literal>Subject</literal> instance that results from executing the JAAS "
+"login modules configured under the name matching the <literal>security-"
+"domain</literal> element value. We will drill into the "
+"<literal>JaasSecurityManager</literal> implementation and its use of JAAS in "
+"the following section."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:520
+#, no-c-format
+msgid "How the JaasSecurityManager Uses JAAS"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:521
+#, no-c-format
+msgid ""
+"The <literal>JaasSecurityManager</literal> uses the JAAS packages to "
+"implement the <literal>AuthenticationManager</literal> and "
+"<literal>RealmMapping</literal> interface behavior. In particular, its "
+"behavior derives from the execution of the login module instances that are "
+"configured under the name that matches the security domain to which the "
+"<literal>JaasSecurityManager</literal> has been assigned. The login modules "
+"implement the security domain's principal authentication and role-"
+"mapping behavior. Thus, you can use the <literal>JaasSecurityManager</"
+"literal> across different security domains simply by plugging in different "
+"login module configurations for the domains."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:524
+#, no-c-format
+msgid ""
+"To illustrate the details of the <literal>JaasSecurityManager</literal>'"
+"s usage of the JAAS authentication process, you will walk through a client "
+"invocation of an EJB home method invocation. The prerequisite setting is "
+"that the EJB has been deployed in the JBoss server and its home interface "
+"methods have been secured using <literal>method-permission</literal> "
+"elements in the <literal>ejb-jar.xml</literal> descriptor, and it has been "
+"assigned a security domain named <literal>jwdomain</literal> using the "
+"<literal>jboss.xml</literal> descriptor <literal>security-domain</literal> "
+"element."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:528
+#, no-c-format
+msgid ""
+"An illustration of the steps involved in the authentication and "
+"authorization of a secured EJB home method invocation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:535
+#, no-c-format
+msgid ""
+"provides a view of the client to server communication we will discuss. The "
+"numbered steps shown are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:540
+#, no-c-format
+msgid ""
+"The client first has to perform a JAAS login to establish the principal and "
+"credentials for authentication, and this is labeled <emphasis>Client Side "
+"Login</emphasis> in the figure. This is how clients establish their login "
+"identities in JBoss. Support for presenting the login information via JNDI "
+"<literal>InitialContext</literal> properties is provided via an alternate "
+"configuration. A JAAS login entails creating a <literal>LoginContext</"
+"literal> instance and passing the name of the configuration to use. The "
+"configuration name is <literal>other</literal>. This one-time login "
+"associates the login principal and credentials with all subsequent EJB "
+"method invocations. Note that the process might not authenticate the user. "
+"The nature of the client-side login depends on the login module "
+"configuration that the client uses. In this example, the <literal>other</"
+"literal> client-side login configuration entry is set up to use the "
+"<literal>ClientLoginModule</literal> module (an <literal>org.jboss.security."
+"ClientLoginModule</literal>). This is the default client side module that "
+"simply binds the username and password to the JBoss EJB invocation layer for "
+"later authentication on the server. The identity of the client is not "
+"authenticated on the client."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:545
+#, no-c-format
+msgid ""
+"Later, the client obtains the EJB home interface and attempts to create a "
+"bean. This event is labeled as <emphasis>Home Method Invocation</emphasis>. "
+"This results in a home interface method invocation being sent to the JBoss "
+"server. The invocation includes the method arguments passed by the client "
+"along with the user identity and credentials from the client-side JAAS login "
+"performed in step 1."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:550
+#, no-c-format
+msgid ""
+"On the server side, the security interceptor first requires authentication "
+"of the user invoking the call, which, as on the client side, involves a JAAS "
+"login."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:555
+#, no-c-format
+msgid ""
+"The security domain under which the EJB is secured determines the choice of "
+"login modules. The security domain name is used as the login configuration "
+"entry name passed to the <literal>LoginContext</literal> constructor. The "
+"EJB security domain is <literal>jwdomain</literal>. If the JAAS login "
+"authenticates the user, a JAAS <literal>Subject</literal> is created that "
+"contains the following in its <literal>PrincipalsSet</literal>:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:560
+#, no-c-format
+msgid ""
+"A <literal>java.security.Principal</literal> that corresponds to the client "
+"identity as known in the deployment security environment."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:565
+#, no-c-format
+msgid ""
+"A <literal>java.security.acl.Group</literal> named <literal>Roles</literal> "
+"that contains the role names from the application domain to which the user "
+"has been assigned. <literal>org.jboss.security.SimplePrincipal</literal> "
+"objects are used to represent the role names; <literal>SimplePrincipal</"
+"literal> is a simple string-based implementation of <literal>Principal</"
+"literal>. These roles are used to validate the roles assigned to methods in "
+"<literal>ejb-jar.xml</literal> and the <literal>EJBContext.isCallerInRole"
+"(String)</literal> method implementation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:570
+#, no-c-format
+msgid ""
+"An optional <literal>java.security.acl.Group</literal> named "
+"<literal>CallerPrincipal</literal>, which contains a single <literal>org."
+"jboss.security.SimplePrincipal</literal> that corresponds to the identity of "
+"the application domain's caller. The <literal>CallerPrincipal</literal> "
+"sole group member will be the value returned by the <literal>EJBContext."
+"getCallerPrincipal()</literal> method. The purpose of this mapping is to "
+"allow a <literal>Principal</literal> as known in the operational security "
+"environment to map to a <literal>Principal</literal> with a name known to "
+"the application. In the absence of a <literal>CallerPrincipal</literal> "
+"mapping the deployment security environment principal is used as the "
+"<literal>getCallerPrincipal</literal> method value. That is, the operational "
+"principal is the same as the application domain principal."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:577
+#, no-c-format
+msgid ""
+"The final step of the security interceptor check is to verify that the "
+"authenticated user has permission to invoke the requested method This is "
+"labeled as <emphasis>Server Side Authorization</emphasis> in <xref linkend="
+"\"How_the_JaasSecurityManager_Uses_JAAS-"
+"An_illustration_of_the_steps_involved_in_the_authentication_and_authorization_of_a_secured_EJB_home_method_invocation."
+"\"/>. Performing the authorization this entails the following steps:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:582
+#, no-c-format
+msgid ""
+"Obtain the names of the roles allowed to access the EJB method from the EJB "
+"container. The role names are determined by <literal>ejb-jar.xml</literal> "
+"descriptor role-name elements of all <literal>method-permission</literal> "
+"elements containing the invoked method."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:587
+#, no-c-format
+msgid ""
+"If no roles have been assigned, or the method is specified in an "
+"<literal>exclude-list</literal> element, then access to the method is "
+"denied. Otherwise, the <literal>doesUserHaveRole</literal> method is invoked "
+"on the security manager by the security interceptor to see if the caller has "
+"one of the assigned role names. This method iterates through the role names "
+"and checks if the authenticated user's Subject <literal>Roles</literal> "
+"group contains a <literal>SimplePrincipal</literal> with the assigned role "
+"name. Access is allowed if any role name is a member of the <literal>Roles</"
+"literal> group. Access is denied if none of the role names are members."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:592
+#, no-c-format
+msgid ""
+"If the EJB was configured with a custom security proxy, the method "
+"invocation is delegated to it. If the security proxy wants to deny access to "
+"the caller, it will throw a <literal>java.lang.SecurityException</literal>. "
+"If no <literal>SecurityException</literal> is thrown, access to the EJB "
+"method is allowed and the method invocation passes to the next container "
+"interceptor. Note that the <literal>SecurityProxyInterceptor</literal> "
+"handles this check and this interceptor is not shown."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:599
+#, no-c-format
+msgid ""
+"Every secured EJB method invocation, or secured web content access, requires "
+"the authentication and authorization of the caller because security "
+"information is handled as a stateless attribute of the request that must be "
+"presented and validated on each request. This can be an expensive operation "
+"if the JAAS login involves client-to-server communication. Because of this, "
+"the <literal>JaasSecurityManager</literal> supports the notion of an "
+"authentication cache that is used to store principal and credential "
+"information from previous successful logins. You can specify the "
+"authentication cache instance to use as part of the "
+"<literal>JaasSecurityManager</literal> configuration as you will see when "
+"the associated MBean service is discussed in following section. In the "
+"absence of any user-defined cache, a default cache that maintains credential "
+"information for a configurable period of time is used."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:605
+#, fuzzy, no-c-format
+msgid "The JaasSecurityManagerService MBean"
+msgstr "The InvokerAdaptorService MBean"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:606
+#, no-c-format
+msgid ""
+"The <literal>JaasSecurityManagerService</literal> MBean service manages "
+"security managers. Although its name begins with <emphasis>Jaas</emphasis>, "
+"the security managers it handles need not use JAAS in their implementation. "
+"The name arose from the fact that the default security manager "
+"implementation is the <literal>JaasSecurityManager</literal>. The primary "
+"role of the <literal>JaasSecurityManagerService</literal> is to externalize "
+"the security manager implementation. You can change the security manager "
+"implementation by providing an alternate implementation of the "
+"<literal>AuthenticationManager</literal> and <literal>RealmMapping</literal> "
+"interfaces."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:609
+#, no-c-format
+msgid ""
+"The second fundamental role of the <literal>JaasSecurityManagerService</"
+"literal> is to provide a JNDI <literal>javax.naming.spi.ObjectFactory</"
+"literal> implementation to allow for simple code-free management of the JNDI "
+"name to security manager implementation mapping. It has been mentioned that "
+"security is enabled by specifying the JNDI name of the security manager "
+"implementation via the <literal>security-domain</literal> deployment "
+"descriptor element. When you specify a JNDI name, there has to be an object-"
+"binding there to use. To simplify the setup of the JNDI name to security "
+"manager bindings, the <literal>JaasSecurityManagerService</literal> manages "
+"the association of security manager instances to names by binding a next "
+"naming system reference with itself as the JNDI ObjectFactory under the name "
+"<literal>java:/jaas</literal>. This allows one to use a naming convention of "
+"the form <literal>java:/jaas/XYZ</literal> as the value for the "
+"<literal>security-domain</literal> element, and the security manager "
+"instance for the <literal>XYZ</literal> security domain will be created as "
+"needed for you. The security manager for the domain <literal>XYZ</literal> "
+"is created on the first lookup against the <literal>java:/jaas/XYZ</literal> "
+"binding by creating an instance of the class specified by the "
+"<literal>SecurityManagerClassName</literal> attribute using a constructor "
+"that takes the name of the security domain. For example, consider the "
+"following container security configuration snippet:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:612
+#, fuzzy, no-c-format
+msgid ""
+"<jboss>\n"
+" <!-- Configure all containers to be secured under the \"hades\" "
+"security domain -->\n"
+" <security-domain>java:/jaas/hades</security-domain>\n"
+" <!-- ... -->\n"
+"</jboss>"
+msgstr ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/digest</security-domain>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:613
+#, no-c-format
+msgid ""
+"Any lookup of the name <literal>java:/jaas/hades</literal> will return a "
+"security manager instance that has been associated with the security domain "
+"named <literal>hades</literal>. This security manager will implement the "
+"AuthenticationManager and RealmMapping security interfaces and will be of "
+"the type specified by the <literal>JaasSecurityManagerService</"
+"literal><literal>SecurityManagerClassName</literal> attribute."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:616
+#, no-c-format
+msgid ""
+"The <literal>JaasSecurityManagerService</literal> MBean is configured by "
+"default for use in the standard JBoss distribution, and you can often use "
+"the default configuration as is. The configurable attributes of the "
+"<literal>JaasSecurityManagerService</literal> include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:621
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityManagerClassName</emphasis>: The name of the "
+"class that provides the security manager implementation. The implementation "
+"must support both the <literal>org.jboss.security.AuthenticationManager</"
+"literal> and <literal>org.jboss.security.RealmMapping</literal> interfaces. "
+"If not specified this defaults to the JAAS-based <literal>org.jboss.security."
+"plugins.JaasSecurityManager</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:626
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CallbackHandlerClassName</emphasis>: The name of the "
+"class that provides the <literal>javax.security.auth.callback."
+"CallbackHandler</literal> implementation used by the "
+"<literal>JaasSecurityManager</literal>. You can override the handler used by "
+"the <literal>JaasSecurityManager</literal> if the default implementation "
+"(<literal>org.jboss.security.auth.callback.SecurityAssociationHandler</"
+"literal>) does not meet your needs. This is a rather deep configuration that "
+"generally should not be set unless you know what you are doing."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:631
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityProxyFactoryClassName</emphasis>: The name "
+"of the class that provides the <literal>org.jboss.security."
+"SecurityProxyFactory</literal> implementation. If not specified this "
+"defaults to <literal>org.jboss.security.SubjectSecurityProxyFactory</"
+"literal>."
+msgstr ""
+"<literal>RMIClientSocketFactory</literal>:可选的自定义 <literal>java.rmi."
+"server.RMIServerSocketFactory</literal> 实现的类名。如果它没有指定,将使用缺"
+"省的 <literal>RMIServerSocketFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:636
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthenticationCacheJndiName</emphasis>: Specifies "
+"the location of the security credential cache policy. This is first treated "
+"as an <literal>ObjectFactory</literal> location capable of returning "
+"<literal>CachePolicy</literal> instances on a per-security-domain basis. "
+"This is done by appending the name of the security domain to this name when "
+"looking up the <literal>CachePolicy</literal> for a domain. If this fails, "
+"the location is treated as a single <literal>CachePolicy</literal> for all "
+"security domains. As a default, a timed cache policy is used."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:641
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DefaultCacheTimeout</emphasis>: Specifies the "
+"default timed cache policy timeout in seconds. The default value is 1800 "
+"seconds (30 minutes). The value you use for the timeout is a tradeoff "
+"between frequent authentication operations and how long credential "
+"information may be out of sync with respect to the security information "
+"store. If you want to disable caching of security credentials, set this to 0 "
+"to force authentication to occur every time. This has no affect if the "
+"<literal>AuthenticationCacheJndiName</literal> has been changed from the "
+"default value."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:646
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DefaultCacheResolution</emphasis>: Specifies the "
+"default timed cache policy resolution in seconds. This controls the interval "
+"at which the cache current timestamp is updated and should be less than the "
+"<literal>DefaultCacheTimeout</literal> in order for the timeout to be "
+"meaningful. The default resolution is 60 seconds(1 minute). This has no "
+"affect if the <literal>AuthenticationCacheJndiName</literal> has been "
+"changed from the default value."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:651
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DefaultUnauthenticatedPrincipal</emphasis>: "
+"Specifies the principal to use for unauthenticated users. This setting makes "
+"it possible to set default permissions for users who have not been "
+"authenticated."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:656
+#, no-c-format
+msgid ""
+"The <literal>JaasSecurityManagerService</literal> also supports a number of "
+"useful operations. These include flushing any security domain authentication "
+"cache at runtime, getting the list of active users in a security domain "
+"authentication cache, and any of the security manager interface methods."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:659
+#, no-c-format
+msgid ""
+"Flushing a security domain authentication cache can be used to drop all "
+"cached credentials when the underlying store has been updated and you want "
+"the store state to be used immediately. The MBean operation signature is: "
+"<literal>public void flushAuthenticationCache(String securityDomain)</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:662 J2EE_Security_On_JBOSS.xml:669
+#, no-c-format
+msgid "This can be invoked programmatically using the following code snippet:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:665
+#, no-c-format
+msgid ""
+"MBeanServer server = ...;\n"
+"String jaasMgrName = \"jboss.security:service=JaasSecurityManager\";\n"
+"ObjectName jaasMgr = new ObjectName(jaasMgrName);\n"
+"Object[] params = {domainName};\n"
+"String[] signature = {\"java.lang.String\"};\n"
+"server.invoke(jaasMgr, \"flushAuthenticationCache\", params, signature);"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:666
+#, no-c-format
+msgid ""
+"Getting the list of active users provides a snapshot of the "
+"<literal>Principals</literal> keys in a security domain authentication cache "
+"that are not expired. The MBean operation signature is: <literal>public List "
+"getAuthenticationCachePrincipals(String securityDomain)</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:672
+#, no-c-format
+msgid ""
+"MBeanServer server = ...;\n"
+"String jaasMgrName = \"jboss.security:service=JaasSecurityManager\";\n"
+"ObjectName jaasMgr = new ObjectName(jaasMgrName);\n"
+"Object[] params = {domainName};\n"
+"String[] signature = {\"java.lang.String\"};\n"
+"List users = (List) server.invoke(jaasMgr, \"getAuthenticationCachePrincipals"
+"\", \n"
+" params, signature);"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:673
+#, no-c-format
+msgid "The security manager has a few additional access methods."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:676
+#, no-c-format
+msgid ""
+"public boolean isValid(String securityDomain, Principal principal, Object "
+"credential);\n"
+"public Principal getPrincipal(String securityDomain, Principal principal);\n"
+"public boolean doesUserHaveRole(String securityDomain, Principal "
+"principal, \n"
+" Object credential, Set roles);\n"
+"public Set getUserRoles(String securityDomain, Principal principal, Object "
+"credential);"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:677
+#, no-c-format
+msgid ""
+"They provide access to the corresponding <literal>AuthenticationManager</"
+"literal> and <literal>RealmMapping</literal> interface method of the "
+"associated security domain named by the <literal>securityDomain</literal> "
+"argument."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:683
+#, no-c-format
+msgid "The JaasSecurityDomain MBean"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:684
+#, no-c-format
+msgid ""
+"The <literal>org.jboss.security.plugins.JaasSecurityDomain</literal> is an "
+"extension of <literal>JaasSecurityManager</literal> that adds the notion of "
+"a <literal>KeyStore</literal>, a JSSE <literal>KeyManagerFactory</literal> "
+"and a <literal>TrustManagerFactory</literal> for supporting SSL and other "
+"cryptographic use cases. The additional configurable attributes of the "
+"<literal>JaasSecurityDomain</literal> include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:689
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">KeyStoreType</emphasis>: The type of the "
+"<literal>KeyStore</literal> implementation. This is the type argument passed "
+"to the <literal>java.security.KeyStore.getInstance(String type)</literal> "
+"factory method. The default is <literal>JKS</literal>."
+msgstr ""
+"<emphasis role=\"bold\">keystoreType</emphasis>:用于服务器证书的 keystore 文"
+"件的类型。如果没有指定的话,它的缺省值是 <literal>JKS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:694
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">KeyStoreURL</emphasis>: A URL to the location of the "
+"<literal>KeyStore</literal> database. This is used to obtain an "
+"<literal>InputStream</literal> to initialize the <literal>KeyStore</"
+"literal>. If the string is not a value URL, it is treated as a file."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:699
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">KeyStorePass</emphasis>: The password associated "
+"with the <literal>KeyStore</literal> database contents. The "
+"<literal>KeyStorePass</literal> is also used in combination with the "
+"<literal>Salt</literal> and <literal>IterationCount</literal> attributes to "
+"create a PBE secret key used with the encode/decode operations. The "
+"<literal>KeyStorePass</literal> attribute value format is one of the "
+"following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:704
+#, no-c-format
+msgid ""
+"The plaintext password for the <literal>KeyStore</literal> The "
+"<literal>toCharArray()</literal> value of the string is used without any "
+"manipulation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:709
+#, no-c-format
+msgid ""
+"A command to execute to obtain the plaintext password. The format is "
+"<literal>{EXT}...</literal> where the <literal>...</literal> is the exact "
+"command line that will be passed to the <literal>Runtime.exec(String)</"
+"literal> method to execute a platform-specific command. The first line of "
+"the command output is used as the password."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:714
+#, no-c-format
+msgid ""
+"A class to create to obtain the plaintext password. The format is <literal>"
+"{CLASS}classname[:ctorarg]</literal> where the <literal>[:ctorarg]</literal> "
+"is an optional string that will be passed to the constructor when "
+"instantiating the <literal>classname</literal>. The password is obtained "
+"from classname by invoking a <literal>toCharArray()</literal> method if "
+"found, otherwise, the <literal>toString()</literal> method is used."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:721
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Salt</emphasis>: The <literal>PBEParameterSpec</"
+"literal> salt value."
+msgstr ""
+"<emphasis role=\"bold\">FromName</emphasis>:<literal>LinkRef</literal> 在 "
+"JNDI 下绑定的位置。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:726
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">IterationCount</emphasis>: The "
+"<literal>PBEParameterSpec</literal> iteration count value."
+msgstr ""
+"<emphasis role=\"bold\">parameter</emphasis>:这个元素描述了操作的签名。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:731
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TrustStoreType</emphasis>: The type of the "
+"<literal>TrustStore</literal> implementation. This is the type argument "
+"passed to the <literal>java.security.KeyStore.getInstance(String type)</"
+"literal> factory method. The default is <literal>JKS</literal>."
+msgstr ""
+"<emphasis role=\"bold\">keystoreType</emphasis>:用于服务器证书的 keystore 文"
+"件的类型。如果没有指定的话,它的缺省值是 <literal>JKS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:736
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TrustStoreURL</emphasis>: A URL to the location of "
+"the <literal>TrustStore</literal> database. This is used to obtain an "
+"<literal>InputStream</literal> to initialize the <literal>KeyStore</"
+"literal>. If the string is not a value URL, it is treated as a file."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:741
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">TrustStorePass</emphasis>: The password associated "
+"with the trust store database contents. The <literal>TrustStorePass</"
+"literal> is a simple password and doesn't have the same configuration "
+"options as the <literal>KeyStorePass</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:746
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ManagerServiceName</emphasis>: Sets the JMX object "
+"name string of the security manager service MBean. This is used to register "
+"the defaults to register the <literal>JaasSecurityDomain</literal> as a the "
+"security manager under <literal>java:/jaas/<domain></literal> where "
+"<literal><domain></literal> is the name passed to the MBean "
+"constructor. The name defaults to <literal>jboss.security:"
+"service=JaasSecurityManager</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:756
+#, no-c-format
+msgid "Defining Security Domains"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:757
+#, no-c-format
+msgid ""
+"The standard way of configuring security domains for authentication and "
+"authorization in JBoss is to use the XML login configuration file. The login "
+"configuration policy defines a set of named security domains that each "
+"define a stack of login modules that will be called upon to authenticate and "
+"authorize users."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:760
+#, no-c-format
+msgid ""
+"The XML configuration file conforms to the DTD given by <xref linkend="
+"\"Defining_Security_Domains-The_XMLLoginConfig_DTD\"/>. This DTD can be "
+"found in <literal>docs/dtd/security_config.dtd</literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:764
+#, no-c-format
+msgid "The XMLLoginConfig DTD"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:776
+#, no-c-format
+msgid ""
+"The following example shows a simple configuration named jmx-console that is "
+"backed by a single login module. The login module is configured by a simple "
+"set of name/value configuration pairs that have meaning to the login module "
+"in question. We'll see what these options mean later, for now we'll "
+"just be concerned with the structure of the configuration file."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:779
+#, no-c-format
+msgid ""
+"<application-policy name=\"jmx-console\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\" flag=\"required\">\n"
+" <module-option name=\"usersProperties\">props/jmx-console-"
+"users.properties</module-option>\n"
+" <module-option name=\"rolesProperties\">props/jmx-console-"
+"roles.properties</module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:780
+#, no-c-format
+msgid ""
+"The <literal>name</literal> attribute of the <literal>application-policy</"
+"literal> is the login configuration name. Applications policy elements will "
+"be bound by that name in JNDI under the the <literal>java:/jaas</literal> "
+"context. Applications will link to security domains through this JNDI name "
+"in their deployment descriptors. (See the <literal>security-domain</literal> "
+"elements in <literal>jboss.xml</literal>, <literal>jboss-web.xml</literal> "
+"and <literal>jboss-service.xml</literal> files for examples)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:783
+#, no-c-format
+msgid ""
+"The <literal>code</literal> attribute of the <literal>login-module</literal> "
+"element specifies the class name of the login module implementation. The "
+"<literal>required</literal> flag attribute controls the overall behavior of "
+"the authentication stack. The allowed values and meanings are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:788
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">required</emphasis>: The login module is required to "
+"succeed for the authentication to be successful. If any required module "
+"fails, the authentication will fail. The remaining login modules in the "
+"stack will be called regardless of the outcome of the authentication."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:793
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">requisite</emphasis>: The login module is required "
+"to succeed. If it succeeds, authentication continues down the login stack. "
+"If it fails, control immediately returns to the application."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:798
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sufficient</emphasis>: The login module is not "
+"required to succeed. If it does succeed, control immediately returns to the "
+"application. If it fails, authentication continues down the login stack."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:803
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">optional</emphasis>: The login module is not "
+"required to succeed. Authentication still continues to proceed down the "
+"login stack regardless of whether the login module succeeds or fails."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:808
+#, no-c-format
+msgid ""
+"The following example shows the definition of a security domain that uses "
+"multiple login modules. Since both modules are marked as sufficient, only "
+"one of them need to succeed for login to proceed."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:811
+#, no-c-format
+msgid ""
+"<application-policy name=\"todo\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi.LdapLoginModule"
+"\" \n"
+" flag=\"sufficient\">\n"
+" <!-- LDAP configuration -->\n"
+" </login-module>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"DatabaseServerLoginModule\" \n"
+" flag=\"sufficient\">\n"
+" <!-- database configuration -->\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:812
+#, no-c-format
+msgid ""
+"Each login module has its own set of configuration options. These are set as "
+"name/value pairs using the <literal>module-option</literal> elements. We'"
+"ll cover module options in more depth when we look at the individual login "
+"modules available in JBoss AS."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:816
+#, no-c-format
+msgid "Loading Security Domains"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:817
+#, no-c-format
+msgid ""
+"Authentication security domains are configured statically in the "
+"<literal>conf/login-config.xml</literal> file. The <literal>XMLLoginConfig</"
+"literal> MBean is responsible for loading security configurations from this "
+"configurations from a local configuration file. The MBean is defined as "
+"shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:820
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.security.auth.login.XMLLoginConfig\"\n"
+" name=\"jboss.security:service=XMLLoginConfig\">\n"
+" <attribute name=\"ConfigResource\">login-config.xml</"
+"attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:821
+#, fuzzy, no-c-format
+msgid "The MBean supports the following attributes:"
+msgstr "HttpInvoker 支持下面的属性:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:826
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ConfigURL</emphasis>: specifies the URL of the XML "
+"login configuration file that should be loaded by this MBean on startup. "
+"This must be a valid URL string representation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:831
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ConfigResource</emphasis>: specifies the resource "
+"name of the XML login configuration file that should be loaded by this MBean "
+"on startup. The name is treated as a classpath resource for which a URL is "
+"located using the thread context class loader."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:836
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ValidateDTD</emphasis>: a flag indicating if the XML "
+"configuration should be validated against its DTD. This defaults to true."
+msgstr ""
+"<emphasis role=\"bold\">cookies</emphasis>:这个标记表示是否用 cookies 记录会"
+"话。它的缺省值是 true。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:841
+#, no-c-format
+msgid ""
+"The MBean also supports the following operations that allow one to "
+"dynamically extend the login configurations at runtime. Note that any "
+"operation that attempts to alter login configuration requires a "
+"<literal>javax.security.auth.AuthPermission(\"refreshLoginConfiguration\")</"
+"literal> when running with a security manager. The <literal>org.jboss.book."
+"security.service.SecurityConfig</literal> service demonstrates how this can "
+"be used to add/remove a deployment specific security configuration "
+"dynamically."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:846
+#, no-c-format
+msgid ""
+"<literal>void addAppConfig(String appName, AppConfigurationEntry[] entries)</"
+"literal>: this adds the given login module configuration stack to the "
+"current configuration under the given <literal>appName</literal>. This "
+"replaces any existing entry under that name."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:851
+#, no-c-format
+msgid ""
+"<literal>void removeAppConfig(String appName)</literal>: this removes the "
+"login module configuration registered under the given <literal>appName</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:856
+#, no-c-format
+msgid ""
+"<literal>String[] loadConfig(URL configURL) throws Exception</literal>: this "
+"loads one or more login configurations from a URL representing either an XML "
+"or legacy Sun login configuration file. Note that all login configurations "
+"must be added or none will be added. It returns the names of the login "
+"configurations that were added."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:861
+#, no-c-format
+msgid ""
+"<literal>void removeConfigs(String[] appNames)</literal>: this removes the "
+"login configurations specified <literal>appNames</literal> array."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:866
+#, no-c-format
+msgid ""
+"<literal>String displayAppConfig(String appName)</literal>: this operation "
+"displays a simple string format of the named configuration if it exists."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:871
+#, no-c-format
+msgid ""
+"The <literal>SecurityConfig</literal> MBean is responsible for selecting the "
+"<literal>javax.security.auth.login.Configuration</literal> to be used. The "
+"default configuration simply references the <literal>XMLLoginConfig</"
+"literal> MBean."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:874
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.security.plugins.SecurityConfig\" \n"
+" name=\"jboss.security:service=SecurityConfig\">\n"
+" <attribute name=\"LoginConfig\">jboss.security:"
+"service=XMLLoginConfig</attribute>\n"
+" </mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:875
+#, fuzzy, no-c-format
+msgid "There is one configurable attribute:"
+msgstr "可配置的属性如下:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:880
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LoginConfig</emphasis>: Specifies the JMX "
+"<literal>ObjectName</literal> string of the MBean that provides the default "
+"JAAS login configuration. When the <literal>SecurityConfig</literal> is "
+"started, this MBean is queried for its <literal>javax.security.auth.login."
+"Configuration</literal> by calling its <literal>getConfiguration"
+"(Configuration currentConfig)</literal> operation. If the "
+"<literal>LoginConfig</literal> attribute is not specified then the default "
+"Sun <literal>Configuration</literal> implementation described in the "
+"<literal>Configuration</literal> class JavaDocs is used."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:885
+#, no-c-format
+msgid ""
+"In addition to allowing for a custom JAAS login configuration "
+"implementation, this service allows configurations to be chained together in "
+"a stack at runtime. This allows one to push a login configuration onto the "
+"stack and latter pop it. This is a feature used by the security unit tests "
+"to install custom login configurations into a default JBoss installation. "
+"Pushing a new configuration is done using:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:888
+#, no-c-format
+msgid ""
+"public void pushLoginConfig(String objectName) throws\n"
+" JMException, MalformedObjectNameException;"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:889
+#, no-c-format
+msgid ""
+"The <literal>objectName</literal> parameters specifies an MBean similar to "
+"the <literal>LoginConfig</literal> attribute. The current login "
+"configuration may be removed using:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:892
+#, no-c-format
+msgid "public void popLoginConfig() throws JMException;"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:896
+#, fuzzy, no-c-format
+msgid "The DynamicLoginConfig service"
+msgstr "JNDI 命名服务"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:897
+#, no-c-format
+msgid ""
+"Security domains defined in the <literal>login-config.xml</literal> file are "
+"essentially static. They are read when JBoss starts up, but there is no easy "
+"way to add a new security domain or change the definition for an existing "
+"one. The <literal>DynamicLoginConfig</literal> service allows you to "
+"dynamically deploy security domains. This allows you to specify JAAS login "
+"configuration as part of a deployment (or just as a standalone service) "
+"rather than having to edit the static <literal>login-config.xml</literal> "
+"file."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:900
+#, fuzzy, no-c-format
+msgid "The service supports the following attributes:"
+msgstr "HttpInvoker 支持下面的属性:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:905
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthConfig</emphasis>: The resource path to the JAAS "
+"login configuration file to use. This defaults to <literal>login-config.xml</"
+"literal>"
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:910
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">LoginConfigService</emphasis>: the "
+"<literal>XMLLoginConfig</literal> service name to use for loading. This "
+"service must support a <literal>String loadConfig(URL)</literal> operation "
+"to load the configurations."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:915
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">SecurityManagerService</emphasis>: The "
+"<literal>SecurityManagerService</literal> name used to flush the registered "
+"security domains. This service must support a "
+"<literal>flushAuthenticationCache(String)</literal> operation to flush the "
+"case for the argument security domain. Setting this triggers the flush of "
+"the authentication caches when the service is stopped."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:920
+#, no-c-format
+msgid ""
+"Here is an example MBean definition using the <literal>DynamicLoginConfig</"
+"literal> service."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:923
+#, no-c-format
+msgid ""
+"<server>\n"
+" <mbean code=\"org.jboss.security.auth.login.DynamicLoginConfig\" name="
+"\"...\">\n"
+" <attribute name=\"AuthConfig\">login-config.xml</"
+"attribute>\n"
+"\n"
+" <!-- The service which supports dynamic processing of login-"
+"config.xml\n"
+" configurations.\n"
+" -->\n"
+" <depends optional-attribute-name=\"LoginConfigService\">\n"
+" jboss.security:service=XMLLoginConfig </depends>\n"
+"\n"
+" <!-- Optionally specify the security mgr service to use when\n"
+" this service is stopped to flush the auth caches of the domains\n"
+" registered by this service.\n"
+" -->\n"
+" <depends optional-attribute-name=\"SecurityManagerService\">\n"
+" jboss.security:service=JaasSecurityManager </depends>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:924
+#, no-c-format
+msgid ""
+"This will load the specified <literal>AuthConfig</literal> resource using "
+"the specified <literal>LoginConfigService</literal> MBean by invoking "
+"<literal>loadConfig</literal> with the appropriate resource URL. When the "
+"service is stopped the configurations are removed. The resource specified "
+"may be either an XML file, or a Sun JAAS login configuration."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:930
+#, no-c-format
+msgid "Using JBoss Login Modules"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:931
+#, no-c-format
+msgid ""
+"JBoss includes several bundled login modules suitable for most user "
+"management needs. JBoss can read user information from a relational "
+"database, an LDAP server or flat files. In addition to these core login "
+"modules, JBoss provides several other login modules that provide user "
+"information for very customized needs in JBoss. Before we explore the "
+"individual login modules, let's take a look at a few login module "
+"configuration options that are common to multiple modules."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:935
+#, no-c-format
+msgid "Password Stacking"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:936
+#, no-c-format
+msgid ""
+"Multiple login modules can be chained together in a stack, with each login "
+"module providing both the authentication and authorization components. This "
+"works for many use cases, but sometimes authentication and authorization are "
+"split across multiple user management stores. A previous example showed how "
+"to combine LDAP and a relational database, allowing a user to be "
+"authenticated by either system. However, consider the case where users are "
+"managed in a central LDAP server but application-specific roles are stored "
+"in the application's relational database. The password-stacking module "
+"option captures this relationship."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:941
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">password-stacking</emphasis>: When <literal>password-"
+"stacking</literal> option is set to <literal>useFirstPass</literal>, this "
+"module first looks for a shared username and password under the property "
+"names <literal>javax.security.auth.login.name</literal> and <literal>javax."
+"security.auth.login.password</literal> respectively in the login module "
+"shared state map. If found these are used as the principal name and "
+"password. If not found the principal name and password are set by this login "
+"module and stored under the property names <literal>javax.security.auth."
+"login.name</literal> and <literal>javax.security.auth.login.password</"
+"literal> respectively."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:946
+#, no-c-format
+msgid ""
+"To use password stacking, each login module should set <literal>password-"
+"stacking</literal> to <literal>useFirstPass</literal>. If a previous module "
+"configured for password stacking has authenticated the user, all the other "
+"stacking modules will consider the user authenticated and only attempt to "
+"provide a set of roles for the authorization step."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:949
+#, no-c-format
+msgid "The following listing shows how password stacking could be used:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:952
+#, fuzzy, no-c-format
+msgid ""
+"<application-policy name=\"todo\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi.LdapLoginModule"
+"\" \n"
+" flag=\"required\">\n"
+" <!-- LDAP configuration -->\n"
+" <module-option name=\"password-stacking\">useFirstPass</"
+"module-option>\n"
+" </login-module>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"DatabaseServerLoginModule\" \n"
+" flag=\"required\">\n"
+" <!-- database configuration --> \n"
+" <module-option name=\"password-stacking\">useFirstPass</"
+"module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+"<application-policy name=\"digest\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"usersProperties\">digest-users."
+"properties</module-option>\n"
+" <module-option name=\"rolesProperties\">digest-roles."
+"properties</module-option>\n"
+" <module-option name=\"hashAlgorithm\">MD5</module-"
+"option>\n"
+" <module-option name=\"hashEncoding\">rfc2617</module-"
+"option>\n"
+" <module-option name=\"hashUserPassword\">false</module-"
+"option>\n"
+" <module-option name=\"hashStorePassword\">true</module-"
+"option>\n"
+" <module-option name=\"passwordIsA1Hash\">true</module-"
+"option>\n"
+" <module-option name=\"storeDigestCallback\">\n"
+" org.jboss.security.auth.spi.RFC2617Digest\n"
+" </module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:953
+#, no-c-format
+msgid ""
+"When using password stacking, it is usually appropriate to set all modules "
+"to be required to make sure that all modules are considered and have chance "
+"to contribute roles to the authorization process."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:959
+#, no-c-format
+msgid "Password Hashing"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:960
+#, no-c-format
+msgid ""
+"Most of the login modules need to compare a client-supplied password to a "
+"password stored in a user management system. These modules generally work "
+"with plain text passwords, but can also be configured to support hashed "
+"passwords to prevent plain text passwords from being stored on the server "
+"side."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:965
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hashAlgorithm</emphasis>: The name of the "
+"<literal>java.security.MessageDigest</literal> algorithm to use to hash the "
+"password. There is no default so this option must be specified to enable "
+"hashing. Typical values are <literal>MD5</literal> and <literal>SHA</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:970
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hashEncoding</emphasis>: The string format for the "
+"hashed pass and must be either <literal>base64</literal>, <literal>hex</"
+"literal> or <literal>rfc2617</literal>. The default is <literal>base64</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">scheme</emphasis>:它设置 <literal>ServletRequest."
+"getScheme</literal> 方法访问的协议名。它的缺省值是 <literal>http</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:975
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hashCharset</emphasis>: The encoding used to convert "
+"the clear text password to a byte array. The platform default encoding is "
+"the default."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:980
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hashUserPassword</emphasis>: This indicates that the "
+"hashing algorithm should be applied to the password the user submits. The "
+"hashed user password will be compared against the value in the login module, "
+"which is expected to be a hash of the password. The default is true."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:985
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hashStorePassword</emphasis>: This indicates that "
+"the hashing algorithm should be applied to the password stored on the server "
+"side. This is used for digest authentication where the user submits a hash "
+"of the user password along with a request-specific tokens from the server to "
+"be comare. JBoss uses the hash algorithm (for digest, this would be "
+"<literal>rfc2617</literal>) to compute a server-side hash that should match "
+"the hashed value sent from the client."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:990
+#, no-c-format
+msgid ""
+"The following is an login module configuration that assigns unauthenticated "
+"users the principal name <literal>nobody</literal> and contains based64-"
+"encoded, MD5 hashes of the passwords in a <literal>usersb64.properties</"
+"literal> file."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:993
+#, no-c-format
+msgid ""
+"<policy>\n"
+" <application-policy name=\"testUsersRoles\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"hashAlgorithm\">MD5</module-"
+"option>\n"
+" <module-option name=\"hashEncoding\">base64</module-"
+"option> \n"
+" </login-module>\n"
+" </authentication>\n"
+" </application-policy>\n"
+"</policy>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:994
+#, no-c-format
+msgid ""
+"If you need to generate passwords in code, <literal>the org.jboss.security."
+"Util</literal> class provides a static helper method that will hash a "
+"password using a given encoding."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:997
+#, no-c-format
+msgid ""
+"String hashedPassword = Util.createPasswordHash(\"MD5\",\n"
+" Util.BASE64_ENCODING,\n"
+" null,\n"
+" null,\n"
+" \"password\");"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:998
+#, no-c-format
+msgid ""
+"OpenSSL provides an alternative way to quickly generate hashed passwords."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1001
+#, no-c-format
+msgid "echo -n password | openssl dgst -md5 -binary | openssl base64"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1002
+#, no-c-format
+msgid ""
+"In both cases, the text password should hash to \"X03MO1qnZdYdgyfeuILPmQ=="
+"\". This is the value that would need to be stored in the user store."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1008
+#, no-c-format
+msgid "Unauthenticated Identity"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1009
+#, no-c-format
+msgid ""
+"Not all requests come in authenticated. The unauthenticated identity is a "
+"login module configuration option that assigns a specific identity (guest, "
+"for example) to requests that are made with no associated authentication "
+"information. This can be used to allow unprotected servlets to invoke "
+"methods on EJBs that do not require a specific role. Such a principal has no "
+"associated roles and so can only access either unsecured EJBs or EJB methods "
+"that are associated with the unchecked permission constraint."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1014
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">unauthenticatedIdentity</emphasis>: This defines the "
+"principal name that should be assigned to requests that contain no "
+"authentication information."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1022
+#, no-c-format
+msgid "UsersRolesLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1023
+#, no-c-format
+msgid ""
+"The <literal>UsersRolesLoginModule</literal> is a simple login module that "
+"supports multiple users and user roles loaded from Java properties files. "
+"The username-to-password mapping file is called <literal>users.properties</"
+"literal> and the username-to-roles mapping file is called <literal>roles."
+"properties</literal>. The properties files are loaded during initialization "
+"using the initialize method thread context class loader. This means that "
+"these files can be placed into the J2EE deployment JAR, the JBoss "
+"configuration directory, or any directory on the JBoss server or system "
+"classpath. The primary purpose of this login module is to easily test the "
+"security settings of multiple users and roles using properties files "
+"deployed with the application."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1026
+#, no-c-format
+msgid ""
+"The <literal>users.properties</literal> file uses a "
+"<literal>username=password</literal> format with each user entry on a "
+"separate line as show here:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1029
+#, no-c-format
+msgid ""
+"username1=password1\n"
+"username2=password2\n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1030
+#, no-c-format
+msgid ""
+"The <literal>roles.properties</literal> file uses as <literal>username=role1,"
+"role2,...</literal> format with an optional group name value. For example:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1033
+#, no-c-format
+msgid ""
+"username1=role1,role2,...\n"
+"username1.RoleGroup1=role3,role4,...\n"
+"username2=role1,role3,..."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1034
+#, no-c-format
+msgid ""
+"The <literal>username.XXX</literal> form of property name is used to assign "
+"the username roles to a particular named group of roles where the "
+"<literal>XXX</literal> portion of the property name is the group name. The "
+"<literal>username=...</literal> form is an abbreviation for "
+"<literal>username.Roles=...</literal>, where the <literal>Roles</literal> "
+"group name is the standard name the <literal>JaasSecurityManager</literal> "
+"expects to contain the roles which define the users permissions."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1037
+#, no-c-format
+msgid ""
+"The following would be equivalent definitions for the <literal>jduke</"
+"literal> username:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1040
+#, no-c-format
+msgid ""
+"jduke=TheDuke,AnimatedCharacter\n"
+"jduke.Roles=TheDuke,AnimatedCharacter"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1041 J2EE_Security_On_JBOSS.xml:1101
+#: J2EE_Security_On_JBOSS.xml:1210 J2EE_Security_On_JBOSS.xml:1338
+#, fuzzy, no-c-format
+msgid "The supported login module configuration options include the following:"
+msgstr "MBean的管理接口的范围包括:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1046
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">usersProperties</emphasis>: The name of the "
+"properties resource containing the username to password mappings. This "
+"defaults to <literal>users.properties</literal>."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1051
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">rolesProperties</emphasis>: The name of the "
+"properties resource containing the username to roles mappings. This defaults "
+"to <literal>roles.properties</literal>."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1056
+#, no-c-format
+msgid ""
+"This login module supports password stacking, password hashing and "
+"unauthenticated identity."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1062
+#, no-c-format
+msgid "LdapLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1063
+#, no-c-format
+msgid ""
+"The <literal>LdapLoginModule</literal> is a <literal>LoginModule</literal> "
+"implementation that authenticates against an LDAP server. You would use the "
+"<literal>LdapLoginModule</literal> if your username and credentials are "
+"stored in an LDAP server that is accessible using a JNDI LDAP provider."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1066
+#, no-c-format
+msgid ""
+"The LDAP connectivity information is provided as configuration options that "
+"are passed through to the environment object used to create JNDI initial "
+"context. The standard LDAP JNDI properties used include the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1071
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>: The "
+"classname of the <literal>InitialContextFactory</literal> implementation. "
+"This defaults to the Sun LDAP provider implementation <literal>com.sun.jndi."
+"ldap.LdapCtxFactory</literal>."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"security.jndi.LoginInitialContextFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1076
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>: The LDAP URL "
+"for the LDAP server"
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1081
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.authentication</emphasis>: The "
+"security level to use. This defaults to <literal>simple</literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_port</emphasis> 指定多点传送端口号码。它的缺省"
+"值是 <literal>45566</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1086
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.protocol</emphasis>: The "
+"transport protocol to use for secure access, such as, SSL."
+msgstr ""
+"<emphasis role=\"bold\">protocol</emphasis>:所使用的 SSL 协议的版本。如果没"
+"有指定的话,缺省是 <literal>TLS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1091
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.principal</emphasis>: The "
+"principal for authenticating the caller to the service. This is built from "
+"other properties as described below."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1096
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.credentials</emphasis>: The "
+"value of the property depends on the authentication scheme. For example, it "
+"could be a hashed password, clear-text password, key, certificate, and so on."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1106
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principalDNPrefix</emphasis>: A prefix to add to the "
+"username to form the user distinguished name. See "
+"<literal>principalDNSuffix</literal> for more info."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1111
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principalDNSuffix</emphasis>: A suffix to add to the "
+"username when forming the user distinguished name. This is useful if you "
+"prompt a user for a username and you don't want the user to have to "
+"enter the fully distinguished name. Using this property and "
+"<literal>principalDNSuffix</literal> the <literal>userDN</literal> will be "
+"formed as <literal>principalDNPrefix + username + principalDNSuffix</literal>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1116
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">useObjectCredential</emphasis>: A true/false value "
+"that indicates that the credential should be obtained as an opaque "
+"<literal>Object</literal> using the <literal>org.jboss.security.auth."
+"callback.ObjectCallback</literal> type of <literal>Callback</literal> rather "
+"than as a <literal>char[]</literal> password using a JAAS "
+"<literal>PasswordCallback</literal>. This allows for passing non-"
+"<literal>char[]</literal> credential information to the LDAP server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1121
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">rolesCtxDN</emphasis>: The fixed distinguished name "
+"to the context to search for user roles."
+msgstr "<emphasis role=\"bold\">type</emphasis>:attribute类型的类全名。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1126
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">userRolesCtxDNAttributeName</emphasis>: The name of "
+"an attribute in the user object that contains the distinguished name to the "
+"context to search for user roles. This differs from <literal>rolesCtxDN</"
+"literal> in that the context to search for a user's roles can be unique "
+"for each user."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1131
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">roleAttributeID</emphasis>: The name of the "
+"attribute that contains the user roles. If not specified this defaults to "
+"<literal>roles</literal>."
+msgstr ""
+"<emphasis role=\"bold\">protocol</emphasis>:所使用的 SSL 协议的版本。如果没"
+"有指定的话,缺省是 <literal>TLS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1136
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">roleAttributeIsDN</emphasis>: A flag indicating "
+"whether the <literal>roleAttributeID</literal> contains the fully "
+"distinguished name of a role object, or the role name. If false, the role "
+"name is taken from the value of <literal>roleAttributeID</literal>. If true, "
+"the role attribute represents the distinguished name of a role object. The "
+"role name is taken from the value of the <literal>roleNameAttributeId</"
+"literal> attribute of the context name by the distinguished name. In certain "
+"directory schemas (e.g., MS ActiveDirectory), role attributes in the user "
+"object are stored as DNs to role objects instead of as simple names, in "
+"which case, this property should be set to true. The default is false."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1141
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">roleNameAttributeID</emphasis>: The name of the "
+"attribute of the context pointed to by the <literal>roleCtxDN</literal> "
+"distinguished name value which contains the role name. If the "
+"<literal>roleAttributeIsDN</literal> property is set to true, this property "
+"is used to find the role object's name attribute. The default is "
+"<literal>group</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1146
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">uidAttributeID</emphasis>: The name of the attribute "
+"in the object containing the user roles that corresponds to the userid. This "
+"is used to locate the user roles. If not specified this defaults to "
+"<literal>uid</literal>."
+msgstr ""
+"<emphasis role=\"bold\">keystoreType</emphasis>:用于服务器证书的 keystore 文"
+"件的类型。如果没有指定的话,它的缺省值是 <literal>JKS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1151
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">matchOnUserDN</emphasis>: A true/false flag "
+"indicating if the search for user roles should match on the user's fully "
+"distinguished name. If false, just the username is used as the match value "
+"against the <literal>uidAttributeName</literal> attribute. If true, the full "
+"<literal>userDN</literal> is used as the match value."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1156
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">unauthenticatedIdentity</emphasis>: The principal "
+"name that should be assigned to requests that contain no authentication "
+"information. This behavior is inherited from the "
+"<literal>UsernamePasswordLoginModule</literal> superclass."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1161
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">allowEmptyPasswords</emphasis>: A flag indicating if "
+"empty (length 0) passwords should be passed to the LDAP server. An empty "
+"password is treated as an anonymous login by some LDAP servers and this may "
+"not be a desirable feature. Set this to false to reject empty passwords or "
+"true to have the LDAP server validate the empty password. The default is "
+"true."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1166
+#, no-c-format
+msgid ""
+"The authentication of a user is performed by connecting to the LDAP server "
+"based on the login module configuration options. Connecting to the LDAP "
+"server is done by creating an <literal>InitialLdapContext</literal> with an "
+"environment composed of the LDAP JNDI properties described previously in "
+"this section. The <literal>Context.SECURITY_PRINCIPAL</literal> is set to "
+"the distinguished name of the user as obtained by the callback handler in "
+"combination with the <literal>principalDNPrefix</literal> and "
+"<literal>principalDNSuffix</literal> option values, and the <literal>Context."
+"SECURITY_CREDENTIALS</literal> property is either set to the "
+"<literal>String</literal> password or the <literal>Object</literal> "
+"credential depending on the <literal>useObjectCredential</literal> option."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1169
+#, no-c-format
+msgid ""
+"Once authentication has succeeded by virtue of being able to create an "
+"<literal>InitialLdapContext</literal> instance, the user's roles are "
+"queried by performing a search on the <literal>rolesCtxDN</literal> location "
+"with search attributes set to the <literal>roleAttributeName</literal> and "
+"<literal>uidAttributeName</literal> option values. The roles names are "
+"obtaining by invoking the <literal>toString</literal> method on the role "
+"attributes in the search result set."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1172
+#, no-c-format
+msgid "The following is a sample <literal>login-config.xml</literal> entry."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1175
+#, fuzzy, no-c-format
+msgid ""
+"<application-policy name=\"testLDAP\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"LdapLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"java.naming.factory.initial\"> \n"
+" com.sun.jndi.ldap.LdapCtxFactory\n"
+" </module-option>\n"
+" <module-option name=\"java.naming.provider.url\">\n"
+" ldap://ldaphost.jboss.org:1389/\n"
+" </module-option>\n"
+" <module-option name=\"java.naming.security.authentication"
+"\">\n"
+" simple\n"
+" </module-option>\n"
+" <module-option name=\"principalDNPrefix\">uid=</"
+"module-option> \n"
+" <module-option name=\"principalDNSuffix\">\n"
+" ,ou=People,dc=jboss,dc=org\n"
+" </module-option>\n"
+"\n"
+" <module-option name=\"rolesCtxDN\">\n"
+" ou=Roles,dc=jboss,dc=org\n"
+" </module-option>\n"
+" <module-option name=\"uidAttributeID\">member</"
+"module-option>\n"
+" <module-option name=\"matchOnUserDN\">true</module-"
+"option>\n"
+"\n"
+" <module-option name=\"roleAttributeID\">cn</module-"
+"option>\n"
+" <module-option name=\"roleAttributeIsDN\">false </"
+"module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+" </application-policy>"
+msgstr ""
+"<application-policy name=\"digest\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"usersProperties\">digest-users."
+"properties</module-option>\n"
+" <module-option name=\"rolesProperties\">digest-roles."
+"properties</module-option>\n"
+" <module-option name=\"hashAlgorithm\">MD5</module-"
+"option>\n"
+" <module-option name=\"hashEncoding\">rfc2617</module-"
+"option>\n"
+" <module-option name=\"hashUserPassword\">false</module-"
+"option>\n"
+" <module-option name=\"hashStorePassword\">true</module-"
+"option>\n"
+" <module-option name=\"passwordIsA1Hash\">true</module-"
+"option>\n"
+" <module-option name=\"storeDigestCallback\">\n"
+" org.jboss.security.auth.spi.RFC2617Digest\n"
+" </module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1176
+#, no-c-format
+msgid ""
+"An LDIF file representing the structure of the directory this data operates "
+"against is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1179
+#, no-c-format
+msgid ""
+"dn: dc=jboss,dc=org\n"
+"objectclass: top\n"
+"objectclass: dcObject\n"
+"objectclass: organization\n"
+"dc: jboss\n"
+"o: JBoss\n"
+"\n"
+"dn: ou=People,dc=jboss,dc=org\n"
+"objectclass: top\n"
+"objectclass: organizationalUnit\n"
+"ou: People\n"
+"\n"
+"dn: uid=jduke,ou=People,dc=jboss,dc=org\n"
+"objectclass: top\n"
+"objectclass: uidObject\n"
+"objectclass: person\n"
+"uid: jduke\n"
+"cn: Java Duke\n"
+"sn: Duke\n"
+"userPassword: theduke\n"
+"\n"
+"dn: ou=Roles,dc=jboss,dc=org\n"
+"objectclass: top\n"
+"objectclass: organizationalUnit\n"
+"ou: Roles\n"
+"\n"
+"dn: cn=JBossAdmin,ou=Roles,dc=jboss,dc=org\n"
+"objectclass: top\n"
+"objectclass: groupOfNames\n"
+"cn: JBossAdmin\n"
+"member: uid=jduke,ou=People,dc=jboss,dc=org\n"
+"description: the JBossAdmin group"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1180
+#, no-c-format
+msgid ""
+"Looking back at the <literal>testLDAP</literal> login module configuration, "
+"the <literal>java.naming.factory.initial</literal>, <literal>java.naming."
+"factory.url</literal> and <literal>java.naming.security</literal> options "
+"indicate the Sun LDAP JNDI provider implementation will be used, the LDAP "
+"server is located on host <literal>ldaphost.jboss.org</literal> on port "
+"1389, and that the LDAP simple authentication method will be use to connect "
+"to the LDAP server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1183
+#, no-c-format
+msgid ""
+"The login module attempts to connect to the LDAP server using a DN "
+"representing the user it is trying to authenticate. This DN is constructed "
+"from the <literal>principalDNPrefix</literal>, passed in, the username of "
+"the user and the <literal>principalDNSuffix</literal> as described above. In "
+"this example, the username <literal>jduke</literal> would map to "
+"<literal>uid=jduke,ou=People,dc=jboss,dc=org</literal>. We've assumed "
+"the LDAP server authenticates users using the <literal>userPassword</"
+"literal> attribute of the user's entry (<literal>theduke</literal> in "
+"this example). This is the way most LDAP servers work, however, if your LDAP "
+"server handles authentication differently you will need to set the "
+"authentication credentials in a way that makes sense for your server."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1186
+#, no-c-format
+msgid ""
+"Once authentication succeeds, the roles on which authorization will be based "
+"are retrieved by performing a subtree search of the <literal>rolesCtxDN</"
+"literal> for entries whose <literal>uidAttributeID</literal> match the user. "
+"If <literal>matchOnUserDN</literal> is true the search will be based on the "
+"full DN of the user. Otherwise the search will be based on the actual user "
+"name entered. In this example, the search is under <literal>ou=Roles,"
+"dc=jboss,dc=org</literal> for any entries that have a <literal>member</"
+"literal> attribute equal to <literal>uid=jduke,ou=People,dc=jboss,dc=org</"
+"literal>. The search would locate <literal>cn=JBossAdmin</literal> under the "
+"roles entry."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1189
+#, no-c-format
+msgid ""
+"The search returns the attribute specified in the <literal>roleAttributeID</"
+"literal> option. In this example, the attribute is <literal>cn</literal>. "
+"The value returned would be <literal>JBossAdmin</literal>, so the jduke user "
+"is assigned to the <literal>JBossAdmin</literal> role."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1192
+#, no-c-format
+msgid ""
+"It's often the case that a local LDAP server provides identity and "
+"authentication services but is unable to use the authorization services. "
+"This is because application roles don't always map well onto LDAP "
+"groups, and LDAP administrators are often hesitant to allow external "
+"application-specific data in central LDAP servers. For this reason, the LDAP "
+"authentication module is often paired with another login module, such as the "
+"database login module, that can provide roles more suitable to the "
+"application being developed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1195
+#, no-c-format
+msgid ""
+"This login module also supports unauthenticated identity and password "
+"stacking."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1201
+#, no-c-format
+msgid "DatabaseServerLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1202
+#, no-c-format
+msgid ""
+"The <literal>DatabaseServerLoginModule</literal> is a JDBC based login "
+"module that supports authentication and role mapping. You would use this "
+"login module if you have your username, password and role information "
+"relational database. The <literal>DatabaseServerLoginModule</literal> is "
+"based on two logical tables:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1205
+#, no-c-format
+msgid ""
+"Table Principals(PrincipalID text, Password text)\n"
+"Table Roles(PrincipalID text, Role text, RoleGroup text)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1206
+#, no-c-format
+msgid ""
+"The <literal>Principals</literal> table associates the user "
+"<literal>PrincipalID</literal> with the valid password and the "
+"<literal>Roles</literal> table associates the user <literal>PrincipalID</"
+"literal> with its role sets. The roles used for user permissions must be "
+"contained in rows with a <literal>RoleGroup</literal> column value of "
+"<literal>Roles</literal>. The tables are logical in that you can specify the "
+"SQL query that the login module uses. All that is required is that the "
+"<literal>java.sql.ResultSet</literal> has the same logical structure as the "
+"<literal>Principals</literal> and <literal>Roles</literal> tables described "
+"previously. The actual names of the tables and columns are not relevant as "
+"the results are accessed based on the column index. To clarify this notion, "
+"consider a database with two tables, <literal>Principals</literal> and "
+"<literal>Roles</literal>, as already declared. The following statements "
+"build the tables to contain a <literal>PrincipalID</literal><literal>java</"
+"literal> with a <literal>Password</literal> of <literal>echoman</literal> in "
+"the <literal>Principals</literal> table, a <literal>PrincipalID</"
+"literal><literal>java</literal> with a role named <literal>Echo</literal> in "
+"the <literal>Roles</literal><literal>RoleGroup</literal> in the "
+"<literal>Roles</literal> table, and a <literal>PrincipalID</"
+"literal><literal>java</literal> with a role named <literal>caller_java</"
+"literal> in the <literal>CallerPrincipal</literal><literal>RoleGroup</"
+"literal> in the <literal>Roles</literal> table:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1209
+#, no-c-format
+msgid ""
+"INSERT INTO Principals VALUES('java', 'echoman')\n"
+"INSERT INTO Roles VALUES('java', 'Echo', 'Roles')\n"
+"INSERT INTO Roles VALUES('java', 'caller_java', '"
+"CallerPrincipal')"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1215
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">dsJndiName</emphasis>: The JNDI name for the "
+"<literal>DataSource</literal> of the database containing the logical "
+"<literal>Principals</literal> and <literal>Roles</literal> tables. If not "
+"specified this defaults to <literal>java:/DefaultDS</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Host</literal> 接口实现的类的全名。它的缺省值是 <literal>org.apache."
+"catalina.core.StandardHost</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1220
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principalsQuery</emphasis>: The prepared statement "
+"query equivalent to: <literal>select Password from Principals where "
+"PrincipalID=?</literal>. If not specified this is the exact prepared "
+"statement that will be used."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1225
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">rolesQuery</emphasis>: The prepared statement query "
+"equivalent to: <literal>select Role, RoleGroup from Roles where PrincipalID=?"
+"</literal>. If not specified this is the exact prepared statement that will "
+"be used."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1230
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ignorePasswordCase</emphasis>: A boolean flag "
+"indicating if the password comparison should ignore case. This can be useful "
+"for hashed password encoding where the case of the hashed password is not "
+"significant."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1235
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principalClass</emphasis>: An option that specifies "
+"a <literal>Principal</literal> implementation class. This must support a "
+"constructor taking a string argument for the principal name."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1240
+#, no-c-format
+msgid ""
+"As an example <literal>DatabaseServerLoginModule</literal> configuration, "
+"consider a custom table schema like the following:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1243
+#, no-c-format
+msgid ""
+"CREATE TABLE Users(username VARCHAR(64) PRIMARY KEY, passwd VARCHAR(64))\n"
+"CREATE TABLE UserRoles(username VARCHAR(64), userRoles VARCHAR(32))"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1244
+#, no-c-format
+msgid "A corresponding <literal>login-config.xml</literal> entry would be:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1247
+#, fuzzy, no-c-format
+msgid ""
+"<policy>\n"
+" <application-policy name=\"testDB\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"DatabaseServerLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"dsJndiName\">java:/"
+"MyDatabaseDS</module-option>\n"
+" <module-option name=\"principalsQuery\">\n"
+" select passwd from Users username where username=?</"
+"module-option>\n"
+" <module-option name=\"rolesQuery\">\n"
+" select userRoles, 'Roles' from UserRoles where "
+"username=?</module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+" </application-policy>\n"
+"</policy>"
+msgstr ""
+"<application-policy name=\"digest\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"usersProperties\">digest-users."
+"properties</module-option>\n"
+" <module-option name=\"rolesProperties\">digest-roles."
+"properties</module-option>\n"
+" <module-option name=\"hashAlgorithm\">MD5</module-"
+"option>\n"
+" <module-option name=\"hashEncoding\">rfc2617</module-"
+"option>\n"
+" <module-option name=\"hashUserPassword\">false</module-"
+"option>\n"
+" <module-option name=\"hashStorePassword\">true</module-"
+"option>\n"
+" <module-option name=\"passwordIsA1Hash\">true</module-"
+"option>\n"
+" <module-option name=\"storeDigestCallback\">\n"
+" org.jboss.security.auth.spi.RFC2617Digest\n"
+" </module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1248
+#, no-c-format
+msgid ""
+"This module supports password stacking, password hashing and unathenticated "
+"identity."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1254
+#, no-c-format
+msgid "BaseCertLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1255
+#, no-c-format
+msgid ""
+"This is a login module which authenticates users based on X509 certificates. "
+"A typical use case for this login module is <literal>CLIENT-CERT</literal> "
+"authentication in the web tier. This login module only performs "
+"authentication. You need to combine it with another login module capable of "
+"acquiring the authorization roles to completely define access to a secured "
+"web or EJB component. Two subclasses of this login module, "
+"<literal>CertRolesLoginModule</literal> and "
+"<literal>DatabaseCertLoginModule</literal> extend the behavior to obtain the "
+"authorization roles from either a properties file or database."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1258
+#, no-c-format
+msgid ""
+"The <literal>BaseCertLoginModule</literal> needs a <literal>KeyStore</"
+"literal> to perform user validation. This is obtained through a <literal>org."
+"jboss.security.SecurityDomain</literal> implementation. Typically, the "
+"<literal>SecurityDomain</literal> implementation is configured using the "
+"<literal>org.jboss.security.plugins.JaasSecurityDomain</literal> MBean as "
+"shown in this <literal>jboss-service.xml</literal> configuration fragment:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1261
+#, fuzzy, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.security.plugins.JaasSecurityDomain\"\n"
+" name=\"jboss.ch8:service=SecurityDomain\">\n"
+" <constructor>\n"
+" <arg type=\"java.lang.String\" value=\"jmx-console\"/>\n"
+" </constructor>\n"
+" <attribute name=\"KeyStoreURL\">resource:localhost.keystore</"
+"attribute>\n"
+" <attribute name=\"KeyStorePass\">unit-tests-server</"
+"attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.ha.jndi.HANamingService\" \n"
+" name=\"jboss:service=HAJNDI\"> \n"
+" <depends>jboss:service=MySpecialPartition</depends> \n"
+" <attribute name=\"PartitionName\">MySpecialPartition</"
+"attribute> \n"
+" <attribute name=\"Port\">56789</attribute> \n"
+"</mbean>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1262
+#, no-c-format
+msgid ""
+"This creates a security domain with the name <literal>jmx-console</literal> "
+"whose <literal>SecurityDomain</literal> implementation is available via JNDI "
+"under the name <literal>java:/jaas/jmx-console</literal> following the "
+"JBossSX security domain naming pattern. To secure a web application such as "
+"the <literal>jmx-console.war</literal> using client certs and role based "
+"authorization, one would first modify the <literal>web.xml</literal> to "
+"declare the resources to be secured, along with the allowed roles and "
+"security domain to be used for authentication and authorization."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1265
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
+"\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app> \n"
+" ... \n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HtmlAdaptor</web-resource-name>\n"
+" <description>An example security config that only allows "
+"users with\n"
+" the role JBossAdmin to access the HTML JMX console web\n"
+" application </description>\n"
+" <url-pattern>/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>CLIENT-CERT</auth-method>\n"
+" <realm-name>JBoss JMX Console</realm-name>\n"
+" </login-config>\n"
+" <security-role>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+msgstr ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app>\n"
+" <!-- ... -->\n"
+" \n"
+" <!-- A security constraint that restricts access to the HTML JMX "
+"console\n"
+" to users with the role JBossAdmin. Edit the roles to what you want "
+"and\n"
+" uncomment the WEB-INF/jboss-web.xml/security-domain element to "
+"enable\n"
+" secured access to the HTML JMX console.\n"
+" -->\n"
+" <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HtmlAdaptor</web-resource-name>\n"
+" <description> An example security config that only allows "
+"users with\n"
+" the role JBossAdmin to access the HTML JMX console web\n"
+" application </description>\n"
+" <url-pattern>/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>JBoss JMX Console</realm-name>\n"
+" </login-config>\n"
+" <security-role>\n"
+" <role-name>JBossAdmin</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1266
+#, no-c-format
+msgid ""
+"Next we, need to specify the JBoss security domain in <literal>jboss-web."
+"xml</literal>:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1269
+#, fuzzy, no-c-format
+msgid ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/jmx-console</security-domain>\n"
+"</jboss-web>"
+msgstr ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/http-invoker</security-domain>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1270
+#, no-c-format
+msgid ""
+"Finally, you need to define the login module configuration for the jmx-"
+"console security domain you just specified. This is done in the "
+"<literal>conf/login-config.xml</literal> file."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1273
+#, fuzzy, no-c-format
+msgid ""
+"<application-policy name=\"jmx-console\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"BaseCertLoginModule\" \n"
+" flag=\"required\">\n"
+" <module-option name=\"password-stacking\">useFirstPass</"
+"module-option>\n"
+" <module-option name=\"securityDomain\">java:/jaas/jmx-"
+"console</module-option>\n"
+" </login-module>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\" \n"
+" flag=\"required\">\n"
+" <module-option name=\"password-stacking\">useFirstPass</"
+"module-option>\n"
+" <module-option name=\"usersProperties\">jmx-console-users."
+"properties</module-option>\n"
+" <module-option name=\"rolesProperties\">jmx-console-roles."
+"properties</module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+"<application-policy name=\"digest\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"usersProperties\">digest-users."
+"properties</module-option>\n"
+" <module-option name=\"rolesProperties\">digest-roles."
+"properties</module-option>\n"
+" <module-option name=\"hashAlgorithm\">MD5</module-"
+"option>\n"
+" <module-option name=\"hashEncoding\">rfc2617</module-"
+"option>\n"
+" <module-option name=\"hashUserPassword\">false</module-"
+"option>\n"
+" <module-option name=\"hashStorePassword\">true</module-"
+"option>\n"
+" <module-option name=\"passwordIsA1Hash\">true</module-"
+"option>\n"
+" <module-option name=\"storeDigestCallback\">\n"
+" org.jboss.security.auth.spi.RFC2617Digest\n"
+" </module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1274
+#, no-c-format
+msgid ""
+"Here the <literal>BaseCertLoginModule</literal> is used for authentication "
+"of the client cert, and the <literal>UsersRolesLoginModule</literal> is only "
+"used for authorization due to the <literal>password-stacking=useFirstPass</"
+"literal> option. Both the <literal>localhost.keystore</literal> and the "
+"<literal>jmx-console-roles.properties</literal> need an entry that maps to "
+"the principal associated with the client cert. By default, the principal is "
+"created using the client certificate distinguished name. Consider the "
+"following certificate:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1277
+#, no-c-format
+msgid ""
+"[starksm at banshee9100 conf]$ keytool -printcert -file unit-tests-client."
+"export\n"
+"Owner: CN=unit-tests-client, OU=JBoss Inc., O=JBoss Inc., ST=Washington, "
+"C=US\n"
+"Issuer: CN=jboss.com, C=US, ST=Washington, L=Snoqualmie Pass, "
+"EMAILADDRESS=admin\n"
+"@jboss.com, OU=QA, O=JBoss Inc.\n"
+"Serial number: 100103\n"
+"Valid from: Wed May 26 07:34:34 PDT 2004 until: Thu May 26 07:34:34 PDT "
+"2005\n"
+"Certificate fingerprints:\n"
+" MD5: 4A:9C:2B:CD:1B:50:AA:85:DD:89:F6:1D:F5:AF:9E:AB\n"
+" SHA1: DE:DE:86:59:05:6C:00:E8:CC:C0:16:D3:C2:68:BF:95:B8:83:E9:58"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1278
+#, no-c-format
+msgid ""
+"The <literal>localhost.keystore</literal> would need this cert stored with "
+"an alias of <literal>CN=unit-tests-client, OU=JBoss Inc., O=JBoss Inc., "
+"ST=Washington, C=US</literal> and the <literal>jmx-console-roles.properties</"
+"literal> would also need an entry for the same entry. Since the DN contains "
+"many characters that are normally treated as delimiters, you will need to "
+"escape the problem characters using a backslash ('<literal>\\</"
+"literal>') as shown here:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1281
+#, no-c-format
+msgid ""
+"# A sample roles.properties file for use with the UsersRolesLoginModule\n"
+"CN\\=unit-tests-client,\\ OU\\=JBoss\\ Inc.,\\ O\\=JBoss\\ Inc.,\\ ST"
+"\\=Washington,\\ C\\=US=JBossAdmin\n"
+"admin=JBossAdmin"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1285
+#, no-c-format
+msgid "IdentityLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1286
+#, no-c-format
+msgid ""
+"The <literal>IdentityLoginModule</literal> is a simple login module that "
+"associates a hard-coded user name a to any subject authenticated against the "
+"module. It creates a <literal>SimplePrincipal</literal> instance using the "
+"name specified by the <literal>principal</literal> option. This login module "
+"is useful when you need to provide a fixed identity to a service and in "
+"development environments when you want to test the security associated with "
+"a given principal and associated roles."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1289
+#, no-c-format
+msgid "The supported login module configuration options include:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1294
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principal</emphasis>: This is the name to use for "
+"the <literal>SimplePrincipal</literal> all users are authenticated as. The "
+"principal name defaults to <literal>guest</literal> if no principal option "
+"is specified."
+msgstr ""
+"<emphasis role=\"bold\">scheme</emphasis>:它设置 <literal>ServletRequest."
+"getScheme</literal> 方法访问的协议名。它的缺省值是 <literal>http</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1299
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">roles</emphasis>: This is a comma-delimited list of "
+"roles that will be assigned to the user."
+msgstr ""
+"<emphasis role=\"bold\">cookies</emphasis>:这个标记表示是否用 cookies 记录会"
+"话。它的缺省值是 true。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1304
+#, no-c-format
+msgid ""
+"A sample XMLLoginConfig configuration entry that would authenticate all "
+"users as the principal named <literal>jduke</literal> and assign role names "
+"of <literal>TheDuke</literal>, and <literal>AnimatedCharacter</literal> is:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1307
+#, no-c-format
+msgid ""
+"<policy>\n"
+" <application-policy name=\"testIdentity\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"IdentityLoginModule\"\n"
+" flag=\"required\">\n"
+" <module-option name=\"principal\">jduke</module-"
+"option>\n"
+" <module-option name=\"roles\">TheDuke,"
+"AnimatedCharater</module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+" </application-policy>\n"
+"</policy>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1308
+#, no-c-format
+msgid "This module supports password stacking."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1314
+#, no-c-format
+msgid "RunAsLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1315
+#, no-c-format
+msgid ""
+"JBoss has a helper login module called <literal>RunAsLoginModule</literal> "
+"that pushes a run as role for the duration of the login phase of "
+"authentication, and pops the run as role in either the commit or abort "
+"phase. The purpose of this login module is to provide a role for other login "
+"modules that need to access secured resources in order to perform their "
+"authentication. An example would be a login module that accesses an secured "
+"EJB. This login module must be configured ahead of the login module(s) that "
+"need a run as role established."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1318
+#, fuzzy, no-c-format
+msgid "The only login module configuration option is:"
+msgstr "The JBoss AS installer configuration sets"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1323
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">roleName</emphasis>: the name of the role to use as "
+"the run as role during login phase. If not specified a default of "
+"<literal>nobody</literal> is used."
+msgstr ""
+"<emphasis role=\"bold\">protocol</emphasis>:所使用的 SSL 协议的版本。如果没"
+"有指定的话,缺省是 <literal>TLS</literal>。"
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1331
+#, no-c-format
+msgid "ClientLoginModule"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1332
+#, no-c-format
+msgid ""
+"The <literal>ClientLoginModule</literal> is an implementation of "
+"<literal>LoginModule</literal> for use by JBoss clients for the "
+"establishment of the caller identity and credentials. This simply sets the "
+"<literal>org.jboss.security.SecurityAssociation.principal</literal> to the "
+"value of the <literal>NameCallback</literal> filled in by the "
+"<literal>callbackhandler</literal>, and the <literal>org.jboss.security."
+"SecurityAssociation.credential</literal> to the value of the "
+"<literal>PasswordCallback</literal> filled in by the "
+"<literal>callbackhandler</literal>. This is the only supported mechanism for "
+"a client to establish the current thread's caller. Both stand-alone "
+"client applications and server environments, acting as JBoss EJB clients "
+"where the security environment has not been configured to use JBossSX "
+"transparently, need to use the <literal>ClientLoginModule</literal>. Of "
+"course, you could always set the <literal>org.jboss.security."
+"SecurityAssociation</literal> information directly, but this is considered "
+"an internal API that is subject to change without notice."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1335
+#, no-c-format
+msgid ""
+"Note that this login module does not perform any authentication. It merely "
+"copies the login information provided to it into the JBoss server EJB "
+"invocation layer for subsequent authentication on the server. If you need to "
+"perform client-side authentication of users you would need to configure "
+"another login module in addition to the <literal>ClientLoginModule</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1343
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">multi-threaded</emphasis>: When the multi-threaded "
+"option is set to true, each login thread has its own principal and "
+"credential storage. This is useful in client environments where multiple "
+"user identities are active in separate threads. When true, each separate "
+"thread must perform its own login. When set to false the login identity and "
+"credentials are global variables that apply to all threads in the VM. The "
+"default for this option is false."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1348
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">password-stacking</emphasis>: When <literal>password-"
+"stacking</literal> option is set to <literal>useFirstPass</literal>, this "
+"module first looks for a shared username and password using <literal>javax."
+"security.auth.login.name</literal> and <literal>javax.security.auth.login."
+"password</literal> respectively in the login module shared state map. This "
+"allows a module configured prior to this one to establish a valid username "
+"and password that should be passed to JBoss. You would use this option if "
+"you want to perform client-side authentication of clients using some other "
+"login module such as the <literal>LdapLoginModule</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1353
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">restore-login-identity</emphasis>: When "
+"<literal>restore-login-identity</literal> is true, the "
+"<literal>SecurityAssociation</literal> principal and credential seen on "
+"entry to the <literal>login()</literal> method are saved and restored on "
+"either abort or logout. When false (the default), the abort and logout "
+"simply clear the <literal>SecurityAssociation</literal>. A <literal>restore-"
+"login-identity</literal> of true is needed if one need to change identities "
+"and then restore the original caller identity."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1358
+#, no-c-format
+msgid ""
+"A sample login configuration for <literal>ClientLoginModule</literal> is the "
+"default configuration entry found in the JBoss distribution <literal>client/"
+"auth.conf</literal> file. The configuration is:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1361
+#, no-c-format
+msgid ""
+"other {\n"
+" // Put your login modules that work without jBoss here\n"
+" \n"
+" // jBoss LoginModule\n"
+" org.jboss.security.ClientLoginModule required;\n"
+" \n"
+" // Put your login modules that need jBoss here\n"
+"};"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1367
+#, no-c-format
+msgid "Writing Custom Login Modules"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1368
+#, no-c-format
+msgid ""
+"If the login modules bundled with the JBossSX framework do not work with "
+"your security environment, you can write your own custom login module "
+"implementation that does. Recall from the section on the "
+"<literal>JaasSecurityManager</literal> architecture that the "
+"<literal>JaasSecurityManager</literal> expected a particular usage pattern "
+"of the <literal>Subject</literal> principals set. You need to understand the "
+"JAAS Subject class's information storage features and the expected usage "
+"of these features to be able to write a login module that works with the "
+"<literal>JaasSecurityManager</literal>. This section examines this "
+"requirement and introduces two abstract base <literal>LoginModule</literal> "
+"implementations that can help you implement your own custom login modules."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1371
+#, no-c-format
+msgid ""
+"You can obtain security information associated with a <literal>Subject</"
+"literal> in six ways in JBoss using the following methods:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1374
+#, no-c-format
+msgid ""
+"java.util.Set getPrincipals()\n"
+"java.util.Set getPrincipals(java.lang.Class c)\n"
+"java.util.Set getPrivateCredentials()\n"
+"java.util.Set getPrivateCredentials(java.lang.Class c)\n"
+"java.util.Set getPublicCredentials()\n"
+"java.util.Set getPublicCredentials(java.lang.Class c)"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1375
+#, no-c-format
+msgid ""
+"For <literal>Subject</literal> identities and roles, JBossSX has selected "
+"the most natural choice: the principals sets obtained via "
+"<literal>getPrincipals()</literal> and <literal>getPrincipals(java.lang."
+"Class)</literal>. The usage pattern is as follows:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1380
+#, no-c-format
+msgid ""
+"User identities (username, social security number, employee ID, and so on) "
+"are stored as <literal>java.security.Principal</literal> objects in the "
+"<literal>Subject</literal><literal>Principals</literal> set. The "
+"<literal>Principal</literal> implementation that represents the user "
+"identity must base comparisons and equality on the name of the principal. A "
+"suitable implementation is available as the <literal>org.jboss.security."
+"SimplePrincipal</literal> class. Other <literal>Principal</literal> "
+"instances may be added to the <literal>Subject</literal><literal>Principals</"
+"literal> set as needed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1385
+#, no-c-format
+msgid ""
+"The assigned user roles are also stored in the <literal>Principals</literal> "
+"set, but they are grouped in named role sets using <literal>java.security."
+"acl.Group</literal> instances. The <literal>Group</literal> interface "
+"defines a collection of <literal>Principal</literal>s and/or <literal>Group</"
+"literal>s, and is a subinterface of <literal>java.security.Principal</"
+"literal>. Any number of role sets can be assigned to a <literal>Subject</"
+"literal>. Currently, the JBossSX framework uses two well-known role sets "
+"with the names <literal>Roles</literal> and <literal>CallerPrincipal</"
+"literal>. The <literal>Roles</literal> Group is the collection of "
+"<literal>Principal</literal>s for the named roles as known in the "
+"application domain under which the <literal>Subject</literal> has been "
+"authenticated. This role set is used by methods like the <literal>EJBContext."
+"isCallerInRole(String)</literal>, which EJBs can use to see if the current "
+"caller belongs to the named application domain role. The security "
+"interceptor logic that performs method permission checks also uses this role "
+"set. The <literal>CallerPrincipal</literal><literal>Group</literal> consists "
+"of the single <literal>Principal</literal> identity assigned to the user in "
+"the application domain. The <literal>EJBContext.getCallerPrincipal() </"
+"literal>method uses the <literal>CallerPrincipal</literal> to allow the "
+"application domain to map from the operation environment identity to a user "
+"identity suitable for the application. If a <literal>Subject</literal> does "
+"not have a <literal>CallerPrincipal</literal><literal>Group</literal>, the "
+"application identity is the same as operational environment identity."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1391
+#, no-c-format
+msgid "Support for the Subject Usage Pattern"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1392
+#, no-c-format
+msgid ""
+"To simplify correct implementation of the <literal>Subject</literal> usage "
+"patterns described in the preceding section, JBossSX includes two abstract "
+"login modules that handle the population of the authenticated "
+"<literal>Subject</literal> with a template pattern that enforces correct "
+"<literal>Subject</literal> usage. The most generic of the two is the "
+"<literal>org.jboss.security.auth.spi.AbstractServerLoginModule</literal> "
+"class. It provides a concrete implementation of the <literal>javax.security."
+"auth.spi.LoginModule</literal> interface and offers abstract methods for the "
+"key tasks specific to an operation environment security infrastructure. The "
+"key details of the class are highlighted in the following class fragment. "
+"The JavaDoc comments detail the responsibilities of subclasses."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1395
+#, no-c-format
+msgid ""
+"package org.jboss.security.auth.spi;\n"
+"/**\n"
+" * This class implements the common functionality required for a JAAS\n"
+" * server-side LoginModule and implements the JBossSX standard\n"
+" * Subject usage pattern of storing identities and roles. Subclass\n"
+" * this module to create your own custom LoginModule and override the\n"
+" * login(), getRoleSets(), and getIdentity() methods.\n"
+" */\n"
+"public abstract class AbstractServerLoginModule\n"
+" implements javax.security.auth.spi.LoginModule\n"
+"{\n"
+" protected Subject subject;\n"
+" protected CallbackHandler callbackHandler;\n"
+" protected Map sharedState;\n"
+" protected Map options;\n"
+" protected Logger log;\n"
+"\n"
+" /** Flag indicating if the shared credential should be used */\n"
+" protected boolean useFirstPass;\n"
+" /** \n"
+" * Flag indicating if the login phase succeeded. Subclasses that\n"
+" * override the login method must set this to true on successful\n"
+" * completion of login\n"
+" */\n"
+" protected boolean loginOk;\n"
+" \n"
+" // ...\n"
+" /**\n"
+" * Initialize the login module. This stores the subject,\n"
+" * callbackHandler and sharedState and options for the login\n"
+" * session. Subclasses should override if they need to process\n"
+" * their own options. A call to super.initialize(...) must be\n"
+" * made in the case of an override.\n"
+" *\n"
+" * <p>\n"
+" * The options are checked for the <em>password-stacking</"
+"em> parameter.\n"
+" * If this is set to \"useFirstPass\", the login identity will be taken "
+"from the\n"
+" * <code>javax.security.auth.login.name</code> value of the "
+"sharedState map,\n"
+" * and the proof of identity from the\n"
+" * <code>javax.security.auth.login.password</code> value of "
+"the sharedState map.\n"
+" *\n"
+" * @param subject the Subject to update after a successful login.\n"
+" * @param callbackHandler the CallbackHandler that will be used to "
+"obtain the\n"
+" * the user identity and credentials.\n"
+" * @param sharedState a Map shared between all configured login module "
+"instances\n"
+" * @param options the parameters passed to the login module.\n"
+" */\n"
+" public void initialize(Subject subject,\n"
+" CallbackHandler callbackHandler,\n"
+" Map sharedState,\n"
+" Map options)\n"
+" {\n"
+" // ...\n"
+" }\n"
+" \n"
+"\n"
+" /**\n"
+" * Looks for javax.security.auth.login.name and\n"
+" * javax.security.auth.login.password values in the sharedState\n"
+" * map if the useFirstPass option was true and returns true if\n"
+" * they exist. If they do not or are null this method returns\n"
+" * false. \n"
+" * Note that subclasses that override the login method\n"
+" * must set the loginOk var to true if the login succeeds in\n"
+" * order for the commit phase to populate the Subject. This\n"
+" * implementation sets loginOk to true if the login() method\n"
+" * returns true, otherwise, it sets loginOk to false.\n"
+" */\n"
+" public boolean login() \n"
+" throws LoginException\n"
+" {\n"
+" // ...\n"
+" }\n"
+" \n"
+" /**\n"
+" * Overridden by subclasses to return the Principal that\n"
+" * corresponds to the user primary identity.\n"
+" */\n"
+" abstract protected Principal getIdentity();\n"
+" \n"
+" /**\n"
+" * Overridden by subclasses to return the Groups that correspond\n"
+" * to the role sets assigned to the user. Subclasses should\n"
+" * create at least a Group named \"Roles\" that contains the roles\n"
+" * assigned to the user. A second common group is\n"
+" * \"CallerPrincipal,\" which provides the application identity of\n"
+" * the user rather than the security domain identity.\n"
+" * \n"
+" * @return Group[] containing the sets of roles\n"
+" */\n"
+" abstract protected Group[] getRoleSets() throws LoginException;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1396
+#, no-c-format
+msgid ""
+"You'll need to pay attention to the <literal>loginOk</literal> instance "
+"variable. This must be set to true if the login succeeds, false otherwise by "
+"any subclasses that override the login method. Failure to set this variable "
+"correctly will result in the commit method either not updating the subject "
+"when it should, or updating the subject when it should not. Tracking the "
+"outcome of the login phase was added to allow login modules to be chained "
+"together with control flags that do not require that the login module "
+"succeed in order for the overall login to succeed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1399
+#, no-c-format
+msgid ""
+"The second abstract base login module suitable for custom login modules is "
+"the <literal>org.jboss.security.auth.spi.UsernamePasswordLoginModule</"
+"literal>. This login module further simplifies custom login module "
+"implementation by enforcing a string-based username as the user identity and "
+"a <literal>char[]</literal> password as the authentication credentials. It "
+"also supports the mapping of anonymous users (indicated by a null username "
+"and password) to a principal with no roles. The key details of the class are "
+"highlighted in the following class fragment. The JavaDoc comments detail the "
+"responsibilities of subclasses."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1402
+#, no-c-format
+msgid ""
+"package org.jboss.security.auth.spi;\n"
+"\n"
+"/**\n"
+" * An abstract subclass of AbstractServerLoginModule that imposes a\n"
+" * an identity == String username, credentials == String password\n"
+" * view on the login process. Subclasses override the\n"
+" * getUsersPassword() and getUsersRoles() methods to return the\n"
+" * expected password and roles for the user.\n"
+" */\n"
+"public abstract class UsernamePasswordLoginModule\n"
+" extends AbstractServerLoginModule\n"
+"{\n"
+" /** The login identity */\n"
+" private Principal identity;\n"
+" /** The proof of login identity */\n"
+" private char[] credential;\n"
+" /** The principal to use when a null username and password are seen */\n"
+" private Principal unauthenticatedIdentity;\n"
+"\n"
+" /**\n"
+" * The message digest algorithm used to hash passwords. If null then\n"
+" * plain passwords will be used. */\n"
+" private String hashAlgorithm = null;\n"
+"\n"
+" /**\n"
+" * The name of the charset/encoding to use when converting the\n"
+" * password String to a byte array. Default is the platform's\n"
+" * default encoding.\n"
+" */\n"
+" private String hashCharset = null;\n"
+"\n"
+" /** The string encoding format to use. Defaults to base64. */\n"
+" private String hashEncoding = null;\n"
+" \n"
+" // ...\n"
+" \n"
+" /** \n"
+" * Override the superclass method to look for an\n"
+" * unauthenticatedIdentity property. This method first invokes\n"
+" * the super version.\n"
+" *\n"
+" * @param options,\n"
+" * @option unauthenticatedIdentity: the name of the principal to\n"
+" * assign and authenticate when a null username and password are\n"
+" * seen.\n"
+" */\n"
+" public void initialize(Subject subject,\n"
+" CallbackHandler callbackHandler,\n"
+" Map sharedState,\n"
+" Map options)\n"
+" {\n"
+" super.initialize(subject, callbackHandler, sharedState,\n"
+" options);\n"
+" // Check for unauthenticatedIdentity option.\n"
+" Object option = options.get(\"unauthenticatedIdentity\");\n"
+" String name = (String) option;\n"
+" if (name != null) {\n"
+" unauthenticatedIdentity = new SimplePrincipal(name);\n"
+" }\n"
+" }\n"
+" \n"
+" // ...\n"
+" \n"
+" /**\n"
+" * A hook that allows subclasses to change the validation of the\n"
+" * input password against the expected password. This version\n"
+" * checks that neither inputPassword or expectedPassword are null\n"
+" * and that inputPassword.equals(expectedPassword) is true;\n"
+" *\n"
+" * @return true if the inputPassword is valid, false otherwise.\n"
+" */\n"
+" protected boolean validatePassword(String inputPassword,\n"
+" String expectedPassword)\n"
+" {\n"
+" if (inputPassword == null || expectedPassword == null) {\n"
+" return false;\n"
+" }\n"
+" return inputPassword.equals(expectedPassword);\n"
+" }\n"
+" \n"
+" /**\n"
+" * Get the expected password for the current username available\n"
+" * via the getUsername() method. This is called from within the\n"
+" * login() method after the CallbackHandler has returned the\n"
+" * username and candidate password.\n"
+" *\n"
+" * @return the valid password String\n"
+" */\n"
+" abstract protected String getUsersPassword()\n"
+" throws LoginException;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1403
+#, no-c-format
+msgid ""
+"The choice of subclassing the <literal>AbstractServerLoginModule</literal> "
+"versus <literal>UsernamePasswordLoginModule</literal> is simply based on "
+"whether a string-based username and credentials are usable for the "
+"authentication technology you are writing the login module for. If the "
+"string-based semantic is valid, then subclass "
+"<literal>UsernamePasswordLoginModule</literal>, otherwise subclass "
+"<literal>AbstractServerLoginModule</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1406
+#, no-c-format
+msgid ""
+"The steps you are required to perform when writing a custom login module are "
+"summarized in the following depending on which base login module class you "
+"choose. When writing a custom login module that integrates with your "
+"security infrastructure, you should start by subclassing "
+"<literal>AbstractServerLoginModule</literal> or "
+"<literal>UsernamePasswordLoginModule</literal> to ensure that your login "
+"module provides the authenticated <literal>Principal</literal> information "
+"in the form expected by the JBossSX security manager."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1409
+#, fuzzy, no-c-format
+msgid ""
+"When subclassing the <literal>AbstractServerLoginModule</literal>, you need "
+"to override the following:"
+msgstr "用<literal>RMIAdaptor</literal>来测试客户段访问,运行下面的:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1414 J2EE_Security_On_JBOSS.xml:1439
+#, no-c-format
+msgid ""
+"<literal>void initialize(Subject, CallbackHandler, Map, Map)</literal>: if "
+"you have custom options to parse."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1419
+#, no-c-format
+msgid ""
+"<literal>boolean login()</literal>: to perform the authentication activity. "
+"Be sure to set the <literal>loginOk</literal> instance variable to true if "
+"login succeeds, false if it fails."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1424
+#, no-c-format
+msgid ""
+"<literal>Principal getIdentity()</literal>: to return the "
+"<literal>Principal</literal> object for the user authenticated by the "
+"<literal>log()</literal> step."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1429 J2EE_Security_On_JBOSS.xml:1444
+#, no-c-format
+msgid ""
+"<literal>Group[] getRoleSets()</literal>: to return at least one "
+"<literal>Group</literal> named <literal>Roles</literal> that contains the "
+"roles assigned to the <literal>Principal</literal> authenticated during "
+"<literal>login()</literal>. A second common <literal>Group</literal> is "
+"named <literal>CallerPrincipal</literal> and provides the user's "
+"application identity rather than the security domain identity."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1434
+#, fuzzy, no-c-format
+msgid ""
+"When subclassing the <literal>UsernamePasswordLoginModule</literal>, you "
+"need to override the following:"
+msgstr "用<literal>RMIAdaptor</literal>来测试客户段访问,运行下面的:"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1449
+#, no-c-format
+msgid ""
+"<literal>String getUsersPassword()</literal>: to return the expected "
+"password for the current username available via the <literal>getUsername()</"
+"literal> method. The <literal>getUsersPassword()</literal> method is called "
+"from within <literal>login()</literal> after the <literal>callbackhandler</"
+"literal> returns the username and candidate password."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1457
+#, no-c-format
+msgid "A Custom LoginModule Example"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1458
+#, no-c-format
+msgid ""
+"In this section we will develop a custom login module example. It will "
+"extend the <literal>UsernamePasswordLoginModule</literal> and obtains a "
+"user's password and role names from a JNDI lookup. The idea is that "
+"there is a JNDI context that will return a user's password if you "
+"perform a lookup on the context using a name of the form <literal>password/"
+"<username></literal> where <literal><username></literal> is the "
+"current user being authenticated. Similarly, a lookup of the form "
+"<literal>roles/<username></literal> returns the requested user's "
+"roles."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1461
+#, no-c-format
+msgid ""
+"The source code for the example is located in the <literal>src/main/org/"
+"jboss/book/security/ex2</literal> directory of the book examples. <xref "
+"linkend=\"A_Custom_LoginModule_Example-_A_JndiUserAndPass_custom_login_module"
+"\"/> shows the source code for the <literal>JndiUserAndPass</literal> custom "
+"login module. Note that because this extends the JBoss "
+"<literal>UsernamePasswordLoginModule</literal>, all the "
+"<literal>JndiUserAndPass</literal> does is obtain the user's password "
+"and roles from the JNDI store. The <literal>JndiUserAndPass</literal> does "
+"not concern itself with the JAAS <literal>LoginModule</literal> operations."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1464
+#, no-c-format
+msgid "A JndiUserAndPass custom login module"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1465
+#, no-c-format
+msgid ""
+"package org.jboss.book.security.ex2;\n"
+" \n"
+"import java.security.acl.Group;\n"
+"import java.util.Map;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"import javax.security.auth.Subject;\n"
+"import javax.security.auth.callback.CallbackHandler;\n"
+"import javax.security.auth.login.LoginException;\n"
+"\n"
+"import org.jboss.security.SimpleGroup;\n"
+"import org.jboss.security.SimplePrincipal;\n"
+"import org.jboss.security.auth.spi.UsernamePasswordLoginModule;\n"
+"\n"
+"/** \n"
+" * An example custom login module that obtains passwords and roles\n"
+" * for a user from a JNDI lookup.\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.4 $\n"
+"*/\n"
+"public class JndiUserAndPass \n"
+" extends UsernamePasswordLoginModule\n"
+"{\n"
+" /** The JNDI name to the context that handles the password/username "
+"lookup */\n"
+" private String userPathPrefix;\n"
+" /** The JNDI name to the context that handles the roles/ username lookup "
+"*/\n"
+" private String rolesPathPrefix;\n"
+" \n"
+" /**\n"
+" * Override to obtain the userPathPrefix and rolesPathPrefix options.\n"
+" */\n"
+" public void initialize(Subject subject, CallbackHandler "
+"callbackHandler,\n"
+" Map sharedState, Map options)\n"
+" {\n"
+" super.initialize(subject, callbackHandler, sharedState, options);\n"
+" userPathPrefix = (String) options.get(\"userPathPrefix\");\n"
+" rolesPathPrefix = (String) options.get(\"rolesPathPrefix\");\n"
+" }\n"
+" \n"
+" /**\n"
+" * Get the roles the current user belongs to by querying the\n"
+" * rolesPathPrefix + '/' + super.getUsername() JNDI location.\n"
+" */\n"
+" protected Group[] getRoleSets() throws LoginException\n"
+" {\n"
+" try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" String rolesPath = rolesPathPrefix + '/' + super."
+"getUsername();\n"
+"\n"
+" String[] roles = (String[]) ctx.lookup(rolesPath);\n"
+" Group[] groups = {new SimpleGroup(\"Roles\")};\n"
+" log.info(\"Getting roles for user=\"+super.getUsername());\n"
+" for(int r = 0; r < roles.length; r ++) {\n"
+" SimplePrincipal role = new SimplePrincipal(roles[r]);\n"
+" log.info(\"Found role=\"+roles[r]);\n"
+" groups[0].addMember(role);\n"
+" }\n"
+" return groups;\n"
+" } catch(NamingException e) {\n"
+" log.error(\"Failed to obtain groups for\n"
+" user=\"+super.getUsername(), e);\n"
+" throw new LoginException(e.toString(true));\n"
+" }\n"
+" }\n"
+" \n"
+" /** \n"
+" * Get the password of the current user by querying the\n"
+" * userPathPrefix + '/' + super.getUsername() JNDI location.\n"
+" */\n"
+" protected String getUsersPassword() \n"
+" throws LoginException\n"
+" {\n"
+" try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" String userPath = userPathPrefix + '/' + super."
+"getUsername();\n"
+" log.info(\"Getting password for user=\"+super.getUsername());\n"
+" String passwd = (String) ctx.lookup(userPath);\n"
+" log.info(\"Found password=\"+passwd);\n"
+" return passwd;\n"
+" } catch(NamingException e) {\n"
+" log.error(\"Failed to obtain password for\n"
+" user=\"+super.getUsername(), e);\n"
+" throw new LoginException(e.toString(true));\n"
+" }\n"
+" } \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1466
+#, no-c-format
+msgid ""
+"The details of the JNDI store are found in the <literal>org.jboss.book."
+"security.ex2.service.JndiStore</literal> MBean. This service binds an "
+"<literal>ObjectFactory</literal> that returns a <literal>javax.naming."
+"Context</literal> proxy into JNDI. The proxy handles lookup operations done "
+"against it by checking the prefix of the lookup name against "
+"<literal>password</literal> and <literal>roles</literal>. When the name "
+"begins with <literal>password</literal>, a user's password is being "
+"requested. When the name begins with <literal>roles</literal> the user's "
+"roles are being requested. The example implementation always returns a "
+"password of <literal>theduke</literal> and an array of roles names equal to "
+"<literal>{\"TheDuke\", \"Echo\"}</literal> regardless of what the username "
+"is. You can experiment with other implementations as you wish."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1469
+#, no-c-format
+msgid ""
+"The example code includes a simple session bean for testing the custom login "
+"module. To build, deploy and run the example, execute the following command "
+"in the examples directory."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1472
+#, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=security -Dex=2 run-example\n"
+"...\n"
+"run-example2:\n"
+" [echo] Waiting for 5 seconds for deploy...\n"
+" [java] [INFO,ExClient] Login with username=jduke, password=theduke\n"
+" [java] [INFO,ExClient] Looking up EchoBean2\n"
+" [java] [INFO,ExClient] Created Echo\n"
+" [java] [INFO,ExClient] Echo.echo('Hello') = Hello"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1473
+#, no-c-format
+msgid ""
+"The choice of using the <literal>JndiUserAndPass</literal> custom login "
+"module for the server side authentication of the user is determined by the "
+"login configuration for the example security domain. The EJB JAR "
+"<literal>META-INF/jboss.xml</literal> descriptor sets the security domain"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1476
+#, fuzzy, no-c-format
+msgid ""
+"<?xml version=\"1.0\"?>\n"
+"<jboss>\n"
+" <security-domain>java:/jaas/security-ex2</security-domain>\n"
+"</jboss>"
+msgstr ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/digest</security-domain>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1477
+#, no-c-format
+msgid ""
+"The SAR <literal>META-INF/login-config.xml</literal> descriptor defines the "
+"login module configuration."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1480
+#, no-c-format
+msgid ""
+"<application-policy name = \"security-ex2\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.book.security.ex2.JndiUserAndPass"
+"\"\n"
+" flag=\"required\">\n"
+" <module-option name = \"userPathPrefix\">/security/store/"
+"password</module-option>\n"
+" <module-option name = \"rolesPathPrefix\">/security/store/"
+"roles</module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1488
+#, no-c-format
+msgid "The Secure Remote Password (SRP) Protocol"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1489
+#, no-c-format
+msgid ""
+"The SRP protocol is an implementation of a public key exchange handshake "
+"described in the Internet standards working group request for comments 2945"
+"(RFC2945). The RFC2945 abstract states:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1492
+#, no-c-format
+msgid ""
+"This document describes a cryptographically strong network authentication "
+"mechanism known as the Secure Remote Password (SRP) protocol. This mechanism "
+"is suitable for negotiating secure connections using a user-supplied "
+"password, while eliminating the security problems traditionally associated "
+"with reusable passwords. This system also performs a secure key exchange in "
+"the process of authentication, allowing security layers (privacy and/or "
+"integrity protection) to be enabled during the session. Trusted key servers "
+"and certificate infrastructures are not required, and clients are not "
+"required to store or manage any long-term keys. SRP offers both security and "
+"deployment advantages over existing challenge-response techniques, making it "
+"an ideal drop-in replacement where secure password authentication is needed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1495
+#, no-c-format
+msgid ""
+"Note: The complete RFC2945 specification can be obtained from <ulink url="
+"\"http://www.rfc-editor.org/rfc.html\"></ulink>. Additional information on "
+"the SRP algorithm and its history can be found at <ulink url=\"http://www-cs-"
+"students.stanford.edu/~tjw/srp/\"></ulink>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1498
+#, no-c-format
+msgid ""
+"SRP is similar in concept and security to other public key exchange "
+"algorithms, such as Diffie-Hellman and RSA. SRP is based on simple string "
+"passwords in a way that does not require a clear text password to exist on "
+"the server. This is in contrast to other public key-based algorithms that "
+"require client certificates and the corresponding certificate management "
+"infrastructure."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1501
+#, no-c-format
+msgid ""
+"Algorithms like Diffie-Hellman and RSA are known as public key exchange "
+"algorithms. The concept of public key algorithms is that you have two keys, "
+"one public that is available to everyone, and one that is private and known "
+"only to you. When someone wants to send encrypted information to you, then "
+"encrpyt the information using your public key. Only you are able to decrypt "
+"the information using your private key. Contrast this with the more "
+"traditional shared password based encryption schemes that require the sender "
+"and receiver to know the shared password. Public key algorithms eliminate "
+"the need to share passwords."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1504
+#, no-c-format
+msgid ""
+"The JBossSX framework includes an implementation of SRP that consists of the "
+"following elements:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1509
+#, no-c-format
+msgid ""
+"An implementation of the SRP handshake protocol that is independent of any "
+"particular client/server protocol"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1514
+#, no-c-format
+msgid ""
+"An RMI implementation of the handshake protocol as the default client/server "
+"SRP implementation"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1519
+#, no-c-format
+msgid ""
+"A client side JAAS <literal>LoginModule</literal> implementation that uses "
+"the RMI implementation for use in authenticating clients in a secure fashion"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1524
+#, no-c-format
+msgid ""
+"A JMX MBean for managing the RMI server implementation. The MBean allows the "
+"RMI server implementation to be plugged into a JMX framework and "
+"externalizes the configuration of the verification information store. It "
+"also establishes an authentication cache that is bound into the JBoss server "
+"JNDI namespace."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1529
+#, no-c-format
+msgid ""
+"A server side JAAS <literal>LoginModule</literal> implementation that uses "
+"the authentication cache managed by the SRP JMX MBean."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1534
+#, no-c-format
+msgid ""
+"gives a diagram of the key components involved in the JBossSX implementation "
+"of the SRP client/server framework."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1538
+#, no-c-format
+msgid "The JBossSX components of the SRP client-server framework."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1545
+#, no-c-format
+msgid ""
+"On the client side, SRP shows up as a custom JAAS <literal>LoginModule</"
+"literal> implementation that communicates to the authentication server "
+"through an <literal>org.jboss.security.srp.SRPServerInterface</literal> "
+"proxy. A client enables authentication using SRP by creating a login "
+"configuration entry that includes the <literal>org.jboss.security.srp.jaas."
+"SRPLoginModule</literal>. This module supports the following configuration "
+"options:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1550
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">principalClassName</emphasis>: This option is no "
+"longer supported. The principal class is now always <literal>org.jboss."
+"security.srp.jaas.SRPPrincipal</literal>."
+msgstr ""
+"<emphasis role=\"bold\">SecurityMangerService</emphasis>:这是一个关于 "
+"Tomcat 使用的 JAASsecurity manager 的引用。它的缺省值是 <literal>jboss."
+"security:service=JaasSecurityManager</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1555
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">srpServerJndiName</emphasis>: The JNDI name of the "
+"<literal>SRPServerInterface</literal> object to use for communicating with "
+"the SRP authentication server. If both <literal>srpServerJndiName</literal> "
+"and <literal>srpServerRmiUrl</literal> options are specified, the "
+"<literal>srpServerJndiName</literal> is tried before "
+"<literal>srpServerRmiUrl</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1560
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">srpServerRmiUrl</emphasis>: The RMI protocol URL "
+"string for the location of the <literal>SRPServerInterface</literal> proxy "
+"to use for communicating with the SRP authentication server."
+msgstr ""
+"<emphasis role=\"bold\">Port</emphasis>:<literal>NamingService</literal> 的 "
+"JNP 协议侦听端口。如果没有指定,它的缺省值为 1099,和 RMI registry 的缺省端口"
+"相同。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1565
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">externalRandomA</emphasis>: A true/false flag "
+"indicating if the random component of the client public key A should come "
+"from the user callback. This can be used to input a strong cryptographic "
+"random number coming from a hardware token for example."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1570
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hasAuxChallenge</emphasis>: A true/false flag "
+"indicating that a string will be sent to the server as an additional "
+"challenge for the server to validate. If the client session supports an "
+"encryption cipher then a temporary cipher will be created using the session "
+"private key and the challenge object sent as a <literal>javax.crypto."
+"SealedObject</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1575
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">multipleSessions</emphasis>: a true/false flag "
+"indicating if a given client may have multiple SRP login sessions active "
+"simultaneously."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1580
+#, no-c-format
+msgid ""
+"Any other options passed in that do not match one of the previous named "
+"options is treated as a JNDI property to use for the environment passed to "
+"the <literal>InitialContext</literal> constructor. This is useful if the SRP "
+"server interface is not available from the default <literal>InitialContext</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1583
+#, no-c-format
+msgid ""
+"The <literal>SRPLoginModule</literal> needs to be configured along with the "
+"standard <literal>ClientLoginModule</literal> to allow the SRP "
+"authentication credentials to be used for validation of access to security "
+"J2EE components. An example login configuration entry that demonstrates such "
+"a setup is:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1586
+#, no-c-format
+msgid ""
+"srp {\n"
+" org.jboss.security.srp.jaas.SRPLoginModule required\n"
+" srpServerJndiName=\"SRPServerInterface\"\n"
+" ;\n"
+" \n"
+" org.jboss.security.ClientLoginModule required\n"
+" password-stacking=\"useFirstPass\"\n"
+" ;\n"
+"};"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1587
+#, no-c-format
+msgid ""
+"On the JBoss server side, there are two MBeans that manage the objects that "
+"collectively make up the SRP server. The primary service is the <literal>org."
+"jboss.security.srp.SRPService</literal> MBean, and it is responsible for "
+"exposing an RMI accessible version of the SRPServerInterface as well as "
+"updating the SRP authentication session cache. The configurable SRPService "
+"MBean attributes include the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1592
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The JNDI name from which the "
+"SRPServerInterface proxy should be available. This is the location where the "
+"<literal>SRPService</literal> binds the serializable dynamic proxy to the "
+"<literal>SRPServerInterface</literal>. If not specified it defaults to "
+"<literal>srp/SRPServerInterface</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1597
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">VerifierSourceJndiName</emphasis>: The JNDI name of "
+"the <literal>SRPVerifierSource</literal> implementation that should be used "
+"by the <literal>SRPService</literal>. If not set it defaults to <literal>srp/"
+"DefaultVerifierSource</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Host</literal> 接口实现的类的全名。它的缺省值是 <literal>org.apache."
+"catalina.core.StandardHost</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1602
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthenticationCacheJndiName</emphasis>: The JNDI "
+"name under which the authentication <literal>org.jboss.util.CachePolicy</"
+"literal> implementation to be used for caching authentication information is "
+"bound. The SRP session cache is made available for use through this binding. "
+"If not specified it defaults to <literal>srp/AuthenticationCache</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1607
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerPort</emphasis>: RMI port for the "
+"<literal>SRPRemoteServerInterface</literal>. If not specified it defaults to "
+"10099."
+msgstr ""
+"<emphasis role=\"bold\">Port</emphasis>:<literal>NamingService</literal> 的 "
+"JNP 协议侦听端口。如果没有指定,它的缺省值为 1099,和 RMI registry 的缺省端口"
+"相同。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1612
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientSocketFactory</emphasis>: An optional custom "
+"<literal>java.rmi.server.RMIClientSocketFactory</literal> implementation "
+"class name used during the export of the <literal>SRPServerInterface</"
+"literal>. If not specified the default <literal>RMIClientSocketFactory</"
+"literal> is used."
+msgstr ""
+"<emphasis role=\"bold\">ClientSocketFactory</emphasis>:可选的自定义 "
+"<literal>java.rmi.server.RMIClientSocketFactory</literal> 实现的类名。如果它"
+"没有指定,将使用缺省的 <literal>RMIClientSocketFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1617
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerSocketFactory</emphasis>: An optional custom "
+"<literal>java.rmi.server.RMIServerSocketFactory</literal> implementation "
+"class name used during the export of the <literal>SRPServerInterface</"
+"literal>. If not specified the default <literal>RMIServerSocketFactory</"
+"literal> is used."
+msgstr ""
+"<literal>RMIClientSocketFactory</literal>:可选的自定义 <literal>java.rmi."
+"server.RMIServerSocketFactory</literal> 实现的类名。如果它没有指定,将使用缺"
+"省的 <literal>RMIServerSocketFactory</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1622
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthenticationCacheTimeout</emphasis>: Specifies the "
+"timed cache policy timeout in seconds. If not specified this defaults to "
+"1800 seconds(30 minutes)."
+msgstr ""
+"<emphasis role=\"bold\">algorithm</emphasis>:这是所使用的加密算法证书。如果"
+"没有指定的话,缺省值是 SunX509。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1627
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">AuthenticationCacheResolution</emphasis>: Specifies "
+"the timed cache policy resolution in seconds. This controls the interval "
+"between checks for timeouts. If not specified this defaults to 60 seconds(1 "
+"minute)."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1632
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RequireAuxChallenge</emphasis>: Set if the client "
+"must supply an auxiliary challenge as part of the verify phase. This gives "
+"control over whether the <literal>SRPLoginModule</literal> configuration "
+"used by the client must have the <literal>useAuxChallenge</literal> option "
+"enabled."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1637
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">OverwriteSessions</emphasis>: A flag indicating if a "
+"successful user auth for an existing session should overwrite the current "
+"session. This controls the behavior of the server SRP session cache when "
+"clients have not enabled the multiple session per user mode. The default is "
+"false meaning that the second attempt by a user to authentication will "
+"succeed, but the resulting SRP session will not overwrite the previous SRP "
+"session state."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1642
+#, no-c-format
+msgid ""
+"The one input setting is the <literal>VerifierSourceJndiName</literal> "
+"attribute. This is the location of the SRP password information store "
+"implementation that must be provided and made available through JNDI. The "
+"<literal>org.jboss.security.srp SRPVerifierStoreService</literal> is an "
+"example MBean service that binds an implementation of the "
+"<literal>SRPVerifierStore</literal> interface that uses a file of serialized "
+"objects as the persistent store. Although not realistic for a production "
+"environment, it does allow for testing of the SRP protocol and provides an "
+"example of the requirements for an <literal>SRPVerifierStore</literal> "
+"service. The configurable <literal>SRPVerifierStoreService</literal> MBean "
+"attributes include the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1647
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The JNDI name from which the "
+"<literal>SRPVerifierStore</literal> implementation should be available. If "
+"not specified it defaults to <literal>srp/DefaultVerifierSource</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Host</literal> 接口实现的类的全名。它的缺省值是 <literal>org.apache."
+"catalina.core.StandardHost</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1652
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">StoreFile</emphasis>: The location of the user "
+"password verifier serialized object store file. This can be either a URL or "
+"a resource name to be found in the classpath. If not specified it defaults "
+"to <literal>SRPVerifierStore.ser</literal>."
+msgstr ""
+"<emphasis role=\"bold\">keystoreType</emphasis>:用于服务器证书的 keystore 文"
+"件的类型。如果没有指定的话,它的缺省值是 <literal>JKS</literal>。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1657
+#, no-c-format
+msgid ""
+"The <literal>SRPVerifierStoreService</literal> MBean also supports "
+"<literal>addUser</literal> and <literal>delUser</literal> operations for "
+"addition and deletion of users. The signatures are:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1660
+#, no-c-format
+msgid ""
+"public void addUser(String username, String password) throws IOException;\n"
+"public void delUser(String username) throws IOException;"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1661
+#, no-c-format
+msgid ""
+"An example configuration of these services is presented in <xref linkend="
+"\"Providing_Password_Information_for_SRP-The_SRPVerifierStore_interface\"/>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1665
+#, no-c-format
+msgid "Providing Password Information for SRP"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1666
+#, no-c-format
+msgid ""
+"The default implementation of the <literal>SRPVerifierStore</literal> "
+"interface is not likely to be suitable for your production security "
+"environment as it requires all password hash information to be available as "
+"a file of serialized objects. You need to provide an MBean service that "
+"provides an implementation of the <literal>SRPVerifierStore</literal> "
+"interface that integrates with your existing security information stores. "
+"The <literal>SRPVerifierStore</literal> interface is shown in."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1669
+#, fuzzy, no-c-format
+msgid "The SRPVerifierStore interface"
+msgstr "服务生命周期接口"
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1670
+#, no-c-format
+msgid ""
+"package org.jboss.security.srp;\n"
+"\n"
+"import java.io.IOException;\n"
+"import java.io.Serializable;\n"
+"import java.security.KeyException;\n"
+"\n"
+"public interface SRPVerifierStore\n"
+"{\n"
+" public static class VerifierInfo implements Serializable\n"
+" {\n"
+" /**\n"
+" * The username the information applies to. Perhaps redundant\n"
+" * but it makes the object self contained.\n"
+" */\n"
+" public String username;\n"
+"\n"
+" /** The SRP password verifier hash */\n"
+" public byte[] verifier;\n"
+" /** The random password salt originally used to verify the password "
+"*/\n"
+" public byte[] salt;\n"
+" /** The SRP algorithm primitive generator */\n"
+" public byte[] g;\n"
+" /** The algorithm safe-prime modulus */\n"
+" public byte[] N;\n"
+" }\n"
+" \n"
+" /**\n"
+" * Get the indicated user's password verifier information.\n"
+" */\n"
+" public VerifierInfo getUserVerifier(String username)\n"
+" throws KeyException, IOException;\n"
+" /** \n"
+" * Set the indicated users' password verifier information. This\n"
+" * is equivalent to changing a user's password and should\n"
+" * generally invalidate any existing SRP sessions and caches.\n"
+" */\n"
+" public void setUserVerifier(String username, VerifierInfo info)\n"
+" throws IOException;\n"
+"\n"
+" /** \n"
+" * Verify an optional auxiliary challenge sent from the client to\n"
+" * the server. The auxChallenge object will have been decrypted\n"
+" * if it was sent encrypted from the client. An example of a\n"
+" * auxiliary challenge would be the validation of a hardware token\n"
+" * (SafeWord, SecureID, iButton) that the server validates to\n"
+" * further strengthen the SRP password exchange.\n"
+" */\n"
+" public void verifyUserChallenge(String username, Object auxChallenge)\n"
+" throws SecurityException;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1671
+#, no-c-format
+msgid ""
+"The primary function of a <literal>SRPVerifierStore</literal> implementation "
+"is to provide access to the <literal>SRPVerifierStore.VerifierInfo</literal> "
+"object for a given username. The <literal>getUserVerifier(String)</literal> "
+"method is called by the <literal>SRPService</literal> at that start of a "
+"user SRP session to obtain the parameters needed by the SRP algorithm. The "
+"elements of the <literal>VerifierInfo</literal> objects are:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1676
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">username</emphasis>: The user's name or id used "
+"to login."
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1681
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">verifier</emphasis>: This is the one-way hash of the "
+"password or PIN the user enters as proof of their identity. The <literal>org."
+"jboss.security.Util</literal> class has a <literal>calculateVerifier</"
+"literal> method that performs that password hashing algorithm. The output "
+"password <literal>H(salt | H(username | ':' | password))</literal> "
+"as defined by RFC2945. Here <literal>H</literal> is the SHA secure hash "
+"function. The username is converted from a string to a <literal>byte[]</"
+"literal> using the UTF-8 encoding."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1686
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">salt</emphasis>: This is a random number used to "
+"increase the difficulty of a brute force dictionary attack on the verifier "
+"password database in the event that the database is compromised. It is a "
+"value that should be generated from a cryptographically strong random number "
+"algorithm when the user's existing clear-text password is hashed."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1691
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">g</emphasis>: The SRP algorithm primitive generator. "
+"In general this can be a well known fixed parameter rather than a per-user "
+"setting. The <literal>org.jboss.security.srp.SRPConf</literal> utility class "
+"provides several settings for g including a good default which can obtained "
+"via <literal>SRPConf.getDefaultParams().g()</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1696
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">N</emphasis>: The SRP algorithm safe-prime modulus. "
+"In general this can be a well known fixed parameter rather than a per-user "
+"setting. The <literal>org.jboss.security.srp.SRPConf</literal> utility class "
+"provides several settings for <literal>N</literal> including a good default "
+"which can obtained via <literal>SRPConf.getDefaultParams().N()</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1701
+#, no-c-format
+msgid ""
+"So, step 1 of integrating your existing password store is the creation of a "
+"hashed version of the password information. If your passwords are already "
+"store in an irreversible hashed form, then this can only be done on a per-"
+"user basis as part of an upgrade procedure for example. Note that the "
+"<literal>setUserVerifier(String, VerifierInfo)</literal> method is not used "
+"by the current SRPSerivce and may be implemented as no-op method, or even "
+"one that throws an exception stating that the store is read-only."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1704
+#, no-c-format
+msgid ""
+"Step 2 is the creation of the custom <literal>SRPVerifierStore</literal> "
+"interface implementation that knows how to obtain the <literal>VerifierInfo</"
+"literal> from the store you created in step 1. The "
+"<literal>verifyUserChallenge(String, Object)</literal> method of the "
+"interface is only called if the client <literal>SRPLoginModule</literal> "
+"configuration specifies the <literal>hasAuxChallenge</literal> option. This "
+"can be used to integrate existing hardware token based schemes like SafeWord "
+"or Radius into the SRP algorithm."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1707
+#, no-c-format
+msgid ""
+"Step 3 is the creation of an MBean that makes the step 2 implementation of "
+"the <literal>SRPVerifierStore</literal> interface available via JNDI, and "
+"exposes any configurable parameters you need. In addition to the default "
+"<literal>org.jboss.security.srp.SRPVerifierStoreService</literal> example, "
+"the SRP example presented later in this chapter provides a Java properties "
+"file based <literal>SRPVerifierStore</literal> implementation. Between the "
+"two examples you should have enough to integrate your security store."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1714
+#, no-c-format
+msgid "Inside of the SRP algorithm"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1715
+#, no-c-format
+msgid ""
+"The appeal of the SRP algorithm is that is allows for mutual authentication "
+"of client and server using simple text passwords without a secure "
+"communication channel. You might be wondering how this is done. If you want "
+"the complete details and theory behind the algorithm, refer to the SRP "
+"references mentioned in a note earlier. There are six steps that are "
+"performed to complete authentication:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1720
+#, no-c-format
+msgid ""
+"The client side <literal>SRPLoginModule</literal> retrieves the "
+"SRPServerInterface instance for the remote authentication server from the "
+"naming service."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1725
+#, no-c-format
+msgid ""
+"The client side <literal>SRPLoginModule</literal> next requests the SRP "
+"parameters associated with the username attempting the login. There are a "
+"number of parameters involved in the SRP algorithm that must be chosen when "
+"the user password is first transformed into the verifier form used by the "
+"SRP algorithm. Rather than hard-coding the parameters (which could be done "
+"with minimal security risk), the JBossSX implementation allows a user to "
+"retrieve this information as part of the exchange protocol. The "
+"<literal>getSRPParameters(username)</literal> call retrieves the SRP "
+"parameters for the given username."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1730
+#, no-c-format
+msgid ""
+"The client side <literal>SRPLoginModule</literal> begins an SRP session by "
+"creating an <literal>SRPClientSession</literal> object using the login "
+"username, clear-text password, and SRP parameters obtained from step 2. The "
+"client then creates a random number A that will be used to build the private "
+"SRP session key. The client then initializes the server side of the SRP "
+"session by invoking the <literal>SRPServerInterface.init</literal> method "
+"and passes in the username and client generated random number <literal>A</"
+"literal>. The server returns its own random number <literal>B</literal>. "
+"This step corresponds to the exchange of public keys."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1735
+#, no-c-format
+msgid ""
+"The client side <literal>SRPLoginModule</literal> obtains the private SRP "
+"session key that has been generated as a result of the previous messages "
+"exchanges. This is saved as a private credential in the login "
+"<literal>Subject</literal>. The server challenge response <literal>M2</"
+"literal> from step 4 is verified by invoking the <literal>SRPClientSession."
+"verify</literal> method. If this succeeds, mutual authentication of the "
+"client to server, and server to client have been completed. The client side "
+"<literal>SRPLoginModule</literal> next creates a challenge <literal>M1</"
+"literal> to the server by invoking <literal>SRPClientSession.response</"
+"literal> method passing the server random number <literal>B</literal> as an "
+"argument. This challenge is sent to the server via the "
+"<literal>SRPServerInterface.verify</literal> method and server's "
+"response is saved as <literal>M2</literal>. This step corresponds to an "
+"exchange of challenges. At this point the server has verified that the user "
+"is who they say they are."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1740
+#, no-c-format
+msgid ""
+"The client side <literal>SRPLoginModule</literal> saves the login username "
+"and <literal>M1</literal> challenge into the <literal>LoginModule</literal> "
+"sharedState map. This is used as the Principal name and credentials by the "
+"standard JBoss <literal>ClientLoginModule</literal>. The <literal>M1</"
+"literal> challenge is used in place of the password as proof of identity on "
+"any method invocations on J2EE components. The <literal>M1</literal> "
+"challenge is a cryptographically strong hash associated with the SRP "
+"session. Its interception via a third partly cannot be used to obtain the "
+"user's password."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1745
+#, no-c-format
+msgid ""
+"At the end of this authentication protocol, the SRPServerSession has been "
+"placed into the SRPService authentication cache for subsequent use by the "
+"<literal>SRPCacheLoginModule</literal>."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1750
+#, no-c-format
+msgid ""
+"Although SRP has many interesting properties, it is still an evolving "
+"component in the JBossSX framework and has some limitations of which you "
+"should be aware. Issues of note include the following:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1755
+#, no-c-format
+msgid ""
+"Because of how JBoss detaches the method transport protocol from the "
+"component container where authentication is performed, an unauthorized user "
+"could snoop the SRP <literal>M1</literal> challenge and effectively use the "
+"challenge to make requests as the associated username. Custom interceptors "
+"that encrypt the challenge using the SRP session key can be used to prevent "
+"this issue."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1760
+#, no-c-format
+msgid ""
+"The SRPService maintains a cache of SRP sessions that time out after a "
+"configurable period. Once they time out, any subsequent J2EE component "
+"access will fail because there is currently no mechanism for transparently "
+"renegotiating the SRP authentication credentials. You must either set the "
+"authentication cache timeout very long (up to 2,147,483,647 seconds, or "
+"approximately 68 years), or handle re-authentication in your code on failure."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1765
+#, no-c-format
+msgid ""
+"By default there can only be one SRP session for a given username. Because "
+"the negotiated SRP session produces a private session key that can be used "
+"for encryption/decryption between the client and server, the session is "
+"effectively a stateful one. JBoss supports for multiple SRP sessions per "
+"user, but you cannot encrypt data with one session key and then decrypt it "
+"with another."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1770
+#, no-c-format
+msgid ""
+"To use end-to-end SRP authentication for J2EE component calls, you need to "
+"configure the security domain under which the components are secured to use "
+"the <literal>org.jboss.security.srp.jaas.SRPCacheLoginModule</literal>. The "
+"<literal>SRPCacheLoginModule</literal> has a single configuration option "
+"named <literal>cacheJndiName</literal> that sets the JNDI location of the "
+"SRP authentication <literal>CachePolicy</literal> instance. This must "
+"correspond to the <literal>AuthenticationCacheJndiName</literal> attribute "
+"value of the <literal>SRPService</literal> MBean. The "
+"<literal>SRPCacheLoginModule</literal> authenticates user credentials by "
+"obtaining the client challenge from the <literal>SRPServerSession</literal> "
+"object in the authentication cache and comparing this to the challenge "
+"passed as the user credentials. <xref linkend=\"Inside_of_the_SRP_algorithm-"
+"A_sequence_diagram_illustrating_the_interaction_of_the_SRPCacheLoginModule_with_the_SRP_session_cache."
+"\"/> illustrates the operation of the SRPCacheLoginModule.login method "
+"implementation."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1774
+#, no-c-format
+msgid ""
+"A sequence diagram illustrating the interaction of the SRPCacheLoginModule "
+"with the SRP session cache."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1782
+#, no-c-format
+msgid "An SRP example"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1783
+#, no-c-format
+msgid ""
+"We have covered quite a bit of material on SRP and now its time to "
+"demonstrate SRP in practice with an example. The example demonstrates client "
+"side authentication of the user via SRP as well as subsequent secured access "
+"to a simple EJB using the SRP session challenge as the user credential. The "
+"test code deploys an EJB JAR that includes a SAR for the configuration of "
+"the server side login module configuration and SRP services. As in the "
+"previous examples we will dynamically install the server side login module "
+"configuration using the <literal>SecurityConfig</literal> MBean. In this "
+"example we also use a custom implementation of the "
+"<literal>SRPVerifierStore</literal> interface that uses an in memory store "
+"that is seeded from a Java properties file rather than a serialized object "
+"store as used by the <literal>SRPVerifierStoreService</literal>. This custom "
+"service is <literal>org.jboss.book.security.ex3.service."
+"PropertiesVerifierStore</literal>. The following shows the contents of the "
+"JAR that contains the example EJB and SRP services."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1786
+#, no-c-format
+msgid ""
+"[examples]$ jar tf output/security/security-ex3.jar \n"
+"META-INF/MANIFEST.MF\n"
+"META-INF/ejb-jar.xml\n"
+"META-INF/jboss.xml\n"
+"org/jboss/book/security/ex3/Echo.class\n"
+"org/jboss/book/security/ex3/EchoBean.class\n"
+"org/jboss/book/security/ex3/EchoHome.class\n"
+"roles.properties\n"
+"users.properties\n"
+"security-ex3.sar"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1787
+#, no-c-format
+msgid ""
+"The key SRP related items in this example are the SRP MBean services "
+"configuration, and the SRP login module configurations. The <literal>jboss-"
+"service.xml</literal> descriptor of the <literal>security-ex3.sar</literal> "
+"is given in <xref linkend=\"An_SRP_example-The_security_ex3."
+"sar_jboss_service.xml_descriptor_for_the_SRP_services\"/>, while <xref "
+"linkend=\"An_SRP_example-The_client_side_standard_JAAS_configuration\"/> and "
+"<xref linkend=\"An_SRP_example-The_server_side_XMLLoginConfig_configuration"
+"\"/> give the example client side and server side login module "
+"configurations."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1790
+#, fuzzy, no-c-format
+msgid "The security-ex3.sar jboss-service.xml descriptor for the SRP services"
+msgstr "第一个版本的jboss-service.xml描述符如下所示。"
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1791
+#, no-c-format
+msgid ""
+"<server>\n"
+" <!-- The custom JAAS login configuration that installs\n"
+" a Configuration capable of dynamically updating the\n"
+" config settings -->\n"
+"\n"
+" <mbean code=\"org.jboss.book.security.service.SecurityConfig\" \n"
+" name=\"jboss.docs.security:service=LoginConfig-EX3\">\n"
+" <attribute name=\"AuthConfig\">META-INF/login-config.xml</"
+"attribute>\n"
+" <attribute name=\"SecurityConfigName\">jboss.security:"
+"name=SecurityConfig</attribute>\n"
+" </mbean>\n"
+"\n"
+" <!-- The SRP service that provides the SRP RMI server and server "
+"side\n"
+" authentication cache -->\n"
+" <mbean code=\"org.jboss.security.srp.SRPService\" \n"
+" name=\"jboss.docs.security:service=SRPService\">\n"
+" <attribute name=\"VerifierSourceJndiName\">srp-test/security-"
+"ex3</attribute>\n"
+" <attribute name=\"JndiName\">srp-test/SRPServerInterface</"
+"attribute>\n"
+" <attribute name=\"AuthenticationCacheJndiName\">srp-test/"
+"AuthenticationCache</attribute>\n"
+" <attribute name=\"ServerPort\">0</attribute>\n"
+" <depends>jboss.docs.security:"
+"service=PropertiesVerifierStore</depends>\n"
+" </mbean>\n"
+"\n"
+" <!-- The SRP store handler service that provides the user password "
+"verifier\n"
+" information -->\n"
+" <mbean code=\"org.jboss.security.ex3.service.PropertiesVerifierStore"
+"\"\n"
+" name=\"jboss.docs.security:service=PropertiesVerifierStore\">\n"
+" <attribute name=\"JndiName\">srp-test/security-ex3</"
+"attribute>\n"
+" </mbean>\n"
+"</server>"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1792
+#, fuzzy, no-c-format
+msgid "The client side standard JAAS configuration"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1793
+#, no-c-format
+msgid ""
+"srp {\n"
+" org.jboss.security.srp.jaas.SRPLoginModule required\n"
+" srpServerJndiName=\"srp-test/SRPServerInterface\"\n"
+" ;\n"
+" \n"
+" org.jboss.security.ClientLoginModule required\n"
+" password-stacking=\"useFirstPass\"\n"
+" ;\n"
+"};"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1794
+#, fuzzy, no-c-format
+msgid "The server side XMLLoginConfig configuration"
+msgstr "服务端配置"
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1795
+#, no-c-format
+msgid ""
+"<application-policy name=\"security-ex3\">\n"
+" <authentication>\n"
+" <login-module code=\"org.jboss.security.srp.jaas."
+"SRPCacheLoginModule\"\n"
+" flag = \"required\">\n"
+" <module-option name=\"cacheJndiName\">srp-test/"
+"AuthenticationCache</module-option>\n"
+" </login-module>\n"
+" <login-module code=\"org.jboss.security.auth.spi."
+"UsersRolesLoginModule\"\n"
+" flag = \"required\">\n"
+" <module-option name=\"password-stacking\">useFirstPass</"
+"module-option>\n"
+" </login-module>\n"
+" </authentication>\n"
+"</application-policy>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1796
+#, no-c-format
+msgid ""
+"The example services are the <literal>ServiceConfig</literal> and the "
+"<literal>PropertiesVerifierStore</literal> and <literal>SRPService</literal> "
+"MBeans. Note that the <literal>JndiName</literal> attribute of the "
+"<literal>PropertiesVerifierStore</literal> is equal to the "
+"<literal>VerifierSourceJndiName</literal> attribute of the "
+"<literal>SRPService</literal>, and that the <literal>SRPService</literal> "
+"depends on the <literal>PropertiesVerifierStore</literal>. This is required "
+"because the <literal>SRPService</literal> needs an implementation of the "
+"<literal>SRPVerifierStore</literal> interface for accessing user password "
+"verification information."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1799
+#, no-c-format
+msgid ""
+"The client side login module configuration makes use of the "
+"<literal>SRPLoginModule</literal> with a <literal>srpServerJndiName</"
+"literal> option value that corresponds to the JBoss server component "
+"<literal>SRPService</literal> JndiName attribute value(<literal>srp-test/"
+"SRPServerInterface</literal>). Also needed is the "
+"<literal>ClientLoginModule</literal> configured with the <literal>password-"
+"stacking=\"useFirstPass\"</literal> value to propagate the user "
+"authentication credentials generated by the <literal>SRPLoginModule</"
+"literal> to the EJB invocation layer."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1802
+#, no-c-format
+msgid ""
+"There are two issues to note about the server side login module "
+"configuration. First, note the <literal>cacheJndiName=srp-test/"
+"AuthenticationCache</literal> configuration option tells the "
+"<literal>SRPCacheLoginModule</literal> the location of the "
+"<literal>CachePolicy</literal> that contains the <literal>SRPServerSession</"
+"literal> for users who have authenticated against the <literal>SRPService</"
+"literal>. This value corresponds to the <literal>SRPService</"
+"literal><literal>AuthenticationCacheJndiName</literal> attribute value. "
+"Second, the configuration includes a <literal>UsersRolesLoginModule</"
+"literal> with the <literal>password-stacking=useFirstPass</literal> "
+"configuration option. It is required to use a second login module with the "
+"<literal>SRPCacheLoginModule</literal> because SRP is only an authentication "
+"technology. A second login module needs to be configured that accepts the "
+"authentication credentials validated by the <literal>SRPCacheLoginModule</"
+"literal> to set the principal's roles that determines the principal'"
+"s permissions. The <literal>UsersRolesLoginModule</literal> is augmenting "
+"the SRP authentication with properties file based authorization. The "
+"user's roles are coming the <literal>roles.properties</literal> file "
+"included in the EJB JAR."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1805
+#, no-c-format
+msgid ""
+"Now, run the example 3 client by executing the following command from the "
+"book examples directory:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1808
+#, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=security -Dex=3 run-example\n"
+"...\n"
+"run-example3:\n"
+" [echo] Waiting for 5 seconds for deploy...\n"
+" [java] Logging in using the 'srp' configuration\n"
+" [java] Created Echo\n"
+" [java] Echo.echo()#1 = This is call 1\n"
+" [java] Echo.echo()#2 = This is call 2"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1809
+#, no-c-format
+msgid ""
+"In the <literal>examples/logs</literal> directory you will find a file "
+"called <literal>ex3-trace.log</literal>. This is a detailed trace of the "
+"client side of the SRP algorithm. The traces show step-by-step the "
+"construction of the public keys, challenges, session key and verification."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1812
+#, no-c-format
+msgid ""
+"Note that the client has taken a long time to run relative to the other "
+"simple examples. The reason for this is the construction of the client's "
+"public key. This involves the creation of a cryptographically strong random "
+"number, and this process takes quite a bit of time the first time it occurs. "
+"If you were to log out and log in again within the same VM, the process "
+"would be much faster. Also note that <literal>Echo.echo()#2</literal> fails "
+"with an authentication exception. The client code sleeps for 15 seconds "
+"after making the first call to demonstrate the behavior of the "
+"<literal>SRPService</literal> cache expiration. The <literal>SRPService</"
+"literal> cache policy timeout has been set to a mere 10 seconds to force "
+"this issue. As stated earlier, you need to make the cache timeout very long, "
+"or handle re-authentication on failure."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1822
+#, no-c-format
+msgid "Running JBoss with a Java 2 security manager"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1823
+#, no-c-format
+msgid ""
+"By default the JBoss server does not start with a Java 2 security manager. "
+"If you want to restrict privileges of code using Java 2 permissions you need "
+"to configure the JBoss server to run under a security manager. This is done "
+"by configuring the Java VM options in the <literal>run.bat</literal> or "
+"<literal>run.sh</literal> scripts in the JBoss server distribution bin "
+"directory. The two required VM options are as follows:"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1828
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.security.manager</emphasis>: This is used "
+"without any value to specify that the default security manager should be "
+"used. This is the preferred security manager. You can also pass a value to "
+"the <literal>java.security.manager</literal> option to specify a custom "
+"security manager implementation. The value must be the fully qualified class "
+"name of a subclass of <literal>java.lang.SecurityManager</literal>. This "
+"form specifies that the policy file should augment the default security "
+"policy as configured by the VM installation."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1833
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.security.policy</emphasis>: This is used to "
+"specify the policy file that will augment the default security policy "
+"information for the VM. This option takes two forms: <literal>java.security."
+"policy=policyFileURL</literal> and <literal>java.security."
+"policy==policyFileURL</literal>. The first form specifies that the policy "
+"file should augment the default security policy as configured by the VM "
+"installation. The second form specifies that only the indicated policy file "
+"should be used. The <literal>policyFileURL</literal> value can be any URL "
+"for which a protocol handler exists, or a file path specification."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1838
+#, no-c-format
+msgid ""
+"Both the <literal>run.bat</literal> and <literal>run.sh</literal> start "
+"scripts reference an JAVA_OPTS variable which you can use to set the "
+"security manager properties."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1841
+#, no-c-format
+msgid ""
+"Enabling Java 2 security is the easy part. The difficult part of Java 2 "
+"security is establishing the allowed permissions. If you look at the "
+"<literal>server.policy</literal> file that is contained in the default "
+"configuration file set, you'll see that it contains the following "
+"permission grant statement:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1844
+#, no-c-format
+msgid ""
+"grant {\n"
+" // Allow everything for now\n"
+" permission java.security.AllPermission;\n"
+"};"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1845
+#, no-c-format
+msgid ""
+"This effectively disables security permission checking for all code as it "
+"says any code can do anything, which is not a reasonable default. What is a "
+"reasonable set of permissions is entirely up to you."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1848
+#, no-c-format
+msgid ""
+"The current set of JBoss specific <literal>java.lang.RuntimePermissions</"
+"literal> that are required include:"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1854
+#, no-c-format
+msgid "TargetName"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1857
+#, no-c-format
+msgid "What the permission allows"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1860
+#, no-c-format
+msgid "Risks"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1867
+#, no-c-format
+msgid "org.jboss.security.SecurityAssociation.getPrincipalInfo"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1870
+#, no-c-format
+msgid ""
+"Access to the org.jboss.security.SecurityAssociation getPrincipal() and "
+"getCredentials() methods."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1873
+#, no-c-format
+msgid "The ability to see the current thread caller and credentials."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1878
+#, no-c-format
+msgid "org.jboss.security.SecurityAssociation.setPrincipalInfo"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1881
+#, no-c-format
+msgid ""
+"Access to the org.jboss.security.SecurityAssociation setPrincipal() and "
+"setCredentials() methods."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1884
+#, no-c-format
+msgid "The ability to set the current thread caller and credentials."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1889
+#, no-c-format
+msgid "org.jboss.security.SecurityAssociation.setServer"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1892
+#, no-c-format
+msgid "Access to the org.jboss.security.SecurityAssociation setServer method."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1895
+#, no-c-format
+msgid ""
+"The ability to enable or disable multithread storage of the caller principal "
+"and credential."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1900
+#, no-c-format
+msgid "org.jboss.security.SecurityAssociation.setRunAsRole"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1903
+#, no-c-format
+msgid ""
+"Access to the org.jboss.security.SecurityAssociation pushRunAsRole and "
+"popRunAsRole methods."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:1906
+#, no-c-format
+msgid "The ability to change the current caller run-as role principal."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1912
+#, no-c-format
+msgid ""
+"To conclude this discussion, here is a little-known tidbit on debugging "
+"security policy settings. There are various debugging flag that you can set "
+"to determine how the security manager is using your security policy file as "
+"well as what policy files are contributing permissions. Running the VM as "
+"follows shows the possible debugging flag settings:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1915
+#, no-c-format
+msgid ""
+"[bin]$ java -Djava.security.debug=help\n"
+" \n"
+"all turn on all debugging\n"
+"access print all checkPermission results\n"
+"combiner SubjectDomainCombiner debugging\n"
+"jar jar verification\n"
+"logincontext login context results\n"
+"policy loading and granting\n"
+"provider security provider debugging\n"
+"scl permissions SecureClassLoader assigns\n"
+"\n"
+"The following can be used with access:\n"
+"\n"
+"stack include stack trace\n"
+"domain dumps all domains in context\n"
+"failure before throwing exception, dump stack\n"
+" and domain that didn't have permission\n"
+"\n"
+"Note: Separate multiple options with a comma"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1916
+#, no-c-format
+msgid ""
+"Running with <literal>-Djava.security.debug=all</literal> provides the most "
+"output, but the output volume is torrential. This might be a good place to "
+"start if you don't understand a given security failure at all. A less "
+"verbose setting that helps debug permission failures is to use <literal>-"
+"Djava.security.debug=access,failure</literal>. This is still relatively "
+"verbose, but not nearly as bad as the all mode as the security domain "
+"information is only displayed on access failures."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1922
+#, no-c-format
+msgid "Using SSL with JBoss"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1924
+#, no-c-format
+msgid "Adding SSL to EJB3"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1925
+#, no-c-format
+msgid ""
+"By default JBoss EJB3 uses a socket based invoker layer on port 3878. This "
+"is set up in <filename> $JBOSS_HOME/server/<replaceable><serverconfig>"
+"</replaceable>/deploy/ejb3.deployer/META-INF/jboss-service.xml</filename>. "
+"In some cases you may wish to use SSL as the protocol. In order to do this "
+"you must generate a keystore and then configure your beans to use SSL "
+"transport."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1929 J2EE_Security_On_JBOSS.xml:1983
+#, no-c-format
+msgid "Generating the keystore and truststore"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1930
+#, no-c-format
+msgid ""
+"For SSL to work you need to create a public/private key pair, which will be "
+"stored in a keystore. Generate this using the <literal>genkey</literal> "
+"command that comes with the JDK. <programlisting>\n"
+" $cd $JBOSS_HOME/server/production/conf/\n"
+" $keytool -genkey -alias ejb3-ssl -keypass opensource -keystore localhost."
+"keystore\n"
+" Enter keystore password: opensource\n"
+" What is your first and last name?\n"
+" [Unknown]:\n"
+" What is the name of your organizational unit?\n"
+" [Unknown]:\n"
+" What is the name of your organization?\n"
+" [Unknown]:\n"
+" What is the name of your City or Locality?\n"
+" [Unknown]:\n"
+" What is the name of your State or Province?\n"
+" [Unknown]:\n"
+" What is the two-letter country code for this unit?\n"
+" [Unknown]:\n"
+" Is CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, C=Unknown "
+"correct?\n"
+" [no]: yes\n"
+"</programlisting> where <literal>alias</literal> is the name (\"ejb2-ssl\") "
+"of the key pair within the keystore. <literal>keypass</literal> is the "
+"password (\"opensource\") for the keystore, and <literal>keystore</literal> "
+"specifies the location (\"localhost.keystore\") of the keystore to create/"
+"add to."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1935
+#, no-c-format
+msgid ""
+"Since you have not signed our certificate through any certification "
+"authoritiy, you also need to create a truststore for the client, explicitly "
+"saying that you trust the certificate you just created. The first step is to "
+"export the certificate using the JDK keytool:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1937
+#, no-c-format
+msgid ""
+"$ keytool -export -alias ejb3-ssl -file mycert.cer -keystore localhost."
+"keystore\n"
+" Enter keystore password: opensource\n"
+" Certificate stored in file <mycert.cer>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1939
+#, no-c-format
+msgid ""
+"Then you need to create the truststore if it does not exist and import the "
+"certificate into the trueststore:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1941
+#, no-c-format
+msgid ""
+"$ keytool -import -alias ejb3-ssl -file mycert.cer -keystore localhost."
+"truststore\n"
+" Enter keystore password: opensource\n"
+" Owner: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, "
+"C=Unknown\n"
+" Issuer: CN=Unknown, OU=Unknown, O=Unknown, L=Unknown, ST=Unknown, "
+"C=Unknown\n"
+" Serial number: 43bff927\n"
+" Valid from: Sat Jan 07 18:23:51 CET 2006 until: Fri Apr 07 19:23:51 CEST "
+"2006\n"
+" Certificate fingerprints:\n"
+" MD5: CF:DC:71:A8:F4:EA:8F:5A:E9:94:E3:E6:5B:A9:C8:F3\n"
+" SHA1: 0E:AD:F3:D6:41:5E:F6:84:9A:D1:54:3D:DE:A9:B2:01:28:"
+"F6:7C:26\n"
+" Trust this certificate? [no]: yes\n"
+" Certificate was added to keystore"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1945 J2EE_Security_On_JBOSS.xml:1989
+#, no-c-format
+msgid "Setting up the SSL transport"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1946
+#, no-c-format
+msgid ""
+"The simplest way to define an SSL transport is to define a new Remoting "
+"connector using the <literal>sslsocket</literal> protocol as follows. This "
+"transport will listen on port 3843:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1948
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.remoting.transport.Connector\"\n"
+" xmbean-dd=\"org/jboss/remoting/transport/Connector.xml\"\n"
+" name=\"jboss.remoting:type=Connector,transport=socket3843,handler=ejb3"
+"\">\n"
+" <depends>jboss.aop:service=AspectDeployer</depends>\n"
+" <attribute name=\"InvokerLocator\">sslsocket://0.0.0.0:3843</"
+"attribute>\n"
+" <attribute name=\"Configuration\">\n"
+" <handlers>\n"
+" <handler subsystem=\"AOP\">\n"
+" org.jboss.aspects.remoting.AOPRemotingInvocationHandler\n"
+" </handler>\n"
+" </handlers>\n"
+" </attribute>\n"
+" </mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1950 J2EE_Security_On_JBOSS.xml:1990
+#, no-c-format
+msgid ""
+"Now you need to tell JBoss Remoting where to find the keystore to be used "
+"for SSl and its password. This is done using <literal>javax.net.ssl."
+"keyStore</literal> and <literal>javax.net.ssl.keyStorePassword=opensource</"
+"literal> system properties when starting JBoss, as the following example "
+"shows:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1952 J2EE_Security_On_JBOSS.xml:1992
+#, no-c-format
+msgid ""
+"$cd $JBOSS_HOME/bin\n"
+" $ run -Djavax.net.ssl.keyStore=../server/production/conf/localhost."
+"keystore \n"
+" -Djavax.net.ssl.keyStorePassword=opensource"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1956 J2EE_Security_On_JBOSS.xml:2001
+#, no-c-format
+msgid "Configuring your beans to use the SSL transport"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1957
+#, no-c-format
+msgid ""
+"By default all the beans will use the default connector on "
+"<literal>socket://0.0.0.0:3873</literal>. By using the <literal>@org.jboss."
+"annotation.ejb.RemoteBinding</literal> annotation you can have the bean "
+"invokable via SSL."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1959
+#, no-c-format
+msgid ""
+"@RemoteBinding(clientBindUrl=\"sslsocket://0.0.0.0:3843\", jndiBinding="
+"\"StatefulSSL\"),\n"
+" @Remote(BusinessInterface.class)\n"
+" public class StatefulBean implements BusinessInterface\n"
+" {\n"
+" ...\n"
+" }"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1961
+#, no-c-format
+msgid ""
+"This bean will be bound under the JNDI name <literal>StatefulSSL</literal> "
+"and the proxy implementing the remote interface returned to the client will "
+"communicate with the server via SSL."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1964
+#, no-c-format
+msgid "You can also enable different types of communication for your beans"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1966
+#, no-c-format
+msgid ""
+"@RemoteBindings({\n"
+" @RemoteBinding(clientBindUrl=\"sslsocket://0.0.0.0:3843\", jndiBinding="
+"\"StatefulSSL\"),\n"
+" @RemoteBinding(jndiBinding=\"StatefulNormal\")\n"
+" })\n"
+" @Remote(BusinessInterface.class)\n"
+" public class StatefulBean implements BusinessInterface\n"
+" {\n"
+" ...\n"
+" }"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1968
+#, no-c-format
+msgid ""
+"Now if you look up <literal>StatefulNormal</literal> the returned proxy "
+"implementing the remote interface will communicate with the server via the "
+"normal unencrypted socket protocol, and if you look up <literal>StatefulSSL</"
+"literal> the returned proxy implementing the remote interface will "
+"communicate with the server via SSL."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1973 J2EE_Security_On_JBOSS.xml:2010
+#, no-c-format
+msgid "Setting up the client to use the truststore"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1974
+#, no-c-format
+msgid ""
+"If not using a certificate signed by a certificate authorization authority, "
+"you need to point the client to the truststore using the <literal>javax.net."
+"ssl.trustStore</literal> system property and specify the password using the "
+"<literal>javax.net.ssl.trustStorePassword</literal> system property:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1976
+#, no-c-format
+msgid ""
+"java -Djavax.net.ssl.trustStore=${resources}/test/ssl/localhost.truststore\n"
+" -Djavax.net.ssl.trustStorePassword=opensource com.acme.RunClient"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:1981
+#, no-c-format
+msgid "Adding SSL to EJB 2.1 calls"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1984
+#, no-c-format
+msgid "This is similar to the steps described for Adding SSL to EJB3 calls."
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:1994
+#, no-c-format
+msgid ""
+"If you wish to customize the SSLSocketBuilder you need to add the following "
+"to your <literal>$JBOSS_HOME/server/${serverConf}/conf/jboss-service.xml</"
+"literal> file."
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1996
+#, no-c-format
+msgid ""
+"<!-- This section is for custom (SSL) server socket factory -->\n"
+" <mbean code=\"org.jboss.remoting.security.SSLSocketBuilder\"\n"
+" name=\"jboss.remoting:service=SocketBuilder,type=SSL\"\n"
+" display-name=\"SSL Server Socket Factory Builder\">\n"
+" <!-- IMPORTANT - If making ANY customizations, this MUST be set to "
+"false. -->\n"
+" <!-- Otherwise, will used default settings and the following "
+"attributes will be ignored. -->\n"
+" <attribute name=\"UseSSLServerSocketFactory\">false</"
+"attribute>\n"
+" <!-- This is the url string to the key store to use -->\n"
+" <attribute name=\"KeyStoreURL\">localhost.keystore</"
+"attribute>\n"
+" <!-- The password for the key store -->\n"
+" <attribute name=\"KeyStorePassword\">sslsocket</"
+"attribute>\n"
+" <!-- The password for the keys (will use KeystorePassword if this "
+"is not set explicitly. -->\n"
+" <attribute name=\"KeyPassword\">sslsocket</attribute>\n"
+" <!-- The protocol for the SSLContext. Default is TLS. -->\n"
+" <attribute name=\"SecureSocketProtocol\">TLS</attribute>\n"
+" <!-- The algorithm for the key manager factory. Default is "
+"SunX509. -->\n"
+" <attribute name=\"KeyManagementAlgorithm\">SunX509</"
+"attribute>\n"
+" <!-- The type to be used for the key store. -->\n"
+" <!-- Defaults to JKS. Some acceptable values are JKS (Java "
+"Keystore - Sun's keystore format), -->\n"
+" <!-- JCEKS (Java Cryptography Extension keystore - More secure "
+"version of JKS), and -->\n"
+" <!-- PKCS12 (Public-Key Cryptography Standards #12 \n"
+" keystore - RSA's Personal Information Exchange Syntax "
+"Standard). -->\n"
+" <!-- These are not case sensitive. -->\n"
+" <attribute name=\"KeyStoreType\">JKS</attribute>\n"
+" </mbean>"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:1997
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.remoting.security.SSLServerSocketFactoryService"
+"\"\n"
+" name=\"jboss.remoting:service=ServerSocketFactory,type=SSL\"\n"
+" display-name=\"SSL Server Socket Factory\">\n"
+" <depends optional-attribute-name=\"SSLSocketBuilder\"\n"
+" proxy-type=\"attribute\">jboss.remoting:service=SocketBuilder,"
+"type=SSL</depends>\n"
+" </mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2002
+#, no-c-format
+msgid ""
+"In your <literal>$JBOSS_HOME/server/${serverConf}/conf/jboss-service.xml</"
+"literal> file, comment out the following lines: <programlisting>\n"
+"<mbean code=\"org.jboss.remoting.transport.Connector\"\n"
+" name=\"jboss.remoting:service=Connector,transport=socket\"\n"
+" display-name=\"Socket transport Connector\">\n"
+"\n"
+" <!-- Can either just specify the InvokerLocator attribute and not "
+"the invoker element in the -->\n"
+" <!-- Configuration attribute, or do the full invoker configuration "
+"in the in invoker element -->\n"
+" <!-- of the Configuration attribute. -->\n"
+"\n"
+" <!-- Remember that if you do use more than one param on the uri, "
+"will have to include as a CDATA, -->\n"
+" <!-- otherwise, parser will complain. -->\n"
+" <!-- \n"
+" <attribute name=\"InvokerLocator\">\n"
+" <![CDATA[socket://${jboss.bind.address}:4446/?"
+"datatype=invocation]]>\n"
+" </attribute> \n"
+" -->\n"
+"\n"
+" <attribute name=\"Configuration\">\n"
+" <!-- Using the following \n"
+" <invoker> \n"
+" element instead of the InvokerLocator above because specific "
+"attributes needed. \n"
+" -->\n"
+" <!-- If wanted to use any of the parameters below, can \n"
+" just add them as parameters to the url above if wanted use \n"
+" the InvokerLocator attribute. -->\n"
+" <config>\n"
+" <!-- Other than transport type and handler, none of these "
+"configurations are required \n"
+" (will just use defaults). -->\n"
+" <invoker transport=\"socket\">\n"
+" <attribute name=\"dataType\" isParam=\"true\">"
+"invocation</attribute>\n"
+" <attribute name=\"marshaller\"\n"
+" isParam=\"true\">org.jboss.invocation.unified.marshall."
+"InvocationMarshaller</attribute>\n"
+" <attribute name=\"unmarshaller\"\n"
+" isParam=\"true\">org.jboss.invocation.unified.marshall."
+"InvocationUnMarshaller</attribute>\n"
+" <!-- This will be port on which the marshall loader port "
+"runs on. -->\n"
+" <!-- <attribute name=\"loaderport\" isParam=\"true"
+"\">4447</attribute> -->\n"
+" <!-- The following are specific to socket invoker -->\n"
+" <!-- <attribute name=\"numAcceptThreads\">1</"
+"attribute>-->\n"
+" <!-- <attribute name=\"maxPoolSize\">303</"
+"attribute>-->\n"
+" <!-- <attribute name=\"clientMaxPoolSize\" isParam="
+"\"true\">304</attribute>-->\n"
+" <attribute name=\"socketTimeout\" isParam=\"true"
+"\">600000</attribute>\n"
+" <attribute name=\"serverBindAddress\">${jboss.bind."
+"address}</attribute>\n"
+" <attribute name=\"serverBindPort\">4446</"
+"attribute>\n"
+" <!-- <attribute name=\"clientConnectAddress"
+"\">216.23.33.2</attribute> -->\n"
+" <!-- <attribute name=\"clientConnectPort\">7777</"
+"attribute> -->\n"
+" <attribute name=\"enableTcpNoDelay\" isParam=\"true\">"
+"true</attribute>\n"
+" <!-- <attribute name=\"backlog\">200</"
+"attribute>-->\n"
+" <!-- The following is for callback configuration and is "
+"independant of invoker type -->\n"
+" <!-- <attribute name=\"callbackMemCeiling\">30</"
+"attribute>-->\n"
+" <!-- indicates callback store by fully qualified class "
+"name -->\n"
+" <!-- <attribute name=\"callbackStore\">org.jboss."
+"remoting.CallbackStore</attribute>-->\n"
+" <!-- indicates callback store by object name -->\n"
+" <!-- \n"
+" <attribute name=\"callbackStore\">\n"
+" jboss.remoting:service=CallbackStore,type=Serializable\n"
+" </attribute> \n"
+" -->\n"
+" <!-- config params for callback store. if were declaring "
+"callback store via object name, -->\n"
+" <!-- could have specified these config params there. --"
+">\n"
+" <!-- StoreFilePath indicates to which directory to write "
+"the callback objects. -->\n"
+" <!-- The default value is the property value of 'jboss."
+"server.data.dir' and \n"
+" if this is not set, -->\n"
+" <!-- then will be 'data'. Will then append 'remoting' and "
+"the callback client's session id. -->\n"
+" <!-- An example would be 'data\\remoting\\5c4o05l-9jijyx-"
+"e5b6xyph-1-e5b6xyph-2'. -->\n"
+" <!-- <attribute name=\"StoreFilePath\">callback</"
+"attribute>-->\n"
+" <!-- StoreFileSuffix indicates the file suffix to use \n"
+" for the callback objects written to disk. -->\n"
+" <!-- The default value for file suffix is 'ser'. -->\n"
+" <!-- <attribute name=\"StoreFileSuffix\">cst</"
+"attribute>-->\n"
+" </invoker>\n"
+"\n"
+" <!-- At least one handler is required by the connector. If "
+"have more than one, must decalre -->\n"
+" <!-- different subsystem values. Otherwise, all invocations "
+"will be routed to the only one -->\n"
+" <!-- that is declared. -->\n"
+" <handlers>\n"
+" <!-- can also specify handler by fully qualified classname "
+"-->\n"
+" <handler subsystem=\"invoker\">jboss:service=invoker,"
+"type=unified</handler>\n"
+" </handlers>\n"
+" </config>\n"
+" </attribute>\n"
+" <depends>jboss.remoting:service=NetworkRegistry</depends>\n"
+" </mbean>\n"
+"</programlisting> and add the following in it's place:"
+msgstr ""
+
+#. Tag: programlisting
+#: J2EE_Security_On_JBOSS.xml:2006
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.remoting.transport.Connector\"\n"
+" xmbean-dd=\"org/jboss/remoting/transport/Connector.xml\"\n"
+" name=\"jboss.remoting:service=Connector,transport=sslsocket\"> \n"
+" display-name=\"SSL Socket transport Connector\">\n"
+"\n"
+" <attribute name=\"Configuration\">\n"
+" <config>\n"
+" <invoker transport=\"sslsocket\">\n"
+" <attribute name=\"serverSocketFactory\">\n"
+" jboss.remoting:service=ServerSocketFactory,type=SSL\n"
+" </attribute>\n"
+" <attribute name=\"serverBindAddress\">${jboss.bind."
+"address}</attribute>\n"
+" <attribute name=\"serverBindPort\">3843</"
+"attribute>\n"
+" </invoker>\n"
+" <handlers>\n"
+" <handler subsystem=\"invoker\">jboss:service=invoker,"
+"type=unified</handler> \n"
+" </handlers>\n"
+" </config>\n"
+" </attribute>\n"
+" <!--If you specify the keystore and password in the command line and "
+"you're \n"
+" not using the custom ServerSocketFactory, you should take out the "
+"following line-->\n"
+" <depends>jboss.remoting:service=ServerSocketFactory,type=SSL</"
+"depends>\n"
+" <depends>jboss.remoting:service=NetworkRegistry</depends>\n"
+" </mbean>"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2011
+#, no-c-format
+msgid "This is similar to the steps described for EJB3."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2019
+#, no-c-format
+msgid "Configuring JBoss for use Behind a Firewall"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2020
+#, no-c-format
+msgid ""
+"JBoss comes with many socket based services that open listening ports. In "
+"this section we list the services that open ports that might need to be "
+"configured to work when accessing JBoss behind a firewall. The following "
+"table shows the ports, socket type, associated service for the services in "
+"the default configuration file set. <xref linkend="
+"\"Configuring_JBoss_for_use_Behind_a_Firewall-"
+"Additional_ports_in_the_all_configuration\"/> shows the same information for "
+"the additional ports that exist in the all configuration file set."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2024
+#, fuzzy, no-c-format
+msgid "The ports found in the default configuration"
+msgstr "The JBoss AS installer configuration sets"
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2031 J2EE_Security_On_JBOSS.xml:2170
+#, no-c-format
+msgid "Port"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2034 J2EE_Security_On_JBOSS.xml:2173
+#, no-c-format
+msgid "Type"
+msgstr "Type"
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2037 J2EE_Security_On_JBOSS.xml:2176
+#, fuzzy, no-c-format
+msgid "Service"
+msgstr "HTTP 服务"
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2040 J2EE_Security_On_JBOSS.xml:2179
+#, no-c-format
+msgid "Notes"
+msgstr "备注"
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2047
+#, no-c-format
+msgid "1098"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2050 J2EE_Security_On_JBOSS.xml:2061
+#: J2EE_Security_On_JBOSS.xml:2072 J2EE_Security_On_JBOSS.xml:2083
+#: J2EE_Security_On_JBOSS.xml:2094 J2EE_Security_On_JBOSS.xml:2105
+#: J2EE_Security_On_JBOSS.xml:2116 J2EE_Security_On_JBOSS.xml:2130
+#: J2EE_Security_On_JBOSS.xml:2141 J2EE_Security_On_JBOSS.xml:2152
+#: J2EE_Security_On_JBOSS.xml:2189 J2EE_Security_On_JBOSS.xml:2200
+#: J2EE_Security_On_JBOSS.xml:2247 J2EE_Security_On_JBOSS.xml:2258
+#: J2EE_Security_On_JBOSS.xml:2269
+#, no-c-format
+msgid "<entry>TCP</entry>"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2054 J2EE_Security_On_JBOSS.xml:2065
+#, fuzzy, no-c-format
+msgid "org.jboss.naming.NamingService"
+msgstr "The org.jboss.naming.NamingContextFactory"
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2058
+#, no-c-format
+msgid "1099"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2069
+#, no-c-format
+msgid "3873"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2075
+#, no-c-format
+msgid "<literal>org.jboss.remoting.transport.Connector</literal> (EJB3)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2080
+#, no-c-format
+msgid "4444"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2087
+#, no-c-format
+msgid "org.jboss.invocation.jrmp.server.JRMPInvoker"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2091
+#, no-c-format
+msgid "4445"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2098
+#, no-c-format
+msgid "org.jboss.invocation.pooled.server.PooledInvoker"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2102
+#, no-c-format
+msgid "4446"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2108
+#, no-c-format
+msgid ""
+"<literal>org.jboss.remoting.transport.Connector</literal> (UnifiedInvoker)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2113
+#, no-c-format
+msgid "4457"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2119
+#, no-c-format
+msgid "<literal>org.jboss.remoting.transport.Connector</literal> (Messaging)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2122
+#, no-c-format
+msgid ""
+"Plus one additional anonymous TCP port. You can specify fixed port number "
+"via the secondaryBindPort parameter in the <filename>deploy/jboss-messaging."
+"sar/remoting-bisocket-service.xml</filename> file."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2127
+#, no-c-format
+msgid "8009"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2134 J2EE_Security_On_JBOSS.xml:2145
+#, no-c-format
+msgid "org.jboss.web.tomcat.service.JBossWeb"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2138
+#, no-c-format
+msgid "8080"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2149
+#, no-c-format
+msgid "8083"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2156
+#, no-c-format
+msgid "org.jboss.web.WebService"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2163
+#, fuzzy, no-c-format
+msgid "Additional ports in the all configuration"
+msgstr "A virtual host configuration."
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2186
+#, no-c-format
+msgid "1100"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2193 J2EE_Security_On_JBOSS.xml:2204
+#: J2EE_Security_On_JBOSS.xml:2215
+#, no-c-format
+msgid "org.jboss.ha.jndi.HANamingService"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2197
+#, no-c-format
+msgid "1101"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2208
+#, no-c-format
+msgid "1102"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2211 J2EE_Security_On_JBOSS.xml:2222
+#: J2EE_Security_On_JBOSS.xml:2236 J2EE_Security_On_JBOSS.xml:2283
+#: J2EE_Security_On_JBOSS.xml:2297 J2EE_Security_On_JBOSS.xml:2311
+#: J2EE_Security_On_JBOSS.xml:2325 J2EE_Security_On_JBOSS.xml:2336
+#: J2EE_Security_On_JBOSS.xml:2350
+#, no-c-format
+msgid "<entry>UDP</entry>"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2219
+#, no-c-format
+msgid "1161"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2226
+#, no-c-format
+msgid "org.jboss.jmx.adaptor.snmp.agent.SnmpAgentService"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2228
+#, no-c-format
+msgid ""
+"Plus one additional anonymous UDP port which does not support configuration "
+"the port."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2233
+#, no-c-format
+msgid "1162"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2240
+#, no-c-format
+msgid "org.jboss.jmx.adaptor.snmp.trapd.TrapdService"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2244
+#, no-c-format
+msgid "3528"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2251
+#, no-c-format
+msgid "org.jboss.invocation.iiop.IIOPInvoker"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2255
+#, no-c-format
+msgid "4447"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2262
+#, no-c-format
+msgid "org.jboss.invocation.jrmp.server.JRMPInvokerHA"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2266
+#, no-c-format
+msgid "7900"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2272
+#, no-c-format
+msgid ""
+"<literal>org.jboss.messaging.core.jmx.MessagingPostOfficeService</literal> "
+"(Messaging, DataChannel)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2275
+#, no-c-format
+msgid ""
+"Plus one additional anonymous TCP port. It can be set using the FD_SOCK."
+"start_port parameter."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2280
+#, no-c-format
+msgid "43333"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2286
+#, no-c-format
+msgid "<literal>org.jboss.cache.TreeCache</literal> (EJB3Entity)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2289 J2EE_Security_On_JBOSS.xml:2303
+#: J2EE_Security_On_JBOSS.xml:2317 J2EE_Security_On_JBOSS.xml:2342
+#: J2EE_Security_On_JBOSS.xml:2356
+#, no-c-format
+msgid ""
+"Plus one additional anonymous UDP port for unicast and one additional "
+"anonymous TCP port. The UDP port can be set using the rcv_port parameter and "
+"the TCP port can be set using the FD_SOCK.start_port parameter."
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2294
+#, no-c-format
+msgid "45551"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2300
+#, no-c-format
+msgid "<literal>org.jboss.cache.TreeCache</literal> (EJB3SFSB)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2308
+#, no-c-format
+msgid "45566"
+msgstr ""
+
+#. Tag: literal
+#: J2EE_Security_On_JBOSS.xml:2315
+#, no-c-format
+msgid "org.jboss.ha.framework.server.ClusterPartition"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2322
+#, no-c-format
+msgid "45567"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2328
+#, no-c-format
+msgid ""
+"<literal>org.jboss.messaging.core.jmx.MessagingPostOfficeService</literal> "
+"(Messaging, DataChannel MPING)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2333
+#, no-c-format
+msgid "45568"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2339
+#, no-c-format
+msgid ""
+"<literal>org.jboss.messaging.core.jmx.MessagingPostOfficeService</literal> "
+"(Messaging, ControlChannel)"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2347
+#, no-c-format
+msgid "45577"
+msgstr ""
+
+#. Tag: entry
+#: J2EE_Security_On_JBOSS.xml:2353
+#, no-c-format
+msgid "<literal>org.jboss.cache.TreeCache</literal> (JBossWebCluster)"
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2366
+#, no-c-format
+msgid "How to Secure the JBoss Server"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2367
+#, no-c-format
+msgid ""
+"JBoss comes with several admin access points that need to be secured or "
+"removed to prevent unauthorized access to administrative functions in a "
+"deployment. This section describes the various admin services and how to "
+"secure them."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2371
+#, fuzzy, no-c-format
+msgid "The JMX Console"
+msgstr "Securing the JMX Console"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2372
+#, no-c-format
+msgid ""
+"The <literal>jmx-console.war</literal> found in the deploy directory "
+"provides an html view into the JMX microkernel. As such, it provides access "
+"to arbitrary admin type access like shutting down the server, stopping "
+"services, deploying new services, etc. It should either be secured like any "
+"other web application, or removed."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2378
+#, no-c-format
+msgid "The Web Console"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2379
+#, no-c-format
+msgid ""
+"The <literal>web-console.war</literal> found in the <literal>deploy/"
+"management</literal> directory is another web application view into the JMX "
+"microkernel. This uses a combination of an applet and a HTML view and "
+"provides the same level of access to admin functionality as the <literal>jmx-"
+"console.war</literal>. As such, it should either be secured or removed. The "
+"<literal>web-console.war</literal> contains commented out templates for "
+"basic security in its <literal>WEB-INF/web.xml</literal> as well as "
+"commented out setup for a security domain in <literal>WEB-INF/jboss-web.xml</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2385
+#, no-c-format
+msgid "The HTTP Invokers"
+msgstr ""
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2386
+#, no-c-format
+msgid ""
+"The <literal>http-invoker.sar</literal> found in the deploy directory is a "
+"service that provides RMI/HTTP access for EJBs and the JNDI <literal>Naming</"
+"literal> service. This includes a servlet that processes posts of marshalled "
+"<literal>org.jboss.invocation.Invocation</literal> objects that represent "
+"invocations that should be dispatched onto the <literal>MBeanServer</"
+"literal>. Effectively this allows access to MBeans that support the detached "
+"invoker operation via HTTP since one could figure out how to format an "
+"appropriate HTTP post. To security this access point you would need to "
+"secure the <literal>JMXInvokerServlet</literal> servlet found in the "
+"<literal>http-invoker.sar/invoker.war/WEB-INF/web.xml</literal> descriptor. "
+"There is a secure mapping defined for the <literal>/restricted/"
+"JMXInvokerServlet</literal> path by default, one would simply have to remove "
+"the other paths and configure the <literal>http-invoker</literal> security "
+"domain setup in the <literal>http-invoker.sar/invoker.war/WEB-INF/jboss-web."
+"xml</literal> descriptor."
+msgstr ""
+
+#. Tag: title
+#: J2EE_Security_On_JBOSS.xml:2392
+#, fuzzy, no-c-format
+msgid "The JMX Invoker"
+msgstr "The JBoss JMX Microkernel"
+
+#. Tag: para
+#: J2EE_Security_On_JBOSS.xml:2393
+#, no-c-format
+msgid ""
+"The <literal>jmx-invoker-adaptor-server.sar</literal> is a service that "
+"exposes the JMX MBeanServer interface via an RMI compatible interface using "
+"the RMI/JRMP detached invoker service. The only way for this service to be "
+"secured currently would be to switch the protocol to RMI/HTTP and secure the "
+"<literal>http-invoker.sar</literal> as described in the previous section. In "
+"the future this service will be deployed as an XMBean with a security "
+"interceptor that supports role based access checks."
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Naming.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Naming.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Naming.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,4654 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Naming.xml:6
+#, no-c-format
+msgid "Naming on JBoss"
+msgstr "Naming on JBoss"
+
+#. Tag: subtitle
+#: Naming.xml:7
+#, no-c-format
+msgid "The JNDI Naming Service"
+msgstr "JNDI 命名服务"
+
+#. Tag: para
+#: Naming.xml:8
+#, no-c-format
+msgid ""
+"The naming service plays a key role in enterprise Java applications, "
+"providing the core infrastructure that is used to locate objects or services "
+"in an application server. It is also the mechanism that clients external to "
+"the application server use to locate services inside the application server. "
+"Application code, whether it is internal or external to the JBoss instance, "
+"need only know that it needs to talk to the a message queue named "
+"<literal>queue/IncomingOrders</literal> and would not need to worry about "
+"any of the details of how the queue is configured. In a clustered "
+"environment, naming services are even more valuable. A client of a service "
+"would desire to look up the <literal>ProductCatalog</literal> session bean "
+"from the cluster without worrying which machine the service is residing. "
+"Whether it is a big clustered service, a local resource or just a simple "
+"application component that is needed, the JNDI naming service provides the "
+"glue that lets code find the objects in the system by name."
+msgstr ""
+"在企业级应用程序里命名服务充当着很关键的角色,它提供核心的基础结构来定位应用"
+"程序服务器里的对象或服务。它也是外部的客户用来定位应用程序服务器内部的服务的"
+"机制。不管是 JBoss 实例内部还是外部的应用程序代码,只需要和叫 <literal>queue/"
+"IncomingOrders</literal> 的消息队列通信,而不需要担心这个队列的配置细节。在群"
+"集环境里,命名服务甚至更加有价值。某一服务的客户只需要在群集系统里的 "
+"<literal>ProductCatalog</literal> session bean 里进行查找,它不需要担心服务"
+"驻存在哪台机器里。不管是大型的群集服务还是本地资源,甚至是一个简单的应用程序"
+"组件,JNDI2服务都可以让代码依据名字来查找所需的对象。"
+
+#. Tag: title
+#: Naming.xml:12
+#, no-c-format
+msgid "An Overview of JNDI"
+msgstr "JNDI 概述"
+
+#. Tag: para
+#: Naming.xml:13
+#, no-c-format
+msgid ""
+"JNDI is a standard Java API that is bundled with JDK1.3 and higher. JNDI "
+"provides a common interface to a variety of existing naming services: DNS, "
+"LDAP, Active Directory, RMI registry, COS registry, NIS, and file systems. "
+"The JNDI API is divided logically into a client API that is used to access "
+"naming services, and a service provider interface (SPI) that allows the user "
+"to create JNDI implementations for naming services."
+msgstr ""
+"JNDI 是一个标准的 Java API,它和 JDK1.3 以及更高的版本捆绑在一起。JNDI 提 "
+"JNDI 供了现存的命名服务的一个公用接口,如:DNS,LDAP,Active Directory,RMI "
+"registry,COS registry,NIS 和文件系统。JNDI API 从逻辑上分为用来访问命名服务"
+"的客户端 API 和允许用户为命名服务创建2JNDI 实现的服务提供者接口(SPI)。233"
+
+#. Tag: para
+#: Naming.xml:16
+#, no-c-format
+msgid ""
+"The SPI layer is an abstraction that naming service providers must implement "
+"to enable the core JNDI classes to expose the naming service using the "
+"common JNDI client interface. An implementation of JNDI for a naming service "
+"is referred to as a JNDI provider. JBoss naming is an example JNDI "
+"implementation, based on the SPI classes. Note that the JNDI SPI is not "
+"needed by J2EE component developers."
+msgstr ""
+"SPI 层是命名服务提供者必须实现的一个抽象,它启用核心 JNDI 核心类并用公用的 "
+"JNDI 客户接口来开放命名服务。对一个命名服务的 JNDI 实现被称作 JNDI 提供者。"
+"JBoss 命名是 JNDI 实现的一个例子,它基于 SPI 类。请注意 J2EE 组件开发者并不需"
+"要 JNDI SPI。"
+
+#. Tag: para
+#: Naming.xml:19
+#, no-c-format
+msgid ""
+"For a thorough introduction and tutorial on JNDI, which covers both the "
+"client and service provider APIs, see the Sun tutorial at <ulink url="
+"\"http://java.sun.com/products/jndi/tutorial/\"></ulink>."
+msgstr ""
+"要获得 JNDI 的详细介绍和指导,包括客户和服务提供者 APIs,请参看 <ulink url="
+"\"http://java.sun.com/products/jndi/tutorial/\"></ulink> 里的 Sun tutorial。"
+
+#. Tag: para
+#: Naming.xml:22
+#, no-c-format
+msgid ""
+"The main JNDI API package is the <literal>javax.naming</literal> package. It "
+"contains five interfaces, 10 classes, and several exceptions. There is one "
+"key class, <literal>InitialContext</literal>, and two key interfaces, "
+"<literal>Context</literal> and <literal>Name</literal>"
+msgstr ""
+"主要的 JNDI API 包是 <literal>javax.naming</literal>。它包括五个接口,十个类"
+"和几个异常<literal>InitialContext</literal> 是其中的一个关键的类,"
+"<literal>Context</literal> 和 <literal>Name</literal> 是两个关键的接口。"
+
+#. Tag: title
+#: Naming.xml:26
+#, no-c-format
+msgid "Names"
+msgstr "名字"
+
+#. Tag: para
+#: Naming.xml:27
+#, no-c-format
+msgid ""
+"The notion of a name is of fundamental importance in JNDI. The naming system "
+"determines the syntax that the name must follow. The syntax of the naming "
+"system allows the user to parse string representations of names into its "
+"components. A name is used with a naming system to locate objects. In the "
+"simplest sense, a naming system is just a collection of objects with unique "
+"names. To locate an object in a naming system you provide a name to the "
+"naming system, and the naming system returns the object store under the name."
+msgstr ""
+"在 JNDI 里,名字标识是和基础和重要的。命名系统决定了名字必须遵循的句法。命名"
+"系统的句法允许用户将名字字符串分解为不同的部分。名字被用来定位对象。简单来"
+"说,命名系统只是一个有着独特名字的对象的集合。为了定位一个对象,你要提供一个"
+"名字给命名系统,然后命名系统返回以这个名字储存的对象。"
+
+#. Tag: para
+#: Naming.xml:30
+#, fuzzy, no-c-format
+msgid ""
+"As an example, consider the Unix file system's naming convention. Each "
+"file is named from its path relative to the root of the file system, with "
+"each component in the path separated by the forward slash character "
+"(\"<literal>/</literal>\"). The file's path is ordered from left to "
+"right. The pathname<literal>/usr/jboss/readme.txt</literal>, for example, "
+"names a file <literal>readme.txt</literal> in the directory <literal>jboss</"
+"literal>, under the directory <literal>usr</literal>, located in the root of "
+"the file system. JBoss naming uses a UNIX-style namespace as its naming "
+"convention."
+msgstr ""
+"举例来说,让我们看看 Unix 文件系统的命名规则。每个文件都依据文件系统的根目录"
+"的相对路径来命名,路径里的每一部分都用斜杠(\"<literal>/</literal>\")来分隔。"
+"文件路径从左至右排列。例如,<literal>/usr/jboss/readme.txt</literal>,命名了"
+"文件系统的根目录下的目录 <literal>usr</literal> 下的子目录 <literal>jboss</"
+"literal> 里的一个 <literal>readme.txt</literal> 文件。JBoss 命名把 UNIX 风格"
+"的命名空间作为它的命名规则。"
+
+#. Tag: para
+#: Naming.xml:33
+#, no-c-format
+msgid ""
+"The <literal>javax.naming.Name</literal> interface represents a generic name "
+"as an ordered sequence of components. It can be a composite name (one that "
+"spans multiple namespaces), or a compound name (one that is used within a "
+"single hierarchical naming system). The components of a name are numbered. "
+"The indexes of a name with N components range from 0 up to, but not "
+"including, N. The most significant component is at index 0. An empty name "
+"has no components."
+msgstr ""
+"<literal>javax.naming.Name</literal> 接口把名字描述为名字各部分的一种排列次"
+"序。它可以是一个 composite name (跨越多个命名空间),或者是 compound name (在"
+"单一分层的命名空间里使用)。名字的每个部分都是数字化的。有 N 个部分的名字的索"
+"引从 0 开始,但不包括 N。索引为 0 的是最重要的部分。空名字不包含任何内容。"
+
+#. Tag: para
+#: Naming.xml:36
+#, no-c-format
+msgid ""
+"A composite name is a sequence of component names that span multiple "
+"namespaces. An example of a composite name would be the hostname and file "
+"combination commonly used with UNIX commands like <literal>scp</literal>. "
+"For example, the following command copies <literal>localfile.txt</literal> "
+"to the file <literal>remotefile.txt</literal> in the <literal>tmp</literal> "
+"directory on host <literal>ahost.someorg.org</literal>:"
+msgstr ""
+"composite name 是跨越多个命名空间的各部分的名字的序列。composite name 的一个"
+"例子就是 UNIX 命令如 <literal>scp</literal> 经常使用的主机和文件名的组合。例"
+"如,下面的命令把 <literal>localfile.txt</literal> 复制为主机 <literal>ahost."
+"someorg.org</literal> 的 <literal>tmp</literal> 目录下的 <literal>remotefile."
+"txt</literal>。"
+
+#. Tag: programlisting
+#: Naming.xml:39
+#, no-c-format
+msgid "scp localfile.txt ahost.someorg.org:/tmp/remotefile.txt"
+msgstr "scp localfile.txt ahost.someorg.org:/tmp/remotefile.txt"
+
+#. Tag: para
+#: Naming.xml:40
+#, no-c-format
+msgid ""
+"A compound name is derived from a hierarchical namespace. Each component in "
+"a compound name is an atomic name, meaning a string that cannot be parsed "
+"into smaller components. A file pathname in the UNIX file system is an "
+"example of a compound name. <literal>ahost.someorg.org:/tmp/remotefile.txt</"
+"literal> is a composite name that spans the DNS and UNIX file system "
+"namespaces. The components of the composite name are <literal>ahost.someorg."
+"org</literal> and <literal>/tmp/remotefile.txt</literal>. A component is a "
+"string name from the namespace of a naming system. If the component comes "
+"from a hierarchical namespace, that component can be further parsed into its "
+"atomic parts by using the <literal>javax.naming.CompoundName</literal> "
+"class. The JNDI API provides the <literal>javax.naming.CompositeName</"
+"literal> class as the implementation of the <literal>Name</literal> "
+"interface for composite names."
+msgstr ""
+"compound name 来源于一个分层的命名空间。compound name 里每一部分都是一个原子"
+"名(atomic name),这意味着这个字符串不能再分割为更小的部分。UNIX 文件系统里的"
+"文件路径名是 compound name 的一个例子。<literal>ahost.someorg.org:/tmp/"
+"remotefile.txt</literal> 是一个 composite name,它跨越了 DNS 和 UNIX 文件系统"
+"命名空间。这个 composite name 的几部分分别是 <literal>ahost.someorg.org</"
+"literal> 和 <literal>/tmp/remotefile.txt</literal>。每个部分都是命名系统里的"
+"命名空间的一个字符串名。如果这个部分来源于一个分层的命名空间,那么它可以用 "
+"<literal>javax.naming.CompoundName</literal> 类进一步分解为原子部件(atomic "
+"parts)。JNDI API 提供 <literal>javax.naming.CompositeName</literal> 类来作为 "
+"composite name 的 <literal>Name</literal> 接口的实现。"
+
+#. Tag: title
+#: Naming.xml:46
+#, no-c-format
+msgid "Contexts"
+msgstr "上下文"
+
+#. Tag: para
+#: Naming.xml:47
+#, no-c-format
+msgid ""
+"The <literal>javax.naming.Context</literal> interface is the primary "
+"interface for interacting with a naming service. The <literal>Context</"
+"literal> interface represents a set of name-to-object bindings. Every "
+"context has an associated naming convention that determines how the context "
+"parses string names into <literal>javax.naming.Name</literal> instances. To "
+"create a name to object binding you invoke the bind method of a "
+"<literal>Context</literal> and specify a name and an object as arguments. "
+"The object can later be retrieved using its name using the <literal>Context</"
+"literal> lookup method. A <literal>Context</literal> will typically provide "
+"operations for binding a name to an object, unbinding a name, and obtaining "
+"a listing of all name-to-object bindings. The object you bind into a "
+"<literal>Context</literal> can itself be of type <literal>Context</"
+"literal> . The <literal>Context</literal> object that is bound is referred "
+"to as a subcontext of the <literal>Context</literal> on which the bind "
+"method was invoked."
+msgstr ""
+"<literal>javax.naming.Context</literal> 接口是和命名服务相互作用的主要接口。"
+"<literal>Context</literal> 接口代表从名字到对象(name-to-object)绑定的集合。每"
+"个 context 都有关联的命名规则来决定怎样把名字字符串解析成 <literal>javax."
+"naming.Name</literal> 实例。你需要调用 <literal>Context</literal> 的 bind 方"
+"法并指定名字和对象参数来创建名字到对象的绑定。之后这个对象就可以用 "
+"<literal>Context</literal> lookup 方法根据它的名字来获取。<literal>Context</"
+"literal> 通常将提供把名字绑定到对象,将名字松绑(unbinding)和获得名字到对象绑"
+"定的列表等操作。你绑定到 <literal>Context</literal> 里的对象也可以是 "
+"<literal>Context</literal> 类型。所绑定的 <literal>Context</literal> 对象被称"
+"作调用 bind 方法的 <literal>Context</literal> 的 subcontext。"
+
+#. Tag: para
+#: Naming.xml:50
+#, no-c-format
+msgid ""
+"As an example, consider a file directory with a pathname <literal>/usr</"
+"literal>, which is a context in the UNIX file system. A file directory named "
+"relative to another file directory is a subcontext (commonly referred to as "
+"a subdirectory). A file directory with a pathname <literal>/usr/jboss</"
+"literal> names a <literal>jboss</literal> context that is a subcontext of "
+"<literal>usr</literal>. In another example, a DNS domain, such as "
+"<literal>org</literal>, is a context. A DNS domain named relative to another "
+"DNS domain is another example of a subcontext. In the DNS domain "
+"<literal>jboss.org</literal>, the DNS domain <literal>jboss</literal> is a "
+"subcontext of <literal>org</literal> because DNS names are parsed right to "
+"left."
+msgstr ""
+"例如,让我们看看 <literal>/usr</literal> 目录,它是 UNIX 文件系统里的一个上下"
+"文(context)。相对于另外一个目录来命名的目录称作子上下文(subcontext,通常被称"
+"为子目录)。路径名为 <literal>/usr/jboss</literal> 的目录命名了作为 "
+"<literal>usr</literal> 的子上下文的 <literal>jboss</literal> 上下文。另外一个"
+"例子是 DNS 域名,如 <literal>org</literal>,也是一个上下文。那么相对于另外一"
+"个 DNS 域名命名的 DNS 域名就是子上下文。在 DNS 域名 literal>jboss.org</"
+"literal> 里,DNS 域名 <literal>jboss</literal> 是 <literal>org</literal> 的"
+"子上下文,这是因为 DNS 域名是从右至左进行解析的。"
+
+#. Tag: title
+#: Naming.xml:54
+#, no-c-format
+msgid "Obtaining a Context using InitialContext"
+msgstr "用 InitialContext 获取 Context "
+
+#. Tag: para
+#: Naming.xml:55
+#, no-c-format
+msgid ""
+"All naming service operations are performed on some implementation of the "
+"<literal>Context</literal> interface. Therefore, you need a way to obtain a "
+"<literal>Context</literal> for the naming service you are interested in "
+"using. The <literal>javax.naming.IntialContext</literal> class implements "
+"the <literal>Context</literal> interface, and provides the starting point "
+"for interacting with a naming service."
+msgstr ""
+"所有命名服务的操作都由 <literal>Context</literal> 接口的某种实现来执行。因"
+"此,你需要获得你感兴趣的命名服务的 <literal>Context</literal>。"
+"<literal>javax.naming.IntialContext</literal> 类实现了 <literal>Context</"
+"literal> 接口,它提供与命名服务相互作用的一个起点。"
+
+#. Tag: para
+#: Naming.xml:58
+#, fuzzy, no-c-format
+msgid ""
+"When you create an <literal>InitialContext</literal>, it is initialized with "
+"properties from the environment. JNDI determines each property's value "
+"by merging the values from the following two sources, in order."
+msgstr ""
+"当你创建一个 <literal>InitialContext</literal> 时,它将用系统环境里的属性进行"
+"初始化。JNDI 通过合并下面两个来源的值来按顺序决定每一个属性值。"
+
+#. Tag: para
+#: Naming.xml:63
+#, fuzzy, no-c-format
+msgid ""
+"The first occurrence of the property from the constructor's environment "
+"parameter and (for appropriate properties) the applet parameters and system "
+"properties."
+msgstr "构造函数的环境参数和(对合适的属性而言) applet 参数以及系统属性。"
+
+#. Tag: para
+#: Naming.xml:68
+#, no-c-format
+msgid ""
+"All <literal>jndi.properties</literal> resource files found on the classpath."
+msgstr ""
+"在 classpath 上发现的所有 <literal>jndi.properties</literal> 资源文件。"
+
+#. Tag: para
+#: Naming.xml:73
+#, fuzzy, no-c-format
+msgid ""
+"For each property found in both of these two sources, the property's "
+"value is determined as follows. If the property is one of the standard JNDI "
+"properties that specify a list of JNDI factories, all of the values are "
+"concatenated into a single colon-separated list. For other properties, only "
+"the first value found is used. The preferred method of specifying the JNDI "
+"environment properties is through a <literal>jndi.properties</literal> file, "
+"which allows your code to externalize the JNDI provider specific information "
+"so that changing JNDI providers will not require changes to your code or "
+"recompilation."
+msgstr ""
+"对于这两个来源里发现的每一个属性,其属性值由以下决定。如果这个属性是指定 "
+"JNDI 工厂(factories)的列表的标准 JNDI 属性之一,所有的值都连成一个用冒号隔开"
+"的列表。对于其他属性,只使用第一个被发现的值。指定 JNDI 环境属性的首选方法是"
+"通过 <literal>jndi.properties</literal> 文件,它允许你的代码独立于与 JNDI 提"
+"供者相关的信息,这样当修改 JNDI 提供者时,你将不需要修改代码或者重新编译。"
+
+#. Tag: para
+#: Naming.xml:76
+#, no-c-format
+msgid ""
+"The <literal>Context</literal> implementation used internally by the "
+"<literal>InitialContext</literal> class is determined at runtime. The "
+"default policy uses the environment property <literal>java.naming.factory."
+"initial</literal>, which contains the class name of the <literal>javax."
+"naming.spi.InitialContextFactory</literal> implementation. You obtain the "
+"name of the <literal>InitialContextFactory</literal> class from the naming "
+"service provider you are using."
+msgstr ""
+"<literal>InitialContext</literal> 类内部使用的 <literal>Context</literal> 实"
+"现是在运行时决定的。缺省策略是使用环境属性 <literal>java.naming.factory."
+"initial</literal>,它包含 <literal>javax.naming.spi.InitialContextFactory</"
+"literal> 实现的类名。你从你正使用的服务提供者获得 "
+"<literal>InitialContextFactory</literal> 类的名字。"
+
+#. Tag: para
+#: Naming.xml:79
+#, no-c-format
+msgid ""
+"gives a sample <literal>jndi.properties</literal> file a client application "
+"would use to connect to a JBossNS service running on the local host at port "
+"1099. The client application would need to have the <literal>jndi."
+"properties</literal> file available on the application classpath. These are "
+"the properties that the JBossNS JNDI implementation requires. Other JNDI "
+"providers will have different properties and values."
+msgstr ""
+"给出了一个样本 <literal>jndi.properties</literal> 文件,客户应用程序将用它来"
+"连接在本机端口 1099 运行的 JBossNS 服务。这个客户应用程序将需要设置 "
+"classpath 使 <literal>jndi.properties</literal> 文件可用。这个文件里的是 "
+"JBossNS JNDI 实现所要求的属性。其他 JNDI 提供者会有不同的属性和值。"
+
+#. Tag: title
+#: Naming.xml:82
+#, no-c-format
+msgid "A sample jndi.properties file"
+msgstr "A sample jndi.properties file"
+
+#. Tag: programlisting
+#: Naming.xml:83
+#, no-c-format
+msgid ""
+"### JBossNS properties\n"
+"java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory\n"
+"java.naming.provider.url=jnp://localhost:1099\n"
+"java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"
+msgstr ""
+"### JBossNS properties\n"
+"java.naming.factory.initial=org.jnp.interfaces.NamingContextFactory\n"
+"java.naming.provider.url=jnp://localhost:1099\n"
+"java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"
+
+#. Tag: title
+#: Naming.xml:92
+#, no-c-format
+msgid "The JBossNS Architecture"
+msgstr "JBossNS 架构"
+
+#. Tag: para
+#: Naming.xml:93
+#, fuzzy, no-c-format
+msgid ""
+"The JBossNS architecture is a Java socket/RMI based implementation of the "
+"<literal>javax.naming.Context</literal> interface. It is a client/server "
+"implementation that can be accessed remotely. The implementation is "
+"optimized so that access from within the same VM in which the JBossNS server "
+"is running does not involve sockets. Same VM access occurs through an object "
+"reference available as a global singleton. <xref linkend="
+"\"The_JBossNS_Architecture-Key_components_in_the_JBossNS_architecture.\"/> "
+"illustrates some of the key classes in the JBossNS implementation and their "
+"relationships."
+msgstr ""
+"JBossNS 架构是一个基于 Java socket/RMI 的 <literal>javax.naming.Context</"
+"literal> 接口的应用。它是一个可以远程访问的客户端/服务器实现。这个实现进行了"
+"优化,使得 JBossNS 服务器运行的同一 VM 内的访问不需要调用套接字。同一 VM 内的"
+"访问通过一个作为全局 singleton 的可用的对象引用来实现。<xref linkend=\"ch3."
+"jbossns.fig\"/> 说明了 JBossNS 实现里的一些关键类和它们的关系。"
+
+#. Tag: title
+#: Naming.xml:97
+#, no-c-format
+msgid "Key components in the JBossNS architecture."
+msgstr "JBossNS 架构里的关键组件。"
+
+#. Tag: para
+#: Naming.xml:104
+#, no-c-format
+msgid ""
+"We will start with the <literal>NamingService</literal> MBean. The "
+"<literal>NamingService</literal> MBean provides the JNDI naming service. "
+"This is a key service used pervasively by the J2EE technology components. "
+"The configurable attributes for the <literal>NamingService</literal> are as "
+"follows."
+msgstr ""
+"我们将从 <literal>NamingService</literal> MBean 开始。"
+"<literal>NamingService</literal> MBean 提供 JNDI 命名服务。它是 J2EE 组件普遍"
+"使用的一个关键服务。下面是 <literal>NamingService</literal> 的可配置属性。"
+
+#. Tag: para
+#: Naming.xml:109
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Port</emphasis>: The jnp protocol listening port for "
+"the <literal>NamingService</literal>. If not specified default is 1099, the "
+"same as the RMI registry default port."
+msgstr ""
+"<emphasis role=\"bold\">Port</emphasis>:<literal>NamingService</literal> 的 "
+"JNP 协议侦听端口。如果没有指定,它的缺省值为 1099,和 RMI registry 的缺省端口"
+"相同。"
+
+#. Tag: para
+#: Naming.xml:114
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RmiPort</emphasis>: The RMI port on which the RMI "
+"Naming implementation will be exported. If not specified the default is 0 "
+"which means use any available port."
+msgstr ""
+"<emphasis role=\"bold\">RmiPort</emphasis>:RMI 命名实现被输出的 RMI 端口。如"
+"果没有指定,它的缺省值是 0,表示使用任何可用端口。"
+
+#. Tag: para
+#: Naming.xml:119
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">BindAddress</emphasis>: The specific address the "
+"<literal>NamingService</literal> listens on. This can be used on a multi-"
+"homed host for a <literal>java.net.ServerSocket</literal> that will only "
+"accept connect requests on one of its addresses."
+msgstr ""
+"<emphasis role=\"bold\">BindAddress</emphasis>:<literal>NamingService</"
+"literal> 侦听的特定地址。它可以用在多宿主主机上,使用只接受其中一个地址的连接"
+"请求的 <literal>java.net.ServerSocket</literal>。"
+
+#. Tag: para
+#: Naming.xml:124
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RmiBindAddress</emphasis>: The specific address the "
+"RMI server portion of the <literal>NamingService</literal> listens on. This "
+"can be used on a multi-homed host for a <literal>java.net.ServerSocket</"
+"literal> that will only accept connect requests on one of its addresses. If "
+"this is not specified and the <literal>BindAddress</literal> is, the "
+"<literal>RmiBindAddress</literal> defaults to the <literal>BindAddress</"
+"literal> value."
+msgstr ""
+"<emphasis role=\"bold\">RmiBindAddress</emphasis>:<literal>NamingService</"
+"literal> 的 RMI 服务器侦听的特定地址。它可以用在多宿主主机上,使用只接受其中"
+"一个地址的连接请求的 <literal>java.net.ServerSocket</literal>。如果它没有被指"
+"定而 <literal>BindAddress</literal> 被指指定,<literal>RmiBindAddress</"
+"literal> 将缺省使用 <literal>BindAddress</literal> 的值。"
+
+#. Tag: para
+#: Naming.xml:129
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Backlog</emphasis>: The maximum queue length for "
+"incoming connection indications (a request to connect) is set to the "
+"<literal>backlog</literal> parameter. If a connection indication arrives "
+"when the queue is full, the connection is refused."
+msgstr ""
+"<emphasis role=\"bold\">Backlog</emphasis>:<literal>backlog</literal> 参数指"
+"定进来的连接指示(连接请求)的最大队列长度。如果在连接指示到达时,队列已经满"
+"了,这个连接将被拒绝。"
+
+#. Tag: para
+#: Naming.xml:134
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ClientSocketFactory</emphasis>: An optional custom "
+"<literal>java.rmi.server.RMIClientSocketFactory</literal> implementation "
+"class name. If not specified the default <literal>RMIClientSocketFactory</"
+"literal> is used."
+msgstr ""
+"<emphasis role=\"bold\">ClientSocketFactory</emphasis>:可选的自定义 "
+"<literal>java.rmi.server.RMIClientSocketFactory</literal> 实现的类名。如果它"
+"没有指定,将使用缺省的 <literal>RMIClientSocketFactory</literal>。"
+
+#. Tag: para
+#: Naming.xml:139
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ServerSocketFactory</emphasis>: An optional custom "
+"<literal>java.rmi.server.RMIServerSocketFactory</literal> implementation "
+"class name. If not specified the default <literal>RMIServerSocketFactory</"
+"literal> is used."
+msgstr ""
+"<literal>RMIClientSocketFactory</literal>:可选的自定义 <literal>java.rmi."
+"server.RMIServerSocketFactory</literal> 实现的类名。如果它没有指定,将使用缺"
+"省的 <literal>RMIServerSocketFactory</literal>。"
+
+#. Tag: para
+#: Naming.xml:144
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JNPServerSocketFactory</emphasis>: An optional "
+"custom <literal>javax.net.ServerSocketFactory</literal> implementation class "
+"name. This is the factory for the <literal>ServerSocket</literal> used to "
+"bootstrap the download of the JBossNS <literal>Naming</literal> interface. "
+"If not specified the <literal>javax.net.ServerSocketFactory.getDefault()</"
+"literal> method value is used."
+msgstr ""
+"<emphasis role=\"bold\">JNPServerSocketFactory</emphasis>:可选的自定义 "
+"<literal>javax.net.ServerSocketFactory</literal> 实现的类名。它是 "
+"<literal>ServerSocket</literal> 用来引导 JBossNS <literal>Naming</literal> 接"
+"口下载的工厂(factory)。它如果没有被指定,将使用 <literal>javax.net."
+"ServerSocketFactory.getDefault()</literal> 方法的值。"
+
+#. Tag: para
+#: Naming.xml:149
+#, no-c-format
+msgid ""
+"The <literal>NamingService</literal> also creates the <literal>java:comp</"
+"literal> context such that access to this context is isolated based on the "
+"context class loader of the thread that accesses the <literal>java:comp</"
+"literal> context. This provides the application component private ENC that "
+"is required by the J2EE specs. This segregation is accomplished by binding a "
+"<literal>javax.naming.Reference</literal> to a context that uses the "
+"<literal>org.jboss.naming.ENCFactory</literal> as its <literal>javax.naming."
+"ObjectFactory</literal>. When a client performs a lookup of <literal>java:"
+"comp</literal>, or any subcontext, the <literal>ENCFactory</literal> checks "
+"the thread context <literal>ClassLoader</literal>, and performs a lookup "
+"into a map using the <literal>ClassLoader</literal> as the key."
+msgstr ""
+"<literal>NamingService</literal> 也创建 <literal>java:comp</literal> 上下文,"
+"基于访问 <literal>java:comp</literal> 上下文的线程的 context class loader,对"
+"这个上下文的访问被隔离。这提供了 J2EE 规格要求的应用程序组件私有 ENC。这种隔"
+"离是通过绑定 <literal>javax.naming.Reference</literal> 到把 <literal>org."
+"jboss.naming.ENCFactory</literal> 作为 <literal>javax.naming.ObjectFactory</"
+"literal> 使用的上下文里来完成的。当客户执行一个 <literal>java:comp</literal> "
+"查找,或任何 subcontext,<literal>ENCFactory</literal> 会检查 thread context "
+"<literal>ClassLoader</literal>,并执行一个在把 <literal>ClassLoader</"
+"literal> 用作键值的映射里的查找。"
+
+#. Tag: para
+#: Naming.xml:152
+#, fuzzy, no-c-format
+msgid ""
+"If a context instance does not exist for the class loader instance, one is "
+"created and associated with that class loader in the <literal>ENCFactory</"
+"literal> map. Thus, correct isolation of an application component's ENC "
+"relies on each component receiving a unique <literal>ClassLoader</literal> "
+"that is associated with the component threads of execution."
+msgstr ""
+"如果这个类加载器实例的上下文实例不存在,将创建一个上下文实例并和 "
+"<literal>ENCFactory</literal> 映射里的类加载器关联。因此,应用程序组件的 ENC "
+"的正确隔离依赖于每个组件都接收一个独立的与组件执行线程关联的 "
+"<literal>ClassLoader</literal>。"
+
+#. Tag: para
+#: Naming.xml:155
+#, no-c-format
+msgid ""
+"The <literal>NamingService</literal> delegates its functionality to an "
+"<literal>org.jnp.server.Main</literal> MBean. The reason for the duplicate "
+"MBeans is because JBossNS started out as a stand-alone JNDI implementation, "
+"and can still be run as such. The <literal>NamingService</literal> MBean "
+"embeds the <literal>Main</literal> instance into the JBoss server so that "
+"usage of JNDI with the same VM as the JBoss server does not incur any socket "
+"overhead. The configurable attributes of the NamingService are really the "
+"configurable attributes of the JBossNS <literal>Main</literal> MBean. The "
+"setting of any attributes on the <literal>NamingService</literal> MBean "
+"simply set the corresponding attributes on the <literal>Main</literal> MBean "
+"the <literal>NamingService</literal> contains. When the "
+"<literal>NamingService</literal> is started, it starts the contained "
+"<literal>Main</literal> MBean to activate the JNDI naming service."
+msgstr ""
+"<literal>NamingService</literal> 把它的功能委托给一个 <literal>org.jnp."
+"server.Main</literal> MBean。使用双重 MBean 的的原因是 JBossNS 虽以独立的 "
+"JNDI 实现开始,但它也可以象这样来运行。<literal>NamingService</literal> "
+"MBean 把 <literal>Main</literal> 实例嵌入到 JBoss 服务器里,所以对同一 VM 的 "
+"JNDI 使用并不会造成任何套接字的开销。NamingService 的可配置属性其实是 "
+"JBossNS <literal>Main</literal> MBean 的可配置属性。对 "
+"<literal>NamingService</literal> MBean 的任何属性的设置简单地设置了 "
+"<literal>NamingService</literal> 包含的 <literal>Main</literal> MBean 的相应"
+"属性。当 <literal>NamingService</literal> 被启动时,它也启动了包含的 "
+"<literal>NamingService</literal> 来激活 JNDI 命名服务。"
+
+#. Tag: para
+#: Naming.xml:158
+#, no-c-format
+msgid ""
+"In addition, the <literal>NamingService</literal> exposes the "
+"<literal>Naming</literal> interface operations through a JMX detyped invoke "
+"operation. This allows the naming service to be accessed via JMX adaptors "
+"for arbitrary protocols. We will look at an example of how HTTP can be used "
+"to access the naming service using the invoke operation later in this "
+"chapter."
+msgstr ""
+"此外,<literal>NamingService</literal> 通过一个 JMX ???调用操作开放 "
+"<literal>Naming</literal> 接口操作。这允许通过任意协议的 JMX 适配器来访问命名"
+"服务。我们将看一个例子,看怎样通过本章后面提及的调用操作用 HTTP 来访问命名服"
+"务。"
+
+#. Tag: para
+#: Naming.xml:161
+#, fuzzy, no-c-format
+msgid ""
+"The details of threads and the thread context class loader won't be "
+"explored here, but the JNDI tutorial provides a concise discussion that is "
+"applicable. See <ulink url=\"http://java.sun.com/products/jndi/tutorial/"
+"beyond/misc/classloader.html\"></ulink> for the details."
+msgstr ""
+"线程和线程类加载器的细节不会在这里探讨,但 JNDI tutorial 提供了一个合适的简要"
+"讨论。细节请参考 <ulink url=\"http://java.sun.com/products/jndi/tutorial/"
+"beyond/misc/classloader.html\"></ulink>。"
+
+#. Tag: para
+#: Naming.xml:164
+#, no-c-format
+msgid ""
+"When the <literal>Main</literal> MBean is started, it performs the following "
+"tasks:"
+msgstr "当 <literal>Main</literal> MBean 被启动时,它执行下面的任务:"
+
+#. Tag: para
+#: Naming.xml:169
+#, no-c-format
+msgid ""
+"Instantiates an <literal>org.jnp.naming.NamingService</literal> instance and "
+"sets this as the local VM server instance. This is used by any <literal>org."
+"jnp.interfaces.NamingContext</literal> instances that are created within the "
+"JBoss server VM to avoid RMI calls over TCP/IP."
+msgstr ""
+"初始化一个 <literal>org.jnp.naming.NamingService</literal> 实例并把它设置为本"
+"地 VM 服务器实例。它可以被任何在 JBoss 服务器 VM 里创建来避免 TCP/IP 上的 "
+"RMI 调用的 <literal>org.jnp.interfaces.NamingContext</literal> 实例使用。"
+
+#. Tag: para
+#: Naming.xml:174
+#, fuzzy, no-c-format
+msgid ""
+"Exports the <literal>NamingServer</literal> instance's <literal>org.jnp."
+"naming.interfaces.Naming</literal> RMI interface using the configured "
+"<literal>RmiPort</literal>, <literal>ClientSocketFactory</literal>, "
+"<literal>ServerSocketFactory</literal>attributes."
+msgstr ""
+"用配置好的 <literal>RmiPort</literal>,<literal>ClientSocketFactory</"
+"literal>,<literal>ServerSocketFactory</literal> 属性开放 "
+"<literal>NamingServer</literal> 实例的 <literal>org.jnp.naming.interfaces."
+"Naming</literal> RMI 接口。"
+
+#. Tag: para
+#: Naming.xml:179
+#, no-c-format
+msgid ""
+"Creates a socket that listens on the interface given by the "
+"<literal>BindAddress</literal> and <literal>Port</literal> attributes."
+msgstr ""
+"创建一个在 <literal>BindAddress</literal> 和 <literal>Port</literal> 属性指定"
+"的接口上侦听的套接字。"
+
+#. Tag: para
+#: Naming.xml:184
+#, no-c-format
+msgid "Spawns a thread to accept connections on the socket."
+msgstr "创建一个接受套接字上的连接的线程。"
+
+#. Tag: title
+#: Naming.xml:192
+#, no-c-format
+msgid "The Naming InitialContext Factories"
+msgstr "The Naming InitialContext Factories"
+
+#. Tag: para
+#: Naming.xml:193
+#, no-c-format
+msgid ""
+"The JBoss JNDI provider currently supports several different "
+"<literal>InitialContext</literal> factory implementations."
+msgstr ""
+"JBoss JNDI 提供者目前支持几种不同的 <literal>InitialContext</literal> 工厂"
+"(factory)实现。"
+
+#. Tag: title
+#: Naming.xml:197
+#, no-c-format
+msgid "The standard naming context factory"
+msgstr "标准命名上下文工厂"
+
+#. Tag: para
+#: Naming.xml:198
+#, no-c-format
+msgid ""
+"The most commonly used factory is the <literal>org.jnp.interfaces."
+"NamingContextFactory</literal> implementation. Its properties include:"
+msgstr ""
+"最常用的工厂是 <literal>org.jnp.interfaces.NamingContextFactory</literal> 实"
+"现。它的属性包括:"
+
+#. Tag: para
+#: Naming.xml:203
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>: The name of "
+"the environment property for specifying the initial context factory to use. "
+"The value of the property should be the fully qualified class name of the "
+"factory class that will create an initial context. If it is not specified, a "
+"<literal>javax.naming.NoInitialContextException</literal> will be thrown "
+"when an <literal>InitialContext</literal> object is created."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定所使用的"
+"初始上下文工厂的环境属性的名字。这个属性的值应该是将创建初始上下文的工厂类的"
+"类全名。如果它没有被指定,创建 <literal>InitialContext</literal> 对象的时候将"
+"抛出 <literal>javax.naming.NoInitialContextException</literal>。"
+
+#. Tag: para
+#: Naming.xml:208
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>: The name of the "
+"environment property for specifying the location of the JBoss JNDI service "
+"provider the client will use. The <literal>NamingContextFactory</literal> "
+"class uses this information to know which JBossNS server to connect to. The "
+"value of the property should be a URL string. For JBossNS the URL format is "
+"<literal>jnp://host:port/[jndi_path]</literal>. The <literal>jnp:</literal> "
+"portion of the URL is the protocol and refers to the socket/RMI based "
+"protocol used by JBoss. The <literal>jndi_path</literal> portion of the URL "
+"is an optional JNDI name relative to the root context, for example, "
+"<literal>apps</literal> or <literal>apps/tmp</literal>. Everything but the "
+"host component is optional. The following examples are equivalent because "
+"the default port value is 1099."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>:用来指定客户将使"
+"用的 JBoss JNDI 服务提供者的位置的环境属性。<literal>NamingContextFactory</"
+"literal> 类使用这个属性来获知该连接哪个 JBossNS 服务器。这个属性的值应该是一"
+"个 URL 字符串。对于 JBossNS 来说,这个 URL 格式是 <literal>jnp://host:port/"
+"[jndi_path]</literal>。这个 URL 的 <literal>jnp:</literal> 部分是协议,它指的"
+"是 JBoss 使用的基于 socket/RMI 的协议。这个 URL 的 <literal>jndi_path</"
+"literal> 部分是一个可选的与根上下文相关的 JNDI 名,如 <literal>apps</"
+"literal> 或 <literal>apps/tmp</literal>。除了 host 外的其他部分都是可选的。下"
+"面的例子都是相等的,因为缺省的端口是 1099。"
+
+#. Tag: literal
+#: Naming.xml:214
+#, no-c-format
+msgid "jnp://www.jboss.org:1099/"
+msgstr "jnp://www.jboss.org:1099/"
+
+#. Tag: literal
+#: Naming.xml:219
+#, no-c-format
+msgid "www.jboss.org:1099"
+msgstr "www.jboss.org:1099"
+
+#. Tag: literal
+#: Naming.xml:224
+#, no-c-format
+msgid "www.jboss.org"
+msgstr "www.jboss.org"
+
+#. Tag: para
+#: Naming.xml:230
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.url.pkgs</emphasis>: The name of "
+"the environment property for specifying the list of package prefixes to use "
+"when loading in URL context factories. The value of the property should be a "
+"colon-separated list of package prefixes for the class name of the factory "
+"class that will create a URL context factory. For the JBoss JNDI provider "
+"this must be <literal>org.jboss.naming:org.jnp.interfaces</literal>. This "
+"property is essential for locating the <literal>jnp:</literal> and "
+"<literal>java:</literal> URL context factories of the JBoss JNDI provider."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.url.pkgs</emphasis>:指定当加载 "
+"URL 上下文工厂时使用的包前缀列表的环境属性的名字。这个属性的值应该是一个用冒"
+"号隔开的包前缀的列表,这个前缀用于创建 URL 上下文工厂的工厂类的类名。对于 "
+"JBoss JNDI 提供者,它必须是 <literal>org.jboss.naming:org.jnp.interfaces</"
+"literal>。这个属性对于定位 JBoss JNDI 提供者的 <literal>jnp:</literal> 和 "
+"<literal>java:</literal> URL 上下文工厂是必要的。"
+
+#. Tag: para
+#: Naming.xml:235
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.socketFactory</emphasis>: The fully qualified "
+"class name of the <literal>javax.net.SocketFactory</literal> implementation "
+"to use to create the bootstrap socket. The default value is <literal>org.jnp."
+"interfaces.TimedSocketFactory</literal>. The <literal>TimedSocketFactory</"
+"literal> is a simple <literal>SocketFactory</literal> implementation that "
+"supports the specification of a connection and read timeout. These two "
+"properties are specified by:"
+msgstr ""
+"<emphasis role=\"bold\">jnp.socketFactory</emphasis>:<literal>javax.net."
+"SocketFactory</literal> 实现用来创建引导套接字的类全名。它的缺省值是 "
+"<literal>org.jnp.interfaces.TimedSocketFactory</literal>。"
+"<literal>TimedSocketFactory</literal> 是一个简单的 <literal>SocketFactory</"
+"literal> 实现,它支持连接和读超时规格。这两个属性如下:"
+
+#. Tag: para
+#: Naming.xml:240
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.timeout</emphasis>: The connection timeout in "
+"milliseconds. The default value is 0 which means the connection will block "
+"until the VM TCP/IP layer times out."
+msgstr ""
+"<emphasis role=\"bold\">jnp.timeout</emphasis>:连接超时的毫秒数。它的缺省值"
+"是 0,表示这个连接将阻塞到 VM TCP/IP 层超时为止。"
+
+#. Tag: para
+#: Naming.xml:245
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.sotimeout</emphasis>: The connected socket read "
+"timeout in milliseconds. The default value is 0 which means reads will "
+"block. This is the value passed to the <literal>Socket.setSoTimeout</"
+"literal> on the newly connected socket."
+msgstr ""
+"<emphasis role=\"bold\">jnp.sotimeout</emphasis>:已连接的套接字读超时的毫秒"
+"数。它的缺省值为 0,表示读将阻塞。它的值会传入最新连接的套接字的 "
+"<literal>Socket.setSoTimeout</literal> 里。"
+
+#. Tag: para
+#: Naming.xml:250
+#, no-c-format
+msgid ""
+"When a client creates an <literal>InitialContext</literal> with these "
+"JBossNS properties available, the <literal>org.jnp.interfaces."
+"NamingContextFactory</literal> object is used to create the "
+"<literal>Context</literal> instance that will be used in subsequent "
+"operations. The <literal>NamingContextFactory</literal> is the JBossNS "
+"implementation of the <literal>javax.naming.spi.InitialContextFactory</"
+"literal> interface. When the <literal>NamingContextFactory</literal> class "
+"is asked to create a <literal>Context</literal>, it creates an <literal>org."
+"jnp.interfaces.NamingContext</literal> instance with the "
+"<literal>InitialContext</literal> environment and name of the context in the "
+"global JNDI namespace. It is the <literal>NamingContext</literal> instance "
+"that actually performs the task of connecting to the JBossNS server, and "
+"implements the <literal>Context</literal> interface. The <literal>Context."
+"PROVIDER_URL</literal> information from the environment indicates from which "
+"server to obtain a <literal>NamingServer</literal> RMI reference."
+msgstr ""
+"当客户用可用的 JBossNS 属性创建一个 <literal>InitialContext</literal> 时,"
+"<literal>org.jnp.interfaces.NamingContextFactory</literal> 对象被用来创建将在"
+"后续操作里使用的 <literal>Context</literal> 实例。"
+"<literal>NamingContextFactory</literal> 是 <literal>javax.naming.spi."
+"InitialContextFactory</literal> 接口的 JBossNS 实现。当 "
+"<literal>NamingContextFactory</literal> 类被要求创建一个 <literal>Context</"
+"literal> 时,它会创建一个有着 <literal>InitialContext</literal> 环境和全局 "
+"JNDI 命名空间里上下文的名字的 <literal>org.jnp.interfaces.NamingContext</"
+"literal> 实例。它是实际上执行连接 JBossNS 服务器和实现 <literal>Context</"
+"literal> 接口任务的 <literal>NamingContext</literal> 实例。系统环境里的"
+"<literal>Context.PROVIDER_URL</literal> 信息指出到哪个服务器里获取 "
+"<literal>NamingServer</literal> RMI 引用。"
+
+#. Tag: para
+#: Naming.xml:253
+#, no-c-format
+msgid ""
+"The association of the <literal>NamingContext</literal> instance to a "
+"<literal>NamingServer</literal> instance is done in a lazy fashion on the "
+"first <literal>Context</literal> operation that is performed. When a "
+"<literal>Context</literal> operation is performed and the "
+"<literal>NamingContext</literal> has no <literal>NamingServer</literal> "
+"associated with it, it looks to see if its environment properties define a "
+"<literal>Context.PROVIDER_URL</literal>. A <literal>Context.PROVIDER_URL</"
+"literal> defines the host and port of the JBossNS server the "
+"<literal>Context</literal> is to use. If there is a provider URL, the "
+"<literal>NamingContext</literal> first checks to see if a <literal>Naming</"
+"literal> instance keyed by the host and port pair has already been created "
+"by checking a <literal>NamingContext</literal> class static map. It simply "
+"uses the existing <literal>Naming</literal> instance if one for the host "
+"port pair has already been obtained. If no <literal>Naming</literal> "
+"instance has been created for the given host and port, the "
+"<literal>NamingContext</literal> connects to the host and port using a "
+"<literal>java.net.Socket</literal>, and retrieves a <literal>Naming</"
+"literal> RMI stub from the server by reading a <literal>java.rmi."
+"MarshalledObject</literal> from the socket and invoking its get method. The "
+"newly obtained Naming instance is cached in the <literal>NamingContext</"
+"literal> server map under the host and port pair. If no provider URL was "
+"specified in the JNDI environment associated with the context, the "
+"<literal>NamingContext</literal> simply uses the in VM Naming instance set "
+"by the <literal>Main</literal> MBean."
+msgstr ""
+"<literal>NamingContext</literal> 实例和 <literal>NamingServer</literal> 实例"
+"的关联是用一种被执行的第一个 <literal>Context</literal> 操作上的懒惰的方式"
+"(lazy fashion)来完成的。当 <literal>Context</literal> 操作被执行且没有 "
+"<literal>NamingServer</literal> 与 <literal>NamingContext</literal> 关联的时"
+"候,它将查看是否它的环境属性定义了一个 <literal>Context.PROVIDER_URL</"
+"literal>。<literal>Context.PROVIDER_URL</literal> 定义 <literal>Context</"
+"literal> 使用的 JBossNS 服务器的主机名和端口号。如果有一个提供者 URL,"
+"<literal>NamingContext</literal> 首先将检查这个主机和端口相对的 "
+"<literal>Naming</literal> 实例是否已经通过查找 <literal>NamingContext</"
+"literal> 类静态映射而被创建。如果已经被创建的话,它简单地使用现存的 "
+"<literal>Naming</literal> 实例。如果没有,<literal>NamingContext</literal> 使"
+"用 <literal>java.net.Socket</literal> 和这个主机和端口连接,而且通过读取套接"
+"字的 <literal>java.rmi.MarshalledObject</literal> 和调用它的 get 方法从服务器"
+"取出一个 <literal>Naming</literal> RMI stub。这个新获得的 Naming 实例用主机名"
+"和端口号缓存在 <literal>NamingContext</literal> 服务器映射里。如果在与上下文"
+"关联的 JNDI 环境里没有指定提供者 URL,<literal>NamingContext</literal> 简单地"
+"使用由 <literal>Main</literal> MBean 设定的 ???in VM 命名实例。"
+
+#. Tag: para
+#: Naming.xml:256
+#, no-c-format
+msgid ""
+"The <literal>NamingContext</literal> implementation of the <literal>Context</"
+"literal> interface delegates all operations to the <literal>Naming</literal> "
+"instance associated with the <literal>NamingContext</literal>. The "
+"<literal>NamingServer</literal> class that implements the <literal>Naming</"
+"literal> interface uses a <literal>java.util.Hashtable</literal> as the "
+"<literal>Context</literal> store. There is one unique <literal>NamingServer</"
+"literal> instance for each distinct JNDI Name for a given JBossNS server. "
+"There are zero or more transient <literal>NamingContext</literal> instances "
+"active at any given moment that refers to a <literal>NamingServer</literal> "
+"instance. The purpose of the <literal>NamingContext</literal> is to act as a "
+"<literal>Context</literal> to the <literal>Naming</literal> interface "
+"adaptor that manages translation of the JNDI names passed to the "
+"<literal>NamingContext</literal> . Because a JNDI name can be relative or a "
+"URL, it needs to be converted into an absolute name in the context of the "
+"JBossNS server to which it refers. This translation is a key function of the "
+"<literal>NamingContext</literal>."
+msgstr ""
+"<literal>Context</literal> 接口的 <literal>NamingContext</literal> 实现把所有"
+"的操作委托给与 <literal>NamingContext</literal> 关联的 <literal>Naming</"
+"literal> 实例。实现 <literal>Naming</literal> 接口的 <literal>NamingServer</"
+"literal> 类把 <literal>java.util.Hashtable</literal> 用作 <literal>Context</"
+"literal> store。在给定的 JBossNS 服务器里,每个独立的 JNDI 名都有唯一的 "
+"<literal>NamingServer</literal> 实例。在任一给定时间里都会有指向 "
+"<literal>NamingServer</literal> 实例的零或多个短暂的活动 "
+"<literal>NamingContext</literal> 实例。<literal>NamingContext</literal> 的目"
+"的是充当 <literal>Naming</literal> 接口适配器的 <literal>Context</literal>,"
+"这个适配器管理传入到 <literal>NamingContext</literal> 的 JNDI 名的翻译。因为 "
+"JNDI 名可以和 URL 相关,它需要转换成它涉及的 JBossNS 服务器的上文里的一个绝对"
+"名。这种翻译是 <literal>NamingContext</literal> 的一个关键的功能。 "
+
+#. Tag: title
+#: Naming.xml:262
+#, no-c-format
+msgid "The org.jboss.naming.NamingContextFactory"
+msgstr "The org.jboss.naming.NamingContextFactory"
+
+#. Tag: para
+#: Naming.xml:263
+#, no-c-format
+msgid ""
+"This version of the <literal>InitialContextFactory</literal> implementation "
+"is a simple extension of the jnp version which differs from the jnp version "
+"in that it stores the last configuration passed to its "
+"<literal>InitialContextFactory.getInitialContext(Hashtable env)</literal> "
+"method in a public thread local variable. This is used by EJB handles and "
+"other JNDI sensitive objects like the <literal>UserTransaction</literal> "
+"factory to keep track of the JNDI context that was in effect when they were "
+"created. If you want this environment to be bound to the object even after "
+"its serialized across vm boundaries, then you should the <literal>org.jboss."
+"naming.NamingContextFactory</literal>. If you want the environment that is "
+"defined in the current VM <literal>jndi.properties</literal> or system "
+"properties, then you should use the <literal>org.jnp.interfaces."
+"NamingContextFactory</literal> version."
+msgstr ""
+"这个版本的 <literal>InitialContextFactory</literal> 实现是一个 JNP 版本的简单"
+"扩展,它与 JNP 版本的不同之处在于它把传入它的 <literal>InitialContextFactory."
+"getInitialContext(Hashtable env)</literal> 方法的最后配置储存在一个公共的线程"
+"本地变量里。它被 EJB handles 和其他 JNDI 敏感的对象如 "
+"<literal>UserTransaction</literal> 工厂用来跟踪创建时就有效的 JNDI 上下文。如"
+"果你想要这种甚至在跨 VM 边界的串形化后绑定到对象的环境,你应该使用 "
+"<literal>org.jboss.naming.NamingContextFactory</literal>。如果你想要在当前 "
+"VM <literal>jndi.properties</literal> 或系统属性里定义的环境,你就应该使用 "
+"<literal>org.jnp.interfaces.NamingContextFactory</literal>。"
+
+#. Tag: title
+#: Naming.xml:269
+#, no-c-format
+msgid "Naming Discovery in Clustered Environments"
+msgstr "群集环境里的命名发现(Naming Discovery)"
+
+#. Tag: para
+#: Naming.xml:270
+#, fuzzy, no-c-format
+msgid ""
+"When running in a clustered JBoss environment, you can choose not to specify "
+"a <literal>Context.PROVIDER_URL</literal> value and let the client query the "
+"network for available naming services. This only works with JBoss servers "
+"running with the <literal>all</literal> configuration, or an equivalent "
+"configuration that has <literal>org.jboss.ha.framework.server."
+"ClusterPartition</literal> and <literal>org.jboss.ha.jndi.HANamingService</"
+"literal> services deployed. The discovery process consists of sending a "
+"multicast request packet to the discovery address/port and waiting for any "
+"node to respond. The response is a HA-RMI version of the <literal>Naming</"
+"literal> interface. The following <literal>InitialContext</literal> "
+"properties affect the discovery configuration:"
+msgstr ""
+"运行在群集的 JBoss 环境里时,你可以选择不指定 <literal>Context.PROVIDER_URL</"
+"literal> 值而让客户在网络上查询可用的命名服务。这只有 JBoss 服务器使用 "
+"<literal>all</literal> 配置或者是部署了 <literal>org.jboss.ha.framework."
+"server.ClusterPartition</literal> 和<emphasis role=\"bold\">jnp."
+"partitionName</emphasis> <literal>org.jboss.ha.jndi.HANamingService</"
+"literal> 服务的配置运行时才可行。发现(discovery)过程由发送多点传送请求包到发"
+"现地址/端口和等待接点应答组成。这个应答是 <literal>Naming</literal> 接口的一"
+"个 HA-RMI 版本。下面的 <literal>InitialContext</literal> 属性影响了发现的配"
+"置:"
+
+#. Tag: para
+#: Naming.xml:275
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.partitionName</emphasis>: The cluster partition "
+"name discovery should be restricted to. If you are running in an environment "
+"with multiple clusters, you may want to restrict the naming discovery to a "
+"particular cluster. There is no default value, meaning that any cluster "
+"response will be accepted."
+msgstr ""
+"<emphasis role=\"bold\">jnp.partitionName</emphasis>:限制发现的群集分区名。"
+"如果在有多个群集系统的环境里运行,你可能想把命名发现限制到某一群集系统里。它"
+"没有缺省值,表示将接受任何群集系统的应答。"
+
+#. Tag: para
+#: Naming.xml:280
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.discoveryGroup</emphasis>: The multicast IP/"
+"address to which the discovery query is sent. The default is 230.0.0.4."
+msgstr ""
+"<emphasis role=\"bold\">jnp.discoveryGroup</emphasis>:接收发现查询的多点传"
+"送 IP 地址。它的缺省值是 230.0.0.4。"
+
+#. Tag: para
+#: Naming.xml:285
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.discoveryPort</emphasis>: The port to which the "
+"discovery query is sent. The default is 1102."
+msgstr ""
+"<emphasis role=\"bold\">jnp.discoveryPort</emphasis>:接收发现查询的端口。缺"
+"省值为 1102。"
+
+#. Tag: para
+#: Naming.xml:290
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.discoveryTimeout</emphasis>: The time in "
+"milliseconds to wait for a discovery query response. The default value is "
+"5000 (5 seconds)."
+msgstr ""
+"<emphasis role=\"bold\">jnp.discoveryTimeout</emphasis>:等待发现查询的应答的"
+"毫秒数。缺省值为 5000(5 秒)。"
+
+#. Tag: para
+#: Naming.xml:295
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jnp.disableDiscovery</emphasis>: A flag indicating "
+"if the discovery process should be avoided. Discovery occurs when either no "
+"<literal>Context.PROVIDER_URL</literal> is specified, or no valid naming "
+"service could be located among the URLs specified. If the <literal>jnp."
+"disableDiscovery</literal> flag is true, then discovery will not be "
+"attempted."
+msgstr ""
+"<emphasis role=\"bold\">jnp.disableDiscovery</emphasis>:指出是否应该避免发现"
+"过程。当没有指定 <literal>Context.PROVIDER_URL</literal> 或者在指定的 URL 里"
+"定位不了有效的命名服务时,发现(Discovery)将发生。如果 <literal>jnp."
+"disableDiscovery</literal> 标记为 true,则不会尝试发现。"
+
+#. Tag: title
+#: Naming.xml:303
+#, no-c-format
+msgid "The HTTP InitialContext Factory Implementation"
+msgstr "The HTTP InitialContext Factory Implementation"
+
+#. Tag: para
+#: Naming.xml:304
+#, fuzzy, no-c-format
+msgid ""
+"The JNDI naming service can be accessed over HTTP. From a JNDI client's "
+"perspective this is a transparent change as they continue to use the JNDI "
+"<literal>Context</literal> interface. Operations through the "
+"<literal>Context</literal> interface are translated into HTTP posts to a "
+"servlet that passes the request to the NamingService using its JMX invoke "
+"operation. Advantages of using HTTP as the access protocol include better "
+"access through firewalls and proxies setup to allow HTTP, as well as the "
+"ability to secure access to the JNDI service using standard servlet role "
+"based security."
+msgstr ""
+"JNDI 命名服务可以通过 HTTP 访问。这对 JNDI 客户来说是一个透明的变化,因为他们"
+"仍然使用 JNDI <literal>Context</literal> 接口。通过 <literal> Context</"
+"literal> 接口的操作被翻译成发送到 servlet 的 HTTP posts,这个 servlet 用它的 "
+"JMX 调用操作把请求传入 NamingService。把 HTTP 当做访问协议的优势包括更好的经"
+"由防火墙和代理服务器的访问,以及用标准的基于 servlet 角色的安全性来使对 JNDI "
+"服务的访问更加安全。"
+
+#. Tag: para
+#: Naming.xml:307
+#, no-c-format
+msgid ""
+"To access JNDI over HTTP you use the <literal>org.jboss.naming."
+"HttpNamingContextFactory</literal> as the factory implementation. The "
+"complete set of support <literal>InitialContext</literal> environment "
+"properties for this factory are:"
+msgstr ""
+"要通过 HTTP 访问 JNDI,你可以把 <literal>org.jboss.naming."
+"HttpNamingContextFactory</literal> 作为工厂的实现(factory implementation)。这"
+"个工厂的完整的支持 <literal>InitialContext</literal> 环境属性的集合是:"
+
+#. Tag: para
+#: Naming.xml:312
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>: The name of "
+"the environment property for specifying the initial context factory, which "
+"must be <literal>org.jboss.naming.HttpNamingContextFactory</literal>."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"naming.HttpNamingContextFactory</literal>。"
+
+#. Tag: para
+#: Naming.xml:317
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis> (or "
+"<literal>Context.PROVIDER_URL</literal>): This must be set to the HTTP URL "
+"of the JNDI factory. The full HTTP URL would be the public URL of the JBoss "
+"servlet container plus <literal>/invoker/JNDIFactory</literal>. Examples "
+"include:"
+msgstr ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>(或 "
+"<literal>Context.PROVIDER_URL</literal>):它必须设置为 JNDI 工厂的 HTTP URL。"
+"完整的 HTTP URL 将是 JBoss servlet 容器的公用 URL 加上 <literal>/invoker/"
+"JNDIFactory</literal>。例如:"
+
+#. Tag: literal
+#: Naming.xml:323
+#, no-c-format
+msgid "http://www.jboss.org:8080/invoker/JNDIFactory"
+msgstr "http://www.jboss.org:8080/invoker/JNDIFactory"
+
+#. Tag: literal
+#: Naming.xml:328
+#, no-c-format
+msgid "http://www.jboss.org/invoker/JNDIFactory"
+msgstr "http://www.jboss.org/invoker/JNDIFactory"
+
+#. Tag: literal
+#: Naming.xml:333
+#, no-c-format
+msgid "https://www.jboss.org/invoker/JNDIFactory"
+msgstr "https://www.jboss.org/invoker/JNDIFactory"
+
+#. Tag: para
+#: Naming.xml:337
+#, no-c-format
+msgid ""
+"The first example accesses the servlet using the port 8080. The second uses "
+"the standard HTTP port 80, and the third uses an SSL encrypted connection to "
+"the standard HTTPS port 443."
+msgstr ""
+"第一个例子用端口 8080 访问 servlet。第二个用标准的 HTTP 端口 80,第三个使用了"
+"标准 HTTPS 端口 443 上的 SSL 加密连接。 "
+
+#. Tag: para
+#: Naming.xml:342 Naming.xml:372
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.url.pkgs</emphasis>: For all "
+"JBoss JNDI provider this must be <literal>org.jboss.naming:org.jnp."
+"interfaces</literal>. This property is essential for locating the "
+"<literal>jnp:</literal> and <literal>java:</literal> URL context factories "
+"of the JBoss JNDI provider."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.url.pkgs</emphasis>:对于所有的 "
+"JBoss JNDI 提供者,它必须是 <literal>org.jboss.naming:org.jnp.interfaces</"
+"literal>。这个属性对于定位 JBoss JNDI 提供者的<literal>jnp:</literal> and "
+"<literal>java:</literal> URL 上下文工厂是必要的。 "
+
+#. Tag: para
+#: Naming.xml:347
+#, fuzzy, no-c-format
+msgid ""
+"The JNDI <literal>Context</literal> implementation returned by the "
+"<literal>HttpNamingContextFactory</literal> is a proxy that delegates "
+"invocations made on it to a bridge servlet which forwards the invocation to "
+"the <literal>NamingService</literal> through the JMX bus and marshalls the "
+"reply back over HTTP. The proxy needs to know what the URL of the bridge "
+"servlet is in order to operate. This value may have been bound on the server "
+"side if the JBoss web server has a well known public interface. If the JBoss "
+"web server is sitting behind one or more firewalls or proxies, the proxy "
+"cannot know what URL is required. In this case, the proxy will be associated "
+"with a system property value that must be set in the client VM. For more "
+"information on the operation of JNDI over HTTP see <xref linkend="
+"\"JNDI_over_HTTP-Accessing_JNDI_over_HTTP\"/>."
+msgstr ""
+"<literal>HttpNamingContextFactory</literal> 返回的 JNDI <literal>Context</"
+"literal> 实现是一个把调用委托给 bridge servlet 的代理,这个 bridge servlet 把"
+"调用通过 JMX 总线转发给 <literal>NamingService</literal> 并把 HTTP 上的回复打"
+"包。这个代理需要知道 bridge servlet 的 URL 来进行操作。如果 JBoss web 服务器"
+"有一个众所周知的公用接口,这个值可能已经被绑定在服务器端了。如果 JBoss web 服"
+"务器处于一个或多个防火墙或代理服务器后面,这个代理就不可能知道它要求的 URL 是"
+"什么。在这种情况下,代理将与一个必须在客户端设置的系统属性值相关联。请参考 "
+"<xref linkend=\"ch3.accessingjndi\"/> 里关于 HTTP 上的 JNDI 操作的更多信息。"
+
+#. Tag: title
+#: Naming.xml:353
+#, no-c-format
+msgid "The Login InitialContext Factory Implementation"
+msgstr "The Login InitialContext Factory Implementation"
+
+#. Tag: para
+#: Naming.xml:354
+#, fuzzy, no-c-format
+msgid ""
+"JAAS is the preferred method for authenticating a remote client to JBoss. "
+"However, for simplicity and to ease the migration from other application "
+"server environment that do not use JAAS, JBoss allows you the security "
+"credentials to be passed through the <literal>InitialContext</literal>. JAAS "
+"is still used under the covers, but there is no manifest use of the JAAS "
+"interfaces in the client application."
+msgstr ""
+"JAAS 是验证 JBoss 的远程客户的首选方法。然而,基于简单性和使不使用 JAAS 的其"
+"他应用服务器环境的移植更加轻松,JBoss 允许你通过 <literal>InitialContext</"
+"literal> 验证安全性凭据(security credentials)。虽然 JAAS 仍旧被使用,但在客户"
+"应用程序里 JAAS 接口的应用并不常见。"
+
+#. Tag: para
+#: Naming.xml:357
+#, no-c-format
+msgid ""
+"The factory class that provides this capability is the <literal>org.jboss."
+"security.jndi.LoginInitialContextFactory</literal>. The complete set of "
+"support <literal>InitialContext</literal> environment properties for this "
+"factory are:"
+msgstr ""
+"提供这种能力的工厂类(factory class)是 <literal>org.jboss.security.jndi."
+"LoginInitialContextFactory</literal>。这个工厂的完整的支持 "
+"<literal>InitialContext</literal> 环境属性的集合是:"
+
+#. Tag: para
+#: Naming.xml:362
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>: The name of "
+"the environment property for specifying the initial context factory, which "
+"must be <literal>org.jboss.security.jndi.LoginInitialContextFactory</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.factory.initial</emphasis>:指定初始上下"
+"文工厂(initial context factory)的环境属性名,它必须是 <literal>org.jboss."
+"security.jndi.LoginInitialContextFactory</literal>。"
+
+#. Tag: para
+#: Naming.xml:367
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>: This must be "
+"set to a <literal>NamingContextFactory</literal> provider URL. The "
+"<literal>LoginIntialContext</literal> is really just a wrapper around the "
+"<literal>NamingContextFactory</literal> that adds a JAAS login to the "
+"existing <literal>NamingContextFactory</literal> behavior."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.provider.url</emphasis>:它必须设置为一"
+"个 <literal>NamingContextFactory</literal> 提供者 URL。"
+"<literal>LoginIntialContext</literal> 实际上是 "
+"<literal>NamingContextFactory</literal> 的一种包装(wrapper),它在 "
+"<literal>NamingContextFactory</literal> 行为上加入了 JAAS login。"
+
+#. Tag: para
+#: Naming.xml:377
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.principal</emphasis> (or "
+"<literal>Context.SECURITY_PRINCIPAL</literal>): The principal to "
+"authenticate. This may be either a <literal>java.security.Principal</"
+"literal> implementation or a string representing the name of a principal."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.security.principal</emphasis>(或 "
+"<literal>Context.SECURITY_PRINCIPAL</literal>):这是验证的原则(principal)。它"
+"可以是 <literal>java.security.Principal</literal> 实现或者原则名的字符串表"
+"示。"
+
+#. Tag: para
+#: Naming.xml:382
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.credentials</emphasis> (or "
+"<literal>Context.SECURITY_CREDENTIALS</literal>), The credentials that "
+"should be used to authenticate the principal, e.g., password, session key, "
+"etc."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.security.credentials</emphasis> (或 "
+"<literal>Context.SECURITY_CREDENTIALS</literal>):用来验证原则(principal)的凭"
+"据(credentials),如密码,会话键值等。"
+
+#. Tag: para
+#: Naming.xml:387
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java.naming.security.protocol</emphasis>: "
+"(<literal>Context.SECURITY_PROTOCOL</literal>) This gives the name of the "
+"JAAS login module to use for the authentication of the principal and "
+"credentials."
+msgstr ""
+"<emphasis role=\"bold\">java.naming.security.protocol</emphasis>(或 "
+"<literal>Context.SECURITY_PROTOCOL</literal>):它给出用于验证原则和凭据的 "
+"JAAS 登录模块的名字。"
+
+#. Tag: title
+#: Naming.xml:395
+#, no-c-format
+msgid "The ORBInitialContextFactory"
+msgstr "<emphasis role=\"bold\">java.naming.security.protocol</emphasis>"
+
+#. Tag: para
+#: Naming.xml:396
+#, fuzzy, no-c-format
+msgid ""
+"When using Sun's CosNaming it is necessary to use a different naming "
+"context factory from the default. CosNaming looks for the ORB in JNDI "
+"instead of using the the ORB configured in <literal>deploy/iiop-service.xml?"
+"</literal>. It is necessary to set the global context factory to "
+"<literal>org.jboss.iiop.naming.ORBInitialContextFactory</literal>, which "
+"sets the ORB to JBoss's ORB. This is done in the <literal>conf/jndi."
+"properties</literal> file:"
+msgstr ""
+"当使用 Sun 的 CosNaming 时,你需要用和缺省的不一样的命名上下文工厂。"
+"CosNaming 在 JNDI 里查找 ORB 而不是使用 <literal>deploy/iiop-service.xml?</"
+"literal> 里配置的 ORB。你有必要把全局的上下文工厂设置为 <literal>org.jboss."
+"iiop.naming.ORBInitialContextFactory</literal>,它会把 ORB 设置成 JBoss 的 "
+"ORB。这是在 <literal>conf/jndi.propeties</literal> 文件里完成的:"
+
+#. Tag: programlisting
+#: Naming.xml:399
+#, no-c-format
+msgid ""
+"# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING\n"
+"#\n"
+"java.naming.factory.initial=org.jboss.iiop.naming.ORBInitialContextFactory\n"
+"java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"
+msgstr ""
+"# DO NOT EDIT THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING\n"
+"#\n"
+"java.naming.factory.initial=org.jboss.iiop.naming.ORBInitialContextFactory\n"
+"java.naming.factory.url.pkgs=org.jboss.naming:org.jnp.interfaces"
+
+#. Tag: para
+#: Naming.xml:400
+#, no-c-format
+msgid ""
+"It is also necessary to use <literal>ORBInitialContextFactory</literal> when "
+"using CosNaming in an application client."
+msgstr ""
+"当在客户应用程序里使用 CosNaming 时,也有必要使用 "
+"<literal>ORBInitialContextFactory</literal>。"
+
+#. Tag: title
+#: Naming.xml:408
+#, no-c-format
+msgid "JNDI over HTTP"
+msgstr "JNDI over HTTP"
+
+#. Tag: para
+#: Naming.xml:409
+#, no-c-format
+msgid ""
+"In addition to the legacy RMI/JRMP with a socket bootstrap protocol, JBoss "
+"provides support for accessing its JNDI naming service over HTTP."
+msgstr ""
+"除了基于套接字引导协议的 RMI/JRMP,JBoss 也提供通过 HTTP 访问 JNDI 命名服务的"
+"支持。"
+
+#. Tag: title
+#: Naming.xml:413
+#, no-c-format
+msgid "Accessing JNDI over HTTP"
+msgstr "通过 HTTP 访问 JNDI"
+
+#. Tag: para
+#: Naming.xml:414
+#, no-c-format
+msgid ""
+"This capability is provided by <literal>http-invoker.sar</literal>. The "
+"structure of the <literal>http-invoker.sar</literal> is:"
+msgstr ""
+"这种能力是由 <literal>http-invoker.sar</literal> 提供的。<literal>http-"
+"invoker.sar</literal> 的结构是:"
+
+#. Tag: programlisting
+#: Naming.xml:417
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">http-invoker.sar</emphasis>\n"
+"+- META-INF/jboss-service.xml\n"
+"+- invoker.war\n"
+"| +- WEB-INF/jboss-web.xml\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/InvokerServlet.class\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/NamingFactoryServlet."
+"class\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/ReadOnlyAccessFilter."
+"class\n"
+"| +- WEB-INF/classes/roles.properties\n"
+"| +- WEB-INF/classes/users.properties\n"
+"| +- WEB-INF/web.xml\n"
+"| +- META-INF/MANIFEST.MF\n"
+"+- META-INF/MANIFEST.MF"
+msgstr ""
+"<emphasis role=\"bold\">http-invoker.sar</emphasis>\n"
+"+- META-INF/jboss-service.xml\n"
+"+- invoker.war\n"
+"| +- WEB-INF/jboss-web.xml\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/InvokerServlet.class\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/NamingFactoryServlet."
+"class\n"
+"| +- WEB-INF/classes/org/jboss/invocation/http/servlet/ReadOnlyAccessFilter."
+"class\n"
+"| +- WEB-INF/classes/roles.properties\n"
+"| +- WEB-INF/classes/users.properties\n"
+"| +- WEB-INF/web.xml\n"
+"| +- META-INF/MANIFEST.MF\n"
+"+- META-INF/MANIFEST.MF"
+
+#. Tag: para
+#: Naming.xml:418
+#, no-c-format
+msgid ""
+"The <literal>jboss-service.xml</literal> descriptor defines the "
+"<literal>HttpInvoker</literal> and <literal>HttpInvokerHA</literal> MBeans. "
+"These services handle the routing of methods invocations that are sent via "
+"HTTP to the appropriate target MBean on the JMX bus."
+msgstr ""
+"<literal>jboss-service.xml</literal> 描述符定义 <literal>HttpInvoker</"
+"literal> 和 <literal>HttpInvokerHA</literal> MBeans。这些服务处理通过 HTTP 发"
+"送到 JMX 上合适的目标 MBean 的方法调用的路由。"
+
+#. Tag: para
+#: Naming.xml:421
+#, no-c-format
+msgid ""
+"The <literal>http-invoker.war</literal> web application contains servlets "
+"that handle the details of the HTTP transport. The "
+"<literal>NamingFactoryServlet</literal> handles creation requests for the "
+"JBoss JNDI naming service <literal>javax.naming.Context</literal> "
+"implementation. The <literal>InvokerServlet</literal> handles invocations "
+"made by RMI/HTTP clients. The <literal>ReadOnlyAccessFilter</literal> allows "
+"one to secure the JNDI naming service while making a single JNDI context "
+"available for read-only access by unauthenticated clients."
+msgstr ""
+"<literal>http-invoker.war</literal> web 应用程序包含了处理 HTTP 传输细节的 "
+"servlets。<literal>NamingFactoryServlet</literal> 处理对 JBoss JNDI 命名服务 "
+"<literal>javax.naming.Context</literal> 实现的创建请求。"
+"<literal>InvokerServlet</literal> 处理 RMI/HTTP 客户的调用。"
+"<literal>ReadOnlyAccessFilter</literal> 允许你把单个的 JNDI 上下文设为对未验"
+"证客户的访问只读,从而使 JNDI 命名服务更安全。"
+
+#. Tag: title
+#: Naming.xml:425
+#, no-c-format
+msgid "The HTTP invoker proxy/server structure for a JNDI Context"
+msgstr "The HTTP invoker proxy/server structure for a JNDI Context"
+
+#. Tag: para
+#: Naming.xml:432
+#, fuzzy, no-c-format
+msgid ""
+"Before looking at the configurations let's look at the operation of the "
+"<literal>http-invoker</literal> services. <xref linkend="
+"\"Accessing_JNDI_over_HTTP-"
+"The_HTTP_invoker_proxyserver_structure_for_a_JNDI_Context\"/> shows a "
+"logical view of the structure of a JBoss JNDI proxy and its relationship to "
+"the JBoss server side components of the <literal>http-invoker</literal>. The "
+"proxy is obtained from the <literal>NamingFactoryServlet</literal> using an "
+"<literal>InitialContext</literal> with the <literal>Context."
+"INITIAL_CONTEXT_FACTORY</literal> property set to <literal>org.jboss.naming."
+"HttpNamingContextFactory</literal>, and the <literal>Context.PROVIDER_URL</"
+"literal> property set to the HTTP URL of the <literal>NamingFactoryServlet</"
+"literal>. The resulting proxy is embedded in an <literal>org.jnp.interfaces."
+"NamingContext</literal> instance that provides the <literal>Context</"
+"literal> interface implementation."
+msgstr ""
+"在阅读这个配置之前,让我们来看看 <literal>http-invoker</literal> 服务的操作。"
+"<xref linkend=\"ch3.httpinvoker.fig\"/> 展示了 JBoss JNDI 代理和它和 "
+"<literal>http-invoker</literal> 的 JBoss 服务器端组件之间的关系的逻辑视图。"
+"把 <literal>Context.INITIAL_CONTEXT_FACTORY</literal> 属性设置为 "
+"<literal>org.jboss.naming.HttpNamingContextFactory</literal> 并把 "
+"<literal>Context.PROVIDER_URL</literal> 设置为 "
+"<literal>NamingFactoryServlet</literal> 的 HTTP URL,用 "
+"<literal>InitialContext</literal> 从 <literal>NamingFactoryServlet</literal> "
+"里获取这个代理。这个代理嵌入在 <literal>org.jnp.interfaces.NamingContext</"
+"literal> 实例里,它提供 <literal>Context</literal> 接口的实现。"
+
+#. Tag: para
+#: Naming.xml:435
+#, fuzzy, no-c-format
+msgid ""
+"The proxy is an instance of <literal>org.jboss.invocation.http.interfaces."
+"HttpInvokerProxy</literal>, and implements the <literal>org.jnp.interfaces."
+"Naming</literal> interface. Internally the <literal>HttpInvokerProxy</"
+"literal> contains an invoker that marshalls the <literal>Naming</literal> "
+"interface method invocations to the <literal>InvokerServlet</literal> via "
+"HTTP posts. The <literal>InvokerServlet</literal> translates these posts "
+"into JMX invocations to the <literal>NamingService</literal>, and returns "
+"the invocation response back to the proxy in the HTTP post response."
+msgstr ""
+"这个代理是 <literal>org.jboss.invocation.http.interfaces.HttpInvokerProxy</"
+"literal> 的一个实例,它实现了 <literal>org.jnp.interfaces.Naming</literal> 接"
+"口。<literal>HttpInvokerProxy</literal> 内部包含一个调用者,它把通过 HTTP "
+"posts 对 <literal>InvokerServlet</literal> 的 <literal>Naming</literal> 接口"
+"方法调用打包。<literal>InvokerServlet</literal> 把这些 posts 翻译成对 "
+"<literal>NamingService</literal> 的 JMX 调用,并把调用结果返回给 HTTP post 响"
+"应里的代理。"
+
+#. Tag: para
+#: Naming.xml:438
+#, fuzzy, no-c-format
+msgid ""
+"There are several configuration values that need to be set to tie all of "
+"these components together and <xref linkend=\"Accessing_JNDI_over_HTTP-"
+"The_relationship_between_configuration_files_and_JNDIHTTP_component\"/> "
+"illustrates the relationship between configuration files and the "
+"corresponding components."
+msgstr ""
+"有几个配置的值需要设置成与所有的组件相关联,<xref linkend=\"ch3.httpjndiconf."
+"fig\"/> 说明了配置文件和对应的组件之间的关系。"
+
+#. Tag: title
+#: Naming.xml:442
+#, no-c-format
+msgid "The relationship between configuration files and JNDI/HTTP component"
+msgstr "The relationship between configuration files and JNDI/HTTP component"
+
+#. Tag: para
+#: Naming.xml:449
+#, no-c-format
+msgid ""
+"The <literal>http-invoker.sar/META-INF/jboss-service.xml</literal> "
+"descriptor defines the <literal>HttpProxyFactory</literal> that creates the "
+"<literal>HttpInvokerProxy</literal> for the <literal>NamingService</"
+"literal>. The attributes that need to be configured for the "
+"<literal>HttpProxyFactory</literal> include:"
+msgstr ""
+"<literal>http-invoker.sar/META-INF/jboss-service.xml</literal> 描述符定义为 "
+"<literal>NamingService</literal> 创建 <literal>HttpInvokerProxy</literal> 的 "
+"<literal>HttpProxyFactory</literal>。需要为 <literal>HttpProxyFactory</"
+"literal> 配置的属性包括:"
+
+#. Tag: para
+#: Naming.xml:454
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerName</emphasis>: The JMX <literal>ObjectName</"
+"literal> of the <literal>NamingService</literal> defined in the "
+"<literal>conf/jboss-service.xml</literal> descriptor. The standard setting "
+"used in the JBoss distributions is <literal>jboss:service=Naming</literal>."
+msgstr ""
+"<emphasis role=\"bold\">InvokerName</emphasis>:<literal>conf/jboss-service."
+"xml</literal> 描述符里定义的 <literal>NamingService</literal> 的 JMX "
+"<literal>ObjectName</literal>。JBoss 发行版本里定义的标准设定是 "
+"<literal>jboss:service=Naming</literal>。"
+
+#. Tag: para
+#: Naming.xml:459
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURL</emphasis> or <emphasis role=\"bold"
+"\">InvokerURLPrefix</emphasis> + InvokerURLSuffix + <emphasis role=\"bold"
+"\">UseHostName</emphasis>. You can specify the full HTTP URL to the "
+"<literal>InvokerServlet</literal> using the <literal>InvokerURL</literal> "
+"attribute, or you can specify the hostname independent parts of the URL and "
+"have the <literal>HttpProxyFactory</literal> fill them in. An example "
+"<literal>InvokerURL</literal> value would be <literal>http://jbosshost1.dot."
+"com:8080/invoker/JMXInvokerServlet</literal>. This can be broken down into:"
+msgstr ""
+"<emphasis role=\"bold\">InvokerURL</emphasis> or <emphasis role=\"bold"
+"\">InvokerURLPrefix</emphasis> + InvokerURLSuffix + <emphasis role=\"bold"
+"\">UseHostName</emphasis>:你可以用 <literal>InvokerURL</literal> 属性指定 "
+"<literal>InvokerServlet</literal> 的完整 HTTP URL,或者你可以指定 URL 里的主"
+"机名等独立部分并用 <literal>HttpProxyFactory</literal> 来进行填写。"
+"<literal>http://jbosshost1.dot.com:8080/invoker/JMXInvokerServlet</literal> "
+"是 <literal>InvokerURL</literal> 值的一个例子,它可以分解为:"
+
+#. Tag: para
+#: Naming.xml:462
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURLPrefix</emphasis>: the URL prefix prior to "
+"the hostname. Typically this will be <literal>http://</literal> or "
+"<literal>https://</literal> if SSL is to be used."
+msgstr ""
+"<emphasis role=\"bold\">InvokerURLPrefix</emphasis>:主机名前面的 URL 前缀。"
+"它通常为 <literal>http://</literal>,如果使用 SSL 的话,则是 "
+"<literal>https://</literal>。"
+
+#. Tag: para
+#: Naming.xml:467
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InvokerURLSuffix</emphasis>: the URL suffix after "
+"the hostname. This will include the port number of the web server as well as "
+"the deployed path to the <literal>InvokerServlet</literal> . For the example "
+"<literal>InvokerURL</literal> value the <literal>InvokerURLSuffix</literal> "
+"would be <literal>:8080/invoker/JMXInvokerServlet</literal> without the "
+"quotes. The port number is determined by the web container service settings. "
+"The path to the <literal>InvokerServlet</literal> is specified in the "
+"<literal>http-invoker.sar/invoker.war/WEB-INF/web.xml</literal> descriptor."
+msgstr ""
+"<emphasis role=\"bold\">InvokerURLSuffix</emphasis>:在主机名后的 URL 后缀。"
+"它将包括 web 服务器的端口号和到 <literal>InvokerServlet</literal> 的部署路"
+"径。在 <literal>InvokerURL</literal> 例子里,<literal>InvokerURLSuffix</"
+"literal> 将是 <literal>:8080/invoker/JMXInvokerServlet</literal>。端口号是由 "
+"web 容器服务设置决定的。<literal>InvokerServlet</literal> 的路径在 "
+"<literal>http-invoker.sar/invoker.war/WEB-INF/web.xml</literal> 描述符里指"
+"定。"
+
+#. Tag: para
+#: Naming.xml:472
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">UseHostName</emphasis>: a flag indicating if the "
+"hostname should be used in place of the host IP address when building the "
+"hostname portion of the full <literal>InvokerURL</literal>. If true, "
+"<literal>InetAddress.getLocalHost().getHostName</literal> method will be "
+"used. Otherwise, the <literal>InetAddress.getLocalHost().getHostAddress()</"
+"literal> method is used."
+msgstr ""
+"<emphasis role=\"bold\">UseHostName</emphasis>:指定在建立完整的 "
+"<literal>InvokerURL</literal> 时是否应该用主机名代替 IP 地址。它如果为 "
+"true,<literal>InetAddress.getLocalHost().getHostName</literal> 方法将被使"
+"用,否则将使用 <literal>InetAddress.getLocalHost().getHostAddress()</"
+"literal> 方法。"
+
+#. Tag: para
+#: Naming.xml:480
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>: The <literal>org.jnp."
+"interfaces.Naming</literal> interface the proxy will expose to clients. The "
+"actual client of this proxy is the JBoss JNDI implementation "
+"<literal>NamingContext</literal> class, which JNDI client obtain from "
+"<literal>InitialContext</literal> lookups when using the JBoss JNDI provider."
+msgstr ""
+"<emphasis role=\"bold\">ExportedInterface</emphasis>:代理将开放给客户的 "
+"<literal>org.jnp.interfaces.Naming</literal> 接口。这个代理实际的客户是 "
+"JBoss 的 JNDI 实现 <literal>NamingContext</literal> 类,它是 JNDI 客户在使用 "
+"JBoss JNDI 提供者时,从 <literal>InitialContext</literal> 查找里获取的。"
+
+#. Tag: para
+#: Naming.xml:485
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The name in JNDI under which "
+"the proxy is bound. This needs to be set to a blank/empty string to indicate "
+"the interface should not be bound into JNDI. We can't use the JNDI to "
+"bootstrap itself. This is the role of the <literal>NamingFactoryServlet</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">JndiName</emphasis>:代理所绑定的 JNDI 名。如果接口不"
+"应该绑定 JNDI,这个值应设为空串。我们不能够使用 JNDI 引导它自己,这是 "
+"<literal>NamingFactoryServlet</literal> 的任务。"
+
+#. Tag: para
+#: Naming.xml:490
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>http-invoker.sar/invoker.war/WEB-INF/web.xml</literal> "
+"descriptor defines the mappings of the <literal>NamingFactoryServlet</"
+"literal> and <literal>InvokerServlet</literal> along with their "
+"initialization parameters. The configuration of the "
+"<literal>NamingFactoryServlet</literal> relevant to JNDI/HTTP is the "
+"<literal>JNDIFactory</literal> entry which defines:"
+msgstr ""
+"<literal>http-invoker.sar/invoker.war/WEB-INF/web.xml</literal> 描述符定义"
+"<literal>NamingFactoryServlet</literal> 和 <literal>InvokerServlet</literal> "
+"以及它们 <literal>NamingFactoryServlet</literal> 的初始参数的映射关系。"
+"<literal>JNDIFactory</literal> 条目是和 JNDI/HTTP 相关的 "
+"<literal>NamingFactoryServlet</literal> 的配置,它定义了:"
+
+#. Tag: para
+#: Naming.xml:495
+#, no-c-format
+msgid ""
+"A <literal>namingProxyMBean</literal> initialization parameter that maps to "
+"the <literal>HttpProxyFactory</literal> MBean name. This is used by the "
+"<literal>NamingFactoryServlet</literal> to obtain the <literal>Naming</"
+"literal> proxy which it will return in response to HTTP posts. For the "
+"default <literal>http-invoker.sar/META-INF/jboss-service.xml</literal> "
+"settings the name <literal>jboss:service=invoker,type=http,target=Naming</"
+"literal>."
+msgstr ""
+"一个映射到 <literal>HttpProxyFactory</literal> MBean 名的 "
+"<literal>namingProxyMBean</literal> 初始参数。它被 "
+"<literal>NamingFactoryServlet</literal> 用来获取回应 HTTP posts 的 "
+"<literal>Naming</literal> 代理。对于缺省的 <literal>http-invoker.sar/META-"
+"INF/jboss-service.xml</literal> 设置,它的名字是 <literal>jboss:"
+"service=invoker,type=http,target=Naming</literal>。"
+
+#. Tag: para
+#: Naming.xml:500
+#, fuzzy, no-c-format
+msgid ""
+"A proxy initialization parameter that defines the name of the "
+"<literal>namingProxyMBean</literal> attribute to query for the Naming proxy "
+"value. This defaults to an attribute name of <literal>Proxy</literal>."
+msgstr ""
+"一个定义 <literal>namingProxyMBean</literal> 属性名来查询命名代理值的的代理初"
+"始参数,它缺省为 <literal>Proxy</literal> 的一个属性名。"
+
+#. Tag: para
+#: Naming.xml:505
+#, no-c-format
+msgid ""
+"The servlet mapping for the <literal>JNDIFactory</literal> configuration. "
+"The default setting for the unsecured mapping is <literal>/JNDIFactory/*</"
+"literal>. This is relative to the context root of the <literal>http-invoker."
+"sar/invoker.war</literal>, which by default is the WAR name minus the "
+"<literal>.war</literal> suffix."
+msgstr ""
+"<literal>JNDIFactory</literal> 配置的 servlet 映射。Unsecured 映射的缺省设置"
+"是 <literal>/JNDIFactory/*</literal>。它和 <literal>http-invoker.sar/invoker."
+"war</literal> 的上下文根目录相关,缺省为 WAR 名减去 <literal>.war</literal> "
+"后缀。 "
+
+#. Tag: para
+#: Naming.xml:510
+#, no-c-format
+msgid ""
+"The configuration of the <literal>InvokerServlet</literal> relevant to JNDI/"
+"HTTP is the <literal>JMXInvokerServlet</literal> which defines:"
+msgstr ""
+"和 JNDI/HTTP 相关的 <literal>InvokerServlet</literal> 的配置是 "
+"<literal>JMXInvokerServlet</literal>,它定义了:"
+
+#. Tag: para
+#: Naming.xml:515
+#, no-c-format
+msgid ""
+"The servlet mapping of the <literal>InvokerServlet</literal>. The default "
+"setting for the unsecured mapping is <literal>/JMXInvokerServlet/*</"
+"literal>. This is relative to the context root of the <literal>http-invoker."
+"sar/invoker.war</literal>, which by default is the WAR name minus the "
+"<literal>.war</literal> suffix."
+msgstr ""
+"<literal>InvokerServlet</literal> 的 servlet 映射。Unsecured 映射的缺省设置"
+"是 <literal>/JMXInvokerServlet/*</literal>。它和 <literal>http-invoker.sar/"
+"invoker.war</literal> 的上下文根目录相关,缺省为 WAR 名减去 <literal>.war</"
+"literal> 后缀。 "
+
+#. Tag: title
+#: Naming.xml:523
+#, no-c-format
+msgid "Accessing JNDI over HTTPS"
+msgstr "通过 HTTPS 访问 SSL 连接器JNDI"
+
+#. Tag: para
+#: Naming.xml:524
+#, no-c-format
+msgid ""
+"To be able to access JNDI over HTTP/SSL you need to enable an SSL connector "
+"on the web container. The details of this are covered in the Integrating "
+"Servlet Containers for Tomcat. We will demonstrate the use of HTTPS with a "
+"simple example client that uses an HTTPS URL as the JNDI provider URL. We "
+"will provide an SSL connector configuration for the example, so unless you "
+"are interested in the details of the SSL connector setup, the example is "
+"self contained."
+msgstr ""
+"要通过 HTTP/SSL 访问 JNDI,你需要在 web 容器上启用一个 SSL 连接器。"
+"Integrating Servlet Containers for Tomcat 里有关于这个的详细内容。我们将用一"
+"个简单的客户把 HTTPS URL 用作 JNDI 提供者 URL 的例子来演示 HTTPS 的使用。我们"
+"将为这个例子提供一个 SSL 连接器配置,所以除非你对 SSL 连接器的设置细节很感兴"
+"趣,否则我们将假设这个例子已经包含了这样的配置。"
+
+#. Tag: para
+#: Naming.xml:527
+#, fuzzy, no-c-format
+msgid ""
+"We also provide a configuration of the <literal>HttpProxyFactory</literal> "
+"setup to use an HTTPS URL. The following example shows the section of the "
+"<literal>http-invoker.sar</literal><literal>jboss-service.xml</literal> "
+"descriptor that the example installs to provide this configuration. All that "
+"has changed relative to the standard HTTP configuration are the "
+"<literal>InvokerURLPrefix</literal> and <literal>InvokerURLSuffix</literal> "
+"attributes, which setup an HTTPS URL using the 8443 port."
+msgstr ""
+"我们也提供一个 <literal>HttpProxyFactory</literal> 设立的配置来使用 HTTPS "
+"URL。下面的示例展示了提供这个配置的 <literal>http-invoker.sar</literal> "
+"<literal>jboss-service.xml</literal> 描述符。所有和标准的 HTTP 配置相关的改动"
+"是 <literal>InvokerURLPrefix</literal> 和 <literal>InvokerURLSuffix</"
+"literal> 属性,它们用 8443 端口设置了一个 HTTPS URL。"
+
+#. Tag: programlisting
+#: Naming.xml:530
+#, fuzzy, no-c-format
+msgid ""
+"<!-- Expose the Naming service interface via HTTPS -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\" \n"
+" name=\"jboss:service=invoker,type=https,target=Naming\">\n"
+" <!-- The Naming service we are proxying -->\n"
+" <attribute name=\"InvokerName\">jboss:service=Naming</"
+"attribute>\n"
+" <!-- Compose the invoker URL from the cluster node address -->\n"
+" <attribute name=\"InvokerURLPrefix\">https://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8443/invoker/"
+"JMXInvokerServlet \n"
+"</attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+" <attribute name=\"ExportedInterface\">org.jnp.interfaces.Naming \n"
+"</attribute>\n"
+" <attribute name=\"JndiName\"/>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <interceptors>\n"
+" <interceptor>org.jboss.proxy.ClientMethodInterceptor \n"
+"</interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor\n"
+"</interceptor>\n"
+" <interceptor>org.jboss.naming.interceptors."
+"ExceptionInterceptor \n"
+"</interceptor>\n"
+" <interceptor>org.jboss.invocation.InvokerInterceptor \n"
+"</interceptor>\n"
+" </interceptors>\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+"<!-- Expose the Naming service interface via HTTPS -->\n"
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\" \n"
+" name=\"jboss:service=invoker,type=https,target=Naming\">\n"
+" <!-- The Naming service we are proxying -->\n"
+" <attribute name=\"InvokerName\">jboss:service=Naming</"
+"attribute>\n"
+" <!-- Compose the invoker URL from the cluster node address -->\n"
+" <attribute name=\"InvokerURLPrefix\">https://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8443/invoker/"
+"JMXInvokerServlet </attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+" <attribute name=\"ExportedInterface\">org.jnp.interfaces.Naming "
+"</attribute>\n"
+" <attribute name=\"JndiName\"/>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <interceptors>\n"
+" <interceptor>org.jboss.proxy.ClientMethodInterceptor </"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.naming.interceptors."
+"ExceptionInterceptor </interceptor>\n"
+" <interceptor>org.jboss.invocation.InvokerInterceptor </"
+"interceptor>\n"
+" </interceptors>\n"
+" </attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Naming.xml:531
+#, fuzzy, no-c-format
+msgid ""
+"At a minimum, a JNDI client using HTTPS requires setting up a HTTPS URL "
+"protocol handler. We will be using the Java Secure Socket Extension (JSSE) "
+"for HTTPS. The JSSE documentation does a good job of describing what is "
+"necessary to use HTTPS, and the following steps were needed to configure the "
+"example client shown in <xref linkend=\"Accessing_JNDI_over_HTTPS-"
+"A_JNDI_client_that_uses_HTTPS_as_the_transport\"/>:"
+msgstr ""
+"使用 JNDI 的客户要求最少设置一个 HTTPS URL 协议的处理程序。我们将为 HTTPS 使"
+"用 Java Secure Socket Extension (JSSE)。JSSE 文档很好地描述了使用 HTTPS 所必"
+"需的事情,配置 <xref linkend=\"ch3.jndiclienthttps.ex\"/> 里的示例客户需要下"
+"面的步骤:"
+
+#. Tag: para
+#: Naming.xml:536
+#, no-c-format
+msgid ""
+"A protocol handler for HTTPS URLs must be made available to Java. The JSSE "
+"release includes an HTTPS handler in the <literal>com.sun.net.ssl.internal."
+"www.protocol</literal> package. To enable the use of HTTPS URLs you include "
+"this package in the standard URL protocol handler search property, "
+"<literal>java.protocol.handler.pkgs</literal>. We set the <literal>java."
+"protocol.handler.pkgs</literal> property in the Ant script."
+msgstr ""
+"必需有 Java 可用的 HTTPS URL 协议处理程序。JSSE 发行版本在 <literal>com.sun."
+"net.ssl.internal.www.protocol</literal> 包里包含了一个 HTTPS 处理程序。要使"
+"用 HTTPS URL,你要把这个包包括在标准的 URL 协议处理程序搜索属性 "
+"<literal>java.protocol.handler.pkgs</literal> 里。我们在 Ant 脚本里设置 "
+"<literal>java.protocol.handler.pkgs</literal> 属性。"
+
+#. Tag: para
+#: Naming.xml:541
+#, no-c-format
+msgid ""
+"The JSSE security provider must be installed in order for SSL to work. This "
+"can be done either by installing the JSSE jars as an extension package, or "
+"programatically. We use the programatic approach in the example since this "
+"is less intrusive. Line 18 of the <literal>ExClient</literal> code "
+"demonstrates how this is done."
+msgstr ""
+"使用 SSL 必须安装 JSSE 安全性提供者(security provider)。这可以通过把 JSSE "
+"jars 安装为一个扩展包或编程来完成。我们在这个例子里使用编程的方法,既然这样更"
+"加直接。<literal>ExClient</literal> 代码的第 18 行演示了怎样完成这个安装。"
+
+#. Tag: para
+#: Naming.xml:546
+#, no-c-format
+msgid ""
+"The JNDI provider URL must use HTTPS as the protocol. Lines 24-25 of the "
+"<literal>ExClient</literal> code specify an HTTP/SSL connection to the "
+"localhost on port 8443. The hostname and port are defined by the web "
+"container SSL connector."
+msgstr ""
+" JNDI 提供者 URL 必须使用 HTTPS 协议。<literal>ExClient</literal> 代码的 24-"
+"25 行指定了一个到本机 8443 端口的 HTTP/SSL 连接。主机名和端口号都是由 web 容"
+"器的 SSL 连接器定义的。"
+
+#. Tag: para
+#: Naming.xml:551
+#, no-c-format
+msgid ""
+"The validation of the HTTPS URL hostname against the server certificate must "
+"be disabled. By default, the JSSE HTTPS protocol handler employs a strict "
+"validation of the hostname portion of the HTTPS URL against the common name "
+"of the server certificate. This is the same check done by web browsers when "
+"you connect to secured web site. We are using a self-signed server "
+"certificate that uses a common name of \"<literal>Chapter 8 SSL Example</"
+"literal>\" rather than a particular hostname, and this is likely to be "
+"common in development environments or intranets. The JBoss "
+"<literal>HttpInvokerProxy</literal> will override the default hostname "
+"checking if a <literal>org.jboss.security.ignoreHttpsHost</literal> system "
+"property exists and has a value of true. We set the <literal>org.jboss."
+"security.ignoreHttpsHost</literal> property to true in the Ant script."
+msgstr ""
+"依照服务器证书对 HTTPS URL 主机名的确认(validation)必须被禁止。在缺省情况下,"
+"JSSE HTTPS 协议处理程序(handler)依照服务器证书的通用名来对 HTTPS URL 的主机名"
+"部分进行严格的确认。这和连接到安全的网站时浏览器所做的检查是一样的。我们用的"
+"是一个自签发(self-signed)服务器证书,它使用通用的名字 \"<literal>Chapter 8 "
+"SSL Example</literal>\" 而不是一个特定的主机名,这在开发环境或 Intranet 里可"
+"能很常见。如果系统属性 <literal>org.jboss.security.ignoreHttpsHost</literal> "
+"JBoss 存在并且它的值为 true 的话,<literal>HttpInvokerProxy</literal> 将覆盖"
+"这个缺省的主机名检查。在这个 Ant 脚本里,我们把 <literal>org.jboss.security."
+"ignoreHttpsHost</literal> 属性设置为 true。"
+
+#. Tag: title
+#: Naming.xml:556
+#, no-c-format
+msgid "A JNDI client that uses HTTPS as the transport"
+msgstr "A JNDI client that uses HTTPS as the transport"
+
+#. Tag: programlisting
+#: Naming.xml:557
+#, no-c-format
+msgid ""
+"package org.jboss.chap3.ex1;\n"
+"\n"
+"import java.security.Security;\n"
+"import java.util.Properties;\n"
+"import javax.naming.Context;\n"
+"import javax.naming.InitialContext;\n"
+" \n"
+"public class ExClient\n"
+"{\n"
+" public static void main(String args[]) throws Exception\n"
+" {\n"
+" Properties env = new Properties();\n"
+" env.setProperty(Context.INITIAL_CONTEXT_FACTORY,\n"
+" \"org.jboss.naming.HttpNamingContextFactory\");\n"
+" env.setProperty(Context.PROVIDER_URL,\n"
+" \"https://localhost:8443/invoker/JNDIFactorySSL\");\n"
+"\n"
+" Context ctx = new InitialContext(env);\n"
+" System.out.println(\"Created InitialContext, env=\" + env);\n"
+"\n"
+" Object data = ctx.lookup(\"jmx/invoker/RMIAdaptor\");\n"
+" System.out.println(\"lookup(jmx/invoker/RMIAdaptor): \" + data);\n"
+" }\n"
+"}"
+msgstr ""
+"package org.jboss.chap3.ex1;\n"
+"\n"
+"import java.security.Security;\n"
+"import java.util.Properties;\n"
+"import javax.naming.Context;\n"
+"import javax.naming.InitialContext;\n"
+" \n"
+"public class ExClient\n"
+"{\n"
+" public static void main(String args[]) throws Exception\n"
+" {\n"
+" Properties env = new Properties();\n"
+" env.setProperty(Context.INITIAL_CONTEXT_FACTORY,\n"
+" \"org.jboss.naming.HttpNamingContextFactory\");\n"
+" env.setProperty(Context.PROVIDER_URL,\n"
+" \"https://localhost:8443/invoker/JNDIFactorySSL\");\n"
+"\n"
+" Context ctx = new InitialContext(env);\n"
+" System.out.println(\"Created InitialContext, env=\" + env);\n"
+"\n"
+" Object data = ctx.lookup(\"jmx/invoker/RMIAdaptor\");\n"
+" System.out.println(\"lookup(jmx/invoker/RMIAdaptor): \" + data);\n"
+" }\n"
+"}"
+
+#. Tag: para
+#: Naming.xml:558
+#, no-c-format
+msgid ""
+"To test the client, first build the chapter 3 example to create the "
+"<literal>chap3</literal> configuration fileset."
+msgstr ""
+"要测试这个 JNDI 客户,首先构建(build)第三章的示例来创建 <literal>chap3</"
+"literal> 配置文件集。"
+
+#. Tag: programlisting
+#: Naming.xml:561
+#, no-c-format
+msgid "[examples]$ ant -Dchap=naming config"
+msgstr "[examples]$ ant -Dchap=naming config"
+
+#. Tag: para
+#: Naming.xml:562
+#, no-c-format
+msgid ""
+"Next, start the JBoss server using the <literal>naming</literal> "
+"configuration fileset:"
+msgstr "然后,用 <literal>naming</literal> 配置文件集启动 JBoss 服务器。"
+
+#. Tag: programlisting
+#: Naming.xml:565
+#, no-c-format
+msgid "[bin]$ sh run.sh -c naming"
+msgstr "[bin]$ sh run.sh -c naming"
+
+#. Tag: para
+#: Naming.xml:566
+#, no-c-format
+msgid "And finally, run the <literal>ExClient</literal> using:"
+msgstr "最后,用下面的命令运行 <literal>ExClient</literal>:"
+
+#. Tag: programlisting
+#: Naming.xml:569
+#, fuzzy, no-c-format
+msgid ""
+"[examples]$ ant -Dchap=naming -Dex=1 run-example\n"
+"...\n"
+"run-example1:\n"
+"\n"
+"[java] Created InitialContext, env={java.naming. \\ \n"
+"provider.url=https://localhost:8443/invoker/JNDIFactorySSL, java.naming. \\\n"
+"factory.initial=org.jboss.naming.HttpNamingContextFactory}\n"
+" [java] lookup(jmx/invoker/RMIAdaptor): org.jboss.invocation.jrmp. \\\n"
+" interfaces.JRMPInvokerP\n"
+"roxy at cac3fa"
+msgstr ""
+"[examples]$ ant -Dchap=naming -Dex=1 run-example\n"
+"...\n"
+"run-example1:\n"
+" [java] Created InitialContext, env={java.naming.provider.url=https://"
+"localhost:8443/invo\n"
+"ker/JNDIFactorySSL, java.naming.factory.initial=org.jboss.naming."
+"HttpNamingContextFactory}\n"
+" [java] lookup(jmx/invoker/RMIAdaptor): org.jboss.invocation.jrmp."
+"interfaces.JRMPInvokerP\n"
+"roxy at cac3fa"
+
+#. Tag: title
+#: Naming.xml:573
+#, no-c-format
+msgid "Securing Access to JNDI over HTTP"
+msgstr "使通过 HTTP 访问 JNDI 更安全"
+
+#. Tag: para
+#: Naming.xml:574
+#, fuzzy, no-c-format
+msgid ""
+"One benefit to accessing JNDI over HTTP is that it is easy to secure access "
+"to the JNDI <literal>InitialContext</literal> factory as well as the naming "
+"operations using standard web declarative security. This is possible because "
+"the server side handling of the JNDI/HTTP transport is implemented with two "
+"servlets. These servlets are included in the <literal>http-invoker.sar/"
+"invoker.war</literal> directory found in the <literal>default</literal> and "
+"<literal>all</literal> configuration deploy directories as shown previously. "
+"To enable secured access to JNDI you need to edit the <literal>invoker.war/"
+"WEB-INF/web.xml</literal> descriptor and remove all unsecured servlet "
+"mappings. For example, the <literal>web.xml</literal> descriptor shown in "
+"<xref linkend=\"Securing_Access_to_JNDI_over_HTTP-An_example_web."
+"xml_descriptor_for_secured_access_to_the_JNDI_servlets\"/> only allows "
+"access to the <literal>invoker.war</literal> servlets if the user has been "
+"authenticated and has a role of <literal>HttpInvoker</literal>."
+msgstr ""
+"通过 HTTP 访问 JNDI 的一个好处是,可以很容易地用标准的 web 声明性安全"
+"(declarative security)来使 JNDI <literal>InitialContext</literal> 工厂和命名"
+"操作安全。这是有可能的,因为 JNDI/HTTP 传输的服务器端处理是由两个 servlets 来"
+"实现的。这些 servlets 包括在前面展示过的 <literal>default</literal> 和 "
+"<literal>all</literal> 里的 <literal>http-invoker.sar/invoker.war</literal> "
+"目录下。要启用对 JNDI 的安全访问,你需要编辑 <literal>invoker.war/WEB-INF/"
+"web.xml</literal> 描述符并删除所有的不安全的 servlet 映射。例如,如果用户已经"
+"被验证并充当 <literal>HttpInvoker</literal> 的角色时,<xref linkend=\"ch3."
+"webxmlsec.ex\"/> 里展示的 <literal>web.xml</literal> 描述符只允许对 "
+"<literal>invoker.war</literal> servlets 的访问。"
+
+#. Tag: title
+#: Naming.xml:577
+#, fuzzy, no-c-format
+msgid "An example web.xml descriptor for secured access to the JNDI servlets"
+msgstr ""
+"An example jboss-app.xml descriptor for enabled scoped class loading at the "
+"EAR level."
+
+#. Tag: programlisting
+#: Naming.xml:578
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app>\n"
+" <!-- ### Servlets -->\n"
+" <servlet>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <servlet-class>\n"
+" org.jboss.invocation.http.servlet.InvokerServlet\n"
+" </servlet-class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+" </servlet> <servlet>\n"
+" <servlet-name>JNDIFactory</servlet-name>\n"
+" <servlet-class>\n"
+" org.jboss.invocation.http.servlet.NamingFactoryServlet\n"
+" </servlet-class>\n"
+" <init-param>\n"
+" <param-name>namingProxyMBean</param-name>\n"
+" <param-value>jboss:service=invoker,type=http,"
+"target=Naming</param-value>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>proxyAttribute</param-name>\n"
+" <param-value>Proxy</param-value>\n"
+" </init-param>\n"
+" <load-on-startup>2</load-on-startup>\n"
+" </servlet> \n"
+" <!-- ### Servlet Mappings -->\n"
+" <servlet-mapping>\n"
+" <servlet-name>JNDIFactory</servlet-name>\n"
+" <url-pattern>/restricted/JNDIFactory/*</url-pattern>\n"
+" </servlet-mapping>\n"
+" <servlet-mapping>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <url-pattern>/restricted/JMXInvokerServlet/*</url-"
+"pattern>\n"
+" </servlet-mapping> <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HttpInvokers</web-resource-name>\n"
+" <description>An example security config that only allows "
+"users with\n"
+" the role HttpInvoker to access the HTTP invoker servlets "
+"</description>\n"
+" <url-pattern>/restricted/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>HttpInvoker</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>JBoss HTTP Invoker</realm-name>\n"
+" </login-config> <security-role>\n"
+" <role-name>HttpInvoker</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+msgstr ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE web-app PUBLIC\n"
+" \"-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN\"\n"
+" \"http://java.sun.com/dtd/web-app_2_3.dtd\">\n"
+"<web-app>\n"
+" <!-- ### Servlets -->\n"
+" <servlet>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <servlet-class>\n"
+" org.jboss.invocation.http.servlet.InvokerServlet\n"
+" </servlet-class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+" </servlet> <servlet>\n"
+" <servlet-name>JNDIFactory</servlet-name>\n"
+" <servlet-class>\n"
+" org.jboss.invocation.http.servlet.NamingFactoryServlet\n"
+" </servlet-class>\n"
+" <init-param>\n"
+" <param-name>namingProxyMBean</param-name>\n"
+" <param-value>jboss:service=invoker,type=http,"
+"target=Naming</param-value>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>proxyAttribute</param-name>\n"
+" <param-value>Proxy</param-value>\n"
+" </init-param>\n"
+" <load-on-startup>2</load-on-startup>\n"
+" </servlet> \n"
+" <!-- ### Servlet Mappings -->\n"
+" <servlet-mapping>\n"
+" <servlet-name>JNDIFactory</servlet-name>\n"
+" <url-pattern>/restricted/JNDIFactory/*</url-pattern>\n"
+" </servlet-mapping>\n"
+" <servlet-mapping>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <url-pattern>/restricted/JMXInvokerServlet/*</url-"
+"pattern>\n"
+" </servlet-mapping> <security-constraint>\n"
+" <web-resource-collection>\n"
+" <web-resource-name>HttpInvokers</web-resource-name>\n"
+" <description>An example security config that only allows "
+"users with\n"
+" the role HttpInvoker to access the HTTP invoker servlets "
+"</description>\n"
+" <url-pattern>/restricted/*</url-pattern>\n"
+" <http-method>GET</http-method>\n"
+" <http-method>POST</http-method>\n"
+" </web-resource-collection>\n"
+" <auth-constraint>\n"
+" <role-name>HttpInvoker</role-name>\n"
+" </auth-constraint>\n"
+" </security-constraint>\n"
+" <login-config>\n"
+" <auth-method>BASIC</auth-method>\n"
+" <realm-name>JBoss HTTP Invoker</realm-name>\n"
+" </login-config> <security-role>\n"
+" <role-name>HttpInvoker</role-name>\n"
+" </security-role>\n"
+"</web-app>"
+
+#. Tag: para
+#: Naming.xml:579
+#, no-c-format
+msgid ""
+"The <literal>web.xml</literal> descriptor only defines which sevlets are "
+"secured, and which roles are allowed to access the secured servlets. You "
+"must additionally define the security domain that will handle the "
+"authentication and authorization for the war. This is done through the "
+"<literal>jboss-web.xml</literal> descriptor, and an example that uses the "
+"<literal>http-invoker</literal> security domain is given below."
+msgstr ""
+"<literal>web.xml</literal> 描述符只定义那些 sevlets 是安全的和哪些角色被允许"
+"访问安全的 servlets。你必须额外地为 war 定义处理验证(authentication)和授权"
+"(authorization)的安全领域(security domain)。这是通过 <literal>jboss-web.xml</"
+"literal> 描述符完成的,下面是一个使用 <literal>http-invoker</literal> 安全领"
+"域的例子。"
+
+#. Tag: programlisting
+#: Naming.xml:582
+#, no-c-format
+msgid ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/http-invoker</security-domain>\n"
+"</jboss-web>"
+msgstr ""
+"<jboss-web>\n"
+" <security-domain>java:/jaas/http-invoker</security-domain>\n"
+"</jboss-web>"
+
+#. Tag: para
+#: Naming.xml:583
+#, fuzzy, no-c-format
+msgid ""
+"The <literal>security-domain</literal> element defines the name of the "
+"security domain that will be used for the JAAS login module configuration "
+"used for authentication and authorization. See <xref linkend="
+"\"J2EE_Declarative_Security_Overview-Enabling_Declarative_Security_in_JBoss"
+"\"/> for additional details on the meaning and configuration of the security "
+"domain name."
+msgstr ""
+"<literal>security-domain</literal> 元素定义安全领域的名字,用于验证和授权的 "
+"JAAS 登录(login module)模块配置将使用它。请参考 <xref linkend=\"ch8."
+"declarativesecurity.sect\"/> 里关于安全领域的含义和配置的详细内容。"
+
+#. Tag: title
+#: Naming.xml:589
+#, no-c-format
+msgid "Securing Access to JNDI with a Read-Only Unsecured Context"
+msgstr "用只读的 Unsecured Context 来使对 JNDI 的访问安全。"
+
+#. Tag: para
+#: Naming.xml:590
+#, fuzzy, no-c-format
+msgid ""
+"Another feature available for the JNDI/HTTP naming service is the ability to "
+"define a context that can be accessed by unauthenticated users in read-only "
+"mode. This can be important for services used by the authentication layer. "
+"For example, the <literal>SRPLoginModule</literal> needs to lookup the SRP "
+"server interface used to perform authentication. We'll now walk through "
+"how read-only JNDI works in JBoss."
+msgstr ""
+"JNDI/HTTP 命名服务的另外一个可用特征是定义可以在只读模式被未验证的客户访问的"
+"上下文的能力。这对于验证层(authentication layer)使用的服务来说很重要。例如,"
+"<literal>SRPLoginModule</literal> 需要查找用来执行验证的 SRP 服务器接口。现在"
+"我们来看看只读的 JNDI 在 JBoss 里是怎么工作的。"
+
+#. Tag: para
+#: Naming.xml:593
+#, no-c-format
+msgid ""
+"First, the <literal>ReadOnlyJNDIFactory</literal> is declared in "
+"<literal>invoker.sar/WEB-INF/web.xml</literal>. It will be mapped to "
+"<literal>/invoker/ReadOnlyJNDIFactory</literal>."
+msgstr ""
+"首先,<literal>ReadOnlyJNDIFactory</literal> 在 <literal>invoker.sar/WEB-INF/"
+"web.xml</literal> 里被声明。它将映射到 <literal>/invoker/"
+"ReadOnlyJNDIFactory</literal>。"
+
+#. Tag: programlisting
+#: Naming.xml:596
+#, fuzzy, no-c-format
+msgid ""
+"<servlet>\n"
+" <servlet-name>ReadOnlyJNDIFactory</servlet-name>\n"
+" <description>A servlet that exposes the JBoss JNDI Naming service "
+"stub\n"
+" through http, but only for a single read-only context. The return "
+"content \n"
+" is serialized MarshalledValue containing the org.jnp.interfaces."
+"Naming \n"
+" stub.\n"
+" </description>\n"
+" <servlet-class>org.jboss.invocation.http.servlet."
+"NamingFactoryServlet</servlet-class>\n"
+" <init-param>\n"
+" <param-name>namingProxyMBean</param-name>\n"
+" <param-value><emphasis role=\"bold\">jboss:service=invoker,"
+"type=http,target=Naming,readonly=true</emphasis></param-value>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>proxyAttribute</param-name>\n"
+" <param-value>Proxy</param-value>\n"
+" </init-param>\n"
+" <load-on-startup>2</load-on-startup>\n"
+"</servlet>\n"
+"\n"
+"<!-- ... -->\n"
+" \n"
+"<servlet-mapping>\n"
+" <servlet-name>ReadOnlyJNDIFactory</servlet-name>\n"
+" <url-pattern>/ReadOnlyJNDIFactory/*</url-pattern>\n"
+"</servlet-mapping>"
+msgstr ""
+"<servlet>\n"
+" <servlet-name>ReadOnlyJNDIFactory</servlet-name>\n"
+" <description>A servlet that exposes the JBoss JNDI Naming service "
+"stub\n"
+" through http, but only for a single read-only context. The return "
+"content \n"
+" is serialized MarshalledValue containg the org.jnp.interfaces."
+"Naming \n"
+" stub.\n"
+" </description>\n"
+" <servlet-class>org.jboss.invocation.http.servlet."
+"NamingFactoryServlet</servlet-class>\n"
+" <init-param>\n"
+" <param-name>namingProxyMBean</param-name>\n"
+" <param-value><emphasis role=\"bold\">jboss:service=invoker,"
+"type=http,target=Naming,readonly=true</emphasis></param-value>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>proxyAttribute</param-name>\n"
+" <param-value>Proxy</param-value>\n"
+" </init-param>\n"
+" <load-on-startup>2</load-on-startup>\n"
+"</servlet>\n"
+"\n"
+"<!-- ... -->\n"
+" \n"
+"<servlet-mapping>\n"
+" <servlet-name>ReadOnlyJNDIFactory</servlet-name>\n"
+" <url-pattern>/ReadOnlyJNDIFactory/*</url-pattern>\n"
+"</servlet-mapping>"
+
+#. Tag: para
+#: Naming.xml:597
+#, no-c-format
+msgid ""
+"The factory only provides a JNDI stub which needs to be connected to an "
+"invoker. Here the invoker is <literal>jboss:service=invoker,type=http,"
+"target=Naming,readonly=true</literal>. This invoker is declared in the "
+"<literal>http-invoker.sar/META-INF/jboss-service.xml</literal> file."
+msgstr ""
+"这个工厂只提供一个需要连接到调用者的 JNDI stub。在这里,调用者是 "
+"<literal>jboss:service=invoker,type=http,target=Naming,readonly=true</"
+"literal>。这个调用者在 <literal>http-invoker.sar/META-INF/jboss-service.xml</"
+"literal> 文件里被声明。"
+
+#. Tag: programlisting
+#: Naming.xml:600
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\"\n"
+" name=\"jboss:service=invoker,type=http,target=Naming,readonly=true"
+"\">\n"
+" <attribute name=\"InvokerName\">jboss:service=Naming</"
+"attribute>\n"
+" <attribute name=\"InvokerURLPrefix\">http://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8080<emphasis role=\"bold"
+"\">/invoker/readonly/JMXInvokerServlet</emphasis></attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+" <attribute name=\"ExportedInterface\">org.jnp.interfaces."
+"Naming</attribute>\n"
+" <attribute name=\"JndiName\"></attribute>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <interceptors>\n"
+" <interceptor>org.jboss.proxy.ClientMethodInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.naming.interceptors."
+"ExceptionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation.InvokerInterceptor</"
+"interceptor>\n"
+" </interceptors>\n"
+" </attribute>\n"
+" </mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.invocation.http.server.HttpProxyFactory\"\n"
+" name=\"jboss:service=invoker,type=http,target=Naming,readonly=true"
+"\">\n"
+" <attribute name=\"InvokerName\">jboss:service=Naming</"
+"attribute>\n"
+" <attribute name=\"InvokerURLPrefix\">http://</attribute>\n"
+" <attribute name=\"InvokerURLSuffix\">:8080<emphasis role=\"bold"
+"\">/invoker/readonly/JMXInvokerServlet</emphasis></attribute>\n"
+" <attribute name=\"UseHostName\">true</attribute>\n"
+" <attribute name=\"ExportedInterface\">org.jnp.interfaces."
+"Naming</attribute>\n"
+" <attribute name=\"JndiName\"></attribute>\n"
+" <attribute name=\"ClientInterceptors\">\n"
+" <interceptors>\n"
+" <interceptor>org.jboss.proxy.ClientMethodInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.proxy.SecurityInterceptor</"
+"interceptor>\n"
+" <interceptor>org.jboss.naming.interceptors."
+"ExceptionInterceptor</interceptor>\n"
+" <interceptor>org.jboss.invocation.InvokerInterceptor</"
+"interceptor>\n"
+" </interceptors>\n"
+" </attribute>\n"
+" </mbean>"
+
+#. Tag: para
+#: Naming.xml:601
+#, no-c-format
+msgid ""
+"The proxy on the client side needs to talk back to a specific invoker "
+"servlet on the server side. The configuration here has the actual "
+"invocations going to <literal>/invoker/readonly/JMXInvokerServlet</literal>. "
+"This is actually the standard <literal>JMXInvokerServlet</literal> with a "
+"read-only filter attached."
+msgstr ""
+"客户端的代理需要与服务器端特定的调用者 servlet 通信。这里的配置里有到 "
+"<literal>/invoker/readonly/JMXInvokerServlet</literal> 的实际调用。这实际上是"
+"有只读过滤器的标准 <literal>JMXInvokerServlet</literal>。"
+
+#. Tag: programlisting
+#: Naming.xml:604
+#, no-c-format
+msgid ""
+"<filter>\n"
+" <filter-name>ReadOnlyAccessFilter</filter-name>\n"
+" <filter-class>org.jboss.invocation.http.servlet."
+"ReadOnlyAccessFilter</filter-class>\n"
+" <init-param>\n"
+" <param-name>readOnlyContext</param-name>\n"
+" <param-value><emphasis role=\"bold\">readonly</"
+"emphasis></param-value>\n"
+" <description>The top level JNDI context the filter will "
+"enforce\n"
+" read-only access on. If specified only Context.lookup "
+"operations\n"
+" will be allowed on this context. Another other operations "
+"or\n"
+" lookups on any other context will fail. Do not associate "
+"this\n"
+" filter with the JMXInvokerServlets if you want unrestricted\n"
+" access. </description>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>invokerName</param-name>\n"
+" <param-value>jboss:service=Naming</param-value>\n"
+" <description>The JMX ObjectName of the naming service "
+"mbean </description>\n"
+" </init-param>\n"
+" </filter>\n"
+" \n"
+" <filter-mapping>\n"
+" <filter-name>ReadOnlyAccessFilter</filter-name>\n"
+" <url-pattern>/readonly/*</url-pattern>\n"
+" </filter-mapping>\n"
+"\n"
+" <!-- ... -->\n"
+" <!-- A mapping for the JMXInvokerServlet that only allows "
+"invocations \n"
+" of lookups under a read-only context. This is enforced by the\n"
+" ReadOnlyAccessFilter \n"
+" -->\n"
+" <servlet-mapping>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <url-pattern>/readonly/JMXInvokerServlet/*</url-"
+"pattern>\n"
+" </servlet-mapping>"
+msgstr ""
+"<filter>\n"
+" <filter-name>ReadOnlyAccessFilter</filter-name>\n"
+" <filter-class>org.jboss.invocation.http.servlet."
+"ReadOnlyAccessFilter</filter-class>\n"
+" <init-param>\n"
+" <param-name>readOnlyContext</param-name>\n"
+" <param-value><emphasis role=\"bold\">readonly</"
+"emphasis></param-value>\n"
+" <description>The top level JNDI context the filter will "
+"enforce\n"
+" read-only access on. If specified only Context.lookup "
+"operations\n"
+" will be allowed on this context. Another other operations "
+"or\n"
+" lookups on any other context will fail. Do not associate "
+"this\n"
+" filter with the JMXInvokerServlets if you want unrestricted\n"
+" access. </description>\n"
+" </init-param>\n"
+" <init-param>\n"
+" <param-name>invokerName</param-name>\n"
+" <param-value>jboss:service=Naming</param-value>\n"
+" <description>The JMX ObjectName of the naming service "
+"mbean </description>\n"
+" </init-param>\n"
+" </filter>\n"
+" \n"
+" <filter-mapping>\n"
+" <filter-name>ReadOnlyAccessFilter</filter-name>\n"
+" <url-pattern>/readonly/*</url-pattern>\n"
+" </filter-mapping>\n"
+"\n"
+" <!-- ... -->\n"
+" <!-- A mapping for the JMXInvokerServlet that only allows "
+"invocations \n"
+" of lookups under a read-only context. This is enforced by the\n"
+" ReadOnlyAccessFilter \n"
+" -->\n"
+" <servlet-mapping>\n"
+" <servlet-name>JMXInvokerServlet</servlet-name>\n"
+" <url-pattern>/readonly/JMXInvokerServlet/*</url-"
+"pattern>\n"
+" </servlet-mapping>"
+
+#. Tag: para
+#: Naming.xml:605
+#, no-c-format
+msgid ""
+"The <literal>readOnlyContext</literal> parameter is set to "
+"<literal>readonly</literal> which means that when you access JBoss through "
+"the <literal>ReadOnlyJNDIFactory</literal>, you will only be able to access "
+"data in the <literal>readonly</literal> context. Here is a code fragment "
+"that illustrates the usage:"
+msgstr ""
+"<literal>readOnlyContext</literal> 参数被设置成 <literal>readonly</literal>,"
+"这表示当你通过 <literal>ReadOnlyJNDIFactory</literal> 访问 JBoss 时,你将只能"
+"访问 <literal>readonly</literal> 上下文里的数据。下面是说明这种用法的代码片"
+"段:"
+
+#. Tag: programlisting
+#: Naming.xml:608
+#, no-c-format
+msgid ""
+"Properties env = new Properties();\n"
+"env.setProperty(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jboss.naming.HttpNamingContextFactory\");\n"
+"env.setProperty(Context.PROVIDER_URL, \n"
+" \"http://localhost:8080/invoker/ReadOnlyJNDIFactory\");\n"
+"\n"
+"Context ctx2 = new InitialContext(env);\n"
+"Object data = ctx2.lookup(\"readonly/data\");"
+msgstr ""
+"Properties env = new Properties();\n"
+"env.setProperty(Context.INITIAL_CONTEXT_FACTORY, \n"
+" \"org.jboss.naming.HttpNamingContextFactory\");\n"
+"env.setProperty(Context.PROVIDER_URL, \n"
+" \"http://localhost:8080/invoker/ReadOnlyJNDIFactory\");\n"
+"\n"
+"Context ctx2 = new InitialContext(env);\n"
+"Object data = ctx2.lookup(\"readonly/data\");"
+
+#. Tag: para
+#: Naming.xml:609
+#, fuzzy, no-c-format
+msgid ""
+"Attempts to look up any objects outside of the readonly context will fail. "
+"Note that JBoss doesn't ship with any data in the <literal>readonly</"
+"literal> context, so the readonly context won't be bound usable unless "
+"you create it."
+msgstr ""
+"查找在只读上下文之外的任何对象都会失败。注意 JBoss 并不带有 "
+"<literal>readonly</literal> 上下文里的任何数据,所以除非你创建它,否则只读上"
+"下文不会被绑定。"
+
+#. Tag: title
+#: Naming.xml:617
+#, no-c-format
+msgid "Additional Naming MBeans"
+msgstr "其他命名 MBeans"
+
+#. Tag: para
+#: Naming.xml:618
+#, no-c-format
+msgid ""
+"In addition to the <literal>NamingService</literal> MBean that configures an "
+"embedded JBossNS server within JBoss, there are several additional MBean "
+"services related to naming that ship with JBoss. They are "
+"<literal>JndiBindingServiceMgr</literal>, <literal>NamingAlias</literal>, "
+"<literal>ExternalContext</literal>, and <literal>JNDIView</literal>."
+msgstr ""
+"除了配置 JBoss 里嵌入的 JBossNS 服务器的 <literal>NamingService</literal> "
+"MBean 外,JBoss 还带有几个其他的与命名相关的 MBean 服务。它们是 "
+"<literal>JndiBindingServiceMgr</literal>,<literal>NamingAlias</literal>,"
+"<literal>ExternalContext</literal> 和 <literal>JNDIView</literal>。"
+
+#. Tag: title
+#: Naming.xml:622
+#, no-c-format
+msgid "JNDI Binding Manager"
+msgstr "JNDI 绑定管理者(Binding Manager)"
+
+#. Tag: para
+#: Naming.xml:623
+#, no-c-format
+msgid ""
+"The JNDI binding manager service allows you to quickly bind objects into "
+"JNDI for use by application code. The MBean class for the binding service is "
+"<literal>org.jboss.naming.JNDIBindingServiceMgr</literal>. It has a single "
+"attribute, <literal>BindingsConfig</literal>, which accepts an XML document "
+"that conforms to the <literal>jndi-binding-service_1_0.xsd</literal> schema. "
+"The content of the <literal>BindingsConfig</literal> attribute is "
+"unmarshalled using the JBossXB framework. The following is an MBean "
+"definition that shows the most basic form usage of the JNDI binding manager "
+"service."
+msgstr ""
+"JNDI 绑定管理者服务允许你快速地把应用程序使用的对象绑定到 JNDI 里。绑定服务"
+"的 MBean 类是 <literal>org.jboss.naming.JNDIBindingServiceMgr</literal>。它有"
+"单一的属性, <literal>BindingsConfig</literal>,这个属性接受遵循 "
+"<literal>jndi-binding-service_1_0.xsd</literal> 模式的 XML 文档。"
+"<literal>BindingsConfig</literal> 属性的内容是用 JBossXB 框架来解包"
+"(unmarshalled)的。下面是一个 MBean 配置,它展示了 JNDI 绑定管理者服务最基本的"
+"使用方法。"
+
+#. Tag: programlisting
+#: Naming.xml:626
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.naming.JNDIBindingServiceMgr\" \n"
+" name=\"jboss.tests:name=example1\">\n"
+" <attribute name=\"BindingsConfig\" serialDataType=\"jbxb\">\n"
+" <jndi:bindings xmlns:xs=\"http://www.w3.org/2001/XMLSchema-"
+"instance\" \n"
+" xmlns:jndi=\"urn:jboss:jndi-binding-service\"\n"
+" xs:schemaLocation=\"urn:jboss:jndi-binding-service "
+"\\\n"
+" resource:jndi-binding-service_1_0.xsd\"> \n"
+" <jndi:binding name=\"bindexample/message\">\n"
+" <jndi:value trim=\"true\">\n"
+" Hello, JNDI!\n"
+" </jndi:value>\n"
+" </jndi:binding>\n"
+" </jndi:bindings>\n"
+" </attribute>\n"
+"</mbean>"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:627
+#, no-c-format
+msgid ""
+"This binds the text string \"<literal>Hello, JNDI!</literal>\" under the "
+"JNDI name <literal>bindexample/message</literal>. An application would look "
+"up the value just as it would for any other JNDI value. The <literal>trim</"
+"literal> attribute specifies that leading and trailing whitespace should be "
+"ignored. The use of the attribute here is purely for illustrative purposes "
+"as the default value is true."
+msgstr ""
+"它把文本串 \"<literal>Hello, JNDI!</literal>\" 绑定在 JNDI 名 "
+"<literal>bindexample/message</literal> 下。应用程序可以象其他任何 JNDI 值一样"
+"地查找这个值。<literal>trim</literal> 属性指出忽略它前后的空白字符。在这里使"
+"用这个属性纯粹是因为演示目的,因为它的缺省值是 true。"
+
+#. Tag: programlisting
+#: Naming.xml:630
+#, no-c-format
+msgid ""
+"InitialContext ctx = new InitialContext();\n"
+"String text = (String) ctx.lookup(\"bindexample/message\");"
+msgstr ""
+"InitialContext ctx = new InitialContext();\n"
+"String text = (String) ctx.lookup(\"bindexample/message\");"
+
+#. Tag: para
+#: Naming.xml:631
+#, no-c-format
+msgid ""
+"String values themselves are not that interesting. If a JavaBeans property "
+"editor is available, the desired class name can be specified using the "
+"<literal>type</literal> attribute"
+msgstr ""
+"字符串值本身并没什么意思。如果有一个 JavaBean 的属性编辑器,我们可以用 "
+"<literal>type</literal> 属性指定想要的类名。"
+
+#. Tag: programlisting
+#: Naming.xml:634
+#, no-c-format
+msgid ""
+"<jndi:binding name=\"urls/jboss-home\">\n"
+" <jndi:value type=\"java.net.URL\">http://www.jboss.org</jndi:"
+"value>\n"
+"</jndi:binding>"
+msgstr ""
+"<jndi:binding name=\"urls/jboss-home\">\n"
+" <jndi:value type=\"java.net.URL\">http://www.jboss.org</jndi:"
+"value>\n"
+"</jndi:binding>"
+
+#. Tag: para
+#: Naming.xml:635
+#, no-c-format
+msgid ""
+"The <literal>editor</literal> attribute can be used to specify a particular "
+"property editor to use."
+msgstr "<literal>editor</literal> 属性可用来指定所使用的属性编辑器。"
+
+#. Tag: programlisting
+#: Naming.xml:638
+#, no-c-format
+msgid ""
+"<jndi:binding name=\"hosts/localhost\">\n"
+" <jndi:value editor=\"org.jboss.util.propertyeditor.InetAddressEditor"
+"\"> \n"
+" 127.0.0.1 \n"
+" </jndi:value>\n"
+"</jndi:binding>"
+msgstr ""
+"<jndi:binding name=\"hosts/localhost\">\n"
+" <jndi:value editor=\"org.jboss.util.propertyeditor.InetAddressEditor"
+"\"> \n"
+" 127.0.0.1 \n"
+" </jndi:value>\n"
+"</jndi:binding>"
+
+#. Tag: para
+#: Naming.xml:639
+#, no-c-format
+msgid ""
+"For more complicated structures, any JBossXB-ready schema may be used. The "
+"following example shows how a <literal>java.util.Properties</literal> object "
+"would be mapped."
+msgstr ""
+"对于更复杂的结构,可以任何的 JBossXB-ready 模式。下面的例子展示了怎样映射一"
+"个 <literal>java.util.Properties</literal> 对象。"
+
+#. Tag: programlisting
+#: Naming.xml:642
+#, no-c-format
+msgid ""
+"<jndi:binding name=\"maps/testProps\">\n"
+" <java:properties xmlns:java=\"urn:jboss:java-properties\" \n"
+" xmlns:xs=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xs:schemaLocation=\"urn:jboss:java-properties \\\n"
+" resource:java-properties_1_0.xsd\">\n"
+" <java:property>\n"
+" <java:key>key1</java:key>\n"
+" <java:value>value1</java:value>\n"
+" </java:property>\n"
+" <java:property>\n"
+" <java:key>key2</java:key>\n"
+" <java:value>value2</java:value>\n"
+" </java:property>\n"
+" </java:properties>\n"
+"</jndi:binding>"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:643
+#, no-c-format
+msgid ""
+"For more information on JBossXB, see the <ulink url=\"http://wiki.jboss.org/"
+"wiki/Wiki.jsp?page=JBossXB\">JBossXB wiki page</ulink>."
+msgstr ""
+"关于 JBossXB 的更多信息,请参考 <ulink url=\"http://wiki.jboss.org/wiki/Wiki."
+"jsp?page=JBossXB\">JBossXB wiki page</ulink>。"
+
+#. Tag: title
+#: Naming.xml:649
+#, fuzzy, no-c-format
+msgid "The org.jboss.naming.NamingAlias MBean"
+msgstr "The org.jboss.naming.JNDIView MBean"
+
+#. Tag: para
+#: Naming.xml:650
+#, no-c-format
+msgid ""
+"The <literal>NamingAlias</literal> MBean is a simple utility service that "
+"allows you to create an alias in the form of a JNDI <literal>javax.naming."
+"LinkRef</literal> from one JNDI name to another. This is similar to a "
+"symbolic link in the UNIX file system. To an alias you add a configuration "
+"of the <literal>NamingAlias</literal> MBean to the <literal>jboss-service."
+"xml</literal> configuration file. The configurable attributes of the "
+"<literal>NamingAlias</literal> service are as follows:"
+msgstr ""
+"<literal>NamingAlias</literal> MBean 是一个简单的实用服务,它允许你用 JNDI "
+"<literal>javax.naming.LinkRef</literal> 的方式创建一个别名。这和 UNIX 文件系"
+"统里的符号链接相似。对于别名,你要把 <literal>NamingAlias</literal> MBean 的"
+"一个配置加入到 <literal>jboss-service.xml</literal> 文件里。"
+"<literal>NamingAlias</literal> 服务的可配置属性如下:"
+
+#. Tag: para
+#: Naming.xml:655
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">FromName</emphasis>: The location where the "
+"<literal>LinkRef</literal> is bound under JNDI."
+msgstr ""
+"<emphasis role=\"bold\">FromName</emphasis>:<literal>LinkRef</literal> 在 "
+"JNDI 下绑定的位置。"
+
+#. Tag: para
+#: Naming.xml:660
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ToName</emphasis>: The to name of the alias. This is "
+"the target name to which the <literal>LinkRef</literal> refers. The name is "
+"a URL, or a name to be resolved relative to the <literal>InitialContext</"
+"literal>, or if the first character of the name is a dot (<literal>.</"
+"literal>), the name is relative to the context in which the link is bound."
+msgstr ""
+"<emphasis role=\"bold\">ToName</emphasis>:别名的 to name。这是 "
+"<literal>LinkRef</literal> 引用的目标名。这个名字是一个 URL,或者相对 "
+"<literal>InitialContext</literal> 解析的名字,或者如果这个名字的第一个字符是"
+"一个句点(<literal>.</literal>),那它和这个链接所绑定的上下文相关。"
+
+#. Tag: para
+#: Naming.xml:665
+#, no-c-format
+msgid ""
+"The following example provides a mapping of the JNDI name "
+"<literal>QueueConnectionFactory</literal> to the name "
+"<literal>ConnectionFactory</literal>."
+msgstr ""
+"下面的例子提供了 JNDI 名 <literal>QueueConnectionFactory</literal> 到 "
+"<literal>ConnectionFactory</literal> 的映射。"
+
+#. Tag: programlisting
+#: Naming.xml:668
+#, no-c-format
+msgid ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+msgstr ""
+"<mbean code=\"org.jboss.naming.NamingAlias\" \n"
+" name=\"jboss.mq:service=NamingAlias,fromName=QueueConnectionFactory"
+"\">\n"
+" <attribute name=\"ToName\">ConnectionFactory</attribute>\n"
+" <attribute name=\"FromName\">QueueConnectionFactory</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: title
+#: Naming.xml:672
+#, no-c-format
+msgid "org.jboss.naming.ExternalContext MBean"
+msgstr "org.jboss.naming.ExternalContext MBean"
+
+#. Tag: para
+#: Naming.xml:673
+#, no-c-format
+msgid ""
+"The <literal>ExternalContext</literal> MBean allows you to federate external "
+"JNDI contexts into the JBoss server JNDI namespace. The term external refers "
+"to any naming service external to the JBossNS naming service running inside "
+"of the JBoss server VM. You can incorporate LDAP servers, file systems, DNS "
+"servers, and so on, even if the JNDI provider root context is not "
+"serializable. The federation can be made available to remote clients if the "
+"naming service supports remote access."
+msgstr ""
+"<literal>ExternalContext</literal> MBean 允许你把外部(external)的 JNDI 上下文"
+"联合到 JBoss 服务器的 JNDI 命名空间。术语 external 指的是在 JBoss 服务器的 "
+"VM 内部运行的 JBossNS 命名服务之外的任何外部的命名服务。你可以合并 LDAP 服"
+"务,文件系统,DNS 服务器,诸如此类,即使 JNDI 提供者的根上下文不是可串形化的"
+"(serializable)。如果命名服务支持远程访问的话,你也可以使这种联合对远程客户可"
+"用。"
+
+#. Tag: para
+#: Naming.xml:676
+#, no-c-format
+msgid ""
+"To incorporate an external JNDI naming service, you have to add a "
+"configuration of the <literal>ExternalContext</literal> MBean service to the "
+"<literal>jboss-service.xml</literal> configuration file. The configurable "
+"attributes of the <literal>ExternalContext</literal> service are as follows:"
+msgstr ""
+"要合并外部的 JNDI 命名服务,你得在 <literal>jboss-service.xml</literal> 配置"
+"文件里加入一个 <literal>ExternalContext</literal> MBean 服务的配置。下面是 "
+"<literal>ExternalContext</literal> 服务的可配置属性:"
+
+#. Tag: para
+#: Naming.xml:681
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">JndiName</emphasis>: The JNDI name under which the "
+"external context is to be bound."
+msgstr ""
+"<emphasis role=\"bold\">JndiName</emphasis>:外部的上下文绑定的 JNDI 名。"
+
+#. Tag: para
+#: Naming.xml:686
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">RemoteAccess</emphasis>: A boolean flag indicating "
+"if the external <literal>InitialContext</literal> should be bound using a "
+"<literal>Serializable</literal> form that allows a remote client to create "
+"the external <literal>InitialContext</literal> . When a remote client looks "
+"up the external context via the JBoss JNDI <literal>InitialContext</"
+"literal>, they effectively create an instance of the external "
+"<literal>InitialContext</literal> using the same env properties passed to "
+"the <literal>ExternalContext</literal> MBean. This will only work if the "
+"client can do a <literal>new InitialContext(env)</literal> remotely. This "
+"requires that the <literal>Context.PROVIDER_URL</literal> value of env is "
+"resolvable in the remote VM that is accessing the context. This should work "
+"for the LDAP example. For the file system example this most likely won't "
+"work unless the file system path refers to a common network path. If this "
+"property is not given it defaults to false."
+msgstr ""
+"<emphasis role=\"bold\">RemoteAccess</emphasis>:指定外部的 "
+"<literal>InitialContext</literal> 是否应该用 <literal>Serializable</literal> "
+"方式来绑定,这可以允许远程客户创建外部的 <literal>InitialContext</literal>。"
+"当远程客户通过 JBoss JNDI <literal>InitialContext</literal> 查找外部上下文"
+"时,他们用传入到<literal>ExternalContext</literal> MBean 的相同 env 属性来创"
+"建一个外部 <literal>InitialContext</literal> 的实例。这只有客户能够远程执行 "
+"<literal>new InitialContext(env)</literal> 时才可行。这要求 env 的 "
+"<literal>Context.PROVIDER_URL</literal> 值在访问这个上下文的远程 VM 是可解析"
+"的。对于 LDAP 示例,这是可用的。而对于文件系统示例来说,这很可能不行,除非文"
+"件系统路径指向通用的网络路径。如果没有设置,它缺省为 false。"
+
+#. Tag: para
+#: Naming.xml:691
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">CacheContext</emphasis>: The <literal>cacheContext</"
+"literal> flag. When set to true, the external <literal>Context</literal> is "
+"only created when the MBean is started and then stored as an in memory "
+"object until the MBean is stopped. If cacheContext is set to false, the "
+"external <literal>Context</literal> is created on each lookup using the "
+"MBean properties and InitialContext class. When the uncached "
+"<literal>Context</literal> is looked up by a client, the client should "
+"invoke <literal>close()</literal> on the Context to prevent resource leaks."
+msgstr ""
+"<emphasis role=\"bold\">CacheContext</emphasis>:当设置为 true 时,外部的 "
+"<literal>Context</literal> 只有在 MBean 被启动且储存在内存里直到被停止时才会"
+"被创建。如果它被设置为 false,外部的 <literal>Context</literal> 在每次查找时"
+"都会用 MBean 属性和 InitialContext 类创建。当客户查找一个没有被缓存的 "
+"<literal>Context</literal> 时,客户应该调用这个 Context 的 <literal>close()</"
+"literal> 方法来防止资源泄漏。"
+
+#. Tag: para
+#: Naming.xml:696
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">InitialContext</emphasis>: The fully qualified class "
+"name of the <literal>InitialContext</literal> implementation to use. Must be "
+"one of: <literal>javax.naming.InitialContext</literal>, <literal>javax."
+"naming.directory.InitialDirContext</literal> or <literal>javax.naming.ldap."
+"InitialLdapContext</literal>. In the case of the "
+"<literal>InitialLdapContext</literal> a null <literal>Controls</literal> "
+"array is used. The default is <literal>javax.naming.InitialContex</literal>."
+msgstr ""
+"<emphasis role=\"bold\">InitialContext</emphasis>:所使用的 "
+"<literal>InitialContext</literal> 实现的类全名。它必须是 <literal>javax."
+"naming.InitialContext</literal>,<literal>javax.naming.directory."
+"InitialDirContext</literal> 或者 <literal>javax.naming.ldap."
+"InitialLdapContext</literal> 的其中之一。对于 <literal>InitialLdapContext</"
+"literal>,使用了一个空的 <literal>Controls</literal> 数组。它的缺省值是 "
+"<literal>javax.naming.InitialContex</literal>。"
+
+#. Tag: para
+#: Naming.xml:701
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Properties</emphasis>: The <literal>Properties</"
+"literal> attribute contains the JNDI properties for the external "
+"<literal>InitialContext</literal>. The input should be the text equivalent "
+"to what would go into a <literal>jndi.properties</literal> file."
+msgstr ""
+"<emphasis role=\"bold\">Properties</emphasis>:它包含外部 "
+"<literal>InitialContext</literal> 的 JNDI 属性。它应该和 <literal>jndi."
+"properties</literal> 文件里的设置从文本上相同。"
+
+#. Tag: para
+#: Naming.xml:706
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">PropertiesURL</emphasis>: This set the <literal>jndi."
+"properties</literal> information for the external <literal>InitialContext</"
+"literal> from an external properties file. This is either a URL, string or a "
+"classpath resource name. Examples are as follows:"
+msgstr ""
+"<emphasis role=\"bold\">PropertiesURL</emphasis>:它为外部属性文件里的外部 "
+"<literal>InitialContext</literal> 设置 <literal>jndi.properties</literal> 信"
+"息。它可以是一个 URL,字符串或者 classpath 资源名。下面是一些示例:"
+
+#. Tag: para
+#: Naming.xml:711
+#, no-c-format
+msgid "file:///config/myldap.properties"
+msgstr "file:///config/myldap.properties"
+
+#. Tag: para
+#: Naming.xml:716
+#, no-c-format
+msgid "http://config.mycompany.com/myldap.properties"
+msgstr "http://config.mycompany.com/myldap.properties"
+
+#. Tag: para
+#: Naming.xml:721
+#, no-c-format
+msgid "/conf/myldap.properties"
+msgstr "/conf/myldap.properties"
+
+#. Tag: para
+#: Naming.xml:726
+#, no-c-format
+msgid "myldap.properties"
+msgstr "myldap.properties"
+
+#. Tag: para
+#: Naming.xml:733
+#, no-c-format
+msgid ""
+"The MBean definition below shows a binding to an external LDAP context into "
+"the JBoss JNDI namespace under the name <literal>external/ldap/jboss</"
+"literal>."
+msgstr ""
+"下面的 MBean 定义展示了一个外部的 LDAP 上下文到 JBoss JNDI 命名空间 "
+"<literal>external/ldap/jboss</literal> 的绑定。"
+
+#. Tag: programlisting
+#: Naming.xml:736
+#, no-c-format
+msgid ""
+"<!-- Bind a remote LDAP server -->\n"
+"<mbean code=\"org.jboss.naming.ExternalContext\" \n"
+" name=\"jboss.jndi:service=ExternalContext,jndiName=external/ldap/jboss"
+"\">\n"
+" <attribute name=\"JndiName\">external/ldap/jboss</"
+"attribute>\n"
+" <attribute name=\"Properties\">\n"
+" java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory\n"
+" java.naming.provider.url=ldap://ldaphost.jboss.org:389/o=jboss.org\n"
+" java.naming.security.principal=cn=Directory Manager\n"
+" java.naming.security.authentication=simple\n"
+" java.naming.security.credentials=secret\n"
+" </attribute>\n"
+" <attribute name=\"InitialContext\"> javax.naming.ldap."
+"InitialLdapContext </attribute>\n"
+" <attribute name=\"RemoteAccess\">true</attribute>\n"
+"</mbean>"
+msgstr ""
+"<!-- Bind a remote LDAP server -->\n"
+"<mbean code=\"org.jboss.naming.ExternalContext\" \n"
+" name=\"jboss.jndi:service=ExternalContext,jndiName=external/ldap/jboss"
+"\">\n"
+" <attribute name=\"JndiName\">external/ldap/jboss</"
+"attribute>\n"
+" <attribute name=\"Properties\">\n"
+" java.naming.factory.initial=com.sun.jndi.ldap.LdapCtxFactory\n"
+" java.naming.provider.url=ldap://ldaphost.jboss.org:389/o=jboss.org\n"
+" java.naming.security.principal=cn=Directory Manager\n"
+" java.naming.security.authentication=simple\n"
+" java.naming.security.credentials=secret\n"
+" </attribute>\n"
+" <attribute name=\"InitialContext\"> javax.naming.ldap."
+"InitialLdapContext </attribute>\n"
+" <attribute name=\"RemoteAccess\">true</attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Naming.xml:737
+#, no-c-format
+msgid ""
+"With this configuration, you can access the external LDAP context located at "
+"<literal>ldap://ldaphost.jboss.org:389/o=jboss.org</literal> from within the "
+"JBoss VM using the following code fragment:"
+msgstr ""
+"用这个配置,你可以使用下面的代码片段从 JBoss VM 访问 <literal>ldap://"
+"ldaphost.jboss.org:389/o=jboss.org</literal> 上的外部 LDAP 上下文:"
+
+#. Tag: programlisting
+#: Naming.xml:740
+#, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+"LdapContext ldapCtx = iniCtx.lookup(\"external/ldap/jboss\");"
+msgstr ""
+"InitialContext iniCtx = new InitialContext();\n"
+"LdapContext ldapCtx = iniCtx.lookup(\"external/ldap/jboss\");"
+
+#. Tag: para
+#: Naming.xml:741
+#, fuzzy, no-c-format
+msgid ""
+"Using the same code fragment outside of the JBoss server VM will work in "
+"this case because the <literal>RemoteAccess</literal> property was set to "
+"true. If it were set to false, it would not work because the remote client "
+"would receive a <literal>Reference</literal> object with an "
+"<literal>ObjectFactory</literal> that would not be able to recreate the "
+"external <literal>InitialContext</literal>"
+msgstr ""
+"在 JBoss 服务器 VM 外面使用同样的代码片段也是可以的,这是因为 "
+"<literal>RemoteAccess</literal> 属性被设置成了 true。如果这个属性为 false,因"
+"为远程客户会接收一个<literal>ObjectFactory</literal> 的 <literal>Reference</"
+"literal> 对象,它不能够重新创建外部的 <literal>IntialContext</literal>,所以"
+"就不能使用这个代码片段了。"
+
+#. Tag: programlisting
+#: Naming.xml:744
+#, no-c-format
+msgid ""
+"<!-- Bind the /usr/local file system directory -->\n"
+"<mbean code=\"org.jboss.naming.ExternalContext\" \n"
+" name=\"jboss.jndi:service=ExternalContext,jndiName=external/fs/usr/"
+"local\">\n"
+" <attribute name=\"JndiName\">external/fs/usr/local</"
+"attribute>\n"
+" <attribute name=\"Properties\">\n"
+" java.naming.factory.initial=com.sun.jndi.fscontext."
+"RefFSContextFactory\n"
+" java.naming.provider.url=file:///usr/local\n"
+" </attribute>\n"
+" <attribute name=\"InitialContext\">javax.naming.IntialContext</"
+"attribute>\n"
+"</mbean>"
+msgstr ""
+"<!-- Bind the /usr/local file system directory -->\n"
+"<mbean code=\"org.jboss.naming.ExternalContext\" \n"
+" name=\"jboss.jndi:service=ExternalContext,jndiName=external/fs/usr/"
+"local\">\n"
+" <attribute name=\"JndiName\">external/fs/usr/local</"
+"attribute>\n"
+" <attribute name=\"Properties\">\n"
+" java.naming.factory.initial=com.sun.jndi.fscontext."
+"RefFSContextFactory\n"
+" java.naming.provider.url=file:///usr/local\n"
+" </attribute>\n"
+" <attribute name=\"InitialContext\">javax.naming.IntialContext</"
+"attribute>\n"
+"</mbean>"
+
+#. Tag: para
+#: Naming.xml:745
+#, no-c-format
+msgid ""
+"This configuration describes binding a local file system directory <literal>/"
+"usr/local</literal> into the JBoss JNDI namespace under the name "
+"<literal>external/fs/usr/local</literal>."
+msgstr ""
+"这个配置描述了把本地文件系统目录 <literal>/usr/local</literal> 绑定到 JBoss "
+"JNDI 命名空间 <literal>external/fs/usr/local</literal> 里。"
+
+#. Tag: para
+#: Naming.xml:748
+#, no-c-format
+msgid ""
+"With this configuration, you can access the external file system context "
+"located at <literal>file:///usr/local</literal> from within the JBoss VM "
+"using the following code fragment:"
+msgstr ""
+"用这个配置,你可以使用下面的代码片段从 JBoss VM 内部访问 <literal>file:///"
+"usr/local</literal> 上的外部文件系统上下文。"
+
+#. Tag: programlisting
+#: Naming.xml:751
+#, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+" Context ldapCtx = iniCtx.lookup(\"external/fs/usr/local\");"
+msgstr ""
+"InitialContext iniCtx = new InitialContext();\n"
+" Context ldapCtx = iniCtx.lookup(\"external/fs/usr/local\");"
+
+#. Tag: para
+#: Naming.xml:752
+#, no-c-format
+msgid ""
+"Note that the use the Sun JNDI service providers, which must be downloaded "
+"from <ulink url=\"http://java.sun.com/products/jndi/serviceproviders.html"
+"\"></ulink>. The provider JARs should be placed in the server configuration "
+"<literal>lib</literal> directory."
+msgstr ""
+"请注意对 Sun JNDI 服务提供者的使用,它必须从 <ulink url=\"http://java.sun."
+"com/products/jndi/serviceproviders.html\"></ulink> 里下载。提供者 JARs 应该存"
+"放到服务器配置的 <literal>lib</literal> 目录下。"
+
+#. Tag: title
+#: Naming.xml:758
+#, no-c-format
+msgid "The org.jboss.naming.JNDIView MBean"
+msgstr "The org.jboss.naming.JNDIView MBean"
+
+#. Tag: para
+#: Naming.xml:759
+#, fuzzy, no-c-format
+msgid ""
+"The JNDIView MBean allows the user to view the JNDI namespace tree as it "
+"exists in the JBoss server using the JMX agent view interface. To view the "
+"JBoss JNDI namespace using the JNDIView MBean, you connect to the JMX Agent "
+"View using the http interface. The default settings put this at "
+"<literal>http://localhost:8080/jmx-console/</literal>. On this page you will "
+"see a section that lists the registered MBeans sorted by domain. It should "
+"look something like that shown in <xref linkend=\"The_org.jboss.naming."
+"JNDIView_MBean-The_JMX_Console_view_of_the_configured_JBoss_MBeans\"/>."
+msgstr ""
+"JNDIView MBean 允许用户查看 JNDI 命名空间树,就象在 JBoss 服务器里用 JMX 代理"
+"视图接口一样。用 JNDIView MBean 查看 JBoss JNDI 命名空间,你需要用 http 接口"
+"连接到 JMX 代理视图。缺省的设定是:<literal>http://localhost:8080/jmx-"
+"console/</literal>。在这个网页上,你将看到一个列出按域名排序的注册的 MBeans "
+"的部分。它应该和 <xref linkend=\"ch3.jmxconsole.fig\"/> 展示的类似。"
+
+#. Tag: title
+#: Naming.xml:763
+#, no-c-format
+msgid "The JMX Console view of the configured JBoss MBeans"
+msgstr "The JMX Console view of the configured JBoss MBeans"
+
+#. Tag: para
+#: Naming.xml:770
+#, fuzzy, no-c-format
+msgid ""
+"Selecting the JNDIView link takes you to the JNDIView MBean view, which will "
+"have a list of the JNDIView MBean operations. This view should look similar "
+"to that shown in <xref linkend=\"The_org.jboss.naming.JNDIView_MBean-"
+"The_JMX_Console_view_of_the_JNDIView_MBean\"/>."
+msgstr ""
+"选择带你进入 JNDIView MBean 视图的 JNDIView 链接,它将有 JNDIView MBean 操作"
+"的一个列表。这个视图应该和 <xref linkend=\"ch3.jndiview.fig\"/> 展示的类似。"
+
+#. Tag: title
+#: Naming.xml:774
+#, no-c-format
+msgid "The JMX Console view of the JNDIView MBean"
+msgstr "The JMX Console view of the JNDIView MBean"
+
+#. Tag: para
+#: Naming.xml:781
+#, fuzzy, no-c-format
+msgid ""
+"The list operation dumps out the JBoss server JNDI namespace as an HTML page "
+"using a simple text view. As an example, invoking the list operation "
+"produces the view shown in <xref linkend=\"The_org.jboss.naming."
+"JNDIView_MBean-The_JMX_Console_view_of_the_JNDIView_list_operation_output\"/"
+">."
+msgstr ""
+"list 操作用简单的文本视图的方式把 JBoss 服务器的 JNDI 命名空间输出到一个 "
+"HTML 页面上。调用 list 操作会产生和 <xref linkend=\"ch3.jndiviewlist.fig\"/> "
+"类似的输出。"
+
+#. Tag: title
+#: Naming.xml:785
+#, fuzzy, no-c-format
+msgid "The JMX Console view of the JNDIView list operation output"
+msgstr "The JMX Console view of the JNDIView MBean"
+
+#. Tag: title
+#: Naming.xml:797
+#, no-c-format
+msgid "J2EE and JNDI - The Application Component Environment"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:798
+#, no-c-format
+msgid ""
+"JNDI is a fundamental aspect of the J2EE specifications. One key usage is "
+"the isolation of J2EE component code from the environment in which the code "
+"is deployed. Use of the application component's environment allows the "
+"application component to be customized without the need to access or change "
+"the application component's source code. The application component "
+"environment is referred to as the ENC, the enterprise naming context. It is "
+"the responsibility of the application component container to make an ENC "
+"available to the container components in the form of JNDI Context. The ENC "
+"is utilized by the participants involved in the life cycle of a J2EE "
+"component in the following ways."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:803
+#, no-c-format
+msgid ""
+"Application component business logic should be coded to access information "
+"from its ENC. The component provider uses the standard deployment descriptor "
+"for the component to specify the required ENC entries. The entries are "
+"declarations of the information and resources the component requires at "
+"runtime."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:808
+#, no-c-format
+msgid ""
+"The container provides tools that allow a deployer of a component to map the "
+"ENC references made by the component developer to the deployment environment "
+"entity that satisfies the reference."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:813
+#, no-c-format
+msgid ""
+"The component deployer utilizes the container tools to ready a component for "
+"final deployment."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:818
+#, no-c-format
+msgid ""
+"The component container uses the deployment package information to build the "
+"complete component ENC at runtime"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:823
+#, no-c-format
+msgid ""
+"The complete specification regarding the use of JNDI in the J2EE platform "
+"can be found in section 5 of the J2EE 1.4 specification. The J2EE "
+"specification is available at <ulink url=\"http://java.sun.com/j2ee/download."
+"html\"></ulink>."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:826
+#, no-c-format
+msgid ""
+"An application component instance locates the ENC using the JNDI API. An "
+"application component instance creates a <literal>javax.naming."
+"InitialContext</literal> object by using the no argument constructor and "
+"then looks up the naming environment under the name <literal>java:comp/env</"
+"literal>. The application component's environment entries are stored "
+"directly in the ENC, or in its subcontexts. <xref linkend="
+"\"J2EE_and_JNDI___The_Application_Component_Environment-"
+"ENC_access_sample_code\"/> illustrates the prototypical lines of code a "
+"component uses to access its ENC."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:829
+#, no-c-format
+msgid "ENC access sample code"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:830
+#, fuzzy, no-c-format
+msgid ""
+"// Obtain the application component's ENC\n"
+"Context iniCtx = new InitialContext();\n"
+"Context compEnv = (Context) iniCtx.lookup(\"java:comp/env\");"
+msgstr ""
+"InitialContext iniCtx = new InitialContext();\n"
+"LdapContext ldapCtx = iniCtx.lookup(\"external/ldap/jboss\");"
+
+#. Tag: para
+#: Naming.xml:831
+#, no-c-format
+msgid ""
+"An application component environment is a local environment that is "
+"accessible only by the component when the application server container "
+"thread of control is interacting with the application component. This means "
+"that an EJB <literal>Bean1</literal> cannot access the ENC elements of EJB "
+"<literal>Bean2</literal>, and vice versa. Similarly, Web application "
+"<literal>Web1</literal> cannot access the ENC elements of Web application "
+"<literal>Web2</literal> or <literal>Bean1</literal> or <literal>Bean2</"
+"literal> for that matter. Also, arbitrary client code, whether it is "
+"executing inside of the application server VM or externally cannot access a "
+"component's <literal>java:comp</literal> JNDI context. The purpose of "
+"the ENC is to provide an isolated, read-only namespace that the application "
+"component can rely on regardless of the type of environment in which the "
+"component is deployed. The ENC must be isolated from other components "
+"because each component defines its own ENC content. Components <literal>A</"
+"literal> and <literal>B</literal>, for example, may define the same name to "
+"refer to different objects. For example, EJB <literal>Bean1</literal> may "
+"define an environment entry <literal>java:comp/env/red</literal> to refer to "
+"the hexadecimal value for the RGB color for red, while Web application "
+"<literal>Web1</literal> may bind the same name to the deployment environment "
+"language locale representation of red."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:834
+#, no-c-format
+msgid ""
+"There are three commonly used levels of naming scope in JBoss: names under "
+"<literal>java:comp</literal>, names under <literal>java:</literal>, and any "
+"other name. As discussed, the <literal>java:comp</literal> context and its "
+"subcontexts are only available to the application component associated with "
+"that particular context. Subcontexts and object bindings directly under "
+"<literal>java:</literal> are only visible within the JBoss server virtual "
+"machine and not to remote clients. Any other context or object binding is "
+"available to remote clients, provided the context or object supports "
+"serialization. You'll see how the isolation of these naming scopes is "
+"achieved in the <xref linkend=\"Naming_on_JBoss-The_JBossNS_Architecture\"/>."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:837
+#, no-c-format
+msgid ""
+"An example of where the restricting a binding to the <literal>java:</"
+"literal> context is useful would be a <literal>javax.sql.DataSource</"
+"literal> connection factory that can only be used inside of the JBoss server "
+"where the associated database pool resides. On the other hand, an EJB home "
+"interface would be bound to a globally visible name that should accessible "
+"by remote client."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:841
+#, no-c-format
+msgid "ENC Usage Conventions"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:842
+#, no-c-format
+msgid ""
+"JNDI is used as the API for externalizing a great deal of information from "
+"an application component. The JNDI name that the application component uses "
+"to access the information is declared in the standard <literal>ejb-jar.xml</"
+"literal> deployment descriptor for EJB components, and the standard "
+"<literal>web.xml</literal> deployment descriptor for Web components. Several "
+"different types of information may be stored in and retrieved from JNDI "
+"including:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:847
+#, fuzzy, no-c-format
+msgid ""
+"Environment entries as declared by the <literal>env-entry</literal> elements"
+msgstr "下列是 <literal>TCP</literal> 元素里的可用属性。"
+
+#. Tag: para
+#: Naming.xml:852
+#, no-c-format
+msgid ""
+"EJB references as declared by <literal>ejb-ref</literal> and <literal>ejb-"
+"local-ref</literal> elements."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:857
+#, no-c-format
+msgid ""
+"Resource manager connection factory references as declared by the "
+"<literal>resource-ref</literal> elements"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:862
+#, no-c-format
+msgid ""
+"Resource environment references as declared by the <literal>resource-env-"
+"ref</literal> elements"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:867
+#, no-c-format
+msgid ""
+"Each type of deployment descriptor element has a JNDI usage convention with "
+"regard to the name of the JNDI context under which the information is bound. "
+"Also, in addition to the standard deploymentdescriptor element, there is a "
+"JBoss server specific deployment descriptor element that maps the JNDI name "
+"as used by the application component to the deployment environment JNDI name."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:871
+#, no-c-format
+msgid "Environment Entries"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:872
+#, no-c-format
+msgid ""
+"Environment entries are the simplest form of information stored in a "
+"component ENC, and are similar to operating system environment variables "
+"like those found on UNIX or Windows. Environment entries are a name-to-value "
+"binding that allows a component to externalize a value and refer to the "
+"value using a name."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:875
+#, no-c-format
+msgid ""
+"An environment entry is declared using an <literal>env-entry</literal> "
+"element in the standard deployment descriptors. The <literal>env-entry</"
+"literal> element contains the following child elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:880
+#, fuzzy, no-c-format
+msgid ""
+"An optional <emphasis role=\"bold\">description</emphasis> element that "
+"provides a description of the entry"
+msgstr "<emphasis role=\"bold\">description</emphasis>:参数的可选描述。"
+
+#. Tag: para
+#: Naming.xml:885
+#, fuzzy, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">env-entry-name</emphasis> element giving the name "
+"of the entry relative to <literal>java:comp/env</literal>"
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 指定了部署这个 farm 的群集的"
+"名字。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: Naming.xml:890
+#, fuzzy, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">env-entry-type</emphasis> element giving the Java "
+"type of the entry value that must be one of:"
+msgstr "<emphasis role=\"bold\">Never</emphasis>:属性值永远都不要持久化"
+
+#. Tag: literal
+#: Naming.xml:894
+#, no-c-format
+msgid "java.lang.Byte"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:899
+#, no-c-format
+msgid "java.lang.Boolean"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:904
+#, no-c-format
+msgid "java.lang.Character"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:909
+#, no-c-format
+msgid "java.lang.Double"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:914
+#, no-c-format
+msgid "java.lang.Float"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:919
+#, no-c-format
+msgid "java.lang.Integer"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:924
+#, no-c-format
+msgid "java.lang.Long"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:929
+#, no-c-format
+msgid "java.lang.Short"
+msgstr ""
+
+#. Tag: literal
+#: Naming.xml:934
+#, no-c-format
+msgid "java.lang.String"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:941
+#, fuzzy, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">env-entry-value</emphasis> element giving the "
+"value of entry as a string"
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含操作的名字。"
+
+#. Tag: para
+#: Naming.xml:946
+#, no-c-format
+msgid ""
+"An example of an <literal>env-entry</literal> fragment from an <literal>ejb-"
+"jar.xml</literal> deployment descriptor is given in <xref linkend="
+"\"Environment_Entries-An_example_ejb_jar.xml_env_entry_fragment\"/>. There "
+"is no JBoss specific deployment descriptor element because an <literal>env-"
+"entry</literal> is a complete name and value specification. <xref linkend="
+"\"Environment_Entries-ENC_env_entry_access_code_fragment\"/> shows a sample "
+"code fragment for accessing the <literal>maxExemptions</literal> and "
+"<literal>taxRate</literal><literal>env-entry</literal> values declared in "
+"the deployment descriptor."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:949
+#, no-c-format
+msgid "An example ejb-jar.xml env-entry fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:950
+#, no-c-format
+msgid ""
+"<!-- ... -->\n"
+"<session>\n"
+" <ejb-name>ASessionBean</ejb-name>\n"
+" <!-- ... -->\n"
+" <env-entry>\n"
+" <description>The maximum number of tax exemptions allowed </"
+"description>\n"
+" <env-entry-name>maxExemptions</env-entry-name>\n"
+" <env-entry-type>java.lang.Integer</env-entry-type>\n"
+" <env-entry-value>15</env-entry-value>\n"
+" </env-entry>\n"
+" <env-entry>\n"
+" <description>The tax rate </description>\n"
+" <env-entry-name>taxRate</env-entry-name>\n"
+" <env-entry-type>java.lang.Float</env-entry-type>\n"
+" <env-entry-value>0.23</env-entry-value>\n"
+" </env-entry>\n"
+"</session>\n"
+"<!-- ... -->"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:951
+#, no-c-format
+msgid "ENC env-entry access code fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:952
+#, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+"Context envCtx = (Context) iniCtx.lookup(\"java:comp/env\");\n"
+"Integer maxExemptions = (Integer) envCtx.lookup(\"maxExemptions\");\n"
+"Float taxRate = (Float) envCtx.lookup(\"taxRate\");"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:957
+#, no-c-format
+msgid "EJB References"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:958
+#, no-c-format
+msgid ""
+"It is common for EJBs and Web components to interact with other EJBs. "
+"Because the JNDI name under which an EJB home interface is bound is a "
+"deployment time decision, there needs to be a way for a component developer "
+"to declare a reference to an EJB that will be linked by the deployer. EJB "
+"references satisfy this requirement."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:961
+#, no-c-format
+msgid ""
+"An EJB reference is a link in an application component naming environment "
+"that points to a deployed EJB home interface. The name used by the "
+"application component is a logical link that isolates the component from the "
+"actual name of the EJB home in the deployment environment. The J2EE "
+"specification recommends that all references to enterprise beans be "
+"organized in the <literal>java:comp/env/ejb</literal> context of the "
+"application component's environment."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:964
+#, no-c-format
+msgid ""
+"An EJB reference is declared using an <literal>ejb-ref</literal> element in "
+"the deployment descriptor. Each <literal>ejb-ref</literal> element describes "
+"the interface requirements that the referencing application component has "
+"for the referenced enterprise bean. The <literal>ejb-ref</literal> element "
+"contains the following child elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:969 Naming.xml:1062 Naming.xml:1112 Naming.xml:1217
+#, fuzzy, no-c-format
+msgid ""
+"An optional <emphasis role=\"bold\">description</emphasis> element that "
+"provides the purpose of the reference."
+msgstr "<emphasis role=\"bold\">description</emphasis>:参数的可选描述。"
+
+#. Tag: para
+#: Naming.xml:974 Naming.xml:1067
+#, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">ejb-ref-name</emphasis> element that specifies "
+"the name of the reference relative to the <literal>java:comp/env</literal> "
+"context. To place the reference under the recommended <literal>java:comp/env/"
+"ejb</literal> context, use an <literal>ejb/link-name</literal> form for the "
+"<literal>ejb-ref-name</literal> value."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:979 Naming.xml:1072
+#, fuzzy, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">ejb-ref-type</emphasis> element that specifies "
+"the type of the EJB. This must be either <literal>Entity</literal> or "
+"<literal>Session</literal>."
+msgstr ""
+"<emphasis role=\"bold\">CacheMode</emphasis> 指定怎么在节点间使缓存同步。可能"
+"的值是 <literal>LOCAL</literal>,<literal>REPL_SYNC</literal> 或 "
+"<literal>REPL_ASYNC</literal>。"
+
+#. Tag: para
+#: Naming.xml:984
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">home</emphasis> element that gives the fully "
+"qualified class name of the EJB home interface."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:989
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">remote</emphasis> element that gives the fully "
+"qualified class name of the EJB remote interface."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:994
+#, no-c-format
+msgid ""
+"An optional <emphasis role=\"bold\">ejb-link</emphasis> element that links "
+"the reference to another enterprise bean in the same EJB JAR or in the same "
+"J2EE application unit. The <literal>ejb-link</literal> value is the "
+"<literal>ejb-name</literal> of the referenced bean. If there are multiple "
+"enterprise beans with the same <literal>ejb-name</literal>, the value uses "
+"the path name specifying the location of the <literal>ejb-jar</literal> file "
+"that contains the referenced component. The path name is relative to the "
+"referencing <literal>ejb-jar</literal> file. The Application Assembler "
+"appends the <literal>ejb-name</literal> of the referenced bean to the path "
+"name separated by <literal>#</literal>. This allows multiple beans with the "
+"same name to be uniquely identified."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:999
+#, no-c-format
+msgid ""
+"An EJB reference is scoped to the application component whose declaration "
+"contains the <literal>ejb-ref</literal> element. This means that the EJB "
+"reference is not accessible from other application components at runtime, "
+"and that other application components may define <literal>ejb-ref</literal> "
+"elements with the same <literal>ejb-ref-name</literal> without causing a "
+"name conflict. <xref linkend=\"EJB_References-An_example_ejb_jar."
+"xml_ejb_ref_descriptor_fragment\"/> provides an <literal>ejb-jar.xml</"
+"literal> fragment that illustrates the use of the <literal>ejb-ref</literal> "
+"element. A code sample that illustrates accessing the "
+"<literal>ShoppingCartHome</literal> reference declared in <xref linkend="
+"\"EJB_References-An_example_ejb_jar.xml_ejb_ref_descriptor_fragment\"/> is "
+"given in <xref linkend=\"EJB_References-ENC_ejb_ref_access_code_fragment\"/>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1002
+#, no-c-format
+msgid "An example ejb-jar.xml ejb-ref descriptor fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1003
+#, no-c-format
+msgid ""
+"<!-- ... -->\n"
+"<session>\n"
+" <ejb-name>ShoppingCartBean</ejb-name>\n"
+" <!-- ...-->\n"
+"</session>\n"
+"\n"
+"<session>\n"
+" <ejb-name>ProductBeanUser</ejb-name>\n"
+" <!--...-->\n"
+" <ejb-ref>\n"
+" <description>This is a reference to the store products entity "
+"</description>\n"
+" <ejb-ref-name>ejb/ProductHome</ejb-ref-name>\n"
+" <ejb-ref-type>Entity</ejb-ref-type>\n"
+" <home>org.jboss.store.ejb.ProductHome</home>\n"
+" <remote> org.jboss.store.ejb.Product</remote>\n"
+" </ejb-ref>\n"
+"\n"
+"</session>\n"
+"\n"
+"<session>\n"
+" <ejb-ref>\n"
+" <ejb-name>ShoppingCartUser</ejb-name>\n"
+" <!--...-->\n"
+" <ejb-ref-name>ejb/ShoppingCartHome</ejb-ref-name>\n"
+" <ejb-ref-type>Session</ejb-ref-type>\n"
+" <home>org.jboss.store.ejb.ShoppingCartHome</home>\n"
+" <remote> org.jboss.store.ejb.ShoppingCart</remote>\n"
+" <ejb-link>ShoppingCartBean</ejb-link>\n"
+" </ejb-ref>\n"
+"</session>\n"
+"\n"
+"<entity>\n"
+" <description>The Product entity bean </description>\n"
+" <ejb-name>ProductBean</ejb-name>\n"
+" <!--...-->\n"
+"</entity>\n"
+"\n"
+"<!--...-->"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1004
+#, no-c-format
+msgid "ENC ejb-ref access code fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1005
+#, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+"Context ejbCtx = (Context) iniCtx.lookup(\"java:comp/env/ejb\");\n"
+"ShoppingCartHome home = (ShoppingCartHome) ejbCtx.lookup(\"ShoppingCartHome"
+"\");"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1010
+#, fuzzy, no-c-format
+msgid ""
+"EJB References with <literal>jboss.xml</literal> and <literal>jboss-web.xml</"
+"literal>"
+msgstr ""
+"JBoss JMX jar 和 GNU regex jar, <literal>jboss-jmx.jar</literal> 和 "
+"<literal>gnu-regexp.jar</literal>。"
+
+#. Tag: para
+#: Naming.xml:1011
+#, no-c-format
+msgid ""
+"The JBoss specific <literal>jboss.xml</literal> EJB deployment descriptor "
+"affects EJB references in two ways. First, the <literal>jndi-name</literal> "
+"child element of the <literal>session</literal> and <literal>entity</"
+"literal> elements allows the user to specify the deployment JNDI name for "
+"the EJB home interface. In the absence of a <literal>jboss.xml</literal> "
+"specification of the <literal>jndi-name</literal> for an EJB, the home "
+"interface is bound under the <literal>ejb-jar.xml</literal><literal>ejb-"
+"name</literal> value. For example, the session EJB with the <literal>ejb-"
+"name</literal> of <literal>ShoppingCartBean</literal> in <xref linkend="
+"\"EJB_References-An_example_ejb_jar.xml_ejb_ref_descriptor_fragment\"/> "
+"would have its home interface bound under the JNDI name "
+"<literal>ShoppingCartBean</literal> in the absence of a <literal>jboss.xml</"
+"literal><literal>jndi-name</literal> specification."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1014
+#, no-c-format
+msgid ""
+"The second use of the <literal>jboss.xml</literal> descriptor with respect "
+"to <literal>ejb-ref</literal>s is the setting of the destination to which a "
+"component's ENC <literal>ejb-ref</literal> refers. The <literal>ejb-"
+"link</literal> element cannot be used to refer to EJBs in another enterprise "
+"application. If your <literal>ejb-ref</literal> needs to access an external "
+"EJB, you can specify the JNDI name of the deployed EJB home using the "
+"<literal>jboss.xml</literal><literal>ejb-ref/jndi-name</literal> element."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1017
+#, no-c-format
+msgid ""
+"The <literal>jboss-web.xml</literal> descriptor is used only to set the "
+"destination to which a Web application ENC <literal>ejb-ref</literal> "
+"refers. The content model for the JBoss <literal>ejb-ref</literal> is as "
+"follows:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1022
+#, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">ejb-ref-name</emphasis> element that corresponds "
+"to the <emphasis role=\"bold\">ejb-ref-name</emphasis> element in the "
+"<emphasis role=\"bold\">ejb-jar.xml</emphasis> or <emphasis role=\"bold"
+"\">web.xml</emphasis> standard descriptor"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1027
+#, fuzzy, no-c-format
+msgid ""
+"A <literal>jndi-name</literal> element that specifies the JNDI name of the "
+"EJB home interface in the deployment environment"
+msgstr ""
+"<literal>class</literal>元素指定管理接口由XMBean描述符描述的被管理的对象的类"
+"全名。"
+
+#. Tag: para
+#: Naming.xml:1032
+#, fuzzy, no-c-format
+msgid ""
+"provides an example <literal>jboss.xml</literal> descriptor fragment that "
+"illustrates the following usage points:"
+msgstr "下面说明了 <literal>conf</literal> 目录下的文件。"
+
+#. Tag: para
+#: Naming.xml:1037
+#, no-c-format
+msgid ""
+"The <literal>ProductBeanUser</literal><literal>ejb-ref</literal> link "
+"destination is set to the deployment name of <literal>jboss/store/"
+"ProductHome</literal>"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1042
+#, no-c-format
+msgid ""
+"The deployment JNDI name of the <literal>ProductBean</literal> is set to "
+"<literal>jboss/store/ProductHome</literal>"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1047
+#, no-c-format
+msgid "An example jboss.xml ejb-ref fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1048
+#, no-c-format
+msgid ""
+"<!-- ... -->\n"
+"<session>\n"
+" <ejb-name>ProductBeanUser</ejb-name>\n"
+" <ejb-ref>\n"
+" <ejb-ref-name>ejb/ProductHome</ejb-ref-name>\n"
+" <jndi-name><emphasis role=\"bold\">jboss/store/ProductHome</"
+"emphasis></jndi-name>\n"
+" </ejb-ref>\n"
+"</session>\n"
+" \n"
+"<entity>\n"
+" <ejb-name>ProductBean</ejb-name>\n"
+" <jndi-name><emphasis role=\"bold\">jboss/store/ProductHome</"
+"emphasis></jndi-name>\n"
+" <!-- ... -->\n"
+"</entity>\n"
+"<!-- ... -->"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1053
+#, no-c-format
+msgid "EJB Local References"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1054
+#, no-c-format
+msgid ""
+"EJB 2.0 added local interfaces that do not use RMI call by value semantics. "
+"These interfaces use a call by reference semantic and therefore do not incur "
+"any RMI serialization overhead. An EJB local reference is a link in an "
+"application component naming environment that points to a deployed EJB local "
+"home interface. The name used by the application component is a logical link "
+"that isolates the component from the actual name of the EJB local home in "
+"the deployment environment. The J2EE specification recommends that all "
+"references to enterprise beans be organized in the <literal>java:comp/env/"
+"ejb</literal> context of the application component's environment."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1057
+#, no-c-format
+msgid ""
+"An EJB local reference is declared using an <literal>ejb-local-ref</literal> "
+"element in the deployment descriptor. Each <literal>ejb-local-ref</literal> "
+"element describes the interface requirements that the referencing "
+"application component has for the referenced enterprise bean. The "
+"<literal>ejb-local-ref</literal> element contains the following child "
+"elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1077
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">local-home</emphasis> element that gives the fully "
+"qualified class name of the EJB local home interface."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:1082
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">local</emphasis> element that gives the fully "
+"qualified class name of the EJB local interface."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:1087
+#, no-c-format
+msgid ""
+"An <emphasis role=\"bold\">ejb-link</emphasis> element that links the "
+"reference to another enterprise bean in the <literal>ejb-jar</literal> file "
+"or in the same J2EE application unit. The <literal>ejb-link</literal> value "
+"is the <literal>ejb-name</literal> of the referenced bean. If there are "
+"multiple enterprise beans with the same <literal>ejb-name</literal>, the "
+"value uses the path name specifying the location of the <literal>ejb-jar</"
+"literal> file that contains the referenced component. The path name is "
+"relative to the referencing <literal>ejb-jar</literal> file. The Application "
+"Assembler appends the <literal>ejb-name</literal> of the referenced bean to "
+"the path name separated by <literal>#</literal>. This allows multiple beans "
+"with the same name to be uniquely identified. An <literal>ejb-link</literal> "
+"element must be specified in JBoss to match the local reference to the "
+"corresponding EJB."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1092
+#, no-c-format
+msgid ""
+"An EJB local reference is scoped to the application component whose "
+"declaration contains the <literal>ejb-local-ref</literal> element. This "
+"means that the EJB local reference is not accessible from other application "
+"components at runtime, and that other application components may define "
+"<literal>ejb-local-ref</literal> elements with the same <literal>ejb-ref-"
+"name</literal> without causing a name conflict. <xref linkend="
+"\"EJB_Local_References-An_example_ejb_jar."
+"xml_ejb_local_ref_descriptor_fragment\"/> provides an <literal>ejb-jar.xml</"
+"literal> fragment that illustrates the use of the <literal>ejb-local-ref</"
+"literal> element. A code sample that illustrates accessing the "
+"<literal>ProbeLocalHome</literal> reference declared in <xref linkend="
+"\"EJB_Local_References-An_example_ejb_jar."
+"xml_ejb_local_ref_descriptor_fragment\"/> is given in <xref linkend="
+"\"EJB_Local_References-ENC_ejb_local_ref_access_code_fragment\"/>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1095
+#, no-c-format
+msgid "An example ejb-jar.xml ejb-local-ref descriptor fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1096
+#, no-c-format
+msgid ""
+"<!-- ... -->\n"
+" <session>\n"
+" <ejb-name>Probe</ejb-name>\n"
+" <home>org.jboss.test.perf.interfaces.ProbeHome</home>\n"
+" <remote>org.jboss.test.perf.interfaces.Probe</remote>\n"
+" <local-home>org.jboss.test.perf.interfaces.ProbeLocalHome</"
+"local-home>\n"
+" <local>org.jboss.test.perf.interfaces.ProbeLocal</"
+"local>\n"
+" <ejb-class>org.jboss.test.perf.ejb.ProbeBean</ejb-"
+"class>\n"
+" <session-type>Stateless</session-type>\n"
+" <transaction-type>Bean</transaction-type>\n"
+" </session>\n"
+" <session>\n"
+" <ejb-name>PerfTestSession</ejb-name>\n"
+" <home>org.jboss.test.perf.interfaces.PerfTestSessionHome</"
+"home>\n"
+" <remote>org.jboss.test.perf.interfaces.PerfTestSession</"
+"remote>\n"
+" <ejb-class>org.jboss.test.perf.ejb.PerfTestSessionBean</ejb-"
+"class>\n"
+" <session-type>Stateless</session-type>\n"
+" <transaction-type>Container</transaction-type>\n"
+" <ejb-ref>\n"
+" <ejb-ref-name>ejb/ProbeHome</ejb-ref-name>\n"
+" <ejb-ref-type>Session</ejb-ref-type>\n"
+" <home>org.jboss.test.perf.interfaces.SessionHome</"
+"home>\n"
+" <remote>org.jboss.test.perf.interfaces.Session</"
+"remote>\n"
+" <ejb-link>Probe</ejb-link>\n"
+" </ejb-ref>\n"
+" <ejb-local-ref>\n"
+" <ejb-ref-name>ejb/ProbeLocalHome</ejb-ref-name>\n"
+" <ejb-ref-type>Session</ejb-ref-type>\n"
+" <local-home>org.jboss.test.perf.interfaces."
+"ProbeLocalHome</local-home>\n"
+" <local>org.jboss.test.perf.interfaces.ProbeLocal</"
+"local>\n"
+" <ejb-link>Probe</ejb-link>\n"
+" </ejb-local-ref>\n"
+" </session>\n"
+" <!-- ... -->"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1097
+#, no-c-format
+msgid "ENC ejb-local-ref access code fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1098
+#, fuzzy, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+"Context ejbCtx = (Context) iniCtx.lookup(\"java:comp/env/ejb\");\n"
+"ProbeLocalHome home = (ProbeLocalHome) ejbCtx.lookup(\"ProbeLocalHome\");"
+msgstr ""
+"InitialContext iniCtx = new InitialContext();\n"
+"LdapContext ldapCtx = iniCtx.lookup(\"external/ldap/jboss\");"
+
+#. Tag: title
+#: Naming.xml:1103
+#, no-c-format
+msgid "Resource Manager Connection Factory References"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1104
+#, no-c-format
+msgid ""
+"Resource manager connection factory references allow application component "
+"code to refer to resource factories using logical names called resource "
+"manager connection factory references. Resource manager connection factory "
+"references are defined by the <literal>resource-ref</literal> elements in "
+"the standard deployment descriptors. The <literal>Deployer</literal> binds "
+"the resource manager connection factory references to the actual resource "
+"manager connection factories that exist in the target operational "
+"environment using the <literal>jboss.xml</literal> and <literal>jboss-web."
+"xml</literal> descriptors."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1107
+#, no-c-format
+msgid ""
+"Each <literal>resource-ref</literal> element describes a single resource "
+"manager connection factory reference. The <literal>resource-ref</literal> "
+"element consists of the following child elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1117
+#, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">res-ref-name</emphasis> element that specifies the "
+"name of the reference relative to the <literal>java:comp/env</literal> "
+"context. The resource type based naming convention for which subcontext to "
+"place the <literal>res-ref-name</literal> into is discussed in the next "
+"paragraph."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1122
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">res-type</emphasis> element that specifies the "
+"fully qualified class name of the resource manager connection factory."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:1127
+#, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">res-auth</emphasis> element that indicates whether "
+"the application component code performs resource signon programmatically, or "
+"whether the container signs on to the resource based on the principal "
+"mapping information supplied by the Deployer. It must be one of "
+"<literal>Application</literal> or <literal>Container</literal>."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1132
+#, no-c-format
+msgid ""
+"An optional <emphasis role=\"bold\">res-sharing-scope</emphasis> element. "
+"This currently is not supported by JBoss."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1137
+#, no-c-format
+msgid ""
+"The J2EE specification recommends that all resource manager connection "
+"factory references be organized in the subcontexts of the application "
+"component's environment, using a different subcontext for each resource "
+"manager type. The recommended resource manager type to subcontext name is as "
+"follows:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1142
+#, no-c-format
+msgid ""
+"JDBC <literal>DataSource</literal> references should be declared in the "
+"<literal>java:comp/env/jdbc</literal> subcontext."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1147
+#, no-c-format
+msgid ""
+"JMS connection factories should be declared in the <literal>java:comp/env/"
+"jms</literal> subcontext."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1152
+#, no-c-format
+msgid ""
+"JavaMail connection factories should be declared in the <literal>java:comp/"
+"env/mail</literal> subcontext."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1157
+#, no-c-format
+msgid ""
+"URL connection factories should be declared in the <literal>java:comp/env/"
+"url</literal> subcontext."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1162
+#, no-c-format
+msgid ""
+"shows an example <literal>web.xml</literal> descriptor fragment that "
+"illustrates the <literal>resource-ref</literal> element usage. <xref linkend="
+"\"Resource_Manager_Connection_Factory_References-"
+"ENC_resource_ref_access_sample_code_fragment\"/> provides a code fragment "
+"that an application component would use to access the <literal>DefaultMail</"
+"literal> resource declared by the <literal>resource-ref</literal>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1165
+#, no-c-format
+msgid "A web.xml resource-ref descriptor fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1166
+#, no-c-format
+msgid ""
+"<web>\n"
+" <!-- ... -->\n"
+" <servlet>\n"
+" <servlet-name>AServlet</servlet-name>\n"
+" <!-- ... -->\n"
+" </servlet>\n"
+" <!-- ... -->\n"
+" <!-- JDBC DataSources (java:comp/env/jdbc) -->\n"
+" <resource-ref>\n"
+" <description>The default DS</description>\n"
+" <res-ref-name>jdbc/DefaultDS</res-ref-name>\n"
+" <res-type>javax.sql.DataSource</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+" </resource-ref>\n"
+" <!-- JavaMail Connection Factories (java:comp/env/mail) -->\n"
+" <resource-ref>\n"
+" <description>Default Mail</description>\n"
+" <res-ref-name>mail/DefaultMail</res-ref-name>\n"
+" <res-type>javax.mail.Session</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+" </resource-ref>\n"
+" <!-- JMS Connection Factories (java:comp/env/jms) -->\n"
+" <resource-ref>\n"
+" <description>Default QueueFactory</description>\n"
+" <res-ref-name>jms/QueueFactory</res-ref-name>\n"
+" <res-type>javax.jms.QueueConnectionFactory</res-type>\n"
+" <res-auth>Container</res-auth>\n"
+" </resource-ref> \n"
+"<web>"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1167
+#, no-c-format
+msgid "ENC resource-ref access sample code fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1168
+#, no-c-format
+msgid ""
+"Context initCtx = new InitialContext();\n"
+"javax.mail.Session s = (javax.mail.Session)\n"
+"initCtx.lookup(\"java:comp/env/mail/DefaultMail\");"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1173
+#, no-c-format
+msgid ""
+"Resource Manager Connection Factory References with jboss.xml and jboss-web."
+"xml"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1174
+#, no-c-format
+msgid ""
+"The purpose of the JBoss <literal>jboss.xml</literal> EJB deployment "
+"descriptor and <literal>jboss-web.xml</literal> Web application deployment "
+"descriptor is to provide the link from the logical name defined by the "
+"<literal>res-ref-name</literal> element to the JNDI name of the resource "
+"factory as deployed in JBoss. This is accomplished by providing a "
+"<literal>resource-ref</literal> element in the <literal>jboss.xml</literal> "
+"or <literal>jboss-web.xml</literal> descriptor. The JBoss <literal>resource-"
+"ref</literal> element consists of the following child elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1179
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">res-ref-name</emphasis> element that must match "
+"the <literal>res-ref-name</literal> of a corresponding <literal>resource-"
+"ref</literal> element from the <literal>ejb-jar.xml</literal> or "
+"<literal>web.xml</literal> standard descriptors"
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: Naming.xml:1184
+#, fuzzy, no-c-format
+msgid ""
+"An optional <emphasis role=\"bold\">res-type</emphasis> element that "
+"specifies the fully qualified class name of the resource manager connection "
+"factory"
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:1189
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">jndi-name</emphasis> element that specifies the "
+"JNDI name of the resource factory as deployed in JBoss"
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: Naming.xml:1194
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">res-url</emphasis> element that specifies the URL "
+"string in the case of a <literal>resource-ref</literal> of type "
+"<literal>java.net.URL</literal>"
+msgstr ""
+"<emphasis role=\"bold\">DefaultSecurityDomain</emphasis>:它指定在 WAR 文件"
+"的 <literal>jboss-web.xml</literal> 里的 <literal>security-domain</literal> "
+"没有显性地指定的情况下的 JAAS 安全域名。"
+
+#. Tag: para
+#: Naming.xml:1199
+#, no-c-format
+msgid ""
+"provides a sample <literal>jboss-web.xml</literal> descriptor fragment that "
+"shows sample mappings of the <literal>resource-ref</literal> elements given "
+"in <xref linkend=\"Resource_Manager_Connection_Factory_References-A_web."
+"xml_resource_ref_descriptor_fragment\"/>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1202
+#, no-c-format
+msgid "A sample jboss-web.xml resource-ref descriptor fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1203
+#, no-c-format
+msgid ""
+"<jboss-web>\n"
+" <!-- ... -->\n"
+" <resource-ref>\n"
+" <res-ref-name>jdbc/DefaultDS</res-ref-name>\n"
+" <res-type>javax.sql.DataSource</res-type>\n"
+" <jndi-name>java:/DefaultDS</jndi-name>\n"
+" </resource-ref>\n"
+" <resource-ref>\n"
+" <res-ref-name>mail/DefaultMail</res-ref-name>\n"
+" <res-type>javax.mail.Session</res-type>\n"
+" <jndi-name>java:/Mail</jndi-name>\n"
+" </resource-ref>\n"
+" <resource-ref>\n"
+" <res-ref-name>jms/QueueFactory</res-ref-name>\n"
+" <res-type>javax.jms.QueueConnectionFactory</res-type>\n"
+" <jndi-name>QueueConnectionFactory</jndi-name>\n"
+" </resource-ref>\n"
+" <!-- ... -->\n"
+"</jboss-web>"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1208
+#, fuzzy, no-c-format
+msgid "Resource Environment References"
+msgstr "脱管调用者引用"
+
+#. Tag: para
+#: Naming.xml:1209
+#, no-c-format
+msgid ""
+"Resource environment references are elements that refer to administered "
+"objects that are associated with a resource (for example, JMS destinations) "
+"using logical names. Resource environment references are defined by the "
+"<literal>resource-env-ref</literal> elements in the standard deployment "
+"descriptors. The <literal>Deployer</literal> binds the resource environment "
+"references to the actual administered objects location in the target "
+"operational environment using the <literal>jboss.xml</literal> and "
+"<literal>jboss-web.xml</literal> descriptors."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1212
+#, no-c-format
+msgid ""
+"Each <literal>resource-env-ref</literal> element describes the requirements "
+"that the referencing application component has for the referenced "
+"administered object. The <literal>resource-env-ref</literal> element "
+"consists of the following child elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1222
+#, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">resource-env-ref-name</emphasis> element that "
+"specifies the name of the reference relative to the <literal>java:comp/env</"
+"literal> context. Convention places the name in a subcontext that "
+"corresponds to the associated resource factory type. For example, a JMS "
+"queue reference named <literal>MyQueue</literal> should have a "
+"<literal>resource-env-ref-name</literal> of <literal>jms/MyQueue</literal>."
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1227
+#, fuzzy, no-c-format
+msgid ""
+"A <emphasis role=\"bold\">resource-env-ref-type</emphasis> element that "
+"specifies the fully qualified class name of the referenced object. For "
+"example, in the case of a JMS queue, the value would be <literal>javax.jms."
+"Queue</literal>."
+msgstr ""
+"<emphasis role=\"bold\">return-type</emphasis>:这个元素包含这个操作的返回类"
+"型的类全名。如果没指定的话,缺省为void。"
+
+#. Tag: para
+#: Naming.xml:1232
+#, no-c-format
+msgid ""
+"provides an example <literal>resource-ref-env</literal> element declaration "
+"by a session bean. <xref linkend=\"Resource_Environment_References-"
+"ENC_resource_env_ref_access_code_fragment\"/> gives a code fragment that "
+"illustrates how to look up the <literal>StockInfo</literal> queue declared "
+"by the <literal>resource-env-ref</literal>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1235
+#, no-c-format
+msgid "An example ejb-jar.xml resource-env-ref fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1236
+#, no-c-format
+msgid ""
+"<session>\n"
+" <ejb-name>MyBean</ejb-name>\n"
+" <!-- ... -->\n"
+" <resource-env-ref>\n"
+" <description>This is a reference to a JMS queue used in the\n"
+" processing of Stock info\n"
+" </description>\n"
+" <resource-env-ref-name>jms/StockInfo</resource-env-ref-"
+"name>\n"
+" <resource-env-ref-type>javax.jms.Queue</resource-env-ref-"
+"type>\n"
+" </resource-env-ref>\n"
+" <!-- ... -->\n"
+"</session>"
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1237
+#, no-c-format
+msgid "ENC resource-env-ref access code fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1238
+#, fuzzy, no-c-format
+msgid ""
+"InitialContext iniCtx = new InitialContext();\n"
+"javax.jms.Queue q = (javax.jms.Queue)\n"
+"envCtx.lookup(\"java:comp/env/jms/StockInfo\");"
+msgstr ""
+"InitialContext iniCtx = new InitialContext();\n"
+"LdapContext ldapCtx = iniCtx.lookup(\"external/ldap/jboss\");"
+
+#. Tag: title
+#: Naming.xml:1243
+#, no-c-format
+msgid "Resource Environment References and jboss.xml, jboss-web.xml"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1244
+#, no-c-format
+msgid ""
+"The purpose of the JBoss <literal>jboss.xml</literal> EJB deployment "
+"descriptor and <literal>jboss-web.xml</literal> Web application deployment "
+"descriptor is to provide the link from the logical name defined by the "
+"<literal>resource-env-ref-name</literal> element to the JNDI name of the "
+"administered object deployed in JBoss. This is accomplished by providing a "
+"<literal>resource-env-ref</literal> element in the <literal>jboss.xml</"
+"literal> or <literal>jboss-web.xml</literal> descriptor. The JBoss "
+"<literal>resource-env-ref</literal> element consists of the following child "
+"elements:"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1249
+#, no-c-format
+msgid ""
+"A <literal>resource-env-ref-name</literal> element that must match the "
+"<literal>resource-env-ref-name</literal> of a corresponding "
+"<literal>resource-env-ref</literal> element from the <literal>ejb-jar.xml</"
+"literal> or <literal>web.xml</literal> standard descriptors"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1254
+#, no-c-format
+msgid ""
+"A <literal>jndi-name</literal> element that specifies the JNDI name of the "
+"resource as deployed in JBoss"
+msgstr ""
+
+#. Tag: para
+#: Naming.xml:1259
+#, no-c-format
+msgid ""
+"provides a sample <literal>jboss.xml</literal> descriptor fragment that "
+"shows a sample mapping for the <literal>StockInfo</literal><literal>resource-"
+"env-ref</literal>."
+msgstr ""
+
+#. Tag: title
+#: Naming.xml:1262
+#, no-c-format
+msgid "A sample jboss.xml resource-env-ref descriptor fragment"
+msgstr ""
+
+#. Tag: programlisting
+#: Naming.xml:1263
+#, no-c-format
+msgid ""
+"<session>\n"
+" <ejb-name>MyBean</ejb-name>\n"
+" <!-- ... -->\n"
+" <resource-env-ref>\n"
+" <resource-env-ref-name>jms/StockInfo</resource-env-ref-"
+"name>\n"
+" <jndi-name>queue/StockInfoQueue</jndi-name>\n"
+" </resource-env-ref>\n"
+" <!-- ... -->\n"
+"</session>"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Revision_History.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Revision_History.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Revision_History.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,27 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Revision_History.xml:6
+#, no-c-format
+msgid "Revision History"
+msgstr ""
+
+#. Tag: author
+#: Revision_History.xml:12
+#, no-c-format
+msgid "<firstname></firstname> <surname></surname> <email></email>"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Server_Configuration_Guide_CP03.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Server_Configuration_Guide_CP03.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Server_Configuration_Guide_CP03.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,39 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Server_Configuration_Guide_CP03.xml:13
+#, fuzzy, no-c-format
+msgid "Java EE 5 Application Configuration"
+msgstr "EJB 应用程序配置"
+
+#. Tag: title
+#: Server_Configuration_Guide_CP03.xml:19
+#, fuzzy, no-c-format
+msgid "JBoss AS Infrastructure"
+msgstr "The JBoss AS directroy structure"
+
+#. Tag: title
+#: Server_Configuration_Guide_CP03.xml:30
+#, fuzzy, no-c-format
+msgid "Clustering Configuration"
+msgstr "客户端配置"
+
+#. Tag: title
+#: Server_Configuration_Guide_CP03.xml:42
+#, no-c-format
+msgid "Legacy EJB Support"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/The_CMP_Engine.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/The_CMP_Engine.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/The_CMP_Engine.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,7155 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: The_CMP_Engine.xml:6
+#, fuzzy, no-c-format
+msgid "The CMP Engine"
+msgstr "Engine 元素"
+
+#. Tag: para
+#: The_CMP_Engine.xml:7
+#, no-c-format
+msgid ""
+"This chapter will explore the use of container managed persistence (CMP) in "
+"JBoss. We will assume a basic familiarity the EJB CMP model and focus on the "
+"operation of the JBoss CMP engine. Specifically, we will look at how to "
+"configure and optimize CMP applications on JBoss. For more introductory "
+"coverage of basic CMP concepts, we recommend <emphasis>Enterprise Java "
+"Beans, Fourth Edition</emphasis> (O'Reilly 2004)."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:11
+#, fuzzy, no-c-format
+msgid "Example Code"
+msgstr "URL示例包括:"
+
+#. Tag: para
+#: The_CMP_Engine.xml:12
+#, no-c-format
+msgid ""
+"This chapter is example-driven. We will work with the crime portal "
+"application which stores information about imaginary criminal organizations. "
+"The data model we will be working with is shown in <xref linkend="
+"\"Example_Code-The_crime_portal_example_classes\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:16
+#, no-c-format
+msgid "The crime portal example classes"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:23
+#, no-c-format
+msgid ""
+"The source code for the crime portal is available in the <literal>src/main/"
+"org/jboss/cmp2</literal> directory of the example code. To build the example "
+"code, run Ant as shown below"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:26
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=cmp2 config"
+msgstr "[examples]$ ant -Dchap=naming config"
+
+#. Tag: para
+#: The_CMP_Engine.xml:27
+#, no-c-format
+msgid ""
+"This command builds and deploys the application to the JBoss server. When "
+"you start yours JBoss server, or if it is already running, you should see "
+"the following deployment messages:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:30
+#, no-c-format
+msgid ""
+"15:46:36,704 INFO [OrganizationBean$Proxy] Creating organization Yakuza, "
+"Japanese Gangsters\n"
+"15:46:36,790 INFO [OrganizationBean$Proxy] Creating organization Mafia, "
+"Italian Bad Guys\n"
+"15:46:36,797 INFO [OrganizationBean$Proxy] Creating organization Triads, "
+"Kung Fu Movie Extras\n"
+"15:46:36,877 INFO [GangsterBean$Proxy] Creating Gangster 0 '"
+"Bodyguard' Yojimbo\n"
+"15:46:37,003 INFO [GangsterBean$Proxy] Creating Gangster 1 'Master' "
+"Takeshi\n"
+"15:46:37,021 INFO [GangsterBean$Proxy] Creating Gangster 2 'Four "
+"finger' Yuriko\n"
+"15:46:37,040 INFO [GangsterBean$Proxy] Creating Gangster 3 'Killer' "
+"Chow\n"
+"15:46:37,106 INFO [GangsterBean$Proxy] Creating Gangster 4 '"
+"Lightning' Shogi\n"
+"15:46:37,118 INFO [GangsterBean$Proxy] Creating Gangster 5 'Pizza-"
+"Face' Valentino\n"
+"15:46:37,133 INFO [GangsterBean$Proxy] Creating Gangster 6 '"
+"Toohless' Toni\n"
+"15:46:37,208 INFO [GangsterBean$Proxy] Creating Gangster 7 '"
+"Godfather' Corleone\n"
+"15:46:37,238 INFO [JobBean$Proxy] Creating Job 10th Street Jeweler Heist\n"
+"15:46:37,247 INFO [JobBean$Proxy] Creating Job The Greate Train Robbery\n"
+"15:46:37,257 INFO [JobBean$Proxy] Creating Job Cheap Liquor Snatch and Grab"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:31
+#, no-c-format
+msgid ""
+"Since the beans in the examples are configured to have their tables removed "
+"on undeployment, anytime you restart the JBoss server you need to rerun the "
+"config target to reload the example data and re-deploy the application."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:35
+#, no-c-format
+msgid "Enabling CMP Debug Logging"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:36
+#, no-c-format
+msgid ""
+"In order to get meaningful feedback from the chapter tests, you will want to "
+"increase the log level of the CMP subsystem before running running the test. "
+"To enable debug logging add the following category to your <literal>log4j."
+"xml</literal> file:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:39
+#, no-c-format
+msgid ""
+"<category name=\"org.jboss.ejb.plugins.cmp\">\n"
+" <priority value=\"DEBUG\"/>\n"
+"</category>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:40
+#, no-c-format
+msgid ""
+"In addition to this, it is necessary to decrease the threshold on the "
+"<literal>CONSOLE</literal> appender to allow debug level messages to be "
+"logged to the console. The following changes also need to be applied to the "
+"<literal>log4j.xml</literal> file."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:43
+#, no-c-format
+msgid ""
+"<appender name=\"CONSOLE\" class=\"org.apache.log4j.ConsoleAppender"
+"\">\n"
+" <errorHandler class=\"org.jboss.logging.util.OnlyOnceErrorHandler\"/"
+">\n"
+" <param name=\"Target\" value=\"System.out\"/>\n"
+" <param name=\"Threshold\" value=\"<emphasis role=\"bold\">DEBUG</"
+"emphasis>\" />\n"
+"\n"
+" <layout class=\"org.apache.log4j.PatternLayout\">\n"
+" <!-- The default pattern: Date Priority [Category] Message\\n --"
+">\n"
+" <param name=\"ConversionPattern\" value=\"%d{ABSOLUTE} %-5p [%c"
+"{1}] %m%n\"/>\n"
+" </layout>\n"
+"</appender>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:44
+#, no-c-format
+msgid ""
+"To see the full workings of the CMP engine you would need to enable the "
+"custom <literal>TRACE</literal> level priority on the <literal>org.jboss.ejb."
+"plugins.cmp</literal> category as shown here:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:47
+#, no-c-format
+msgid ""
+"<category name=\"org.jboss.ejb.plugins.cmp\">\n"
+" <priority value=\"TRACE\" class=\"org.jboss.logging.XLevel\"/>\n"
+"</category>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:51
+#, no-c-format
+msgid "Running the examples"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:52
+#, no-c-format
+msgid ""
+"The first test target illustrates a number of the customization features "
+"that will be discussed throughout this chapter. To run these tests execute "
+"the following ant target:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:55
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=cmp2 -Dex=test run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:56
+#, no-c-format
+msgid ""
+"22:30:09,862 DEBUG [OrganizationEJB#findByPrimaryKey] Executing SQL: SELECT "
+"t0_OrganizationEJ\n"
+"B.name FROM ORGANIZATION t0_OrganizationEJB WHERE t0_OrganizationEJB.name=?\n"
+"22:30:09,927 DEBUG [OrganizationEJB] Executing SQL: SELECT desc, the_boss "
+"FROM ORGANIZATION W\n"
+"HERE (name=?)\n"
+"22:30:09,931 DEBUG [OrganizationEJB] load relation SQL: SELECT id FROM "
+"GANGSTER WHERE (organi\n"
+"zation=?)\n"
+"22:30:09,947 DEBUG [StatelessSessionContainer] Useless invocation of remove"
+"() for stateless s\n"
+"ession bean\n"
+"22:30:10,086 DEBUG [GangsterEJB#findBadDudes_ejbql] Executing SQL: SELECT "
+"t0_g.id FROM GANGST\n"
+"ER t0_g WHERE (t0_g.badness > ?)\n"
+"22:30:10,097 DEBUG [GangsterEJB#findByPrimaryKey] Executing SQL: SELECT "
+"t0_GangsterEJB.id FRO\n"
+"M GANGSTER t0_GangsterEJB WHERE t0_GangsterEJB.id=?\n"
+"22:30:10,102 DEBUG [GangsterEJB#findByPrimaryKey] Executing SQL: SELECT "
+"t0_GangsterEJB.id FRO\n"
+"M GANGSTER t0_GangsterEJB WHERE t0_GangsterEJB.id=?"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:57
+#, no-c-format
+msgid ""
+"These tests exercise various finders, selectors and object to table mapping "
+"issues. We will refer to the tests throughout the chapter."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:60
+#, no-c-format
+msgid ""
+"The other main target runs a set of tests to demonstrate the optimized "
+"loading configurations presented in <xref linkend=\"The_CMP_Engine-"
+"Optimized_Loading\"/>. Now that the logging is setup correctly, the read-"
+"ahead tests will display useful information about the queries performed. "
+"Note that you do not have to restart the JBoss server for it to recognize "
+"the changes to the log4j.xml file, but it may take a minute or so. The "
+"following shows the actual execution of the readahead client:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:63
+#, fuzzy, no-c-format
+msgid "[examples]$ ant -Dchap=cmp2 -Dex=readahead run-example"
+msgstr "[examples]$ ant -Dchap=chap2 -Dex=3 run-example"
+
+#. Tag: para
+#: The_CMP_Engine.xml:64
+#, no-c-format
+msgid ""
+"When the readahead client is executed, all of the SQL queries executed "
+"during the test are displayed in the JBoss server console. The important "
+"items of note when analyzing the output are the number of queries executed, "
+"the columns selected, and the number of rows loaded. The following shows the "
+"read-ahead none portion of the JBoss server console output from readahead:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:67
+#, no-c-format
+msgid ""
+"22:44:31,570 INFO [ReadAheadTest] \n"
+"########################################################\n"
+"### read-ahead none\n"
+"###\n"
+"22:44:31,582 DEBUG [GangsterEJB#findAll_none] Executing SQL: SELECT t0_g.id "
+"FROM GANGSTER t0_\n"
+"g ORDER BY t0_g.id ASC\n"
+"22:44:31,604 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,615 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,622 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,628 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,635 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,644 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,649 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,658 DEBUG [GangsterEJB] Executing SQL: SELECT name, nick_name, "
+"badness, organization\n"
+", hangout FROM GANGSTER WHERE (id=?)\n"
+"22:44:31,670 INFO [ReadAheadTest] \n"
+"###\n"
+"########################################################\n"
+"..."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:68
+#, no-c-format
+msgid ""
+"We will revisit this example and explore the output when we discuss the "
+"settings for optimized loading."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:76
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc Structure"
+msgstr "The JBoss AS directroy structure"
+
+#. Tag: para
+#: The_CMP_Engine.xml:77
+#, no-c-format
+msgid ""
+"The <literal>jbosscmp-jdbc.xml</literal> descriptor is used to control the "
+"behavior of the JBoss engine. This can be done globally through the "
+"<literal>conf/standardjbosscmp-jdbc.xml</literal> descriptor found in the "
+"server configuration file set, or per EJB JAR deployment via a <literal>META-"
+"INF/jbosscmp-jdbc.xml</literal> descriptor."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:80
+#, no-c-format
+msgid ""
+"The DTD for the <literal>jbosscmp-jdbc.xml</literal> descriptor can be found "
+"in <literal>JBOSS_DIST/docs/dtd/jbosscmp-jdbc_4_0.dtd</literal>. The public "
+"doctype for this DTD is:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:83
+#, no-c-format
+msgid ""
+"<!DOCTYPE jbosscmp-jdbc PUBLIC\n"
+" \"-//JBoss//DTD JBOSSCMP-JDBC 4.0//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_4_0.dtd\">"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:84
+#, no-c-format
+msgid ""
+"The top level elements are shown in <xref linkend="
+"\"The_jbosscmp_jdbc_Structure-The_jbosscmp_jdbc_content_model.\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:88
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc content model."
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:97
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">defaults</emphasis>: The defaults section allows for "
+"the specification of default behavior/settings for behavior that controls "
+"entity beans. Use of this section simplifies the amount of information "
+"needed for the common behaviors found in the entity beans section. See <xref "
+"linkend=\"The_CMP_Engine-Defaults\"/> for the details of the defaults "
+"content."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:102
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">enterprise-beans</emphasis>: The <literal>enterprise-"
+"beans</literal> element allows for customization of entity beans defined in "
+"the <literal>ejb-jar.xml</literal><literal>enterprise-beans</literal> "
+"descriptor. This is described in detail in <xref linkend=\"The_CMP_Engine-"
+"Entity_Beans\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:107
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">relationships</emphasis>: The "
+"<literal>relationships</literal> element allows for the customization of "
+"tables and the loading behavior of entity relationships. This is described "
+"in detail in <xref linkend=\"The_CMP_Engine-Container_Managed_Relationships"
+"\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:112
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">dependent-value-classes</emphasis>: The "
+"<literal>dependent-value-classes</literal> element allows for the "
+"customization of the mapping of dependent value classes to tables. Dependent "
+"value classes are described in detail in <xref linkend=\"CMP_Fields-"
+"Dependent_Value_Classes_DVCs\"/> (DVCs)."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:117
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">type-mappings</emphasis>: The <literal>type-"
+"mappings</literal> element defines the Java to SQL type mappings for a "
+"database, along with SQL templates, and function mappings. This is described "
+"in detail in <xref linkend=\"The_CMP_Engine-Datasource_Customization\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:122
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">entity-commands</emphasis>: The <literal>entity-"
+"commands</literal> element allows for the definition of the entity creation "
+"command instances that know how to create an entity instance in a persistent "
+"store. This is described in detail in <xref linkend=\"The_CMP_Engine-"
+"Entity_Commands_and_Primary_Key_Generation\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:127
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">user-type-mappings</emphasis>: The <literal>user-"
+"type-mappings</literal> elements defines a mapping of a user types to a "
+"column using a mapper class. A mapper is like a mediator. When storing, it "
+"takes an instance of the user type and translates it to a column value. When "
+"loading, it takes a column value and translates it to an instance of the "
+"user type. Details of the user type mappings are described in <xref linkend="
+"\"Datasource_Customization-User_Type_Mappings\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:132
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">reserved-words</emphasis>: The <literal>reserved-"
+"words</literal> element defines one or more reserved words that should be "
+"escaped when generating tables. Each reserved word is specified as the "
+"content of a <literal>word</literal> element."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:140
+#, fuzzy, no-c-format
+msgid "Entity Beans"
+msgstr "EJB 2.x 里的 Entity Bean"
+
+#. Tag: para
+#: The_CMP_Engine.xml:141
+#, no-c-format
+msgid ""
+"We'll start our look at entity beans in JBoss by examining one of the "
+"CMP entity beans in the crime portal. We'll look at the gangster bean, "
+"which is implemented as local CMP entity bean. Although JBoss can provide "
+"remote entity beans with pass-by-reference semantics for calls in the same "
+"VM to get the performance benefit as from local entity beans, the use of "
+"local entity beans is strongly encouraged."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:144
+#, no-c-format
+msgid ""
+"We'll start with the required home interface. Since we're only "
+"concerned with the CMP fields at this point, we'll show only the methods "
+"dealing with the CMP fields."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:147
+#, no-c-format
+msgid ""
+"// Gangster Local Home Interface\n"
+"public interface GangsterHome \n"
+" extends EJBLocalHome \n"
+"{ \n"
+" Gangster create(Integer id, String name, String nickName)\n"
+" throws CreateException;\n"
+" Gangster findByPrimaryKey(Integer id) \n"
+" throws FinderException; \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:148
+#, no-c-format
+msgid ""
+"The local interface is what clients will use to talk. Again, it contains "
+"only the CMP field accessors."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:151
+#, no-c-format
+msgid ""
+"// Gangster Local Interface \n"
+"public interface Gangster\n"
+" extends EJBLocalObject\n"
+"{\n"
+" Integer getGangsterId();\n"
+"\n"
+" String getName();\n"
+"\n"
+" String getNickName();\n"
+" void setNickName(String nickName);\n"
+"\n"
+" int getBadness();\n"
+" void setBadness(int badness);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:152
+#, no-c-format
+msgid ""
+"Finally, we have the actual gangster bean. Despite it's size, very "
+"little code is actually required. The bulk of the class is the create method."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:155
+#, no-c-format
+msgid ""
+"// Gangster Implementation Class\n"
+"public abstract class GangsterBean \n"
+" implements EntityBean \n"
+"{\n"
+" private EntityContext ctx; \n"
+" private Category log = Category.getInstance(getClass());\n"
+" public Integer ejbCreate(Integer id, String name, String nickName)\n"
+" throws CreateException \n"
+" {\n"
+" log.info(\"Creating Gangster \" + id + \" '\" + nickName + "
+"\"' \"+ name);\n"
+" setGangsterId(id);\n"
+" setName(name);\n"
+" setNickName(nickName);\n"
+" return null;\n"
+" }\n"
+" \n"
+" public void ejbPostCreate(Integer id, String name, String nickName) {\n"
+" }\n"
+" \n"
+" // CMP field accessors ---------------------------------------------\n"
+" public abstract Integer getGangsterId();\n"
+" public abstract void setGangsterId(Integer gangsterId); \n"
+" public abstract String getName();\n"
+" public abstract void setName(String name);\n"
+" public abstract String getNickName();\n"
+" public abstract void setNickName(String nickName);\n"
+" public abstract int getBadness();\n"
+" public abstract void setBadness(int badness);\n"
+" public abstract ContactInfo getContactInfo();\n"
+" public abstract void setContactInfo(ContactInfo contactInfo); \n"
+" //... \n"
+" \n"
+" // EJB callbacks ---------------------------------------------------\n"
+" public void setEntityContext(EntityContext context) { ctx = context; }\n"
+" public void unsetEntityContext() { ctx = null; }\n"
+" public void ejbActivate() { } \n"
+" public void ejbPassivate() { } \n"
+" public void ejbRemove() { log.info(\"Removing \" + getName()); }\n"
+" public void ejbStore() { }\n"
+" public void ejbLoad() { }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:156
+#, no-c-format
+msgid ""
+"The only thing missing now is the <literal>ejb-jar.xml</literal> deployment "
+"descriptor. Although the actual bean class is named <literal>GangsterBean</"
+"literal>, we've called the entity <literal>GangsterEJB</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:159
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<ejb-jar xmlns=\"http://java.sun.com/xml/ns/\"Whats_new_in_JBoss_4-"
+"J2EE_Certification_and_Standards_Compliance\" version=\"2.1\"\n"
+" xmlns:xsi=\"http://www.w3.org/2001/XMLSchema-instance\"\n"
+" xsi:schemaLocation=\"http://java.sun.com/xml/ns/j2ee \n"
+" http://java.sun.com/xml/ns/j2ee/ejb-jar_\\2_1.xsd"
+"\">\n"
+" <display-name>Crime Portal</display-name>\n"
+"\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <display-name>Gangster Entity Bean</display-name>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <local-home>org.jboss.cmp2.crimeportal.GangsterHome</"
+"local-home>\n"
+" <local>org.jboss.cmp2.crimeportal.Gangster</local>\n"
+"\n"
+" <ejb-class>org.jboss.cmp2.crimeportal.GangsterBean</ejb-"
+"class>\n"
+" <persistence-type>Container</persistence-type>\n"
+" <prim-key-class>java.lang.Integer</prim-key-class>\n"
+" <reentrant>False</reentrant>\n"
+" <cmp-version>2.x</cmp-version>\n"
+" <abstract-schema-name>gangster</abstract-schema-"
+"name>\n"
+"\n"
+" <cmp-field>\n"
+" <field-name>gangsterId</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>name</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>nickName</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>badness</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>contactInfo</field-name>\n"
+" </cmp-field>\n"
+" <primkey-field>gangsterId</primkey-field>\n"
+"\n"
+" <!-- ... -->\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:160
+#, no-c-format
+msgid ""
+"Note that we've specified a CMP version of <literal>2.x</literal> to "
+"indicate that this is EJB 2.x CMP entity bean. The abstract schema name was "
+"set to <literal>gangster</literal>. That will be important when we look at "
+"EJB-QL queries in <xref linkend=\"The_CMP_Engine-Queries\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:164
+#, no-c-format
+msgid "Entity Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:165
+#, no-c-format
+msgid ""
+"The JBoss configuration for the entity is declared with an <literal>entity</"
+"literal> element in the <literal>jbosscmp-jdbc.xml</literal> file. This file "
+"is located in the <literal>META-INF</literal> directory of the EJB JAR and "
+"contains all of the optional configuration information for configuring the "
+"CMP mapping. The <literal>entity</literal> elements for each entity bean are "
+"grouped together in the <literal>enterprise-beans</literal> element under "
+"the top level <literal>jbosscmp-jdbc</literal> element. A stubbed out entity "
+"configuration is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:168
+#, no-c-format
+msgid ""
+"<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n"
+"<!DOCTYPE jbosscmp-jdbc PUBLIC\n"
+" \"-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd\">\n"
+"<jbosscmp-jdbc>\n"
+" <defaults>\n"
+" <!-- application-wide CMP defaults -->\n"
+" </defaults>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!-- overrides to defaults section -->\n"
+" <table-name>gangster</table-name> \n"
+" <!-- CMP Fields (see CMP-Fields) -->\n"
+" <!-- Load Groups (see Load Groups)-->\n"
+" <!-- Queries (see Queries) -->\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:169
+#, no-c-format
+msgid ""
+"The <literal>ejb-name</literal> element is required to match the entity "
+"specification here with the one in the <literal>ejb-jar.xml</literal> file. "
+"The remainder of the elements specify either overrides the global or "
+"application-wide CMP defaults and CMP mapping details specific to the bean. "
+"The application defaults come from the <literal>defaults</literal> section "
+"of the <literal>jbosscmp-jdbc.xml</literal> file and the global defaults "
+"come from the <literal>defaults</literal> section of the "
+"<literal>standardjbosscmp-jdbc.xml</literal> file in the <literal>conf</"
+"literal> directory for the current server configuration file set. The "
+"<literal>defaults</literal> section is discussed in <xref linkend="
+"\"The_CMP_Engine-Defaults\"/>. <xref linkend=\"Entity_Mapping-"
+"The_entity_element_content_model\"/> shows the full <literal>entity</"
+"literal> content model."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:173
+#, fuzzy, no-c-format
+msgid "The entity element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:180
+#, no-c-format
+msgid "A detailed description of each entity element follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:185
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ejb-name</emphasis>: This required element is the "
+"name of the EJB to which this configuration applies. This element must match "
+"an <literal>ejb-name</literal> of an entity in the <literal>ejb-jar.xml</"
+"literal> file."
+msgstr ""
+"<emphasis role=\"bold\">name</emphasis>:这是虚拟主机的 DNS 名。至少一个 "
+"<literal>Host</literal> 元素必须用对应于所包含的 <literal>Engine</literal> "
+"的 <literal>defaultHost</literal> 值的名字来配置。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:190
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasource</emphasis>: This optional element is the "
+"<literal>jndi-name</literal> used to look up the datasource. All database "
+"connections used by an entity or relation-table are obtained from the "
+"datasource. Having different datasources for entities is not recommended, as "
+"it vastly constrains the domain over which finders and ejbSelects can query. "
+"The default is <literal>java:/DefaultDS</literal> unless overridden in the "
+"defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:195
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasource-mapping</emphasis>: This optional element "
+"specifies the name of the <literal>type-mapping</literal>, which determines "
+"how Java types are mapped to SQL types, and how EJB-QL functions are mapped "
+"to database specific functions. Type mappings are discussed in <xref linkend="
+"\"Datasource_Customization-Mapping\"/>. The default is <literal>Hypersonic "
+"SQL</literal> unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:200
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">create-table</emphasis>: This optional element when "
+"true, specifies that JBoss should attempt to create a table for the entity. "
+"When the application is deployed, JBoss checks if a table already exists "
+"before creating the table. If a table is found, it is logged, and the table "
+"is not created. This option is very useful during the early stages of "
+"development when the table structure changes often. The default is false "
+"unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:205 The_CMP_Engine.xml:2553
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alter-table</emphasis>: If <literal>create-table</"
+"literal> is used to automatically create the schema, <literal>alter-table</"
+"literal> can be used to keep the schema current with changes to the entity "
+"bean. Alter table will perform the following specific tasks:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:210 The_CMP_Engine.xml:2558
+#, no-c-format
+msgid "new fields will be created"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:215 The_CMP_Engine.xml:2563
+#, no-c-format
+msgid "fields which are no longer used will be removed"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:220 The_CMP_Engine.xml:2568
+#, no-c-format
+msgid ""
+"string fields which are shorter than the declared length will have their "
+"length increased to the declared length. (not supported by all databases)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:227
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">remove-table</emphasis>: This optional element when "
+"true, JBoss will attempt to drop the table for each entity and each relation "
+"table mapped relationship. When the application is undeployed, JBoss will "
+"attempt to drop the table. This option is very useful during the early "
+"stages of development when the table structure changes often. The default is "
+"false unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:232 The_CMP_Engine.xml:801
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">post-table-create</emphasis>: This optional element "
+"specifies an arbitrary SQL statement that should be executed immediately "
+"after the database table is created. This command is only executed if "
+"<literal>create-table</literal> is true and the table did not previously "
+"exist."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:237
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-only</emphasis>: This optional element when "
+"true specifies that the bean provider will not be allowed to change the "
+"value of any fields. A field that is read-only will not be stored in, or "
+"inserted into, the database. If a primary key field is read-only, the create "
+"method will throw a <literal>CreateException</literal>. If a set accessor is "
+"called on a read-only field, it throws an <literal>EJBException</literal>. "
+"Read-only fields are useful for fields that are filled in by database "
+"triggers, such as last update. The <literal>read-only</literal> option can "
+"be overridden on a per <literal>cmp-field</literal> basis, and is discussed "
+"in <xref linkend=\"CMP_Fields-Read_only_Fields\"/>. The default is false "
+"unless overridden in the <literal>defaults</literal> section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:242
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-time-out</emphasis>: This optional element is "
+"the amount of time in milliseconds that a read on a read-only field is "
+"valid. A value of 0 means that the value is always reloaded at the start of "
+"a transaction, and a value of -1 means that the value never times out. This "
+"option can also be overridden on a per <literal>cmp-field</literal> basis. "
+"If <literal>read-only</literal> is false, this value is ignored. The default "
+"is -1 unless overridden in the <literal>defaults</literal> section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:247
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">row-locking</emphasis>: This optional element if "
+"true specifies that JBoss will lock all rows loaded in a transaction. Most "
+"databases implement this by using the <literal>SELECT FOR UPDATE</literal> "
+"syntax when loading the entity, but the actual syntax is determined by the "
+"<literal>row-locking-template</literal> in the datasource-mapping used by "
+"this entity. The default is false unless overridden in the "
+"<literal>defaults</literal> section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:252
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">pk-constraint</emphasis>: This optional element if "
+"true specifies that JBoss will add a primary key constraint when creating "
+"tables. The default is true unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:257
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-ahead</emphasis>: This optional element "
+"controls caching of query results and <literal>cmr-fields</literal> for the "
+"entity. This option is discussed in <xref linkend=\"Optimized_Loading-"
+"Read_ahead\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:262
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">fetch-size</emphasis>: This optional element "
+"specifies the number of entities to read in one round-trip to the underlying "
+"datastore. The default is 0 unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:267
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">list-cache-max</emphasis>: This optional element "
+"specifies the number of read-lists that can be tracked by this entity. This "
+"option is discussed in <literal>on-load</literal>. The default is 1000 "
+"unless overridden in the defaults section."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:272 The_CMP_Engine.xml:2615
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">clean-read-ahead-on-load</emphasis>: When an entity "
+"is loaded from the read ahead cache, JBoss can remove the data used from the "
+"read ahead cache. The default is <literal>false</literal>."
+msgstr ""
+"<emphasis role=\"bold\">keystorePass</emphasis>:这是从指定 keystore 文件里访"
+"问服务器证书所用到的密码。它的缺省值是 <literal>changeit</literal>."
+
+#. Tag: para
+#: The_CMP_Engine.xml:277
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">table-name</emphasis>: This optional element is the "
+"name of the table that will hold data for this entity. Each entity instance "
+"will be stored in one row of this table. The default is the <literal>ejb-"
+"name</literal>."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是一个可选的属性,它指定与 "
+"HA-JNDI 服务通讯的不同节点的群集的名字。它的缺省值是 "
+"<literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:282
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">cmp-field</emphasis>: The optional element allows "
+"one to define how the <literal>ejb-jar.xml</literal><literal>cmp-field</"
+"literal> is mapped onto the persistence store. This is discussed in <xref "
+"linkend=\"The_CMP_Engine-CMP_Fields\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:287
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">load-groups</emphasis>: This optional element "
+"specifies one or more groupings of CMP fields to declare load groupings of "
+"fields. This is discussed in <xref linkend=\"Optimized_Loading-Load_Groups\"/"
+">."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:292
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">eager-load-groups</emphasis>: This optional element "
+"defines one or more load grouping as eager load groups. This is discussed in "
+"<xref linkend=\"Loading_Process-Eager_loading_Process\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:297
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">lazy-load-groups</emphasis>: This optional element "
+"defines one or more load grouping as lazy load groups. This is discussed in "
+"<xref linkend=\"Loading_Process-Lazy_loading_Process\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:302
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">query</emphasis>: This optional element specifies "
+"the definition of finders and selectors. This is discussed in <xref linkend="
+"\"The_CMP_Engine-Queries\"/>."
+msgstr ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> 是一个用来为这个群集(参"
+"看 <xref linkend=\"jbosscache-jgroups\"/>)指定 JGroup 配置选项的元素"
+"(element)。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:307
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">unknown-pk</emphasis>: This optional element allows "
+"one to define how an unknown primary key type of <literal>java.lang.Object</"
+"literal> maps to the persistent store."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:312
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">entity-command</emphasis>: This optional element "
+"allows one to define the entity creation command instance. Typically this is "
+"used to define a custom command instance to allow for primary key "
+"generation. This is described in detail in <xref linkend=\"The_CMP_Engine-"
+"Entity_Commands_and_Primary_Key_Generation\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:317
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">optimistic-locking</emphasis>: This optional element "
+"defines the strategy to use for optimistic locking. This is described in "
+"detail in <xref linkend=\"The_CMP_Engine-Optimistic_Locking\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:322
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">audit</emphasis>: This optional element defines the "
+"CMP fields that will be audited. This is described in detail in <xref "
+"linkend=\"CMP_Fields-Auditing_Entity_Access\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:332
+#, no-c-format
+msgid "CMP Fields"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:333
+#, no-c-format
+msgid ""
+"CMP fields are declared on the bean class as abstract getter and setter "
+"methods that follow the JavaBean property accessor conventions. Our gangster "
+"bean, for example, has a <literal>getName()</literal> and a <literal>setName"
+"()</literal> method for accessing the <literal>name</literal> CMP field. In "
+"this section we will look at how the configure these declared CMP fields and "
+"control the persistence and behavior."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:337
+#, no-c-format
+msgid "CMP Field Declaration"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:338
+#, no-c-format
+msgid ""
+"The declaration of a CMP field starts in the <literal>ejb-jar.xml</literal> "
+"file. On the gangster bean, for example, the <literal>gangsterId</literal>, "
+"<literal>name</literal>, <literal>nickName</literal> and <literal>badness</"
+"literal> would be declared in the <literal>ejb-jar.xml</literal> file as "
+"follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:341
+#, no-c-format
+msgid ""
+"<ejb-jar>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <cmp-field><field-name>gangsterId</field-name></"
+"cmp-field>\n"
+" <cmp-field><field-name>name</field-name></cmp-"
+"field>\n"
+" <cmp-field><field-name>nickName</field-name></"
+"cmp-field>\n"
+" <cmp-field><field-name>badness</field-name></"
+"cmp-field>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+" </ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:342
+#, no-c-format
+msgid ""
+"Note that the J2EE deployment descriptor doesn't declare any object-"
+"relational mapping details or other configuration. It is nothing more than a "
+"simple declaration of the CMP fields."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:348
+#, no-c-format
+msgid "CMP Field Column Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:349
+#, no-c-format
+msgid ""
+"The relational mapping configuration of a CMP field is done in the "
+"<literal>jbosscmp-jdbc.xml</literal> file. The structure is similar to the "
+"<literal>ejb-jar.xml</literal> with an entity <literal>element</literal> "
+"that has <literal>cmp-field</literal> elements under it with the additional "
+"configuration details."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:352
+#, no-c-format
+msgid ""
+"The following is shows the basic column name and data type mappings for the "
+"gangster bean."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:355
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <table-name>gangster</table-name>\n"
+" \n"
+" <cmp-field>\n"
+" <field-name>gangsterId</field-name>\n"
+" <column-name>id</column-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>name</field-name>\n"
+" <column-name>name</column-name>\n"
+" <not-null/>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>nickName</field-name>\n"
+" <column-name>nick_name</column-name>\n"
+" <jdbc-type>VARCHAR</jdbc-type>\n"
+" <sql-type>VARCHAR(64)</sql-type>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>badness</field-name>\n"
+" <column-name>badness</column-name>\n"
+" </cmp-field>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+" </jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:356
+#, fuzzy, no-c-format
+msgid ""
+"The full content model of the <literal>cmp-field</literal> element of the "
+"<literal>jbosscmp-jdbc.xml</literal> is shown below."
+msgstr ""
+"你可以用 <literal>jboss-web.xml</literal> 文件里的 <literal>replication-"
+"config</literal> 元素进一步配置会话复制。下面是一个例子:"
+
+#. Tag: title
+#: The_CMP_Engine.xml:361
+#, fuzzy, no-c-format
+msgid "The JBoss entity element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:369
+#, no-c-format
+msgid "A detailed description of each element follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:374
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">field-name</emphasis>: This required element is the "
+"name of the <literal>cmp-field</literal> that is being configured. It must "
+"match the <literal>field-name</literal> element of a <literal>cmp-field</"
+"literal> declared for this entity in the <literal>ejb-jar.xml</literal> file."
+msgstr ""
+"<emphasis role=\"bold\">name</emphasis>:这是虚拟主机的 DNS 名。至少一个 "
+"<literal>Host</literal> 元素必须用对应于所包含的 <literal>Engine</literal> "
+"的 <literal>defaultHost</literal> 值的名字来配置。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:379
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-only</emphasis>: This declares that field in "
+"question is read-only. This field will not be written to the database by "
+"JBoss. Read-only fields are discussed in <xref linkend=\"CMP_Fields-"
+"Read_only_Fields\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:384
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-only-timeout</emphasis>: This is the time in "
+"milliseconds that a read-only field value will be considered valid."
+msgstr ""
+"<emphasis role=\"bold\">InitialStateRetrievalTimeout</emphasis> 指定的取得初"
+"始状态所需要等待的时间(毫秒数)。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:389
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">column-name</emphasis>: This optional element is the "
+"name of the column to which the <literal>cmp-field</literal> is mapped. The "
+"default is to use the <literal>field-name</literal> value."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是一个可选属性,它指定了当"
+"前 <literal>HASessionState</literal> 协议所服务的群集名称。它的缺省值是 "
+"<literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:394
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">not-null</emphasis>: This optional element indicates "
+"that JBoss should add a NOT NULL to the end of the column declaration when "
+"automatically creating the table for this entity. The default for primary "
+"key fields and primitives is not null."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:399
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jdbc-type</emphasis>: This is the JDBC type that is "
+"used when setting parameters in a JDBC prepared statement or loading data "
+"from a JDBC result set. The valid types are defined in <literal>java.sql."
+"Types</literal>. This is only required if <literal>sql-type</literal> is "
+"specified. The default JDBC type will be based on the database type in the "
+"<literal>datasourcemapping</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:404
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sql-type</emphasis>: This is the SQL type that is "
+"used in create table statements for this field. Valid SQL types are only "
+"limited by your database vendor. This is only required if <literal>jdbc-"
+"type</literal> is specified. The default SQL type will be base on the "
+"database type in the <literal>datasourcemapping</literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:409
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">property</emphasis>: This optional element allows "
+"one to define how the properties of a dependent value class CMP field should "
+"be mapped to the persistent store. This is discussed further in <xref "
+"linkend=\"CMP_Fields-Dependent_Value_Classes_DVCs\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:414
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">auto-increment</emphasis>: The presence of this "
+"optional field indicates that it is automatically incremented by the "
+"database layer. This is used to map a field to a generated column as well as "
+"to an externally manipulated column."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:419
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">dbindex</emphasis>: The presence of this optional "
+"field indicates that the server should create an index on the corresponding "
+"column in the database. The index name will be fieldname_index."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:424
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">check-dirty-after-get</emphasis>: This value "
+"defaults to false for primitive types and the basic java.lang immutable "
+"wrappers (<literal>Integer</literal>, <literal>String</literal>, etc...). "
+"For potentially mutable objects, JBoss will mark they field as potentially "
+"dirty after a get operation. If the dirty check on an object is too "
+"expensive, you can optimize it away by setting <literal>check-dirty-after-"
+"get</literal> to false."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:429
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">state-factory</emphasis>: This specifies class name "
+"of a state factory object which can perform dirty checking for this field. "
+"State factory classes must implement the <literal>CMPFieldStateFactory</"
+"literal> interface."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:437
+#, no-c-format
+msgid "Read-only Fields"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:438
+#, no-c-format
+msgid ""
+"JBoss allows for read-only CMP fields by setting the <literal>read-only</"
+"literal> and <literal>read-time-out</literal> elements in the <literal>cmp-"
+"field</literal> declaration. These elements work the same way as they do at "
+"the entity level. If a field is read-only, it will never be used in an "
+"<literal>INSERT</literal> or <literal>UPDATE</literal> statement. If a "
+"primary key field is <literal>read-only</literal>, the create method will "
+"throw a <literal>CreateException</literal>. If a set accessor is called for "
+"a read-only field, it throws an <literal>EJBException</literal>. Read-only "
+"fields are useful for fields that are filled in by database triggers, such "
+"as last update. A read-only CMP field declaration example follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:441
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <cmp-field>\n"
+" <field-name>lastUpdated</field-name>\n"
+" <read-only>true</read-only>\n"
+" <read-time-out>1000</read-time-out>\n"
+" </cmp-field>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:445
+#, no-c-format
+msgid "Auditing Entity Access"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:446
+#, no-c-format
+msgid ""
+"The <literal>audit</literal> element of the entity section allows one to "
+"specify how access to and entity bean is audited. This is only allowed when "
+"an entity bean is accessed under a security domain so that this is a caller "
+"identity established. The content model of the audit element is given <xref "
+"linkend=\"Auditing_Entity_Access-The_jbosscmp_jdbc."
+"xml_audit_element_content_model\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:450
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc.xml audit element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:459
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">created-by</emphasis>: This optional element "
+"indicates that the caller who created the entity should be saved to either "
+"the indicated <literal>column-name</literal> or cmp <literal>field-name</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:464
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">created-time</emphasis>: This optional element "
+"indicates that the time of entity creation should be saved to either the "
+"indicated <literal>column-name</literal> or cmp <literal>field-name</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:469
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">updated-by</emphasis>: This optional element "
+"indicates that the caller who last modified the entity should be saved to "
+"either the indicated <literal>column-name</literal> or CMP <literal>field-"
+"name</literal>."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:474
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">updated-time</emphasis>: This optional element "
+"indicates that the last time of entity modification should be saved to "
+"either the indicated <literal>column-name</literal> or CMP <literal>field-"
+"name</literal>."
+msgstr ""
+"<emphasis role=\"bold\">LenientEjbLink</emphasis>:这个标记指出在尝试 "
+"<literal>jboss-web.xml</literal> 里的 <literal>jndi-name</literal> 时应该忽"
+"略 <literal>ejb-link</literal> 错误。这个标记的缺省值是 ture。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:479
+#, no-c-format
+msgid ""
+"For each element, if a <literal>field-name</literal> is given, the "
+"corresponding audit information should be stored in the specified CMP field "
+"of the entity bean being accessed. Note that there does not have to be an "
+"corresponding CMP field declared on the entity. In case there are matching "
+"field names, you will be able to access audit fields in the application "
+"using the corresponding CMP field abstract getters and setters. Otherwise, "
+"the audit fields will be created and added to the entity internally. You "
+"will be able to access audit information in EJB-QL queries using the audit "
+"field names, but not directly through the entity accessors."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:482
+#, no-c-format
+msgid ""
+"If, on the other hand, a <literal>column-name</literal> is specified, the "
+"corresponding audit information should be stored in the indicated column of "
+"the entity table. If JBoss is creating the table the <literal>jdbc-type</"
+"literal> and <literal>sql-type</literal> element can then be used to define "
+"the storage type."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:485
+#, no-c-format
+msgid ""
+"The declaration of audit information with given column names is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:488
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>AuditChangedNamesEJB</ejb-name>\n"
+" <table-name>cmp2_audit_changednames</table-name>\n"
+" <audit>\n"
+" <created-by>\n"
+" <column-name>createdby</column-name>\n"
+" </created-by>\n"
+" <created-time>\n"
+" <column-name>createdtime</column-name>\n"
+" </created-time>\n"
+" <updated-by>\n"
+" <column-name>updatedby</column-name></"
+"updated-by>\n"
+" <updated-time>\n"
+" <column-name>updatedtime</column-name>\n"
+" </updated-time>\n"
+" </audit>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: title
+#: The_CMP_Engine.xml:492
+#, no-c-format
+msgid "Dependent Value Classes (DVCs)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:493
+#, no-c-format
+msgid ""
+"A dependent value class (DVC) is a fancy term used to identity any Java "
+"class that is the type of a <literal>cmp-field</literal> other than the "
+"automatically recognized types core types such as strings and number values. "
+"By default, a DVC is serialized, and the serialized form is stored in a "
+"single database column. Although not discussed here, there are several known "
+"issues with the long-term storage of classes in serialized form."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:496
+#, no-c-format
+msgid ""
+"JBoss also supports the storage of the internal data of a DVC into one or "
+"more columns. This is useful for supporting legacy JavaBeans and database "
+"structures. It is not uncommon to find a database with a highly flattened "
+"structure (e.g., a <literal>PURCHASE_ORDER</literal> table with the fields "
+"<literal>SHIP_LINE1</literal>, <literal>SHIP_LINE2</literal>, "
+"<literal>SHIP_CITY</literal>, etc. and an additional set of fields for the "
+"billing address). Other common database structures include telephone numbers "
+"with separate fields for area code, exchange, and extension, or a person'"
+"s name spread across several fields. With a DVC, multiple columns can be "
+"mapped to one logical field."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:499
+#, no-c-format
+msgid ""
+"JBoss requires that a DVC to be mapped must follow the JavaBeans naming "
+"specification for simple properties, and that each property to be stored in "
+"the database must have both a getter and a setter method. Furthermore, the "
+"bean must be serializable and must have a no argument constructor. A "
+"property can be any simple type, an unmapped DVC or a mapped DVC, but cannot "
+"be an EJB. A DVC mapping is specified in a <literal>dependent-value-class</"
+"literal> element within the <literal>dependent-value-classes</literal> "
+"element."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:503
+#, no-c-format
+msgid "The jbosscmp-jdbc dependent-value-class element model."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:510
+#, no-c-format
+msgid ""
+"Here is an example of a simple <literal>ContactInfo</literal> DVC class."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:513
+#, no-c-format
+msgid ""
+"public class ContactInfo \n"
+" implements Serializable \n"
+"{\n"
+" /** The cell phone number. */\n"
+" private PhoneNumber cell;\n"
+" \n"
+" /** The pager number. */\n"
+" private PhoneNumber pager;\n"
+" \n"
+" /** The email address */\n"
+" private String email;\n"
+"\n"
+" \n"
+" /**\n"
+" * Creates empty contact info.\n"
+" */\n"
+" public ContactInfo() {\n"
+" }\n"
+"\n"
+" public PhoneNumber getCell() {\n"
+" return cell;\n"
+" }\n"
+" \n"
+" public void setCell(PhoneNumber cell) {\n"
+" this.cell = cell;\n"
+" }\n"
+" \n"
+" public PhoneNumber getPager() {\n"
+" return pager;\n"
+" }\n"
+" \n"
+" public void setPager(PhoneNumber pager) {\n"
+" this.pager = pager;\n"
+" }\n"
+" \n"
+" public String getEmail() {\n"
+" return email;\n"
+" }\n"
+"\n"
+" public void setEmail(String email) {\n"
+" this.email = email.toLowerCase();\n"
+" }\n"
+" \n"
+" // ... equals, hashCode, toString \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:514
+#, no-c-format
+msgid ""
+"The contact info includes a phone number, which is represented by another "
+"DVC class."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:517
+#, no-c-format
+msgid ""
+"public class PhoneNumber\n"
+" implements Serializable \n"
+"{\n"
+" /** The first three digits of the phone number. */\n"
+" private short areaCode;\n"
+"\n"
+" /** The middle three digits of the phone number. */\n"
+" private short exchange;\n"
+"\n"
+" /** The last four digits of the phone number. */\n"
+" private short extension;\n"
+"\n"
+" // ... getters and setters \n"
+" \n"
+" // ... equals, hashCode, toString\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:518
+#, no-c-format
+msgid "The DVC mappings for these two classes are relatively straight forward."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:521
+#, no-c-format
+msgid ""
+"<dependent-value-classes>\n"
+" <dependent-value-class>\n"
+" <description>A phone number</description>\n"
+" <class>org.jboss.cmp2.crimeportal.PhoneNumber</class>\n"
+" <property>\n"
+" <property-name>areaCode</property-name>\n"
+" <column-name>area_code</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>exchange</property-name>\n"
+" <column-name>exchange</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>extension</property-name>\n"
+" <column-name>extension</column-name>\n"
+" </property>\n"
+" </dependent-value-class>\n"
+" \n"
+" <dependent-value-class>\n"
+" <description>General contact info</description>\n"
+" <class>org.jboss.cmp2.crimeportal.ContactInfo</class>\n"
+" <property>\n"
+" <property-name>cell</property-name>\n"
+" <column-name>cell</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>pager</property-name>\n"
+" <column-name>pager</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>email</property-name>\n"
+" <column-name>email</column-name>\n"
+" <jdbc-type>VARCHAR</jdbc-type>\n"
+" <sql-type>VARCHAR(128)</sql-type>\n"
+" </property>\n"
+" </dependent-value-class>\n"
+"</dependent-value-classes>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:522
+#, no-c-format
+msgid ""
+"Each DVC is declared with a <literal>dependent-value-class</literal> "
+"element. A DVC is identified by the Java class type declared in the class "
+"element. Each property to be persisted is declared with a property element. "
+"This specification is based on the <literal>cmp-field</literal> element, so "
+"it should be self-explanatory. This restriction will also be removed in a "
+"future release. The current proposal involves storing the primary key fields "
+"in the case of a local entity and the entity handle in the case of a remote "
+"entity."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:525
+#, no-c-format
+msgid ""
+"The <literal>dependent-value-classes</literal> section defines the internal "
+"structure and default mapping of the classes. When JBoss encounters a field "
+"that has an unknown type, it searches the list of registered DVCs, and if a "
+"DVC is found, it persists this field into a set of columns, otherwise the "
+"field is stored in serialized form in a single column. JBoss does not "
+"support inheritance of DVCs; therefore, this search is only based on the "
+"declared type of the field. A DVC can be constructed from other DVCs, so "
+"when JBoss runs into a DVC, it flattens the DVC tree structure into a set of "
+"columns. If JBoss finds a DVC circuit during startup, it will throw an "
+"<literal>EJBException</literal>. The default column name of a property is "
+"the column name of the base <literal>cmp-field</literal> followed by an "
+"underscore and then the column name of the property. If the property is a "
+"DVC, the process is repeated. For example, a <literal>cmp-field</literal> "
+"named <literal>info</literal> that uses the <literal>ContactInfo</literal> "
+"DVC would have the following columns:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:528
+#, no-c-format
+msgid ""
+"info_cell_area_code\n"
+"info_cell_exchange\n"
+"info_cell_extension\n"
+"info_pager_area_code\n"
+"info_pager_exchange\n"
+"info_pager_extension\n"
+"info_email"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:529
+#, no-c-format
+msgid ""
+"The automatically generated column names can quickly become excessively long "
+"and awkward. The default mappings of columns can be overridden in the entity "
+"element as follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:532
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <cmp-field>\n"
+" <field-name>contactInfo</field-name>\n"
+" <property>\n"
+" <property-name>cell.areaCode</property-"
+"name>\n"
+" <column-name>cell_area</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>cell.exchange</property-"
+"name>\n"
+" <column-name>cell_exch</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>cell.extension</property-"
+"name>\n"
+" <column-name>cell_ext</column-name>\n"
+" </property>\n"
+" \n"
+" <property>\n"
+" <property-name>pager.areaCode</property-"
+"name>\n"
+" <column-name>page_area</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>pager.exchange</property-"
+"name>\n"
+" <column-name>page_exch</column-name>\n"
+" </property>\n"
+" <property>\n"
+" <property-name>pager.extension</property-"
+"name>\n"
+" <column-name>page_ext</column-name>\n"
+" </property>\n"
+" \n"
+" <property>\n"
+" <property-name>email</property-name>\n"
+" <column-name>email</column-name>\n"
+" <jdbc-type>VARCHAR</jdbc-type>\n"
+" <sql-type>VARCHAR(128)</sql-type>\n"
+" </property>\n"
+" </cmp-field>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:533
+#, no-c-format
+msgid ""
+"When overriding property info for the entity, you need to refer to the "
+"property from a flat perspective as in <literal>cell.areaCode</literal>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:541
+#, no-c-format
+msgid "Container Managed Relationships"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:542
+#, no-c-format
+msgid ""
+"Container Managed Relationships (CMRs) are a powerful new feature of CMP "
+"2.0. Programmers have been creating relationships between entity objects "
+"since EJB 1.0 was introduced (not to mention since the introduction of "
+"databases), but before CMP 2.0 the programmer had to write a lot of code for "
+"each relationship in order to extract the primary key of the related entity "
+"and store it in a pseudo foreign key field. The simplest relationships were "
+"tedious to code, and complex relationships with referential integrity "
+"required many hours to code. With CMP 2.0 there is no need to code "
+"relationships by hand. The container can manage one-to-one, one-to-many and "
+"many-to-many relationships, with referential integrity. One restriction with "
+"CMRs is that they are only defined between local interfaces. This means that "
+"a relationship cannot be created between two entities in separate "
+"applications, even in the same application server."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:545
+#, no-c-format
+msgid ""
+"There are two basic steps to create a container managed relationship: create "
+"the <literal>cmr-field</literal> abstract accessors and declare the "
+"relationship in the <literal>ejb-jar.xml</literal> file. The following two "
+"sections describe these steps."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:549
+#, no-c-format
+msgid "CMR-Field Abstract Accessors"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:550
+#, no-c-format
+msgid ""
+"CMR-Field abstract accessors have the same signatures as <literal>cmp-"
+"fields</literal>, except that single-valued relationships must return the "
+"local interface of the related entity, and multi-valued relationships can "
+"only return a <literal>java.util.Collection</literal> (or <literal>java.util."
+"Set</literal>) object. For example, to declare a one-to-many relationship "
+"between organization and gangster, we declare the relationship from "
+"organization to gangster in the <literal>OrganizationBean</literal> class:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:553
+#, no-c-format
+msgid ""
+"public abstract class OrganizationBean\n"
+" implements EntityBean \n"
+"{\n"
+" public abstract Set getMemberGangsters();\n"
+" public abstract void setMemberGangsters(Set gangsters);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:554
+#, no-c-format
+msgid ""
+"We also can declare the relationship from gangster to organization in the "
+"<literal>GangsterBean</literal> class:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:557
+#, no-c-format
+msgid ""
+"public abstract class GangsterBean\n"
+" implements EntityBean \n"
+"{\n"
+" public abstract Organization getOrganization();\n"
+" public abstract void setOrganization(Organization org);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:558
+#, no-c-format
+msgid ""
+"Although each bean declared a CMR field, only one of the two beans in a "
+"relationship must have a set of accessors. As with CMP fields, a CMR field "
+"is required to have both a getter and a setter method."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:564
+#, no-c-format
+msgid "Relationship Declaration"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:565
+#, no-c-format
+msgid ""
+"The declaration of relationships in the <literal>ejb-jar.xml</literal> file "
+"is complicated and error prone. Although we recommend using a tool like "
+"XDoclet to manage the deployment descriptors for CMR fields, it's still "
+"important to understand how the descriptor works. The following illustrates "
+"the declaration of the organization/gangster relationship:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:568
+#, no-c-format
+msgid ""
+"<ejb-jar>\n"
+" <relationships>\n"
+" <ejb-relation>\n"
+" <ejb-relation-name>Organization-Gangster</ejb-relation-"
+"name>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>org-has-gangsters </ejb-"
+"relationship-role-name>\n"
+" <multiplicity>One</multiplicity>\n"
+" <relationship-role-source>\n"
+" <ejb-name>OrganizationEJB</ejb-name>\n"
+" </relationship-role-source>\n"
+" <cmr-field>\n"
+" <cmr-field-name>memberGangsters</cmr-field-"
+"name>\n"
+" <cmr-field-type>java.util.Set</cmr-field-"
+"type>\n"
+" </cmr-field>\n"
+" </ejb-relationship-role>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>\n"
+" gangster-belongs-to-org\n"
+" </ejb-relationship-role-name>\n"
+" <multiplicity>Many</multiplicity>\n"
+" <cascade-delete/>\n"
+" <relationship-role-source>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" </relationship-role-source>\n"
+" <cmr-field>\n"
+" <cmr-field-name>organization</cmr-field-"
+"name>\n"
+" </cmr-field>\n"
+" </ejb-relationship-role>\n"
+" </ejb-relation>\n"
+" </relationships>\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:569
+#, no-c-format
+msgid ""
+"As you can see, each relationship is declared with an <literal>ejb-relation</"
+"literal> element within the top level <literal>relationships</literal> "
+"element. The relation is given a name in the <literal>ejb-relation-name</"
+"literal> element. This is important because we will need to refer to the "
+"role by name in the <literal>jbosscmp-jdbc.xml</literal> file. Each "
+"<literal>ejb-relation</literal> contains two <literal>ejb-relationship-role</"
+"literal> elements (one for each side of the relationship). The <literal>ejb-"
+"relationship-role</literal> tags are as follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:574
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ejb-relationshiprole-name</emphasis>: This optional "
+"element is used to identify the role and match the database mapping the "
+"<literal>jbosscmp-jdbc.xml</literal> file. The relationship role names for "
+"each side of a relationship must be different."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:579
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">multiplicity</emphasis>: This indicates the "
+"multiplicity of this side of the relationship. The valid values are "
+"<literal>One</literal> or <literal>Many</literal>. In this example, the "
+"multiplicity of the organization is <literal>One</literal> and the "
+"multiplicity of the gangster is <literal>Many</literal> because the "
+"relationship is from one organization to many gangsters. Note, as with all "
+"XML elements, this element is case sensitive."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:584
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">cascade-delete</emphasis>: When this optional "
+"element is present, JBoss will delete the child entity when the parent "
+"entity is deleted. Cascade deletion is only allowed for a role where the "
+"other side of the relationship has a multiplicity of one. The default is to "
+"not cascade delete."
+msgstr ""
+
+#. Tag: emphasis
+#: The_CMP_Engine.xml:590
+#, no-c-format
+msgid "relationship-role-source"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:594
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ejb-name</emphasis>: This required element gives the "
+"name of the entity that has the role."
+msgstr "<emphasis role=\"bold\">name</emphasis>:参数的变量名,这是必须的。"
+
+#. Tag: emphasis
+#: The_CMP_Engine.xml:602
+#, no-c-format
+msgid "cmr-field"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:606
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">cmr-field-name</emphasis>: This is the name of the "
+"CMR field of the entity has one, if it has one."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:611
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">cmr-field-type</emphasis>: This is the type of the "
+"CMR field, if the field is a collection type. It must be <literal>java.util."
+"Collection</literal> or <literal>java.util.Set</literal>."
+msgstr ""
+"<emphasis role=\"bold\">prefix</emphasis>:这是每个日志文件名的前缀。它的缺省"
+"值是 <literal>access_log</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:618
+#, no-c-format
+msgid ""
+"After adding the CMR field abstract accessors and declaring the "
+"relationship, the relationship should be functional. The next section "
+"discusses the database mapping of the relationship."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:624
+#, no-c-format
+msgid "Relationship Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:625
+#, no-c-format
+msgid ""
+"Relationships can be mapped using either a foreign key or a separate "
+"relation table. One-to-one and one-to-many relationships use the foreign key "
+"mapping style by default, and many-to-many relationships use only the "
+"relation table mapping style. The mapping of a relationship is declared in "
+"the <literal>relationships</literal> section of the <literal>jbosscmp-jdbc."
+"xml</literal> descriptor via <literal>ejb-relation</literal> elements. "
+"Relationships are identified by the <literal>ejb-relation-name</literal> "
+"from the <literal>ejb-jar.xml</literal> file. The <literal>jbosscmp-jdbc."
+"xml</literal><literal>ejb-relation</literal> element content model is shown "
+"in <xref linkend=\"Relationship_Mapping-The_jbosscmp_jdbc."
+"xml_ejb_relation_element_content_model\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:629
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc.xml ejb-relation element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:636
+#, no-c-format
+msgid ""
+"The basic template of the relationship mapping declaration for "
+"<literal>Organization-Gangster</literal> relationship follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:639
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <relationships>\n"
+" <ejb-relation>\n"
+" <ejb-relation-name>Organization-Gangster</ejb-relation-"
+"name>\n"
+" <foreign-key-mapping/>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>org-has-gangsters</ejb-"
+"relationship-role-name>\n"
+" <key-fields>\n"
+" <key-field>\n"
+" <field-name>name</field-name>\n"
+" <column-name>organization</column-name>\n"
+" </key-field>\n"
+" </key-fields>\n"
+" </ejb-relationship-role>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>gangster-belongs-to-"
+"org</ejb-relationship-role-name>\n"
+" <key-fields/>\n"
+" </ejb-relationship-role>\n"
+" </ejb-relation>\n"
+" </relationships>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:640
+#, no-c-format
+msgid ""
+"After the <literal>ejb-relation-name</literal> of the relationship being "
+"mapped is declared, the relationship can be declared as read only using the "
+"<literal>read-only</literal> and <literal>read-time-out</literal> elements. "
+"They have the same semantics as their counterparts in the entity element."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:643
+#, no-c-format
+msgid ""
+"The <literal>ejb-relation</literal> element must contain either a "
+"<literal>foreign-key-mapping</literal> element or a <literal>relation-table-"
+"mapping</literal> element, which are described in <xref linkend="
+"\"Relationship_Mapping-Foreign_Key_Mapping\"/> and <xref linkend="
+"\"Relationship_Mapping-Relation_table_Mapping\"/>. This element may also "
+"contain a pair of <literal>ejb-relationship-role</literal> elements as "
+"described in the following section."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:647
+#, no-c-format
+msgid "Relationship Role Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:648
+#, no-c-format
+msgid ""
+"Each of the two <literal>ejb-relationship-role</literal> elements contains "
+"mapping information specific to an entity in the relationship. The content "
+"model of the <literal>ejb-relationship-role</literal> element is shown in "
+"<xref linkend=\"Relationship_Role_Mapping-"
+"The_jbosscmp_jdbc_ejb_relationship_role_element_content_model\"/> ."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:652
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc ejb-relationship-role element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:659
+#, no-c-format
+msgid "A detailed description of the main elements follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:664
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ejb-relationship-role-name</emphasis>: This required "
+"element gives the name of the role to which this configuration applies. It "
+"must match the name of one of the roles declared for this relationship in "
+"the <literal>ejb-jar.xml</literal> file."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:669
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">fk-constraint</emphasis>: This optional element is a "
+"true/false value that indicates whether JBoss should add a foreign key "
+"constraint to the tables for this side of the relationship. JBoss will only "
+"add generate the constraint if both the primary table and the related table "
+"were created by JBoss during deployment."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:674
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">key-fields</emphasis>: This optional element "
+"specifies the mapping of the primary key fields of the current entity, "
+"whether it is mapped in the relation table or in the related object. The "
+"<literal>key-fields</literal> element must contain a <literal>key-field</"
+"literal> element for each primary key field of the current entity. The "
+"<literal>key-fields</literal> element can be empty if no foreign key mapping "
+"is needed for this side of the relation. An example of this would be the "
+"many side of a one-to-many relationship. The details of this element are "
+"described below."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:679
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-ahead</emphasis>: This optional element "
+"controls the caching of this relationship. This option is discussed in <xref "
+"linkend=\"Lazy_loading_Process-Relationships\"/>."
+msgstr ""
+"<emphasis role=\"bold\">PartitionConfig</emphasis> 是一个用来为这个群集(参"
+"看 <xref linkend=\"jbosscache-jgroups\"/>)指定 JGroup 配置选项的元素"
+"(element)。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:684
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">batch-cascade-delete</emphasis>: This indicates that "
+"a cascade delete on this relationship should be performed with a single SQL "
+"statement. This requires that the relationship be marked as <literal>batch-"
+"delete</literal> in the <literal>ejb-jar.xml</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:689
+#, no-c-format
+msgid ""
+"As noted above, the <literal>key-fields</literal> element contains a "
+"<literal>key-field</literal> for each primary key field of the current "
+"entity. The <literal>key-field</literal> element uses the same syntax as the "
+"<literal>cmp-field</literal> element of the entity, except that <literal>key-"
+"field</literal> does not support the <literal>not-null</literal> option. Key "
+"fields of a <literal>relation-table</literal> are automatically not null, "
+"because they are the primary key of the table. On the other hand, foreign "
+"key fields must be nullable by default. This is because the CMP "
+"specification requires an insert into the database after the "
+"<literal>ejbCreate</literal> method and an update to it after to pick up CMR "
+"changes made in <literal>ejbPostCreate</literal>. Since the EJB "
+"specification does not allow a relationship to be modified until "
+"<literal>ejbPostCreate</literal>, a foreign key will be initially set to "
+"null. There is a similar problem with removal. You can change this insert "
+"behavior using the <literal>jboss.xml</literal><literal>insert-after-ejb-"
+"post-create</literal> container configuration flag. The following example "
+"illustrates the creation of a new bean configuration that uses "
+"<literal>insert-after-ejb-post-create</literal> by default."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:692
+#, no-c-format
+msgid ""
+"<jboss>\n"
+" <!-- ... -->\n"
+" <container-configurations>\n"
+" <container-configuration extends=\"Standard CMP 2.x EntityBean"
+"\">\n"
+" <container-name>INSERT after ejbPostCreate Container</"
+"container-name>\n"
+" <emphasis role=\"bold\"><insert-after-ejb-post-create>"
+"true</insert-after-ejb-post-create></emphasis>\n"
+" </container-configuration>\n"
+" </container-configurations> \n"
+"</jboss>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:693
+#, no-c-format
+msgid ""
+"An alternate means of working around the non-null foreign key issue is to "
+"map the foreign key elements onto non-null CMP fields. In this case you "
+"simply populate the foreign key fields in <literal>ejbCreate</literal> using "
+"the associated CMP field setters."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:696
+#, no-c-format
+msgid ""
+"The content model of the key-fields element is <xref linkend="
+"\"Relationship_Role_Mapping-"
+"The_jbosscmp_jdbc_key_fields_element_content_model\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:700
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc key-fields element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:707
+#, fuzzy, no-c-format
+msgid ""
+"A detailed description of the elements contained in the <literal>key-field</"
+"literal> element follows:"
+msgstr "下列是 <literal>FC</literal> 元素的可配置属性。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:712
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">field-name</emphasis>: This required element "
+"identifies the field to which this mapping applies. This name must match a "
+"primary key field of the current entity."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:717
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">column-name</emphasis>: Use this element to specify "
+"the column name in which this primary key field will be stored. If this is "
+"relationship uses <literal>foreign-key-mapping</literal>, this column will "
+"be added to the table for the related entity. If this relationship uses "
+"<literal>relation-table-mapping</literal>, this column is added to the "
+"<literal>relation-table</literal>. This element is not allowed for mapped "
+"dependent value class; instead use the property element."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:722
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jdbc-type</emphasis>: This is the JDBC type that is "
+"used when setting parameters in a JDBC <literal>PreparedStatement</literal> "
+"or loading data from a JDBC ResultSet. The valid types are defined in "
+"<literal>java.sql.Types</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:727
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sql-type</emphasis>: This is the SQL type that is "
+"used in create table statements for this field. Valid types are only limited "
+"by your database vendor."
+msgstr ""
+"<emphasis role=\"bold\">SessionIdAlphabet</emphasis>:这是一个用来创建会话 "
+"ID 的字符集。它必须由刚好 65 个唯一的字符组成."
+
+#. Tag: para
+#: The_CMP_Engine.xml:732
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">property</emphasis>: Use this element for to specify "
+"the mapping of a primary key field which is a dependent value class."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:737
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">dbindex</emphasis>: The presence of this optional "
+"field indicates that the server should create an index on the corresponding "
+"column in the database, and the index name will be <literal>fieldname_index</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:745
+#, no-c-format
+msgid "Foreign Key Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:746
+#, no-c-format
+msgid ""
+"Foreign key mapping is the most common mapping style for one-to-one and one-"
+"to-many relationships, but is not allowed for many-to many relationships. "
+"The foreign key mapping element is simply declared by adding an empty "
+"foreign <literal>key-mapping</literal> element to the <literal>ejb-relation</"
+"literal> element."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:749
+#, no-c-format
+msgid ""
+"As noted in the previous section, with a foreign key mapping the "
+"<literal>key-fields</literal> declared in the <literal>ejb-relationship-"
+"role</literal> are added to the table of the related entity. If the "
+"<literal>key-fields</literal> element is empty, a foreign key will not be "
+"created for the entity. In a one-to-many relationship, the many side "
+"(<literal>Gangster</literal> in the example) must have an empty <literal>key-"
+"fields</literal> element, and the one side (<literal>Organization</literal> "
+"in the example) must have a <literal>key-fields</literal> mapping. In one-to-"
+"one relationships, one or both roles can have foreign keys."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:752
+#, no-c-format
+msgid ""
+"The foreign key mapping is not dependent on the direction of the "
+"relationship. This means that in a one-to-one unidirectional relationship "
+"(only one side has an accessor) one or both roles can still have foreign "
+"keys. The complete foreign key mapping for the <literal>Organization-"
+"Gangster</literal> relationship is shown below with the foreign key elements "
+"highlighted in bold:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:755
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <relationships>\n"
+" <ejb-relation>\n"
+" <ejb-relation-name>Organization-Gangster</ejb-relation-"
+"name>\n"
+" <emphasis role=\"bold\"><foreign-key-mapping/></emphasis>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>org-has-gangsters</ejb-"
+"relationship-role-name>\n"
+" <emphasis role=\"bold\"><key-fields> <key-field> "
+"<field-name>name</field-name> <column-name>"
+"organization</column-name> </key-field> </key-fields></"
+"emphasis>\n"
+" </ejb-relationship-role>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>gangster-belongs-to-"
+"org</ejb-relationship-role-name>\n"
+" <emphasis role=\"bold\"><key-fields/></emphasis>\n"
+" </ejb-relationship-role>\n"
+" </ejb-relation>\n"
+" </relationships>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:759
+#, no-c-format
+msgid "Relation table Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:760
+#, no-c-format
+msgid ""
+"Relation table mapping is less common for one-to-one and one-to-many "
+"relationships, but is the only mapping style allowed for many-to-many "
+"relationships. Relation table mapping is defined using the <literal>relation-"
+"table-mapping</literal> element, the content model of which is shown below."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:764
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc relation-table-mapping element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:771
+#, no-c-format
+msgid ""
+"The relation-table-mapping for the <literal>Gangster-Job</literal> "
+"relationship is shown in with table mapping elements highlighted in bold:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:774
+#, no-c-format
+msgid "The jbosscmp-jdbc.xml Relation-table Mapping"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:775
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <relationships>\n"
+" <ejb-relation>\n"
+" <ejb-relation-name>Gangster-Jobs</ejb-relation-"
+"name>\n"
+" <relation-table-mapping>\n"
+" <table-name>gangster_job</table-name>\n"
+" </relation-table-mapping>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>gangster-has-jobs</ejb-"
+"relationship-role-name>\n"
+" <key-fields>\n"
+" <key-field>\n"
+" <field-name>gangsterId</field-name>\n"
+" <column-name>gangster</column-name>\n"
+" </key-field>\n"
+" </key-fields>\n"
+" </ejb-relationship-role> \n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>job-has-gangsters</ejb-"
+"relationship-role-name>\n"
+" <key-fields>\n"
+" <key-field>\n"
+" <field-name>name</field-name>\n"
+" <column-name>job</column-name>\n"
+" </key-field>\n"
+" </key-fields>\n"
+" </ejb-relationship-role>\n"
+" </ejb-relation>\n"
+" </relationships>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:776
+#, no-c-format
+msgid ""
+"The <literal>relation-table-mapping</literal> element contains a subset of "
+"the options available in the <literal>entity</literal> element. A detailed "
+"description of these elements is reproduced here for convenience:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:781
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">table-name</emphasis>: This optional element gives "
+"the name of the table that will hold data for this relationship. The default "
+"table name is based on the entity and <literal>cmr-field</literal> names."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是一个可选的属性,它指定与 "
+"HA-JNDI 服务通讯的不同节点的群集的名字。它的缺省值是 "
+"<literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:786
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasource</emphasis>: This optional element gives "
+"the <literal>jndi-name</literal> used to look up the datasource. All "
+"database connections are obtained from the datasource. Having different "
+"datasources for entities is not recommended, as it vastly constrains the "
+"domain over which finders and <literal>ejbSelect</literal>s can query."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:791
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasourcemapping</emphasis>: This optional element "
+"allows one to specify the name of the <literal>type-mapping</literal> to use."
+msgstr ""
+"<emphasis role=\"bold\">PartitionName</emphasis> 是用来指定节点名称的可选属"
+"性。它的缺省值是 <literal>DefaultPartition</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:796
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">create-table</emphasis>: This optional element if "
+"true indicates JBoss should attempt to create a table for the relationship. "
+"When the application is deployed, JBoss checks if a table already exists "
+"before creating the table. If a table is found, it is logged, and the table "
+"is not created. This option is very useful during the early stages of "
+"development when the table structure changes often."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:806
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">remove-table</emphasis>: This optional element if "
+"true indicates JBoss should attempt to drop the <literal>relation-table</"
+"literal> when the application is undeployed. This option is very useful "
+"during the early stages of development when the table structure changes "
+"often."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:811
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">row-locking</emphasis>: This optional element if "
+"true indicates JBoss should lock all rows loaded in a transaction. Most "
+"databases implement this by using the <literal>SELECT FOR UPDATE</literal> "
+"syntax when loading the entity, but the actual syntax is determined by the "
+"<literal>row-locking-template</literal> in the <literal>datasource-mapping</"
+"literal> used by this entity."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:816
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">pk-constraint</emphasis>: This optional element if "
+"true indicates JBoss should add a primary key constraint when creating "
+"tables."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: title
+#: The_CMP_Engine.xml:828
+#, no-c-format
+msgid "Queries"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:829
+#, no-c-format
+msgid ""
+"Entity beans allow for two types of queries: finders and selects. A finder "
+"provides queries on an entity bean to clients of the bean. The select method "
+"is designed to provide private query statements to an entity implementation. "
+"Unlike finders, which are restricted to only return entities of the same "
+"type as the home interface on which they are defined, select methods can "
+"return any entity type or just one field of the entity. EJB-QL is the query "
+"language used to specify finders and select methods in a platform "
+"independent way."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:833
+#, no-c-format
+msgid "Finder and select Declaration"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:834
+#, no-c-format
+msgid ""
+"The declaration of finders has not changed in CMP 2.0. Finders are still "
+"declared in the home interface (local or remote) of the entity. Finders "
+"defined on the local home interface do not throw a RemoteException. The "
+"following code declares the <literal>findBadDudes_ejbql</literal> finder on "
+"the <literal>GangsterHome</literal> interface. The <literal>ejbql</literal> "
+"suffix here is not required. It is simply a naming convention used here to "
+"differentiate the different types of query specifications we will be looking "
+"at."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:837
+#, no-c-format
+msgid ""
+"public interface GangsterHome \n"
+" extends EJBLocalHome \n"
+"{\n"
+" Collection findBadDudes_ejbql(int badness) throws FinderException;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:838
+#, no-c-format
+msgid ""
+"Select methods are declared in the entity implementation class, and must be "
+"public and abstract just like CMP and CMR field abstract accessors and must "
+"throw a <literal>FinderException</literal>. The following code declares an "
+"select method:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:841
+#, no-c-format
+msgid ""
+"public abstract class GangsterBean \n"
+" implements EntityBean \n"
+"{\n"
+" public abstract Set ejbSelectBoss_ejbql(String name)\n"
+" throws FinderException;\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:845
+#, no-c-format
+msgid "EJB-QL Declaration"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:846
+#, no-c-format
+msgid ""
+"Every select or finder method (except <literal>findByPrimaryKey</literal>) "
+"must have an EJB-QL query defined in the <literal>ejb-jar.xml</literal> "
+"file. The EJB-QL query is declared in a query element, which is contained in "
+"the entity element. The following are the declarations for "
+"<literal>findBadDudes_ejbql</literal> and <literal>ejbSelectBoss_ejbql</"
+"literal> queries:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:849
+#, no-c-format
+msgid ""
+"<ejb-jar>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name> \n"
+" <!-- ... -->\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name><emphasis role=\"bold"
+"\">findBadDudes_ejbql</emphasis></method-name>\n"
+" <method-params>\n"
+" <method-param>int</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <ejb-ql><![CDATA[\n"
+" <emphasis role=\"bold\">SELECT OBJECT(g) FROM gangster g "
+"WHERE g.badness > ?1</emphasis>\n"
+" ]]></ejb-ql>\n"
+" </query>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name><emphasis role=\"bold"
+"\">ejbSelectBoss_ejbql</emphasis></method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <ejb-ql><![CDATA[\n"
+" <emphasis role=\"bold\">SELECT DISTINCT underling."
+"organization.theBoss FROM gangster underling WHERE underling.name = ?1 OR "
+"underling.nickName = ?1</emphasis>\n"
+" ]]></ejb-ql>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</ejb-jar>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:850
+#, no-c-format
+msgid ""
+"EJB-QL is similar to SQL but has some surprising differences. The following "
+"are some important things to note about EJB-QL:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:855
+#, no-c-format
+msgid ""
+"EJB-QL is a typed language, meaning that it only allows comparison of like "
+"types (i.e., strings can only be compared with strings)."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:860
+#, no-c-format
+msgid ""
+"In an equals comparison a variable (single valued path) must be on the left "
+"hand side. Some examples follow:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:865
+#, no-c-format
+msgid ""
+"g.hangout.state = 'CA' Legal\n"
+"'CA' = g.shippingAddress.state <emphasis>NOT Legal</emphasis>\n"
+"'CA' = 'CA' <emphasis>NOT Legal</emphasis>\n"
+"(r.amountPaid * .01) > 300 <emphasis>NOT Legal</emphasis>\n"
+"r.amountPaid > (300 / .01) <emphasis>Legal</emphasis>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:868
+#, no-c-format
+msgid "Parameters use a base 1 index like java.sql.PreparedStatement."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:873
+#, no-c-format
+msgid ""
+"Parameters are only allowed on the right hand side of a comparison. For "
+"example:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:878
+#, no-c-format
+msgid ""
+"gangster.hangout.state = ?1 <emphasis>Legal</emphasis>\n"
+"?1 = gangster.hangout.state <emphasis>NOT Legal</emphasis>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:882
+#, no-c-format
+msgid "Overriding the EJB-QL to SQL Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:883
+#, no-c-format
+msgid ""
+"The EJB-QL query can be overridden in the <literal>jbosscmp-jdbc.xml</"
+"literal> file. The finder or select is still required to have an EJB-QL "
+"declaration, but the <literal>ejb-ql</literal> element can be left empty. "
+"Currently the SQL can be overridden with JBossQL, DynamicQL, DeclaredSQL or "
+"a BMP style custom <literal>ejbFind</literal> method. All EJB-QL overrides "
+"are non-standard extensions to the EJB specification, so use of these "
+"extensions will limit portability of your application. All of the EJB-QL "
+"overrides, except for BMP custom finders, are declared using a "
+"<literal>query</literal> element in the jbosscmp-jdbc.xml file. Tthe content "
+"model is shown in <xref linkend=\"Overriding_the_EJB_QL_to_SQL_Mapping-"
+"The_jbosscmp_jdbc_query_element_content_model\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:887
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc query element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:896
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">description</emphasis>: An optional description for "
+"the query."
+msgstr "<emphasis role=\"bold\">description</emphasis>:参数的可选描述。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:901
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">query-method</emphasis>: This required element "
+"specifies the query method that being configured. This must match a "
+"<literal>query-method</literal> declared for this entity in the <literal>ejb-"
+"jar.xml</literal> file."
+msgstr ""
+"<emphasis role=\"bold\">DefaultSecurityDomain</emphasis>:它指定在 WAR 文件"
+"的 <literal>jboss-web.xml</literal> 里的 <literal>security-domain</literal> "
+"没有显性地指定的情况下的 JAAS 安全域名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:906
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jboss-ql</emphasis>: This is a JBossQL query to use "
+"in place of the EJB-QL query. JBossQL is discussed in <xref linkend="
+"\"Queries-JBossQL\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:911
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">dynamic-ql</emphasis>: This indicated that the "
+"method is a dynamic query method and not an EJB-QL query. Dynamic queries "
+"are discussed in <xref linkend=\"Queries-DynamicQL\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:916
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">declared-sql</emphasis>: This query uses declared "
+"SQL in place of the EJB-QL query. Declared SQL is discussed in <xref linkend="
+"\"Queries-DeclaredSQL\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:921
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-ahead</emphasis>: This optional element allows "
+"one to optimize the loading of additional fields for use with the entities "
+"referenced by the query. This is discussed in detail in <xref linkend="
+"\"The_CMP_Engine-Optimized_Loading\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:929
+#, no-c-format
+msgid "JBossQL"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:930
+#, no-c-format
+msgid ""
+"JBossQL is a superset of EJB-QL that is designed to address some of the "
+"inadequacies of EJB-QL. In addition to a more flexible syntax, new "
+"functions, key words, and clauses have been added to JBossQL. At the time of "
+"this writing, JBossQL includes support for an <literal>ORDER BY</literal>, "
+"<literal>OFFSET</literal> and <literal>LIMIT</literal> clauses, parameters "
+"in the <literal>IN</literal> and <literal>LIKE</literal> operators, the "
+"<literal>COUNT</literal>, <literal>MAX</literal>, <literal>MIN</literal>, "
+"<literal>AVG</literal>, <literal>SUM</literal>, <literal>UCASE</literal> and "
+"<literal>LCASE</literal> functions. Queries can also include functions in "
+"the <literal>SELECT</literal> clause for select methods."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:933
+#, no-c-format
+msgid ""
+"JBossQL is declared in the <literal>jbosscmp-jdbc.xml</literal> file with a "
+"<literal>jboss-ql</literal> element containing the JBossQL query. The "
+"following example provides an example JBossQL declaration."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:936
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findBadDudes_jbossql</method-"
+"name>\n"
+" <method-params>\n"
+" <method-param>int</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <emphasis role=\"bold\"><jboss-ql><![CDATA[ SELECT "
+"OBJECT(g) FROM gangster g WHERE g.badness > ?1 ORDER BY g.badness DESC ]]"
+"></jboss-ql></emphasis>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:937
+#, no-c-format
+msgid "The corresponding generated SQL is straightforward."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:940
+#, no-c-format
+msgid ""
+"SELECT t0_g.id\n"
+" FROM gangster t0_g\n"
+" WHERE t0_g.badness > ?\n"
+" ORDER BY t0_g.badness DESC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:941
+#, no-c-format
+msgid ""
+"Another capability of JBossQL is the ability to retrieve finder results in "
+"blocks using the <literal>LIMIT</literal> and <literal>OFFSET</literal> "
+"functions. For example, to iterate through the large number of jobs "
+"performed, the following <literal>findManyJobs_jbossql</literal> finder may "
+"be defined."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:944
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findManyJobs_jbossql</method-"
+"name>\n"
+" <method-params>\n"
+" <method-param>int</method-param>\n"
+" </method-params>\n"
+" <method-params>\n"
+" <method-param>int</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <emphasis role=\"bold\"><jboss-ql><![CDATA[ SELECT "
+"OBJECT(j) FROM jobs j OFFSET ?1 LIMIT ?2 ]]></jboss-ql></emphasis>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: title
+#: The_CMP_Engine.xml:948
+#, no-c-format
+msgid "DynamicQL"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:949
+#, no-c-format
+msgid ""
+"DynamicQL allows the runtime generation and execution of JBossQL queries. A "
+"DynamicQL query method is an abstract method that takes a JBossQL query and "
+"the query arguments as parameters. JBoss compiles the JBossQL and executes "
+"the generated SQL. The following generates a JBossQL query that selects all "
+"the gangsters that have a hangout in any state in the states set:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:952
+#, no-c-format
+msgid ""
+"public abstract class GangsterBean \n"
+" implements EntityBean \n"
+"{\n"
+" public Set ejbHomeSelectInStates(Set states)\n"
+" throws FinderException\n"
+" {\n"
+" // generate JBossQL query\n"
+" StringBuffer jbossQl = new StringBuffer();\n"
+" jbossQl.append(\"SELECT OBJECT(g) \");\n"
+" jbossQl.append(\"FROM gangster g \");\n"
+" jbossQl.append(\"WHERE g.hangout.state IN (\");\n"
+"\n"
+" for (int i = 0; i < states.size(); i++) {\n"
+" if (i > 0) {\n"
+" jbossQl.append(\", \");\n"
+" }\n"
+"\n"
+" jbossQl.append(\"?\").append(i+1);\n"
+" }\n"
+"\n"
+" jbossQl.append(\") ORDER BY g.name\");\n"
+"\n"
+" // pack arguments into an Object[]\n"
+" Object[] args = states.toArray(new Object[states.size()]);\n"
+" \n"
+" // call dynamic-ql query\n"
+" return ejbSelectGeneric(jbossQl.toString(), args);\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:953
+#, no-c-format
+msgid ""
+"The DynamicQL select method may have any valid select method name, but the "
+"method must always take a string and an object array as parameters. "
+"DynamicQL is declared in the <literal>jbosscmp-jdbc.xml</literal> file with "
+"an empty <literal>dynamic-ql</literal> element. The following is the "
+"declaration for <literal>ejbSelectGeneric</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:956
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>ejbSelectGeneric</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" <method-param>java.lang.Object[]</method-"
+"param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <emphasis role=\"bold\"><dynamic-ql/></emphasis>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: title
+#: The_CMP_Engine.xml:960
+#, no-c-format
+msgid "DeclaredSQL"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:961
+#, no-c-format
+msgid ""
+"DeclaredSQL is based on the legacy JAWS CMP 1.1 engine finder declaration, "
+"but has been updated for CMP 2.0. Commonly this declaration is used to limit "
+"a query with a <literal>WHERE</literal> clause that cannot be represented in "
+"q EJB-QL or JBossQL. The content model for the declared-sql element is given "
+"in <xref linkend=\"DeclaredSQL-"
+"The_jbosscmp_jdbc_declared_sql_element_content_model.\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:965
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc declared-sql element content model.>"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:974
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">select</emphasis>: The <literal>select</literal> "
+"element specifies what is to be selected and consists of the following "
+"elements:"
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:979
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">distinct</emphasis>: If this empty element is "
+"present, JBoss will add the <literal>DISTINCT</literal> keyword to the "
+"generated <literal>SELECT</literal> clause. The default is to use "
+"<literal>DISTINCT</literal> if method returns a <literal>java.util.Set</"
+"literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:984
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ejb-name</emphasis>: This is the <literal>ejb-name</"
+"literal> of the entity that will be selected. This is only required if the "
+"query is for a select method."
+msgstr ""
+"<emphasis role=\"bold\">PartitionObjectName</emphasis>:与代理关联的群集服务"
+"的 JMX <literal>ObjectName</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:989
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">field-name</emphasis>: This is the name of the CMP "
+"field that will be selected from the specified entity. The default is to "
+"select entire entity."
+msgstr ""
+"<emphasis role=\"bold\">keystorePass</emphasis>:这是从指定 keystore 文件里访"
+"问服务器证书所用到的密码。它的缺省值是 <literal>changeit</literal>."
+
+#. Tag: para
+#: The_CMP_Engine.xml:994
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alias</emphasis>: This specifies the alias that will "
+"be used for the main select table. The default is to use the <literal>ejb-"
+"name</literal>."
+msgstr ""
+"<emphasis role=\"bold\">mcast_port</emphasis> 指定多点传送端口号码。它的缺省"
+"值是 <literal>45566</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:999
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">additional-columns</emphasis>: Declares other "
+"columns to be selected to satisfy ordering by arbitrary columns with finders "
+"or to facilitate aggregate functions in selects."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1006
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">from</emphasis>: The <literal>from</literal> element "
+"declares additional SQL to append to the generated <literal>FROM</literal> "
+"clause."
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1011
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">where</emphasis>: The <literal>where</literal> "
+"element declares the <literal>WHERE</literal> clause for the query."
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1016
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">order</emphasis>: The <literal>order</literal> "
+"element declares the <literal>ORDER</literal> clause for the query."
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1021
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">other</emphasis>: The <literal>other</literal> "
+"element declares additional SQL that is appended to the end of the query."
+msgstr ""
+"<emphasis role=\"bold\">display-name</emphasis>:<literal>display-name</"
+"literal>元素指定一个易于使用的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1026
+#, no-c-format
+msgid "The following is an example DeclaredSQL declaration."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1029
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findBadDudes_declaredsql</method-"
+"name>\n"
+" <method-params>\n"
+" <method-param>int</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <declared-sql>\n"
+" <where><![CDATA[ badness > {0} ]]></"
+"where>\n"
+" <order><![CDATA[ badness DESC ]]></"
+"order>\n"
+" </declared-sql>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1030 The_CMP_Engine.xml:1038 The_CMP_Engine.xml:1641
+#, no-c-format
+msgid "The generated SQL would be:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1033
+#, no-c-format
+msgid ""
+"SELECT id\n"
+"FROM gangster\n"
+"WHERE badness > ?\n"
+"ORDER BY badness DESC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1034
+#, no-c-format
+msgid ""
+"As you can see, JBoss generates the <literal>SELECT</literal> and "
+"<literal>FROM</literal> clauses necessary to select the primary key for this "
+"entity. If desired an additional <literal>FROM</literal> clause can be "
+"specified that is appended to the end of the automatically generated "
+"<literal>FROM</literal> clause. The following is example DeclaredSQL "
+"declaration with an additional <literal>FROM</literal> clause."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1037
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>ejbSelectBoss_declaredsql</method-"
+"name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <declared-sql>\n"
+" <select>\n"
+" <distinct/>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <alias>boss</alias>\n"
+" </select>\n"
+" <from><![CDATA[, gangster g, organization o]]"
+"></from>\n"
+" <where><![CDATA[\n"
+" (LCASE(g.name) = {0} OR LCASE(g.nick_name) = {0}) AND\n"
+" g.organization = o.name AND o.the_boss = boss.id\n"
+" ]]></where>\n"
+" </declared-sql>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1041
+#, no-c-format
+msgid ""
+"SELECT DISTINCT boss.id\n"
+" FROM gangster boss, gangster g, organization o\n"
+" WHERE (LCASE(g.name) = ? OR LCASE(g.nick_name) = ?) AND\n"
+" g.organization = o.name AND o.the_boss = boss.id"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1042
+#, no-c-format
+msgid ""
+"Notice that the <literal>FROM</literal> clause starts with a comma. This is "
+"because the container appends the declared <literal>FROM</literal> clause to "
+"the end of the generated <literal>FROM</literal> clause. It is also possible "
+"for the <literal>FROM</literal> clause to start with a SQL <literal>JOIN</"
+"literal> statement. Since this is a select method, it must have a "
+"<literal>select</literal> element to declare the entity that will be "
+"selected. Note that an alias is also declared for the query. If an alias is "
+"not declared, the <literal>table-name</literal> is used as the alias, "
+"resulting in a <literal>SELECT</literal> clause with the <literal>table_name."
+"field_name</literal> style column declarations. Not all database vendors "
+"support the that syntax, so the declaration of an alias is preferred. The "
+"optional empty <literal>distinct</literal> element causes the "
+"<literal>SELECT</literal> clause to use the <literal>SELECT DISTINCT</"
+"literal> declaration. The DeclaredSQL declaration can also be used in select "
+"methods to select a CMP field."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1045
+#, no-c-format
+msgid ""
+"Now we well see an example which overrides a select to return all of the zip "
+"codes an <literal>Organization</literal> operates in."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1048
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>OrganizationEJB</ejb-name>\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>"
+"ejbSelectOperatingZipCodes_declaredsql</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.String</method-"
+"param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <emphasis role=\"bold\"><declared-sql> <select> "
+"<distinct/> <ejb-name>LocationEJB</ejb-name> <field-"
+"name>zipCode</field-name> <alias>hangout</alias> </"
+"select> <from><![CDATA[ , organization o, gangster g ]]></"
+"from> <where><![CDATA[ LCASE(o.name) = {0} AND o.name = g."
+"organization AND g.hangout = hangout.id ]]></where> <order>"
+"<![CDATA[ hangout.zip ]]></order> </declared-sql></"
+"emphasis>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1049
+#, no-c-format
+msgid "The corresponding SQL would be:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1052
+#, no-c-format
+msgid ""
+"SELECT DISTINCT hangout.zip\n"
+" FROM location hangout, organization o, gangster g\n"
+" WHERE LCASE(o.name) = ? AND o.name = g.organization AND g.hangout = "
+"hangout.id\n"
+" ORDER BY hangout.zip"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1054
+#, no-c-format
+msgid "Parameters"
+msgstr "参数(Parameters)"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1055
+#, no-c-format
+msgid ""
+"DeclaredSQL uses a completely new parameter handling system, which supports "
+"entity and DVC parameters. Parameters are enclosed in curly brackets and use "
+"a zero-based index, which is different from the one-based EJB-QL parameters. "
+"There are three categories of parameters: simple, DVC, and entity."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1060
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">simple</emphasis>: A simple parameter can be of any "
+"type except for a known (mapped) DVC or an entity. A simple parameter only "
+"contains the argument number, such as <literal>{0}</literal>. When a simple "
+"parameter is set, the JDBC type used to set the parameter is determined by "
+"the <literal>datasourcemapping</literal> for the entity. An unknown DVC is "
+"serialized and then set as a parameter. Note that most databases do not "
+"support the use of a BLOB value in a WHERE clause."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1065
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">DVC</emphasis>: A DVC parameter can be any known "
+"(mapped) DVC. A DVC parameter must be dereferenced down to a simple property "
+"(one that is not another DVC). For example, if we had a CVS property of type "
+"<literal>ContactInfo</literal>, valid parameter declarations would be "
+"<literal>{0.email}</literal> and <literal>{0.cell.areaCode}</literal> but "
+"not <literal>{0.cell}</literal>. The JDBC type used to set a parameter is "
+"based on the class type of the property and the <literal>datasourcemapping</"
+"literal> of the entity. The JDBC type used to set the parameter is the JDBC "
+"type that is declared for that property in the <literal>dependent-value-"
+"class</literal> element."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1070
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">entity</emphasis>: An entity parameter can be any "
+"entity in the application. An entity parameter must be dereferenced down to "
+"a simple primary key field or simple property of a DVC primary key field. "
+"For example, if we had a parameter of type <literal>Gangster</literal>, a "
+"valid parameter declaration would be <literal>{0.gangsterId}</literal>. If "
+"we had some entity with a primary key field named info of type "
+"<literal>ContactInfo</literal>, a <literal>valid parameter</literal> "
+"declaration would be <literal>{0.info.cell.areaCode}</literal>. Only fields "
+"that are members of the primary key of the entity can be dereferenced (this "
+"restriction may be removed in later versions). The JDBC type used to set the "
+"parameter is the JDBC type that is declared for that field in the entity "
+"declaration."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1080
+#, no-c-format
+msgid "EJBQL 2.1 and SQL92 queries"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1081
+#, no-c-format
+msgid ""
+"The default query compiler doesn't fully support EJB-QL 2.1 or the SQL92 "
+"standard. If you need either of these functions, you can replace the query "
+"compiler. The default compiler is specified in <literal>standardjbosscmp-"
+"jdbc.xml</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1084
+#, no-c-format
+msgid ""
+"<defaults>\n"
+" ...\n"
+" <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc.JDBCEJBQLCompiler</"
+"ql-compiler>\n"
+" ...\n"
+"</defaults>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1085
+#, no-c-format
+msgid ""
+"To use the SQL92 compiler, simply specify the SQL92 compiler in <literal>ql-"
+"compiler</literal> element."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1088
+#, no-c-format
+msgid ""
+"<defaults>\n"
+" ...\n"
+" <ql-compiler>org.jboss.ejb.plugins.cmp.jdbc."
+"EJBQLToSQL92Compiler</ql-compiler>\n"
+" ...\n"
+"</defaults>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1089
+#, no-c-format
+msgid ""
+"This changes the query compiler for all beans in the entire system. You can "
+"also specify the ql-compiler for each element in <literal>jbosscmp-jdbc.xml</"
+"literal>. Here is an example using one of our earlier queries."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1092
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findBadDudes_ejbql</method-name>\n"
+" <method-params>\n"
+" lt;method-param>int</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <ejb-ql><![CDATA[\n"
+" SELECT OBJECT(g)\n"
+" FROM gangster g\n"
+" WHERE g.badness > ?1]]>\n"
+" </ejb-ql>\n"
+" <emphasis role=\"bold\"><ql-compiler>org.jboss.ejb.plugins.cmp."
+"jdbc.EJBQLToSQL92Compiler</ql-compiler></emphasis>\n"
+"</query>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1093
+#, no-c-format
+msgid ""
+"One important limitation of SQL92 query compiler is that it always selects "
+"all the fields of an entity regardless the <literal>read-ahead</literal> "
+"strategy in use. For example, if a query is configured with the <literal>on-"
+"load</literal><literal>read-ahead</literal> strategy, the first query will "
+"include all the fields, not just primary key fields but only the primary key "
+"fields will be read from the <literal>ResultSet</literal>. Then, on load, "
+"other fields will be actually loaded into the read-ahead cache. The "
+"<literal>on-find</literal><literal>read-ahead</literal> with the default "
+"load group <literal>*</literal> works as expected."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1099
+#, no-c-format
+msgid "BMP Custom Finders"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1100
+#, no-c-format
+msgid ""
+"JBoss also supports bean managed persistence custom finders. If a custom "
+"finder method matches a finder declared in the home or local home interface, "
+"JBoss will always call the custom finder over any other implementation "
+"declared in the <literal>ejb-jar.xml</literal> or <literal>jbosscmp-jdbc."
+"xml</literal> files. The following simple example finds the entities by a "
+"collection of primary keys:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1103
+#, no-c-format
+msgid ""
+"public abstract class GangsterBean\n"
+" implements EntityBean \n"
+"{\n"
+" public Collection ejbFindByPrimaryKeys(Collection keys)\n"
+" {\n"
+" return keys;\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1104
+#, no-c-format
+msgid ""
+"This is a very useful finder because it quickly coverts primary keys into "
+"real Entity objects without contacting the database. One drawback is that it "
+"can create an Entity object with a primary key that does not exist in the "
+"database. If any method is invoked on the bad Entity, a "
+"NoSuchEntityException will be thrown. Another drawback is that the resulting "
+"entity bean violates the EJB specification in that it implements a finder, "
+"and the JBoss EJB verifier will fail the deployment of such an entity unless "
+"the StrictVerifier attribute is set to false."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1112
+#, no-c-format
+msgid "Optimized Loading"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1113
+#, no-c-format
+msgid ""
+"The goal of optimized loading is to load the smallest amount of data "
+"required to complete a transaction in the fewest number of queries. The "
+"tuning of JBoss depends on a detailed knowledge of the loading process. This "
+"section describes the internals of the JBoss loading process and its "
+"configuration. Tuning of the loading process really requires a holistic "
+"understanding of the loading system, so this chapter may have to be read "
+"more than once."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1117
+#, no-c-format
+msgid "Loading Scenario"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1118
+#, no-c-format
+msgid ""
+"The easiest way to investigate the loading process is to look at a usage "
+"scenario. The most common scenario is to locate a collection of entities and "
+"iterate over the results performing some operation. The following example "
+"generates an html table containing all of the gangsters:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1121
+#, no-c-format
+msgid ""
+"public String createGangsterHtmlTable_none() \n"
+" throws FinderException \n"
+"{\n"
+" StringBuffer table = new StringBuffer();\n"
+" table.append(\"<table>\");\n"
+"\n"
+" Collection gangsters = gangsterHome.findAll_none();\n"
+" for (Iterator iter = gangsters.iterator(); iter.hasNext();) {\n"
+" Gangster gangster = (Gangster) iter.next();\n"
+" table.append(\"<tr>\");\n"
+" table.append(\"<td>\").append(gangster.getName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getNickName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getBadness());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"</tr>\");\n"
+" }\n"
+"\n"
+" return table.toString();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1122
+#, no-c-format
+msgid ""
+"Assume this code is called within a single transaction and all optimized "
+"loading has been disabled. At the <literal>findAll_none</literal> call, "
+"JBoss will execute the following query:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1125
+#, no-c-format
+msgid ""
+"SELECT t0_g.id\n"
+" FROM gangster t0_g\n"
+" ORDER BY t0_g.id ASC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1126
+#, no-c-format
+msgid ""
+"Then as each of the eight gangster in the sample database is accessed, JBoss "
+"will execute the following eight queries:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1129
+#, no-c-format
+msgid ""
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=0)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=1)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=2)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=3)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=4)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=5)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=6)\n"
+"SELECT name, nick_name, badness, hangout, organization\n"
+" FROM gangster WHERE (id=7)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1130
+#, no-c-format
+msgid ""
+"There are two problems with this scenario. First, an excessive number of "
+"queries are executed because JBoss executes one query for the "
+"<literal>findAll</literal> and one query to access each element found. The "
+"reason for this behavior has to do with the handling of query results inside "
+"the JBoss container. Although it appears that the actual entity beans "
+"selected are returned when a query is executed, JBoss really only returns "
+"the primary keys of the matching entities, and does not load the entity "
+"until a method is invoked on it. This is known as the <emphasis>n+1</"
+"emphasis> problem and is addressed with the read-ahead strategies described "
+"in the following sections."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1133
+#, no-c-format
+msgid ""
+"Second, the values of unused fields are loaded needlessly. JBoss loads the "
+"<literal>hangout</literal> and <literal>organization</literal> fields, which "
+"are never accessed. (we have disabled the complex <literal>contactInfo</"
+"literal> field for the sake of clarity)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1136 The_CMP_Engine.xml:2018
+#, no-c-format
+msgid "The following table shows the execution of the queries:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1140
+#, fuzzy, no-c-format
+msgid "Unoptimized Query Execution"
+msgstr "优化状态复制"
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1144 The_CMP_Engine.xml:1360 The_CMP_Engine.xml:1678
+#: The_CMP_Engine.xml:2035 The_CMP_Engine.xml:2050
+#, no-c-format
+msgid "<entry>id</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1147 The_CMP_Engine.xml:1363 The_CMP_Engine.xml:1681
+#: The_CMP_Engine.xml:2038
+#, fuzzy, no-c-format
+msgid "name"
+msgstr "名字"
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1150 The_CMP_Engine.xml:1366 The_CMP_Engine.xml:1684
+#: The_CMP_Engine.xml:2041
+#, no-c-format
+msgid "nick_name"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1153 The_CMP_Engine.xml:1369 The_CMP_Engine.xml:1687
+#: The_CMP_Engine.xml:2044
+#, no-c-format
+msgid "badness"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1156 The_CMP_Engine.xml:1372 The_CMP_Engine.xml:1690
+#: The_CMP_Engine.xml:2047
+#, no-c-format
+msgid "hangout"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1159 The_CMP_Engine.xml:1375 The_CMP_Engine.xml:1693
+#, no-c-format
+msgid "organization"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1166 The_CMP_Engine.xml:1178 The_CMP_Engine.xml:1382
+#: The_CMP_Engine.xml:1394 The_CMP_Engine.xml:1700 The_CMP_Engine.xml:1712
+#: The_CMP_Engine.xml:2066 The_CMP_Engine.xml:2078 The_CMP_Engine.xml:2081
+#, no-c-format
+msgid "<entry>0</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1169 The_CMP_Engine.xml:1385 The_CMP_Engine.xml:1703
+#: The_CMP_Engine.xml:2069
+#, no-c-format
+msgid "Yojimbo"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1172 The_CMP_Engine.xml:1388 The_CMP_Engine.xml:1706
+#: The_CMP_Engine.xml:2072
+#, no-c-format
+msgid "Bodyguard"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1175 The_CMP_Engine.xml:1306 The_CMP_Engine.xml:1318
+#: The_CMP_Engine.xml:1391 The_CMP_Engine.xml:1522 The_CMP_Engine.xml:1534
+#: The_CMP_Engine.xml:1709 The_CMP_Engine.xml:1840 The_CMP_Engine.xml:1852
+#: The_CMP_Engine.xml:2075 The_CMP_Engine.xml:2269 The_CMP_Engine.xml:2281
+#: The_CMP_Engine.xml:2284
+#, no-c-format
+msgid "<entry>7</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1181 The_CMP_Engine.xml:1201 The_CMP_Engine.xml:1221
+#: The_CMP_Engine.xml:1397 The_CMP_Engine.xml:1417 The_CMP_Engine.xml:1437
+#: The_CMP_Engine.xml:1715 The_CMP_Engine.xml:1735 The_CMP_Engine.xml:1755
+#, no-c-format
+msgid "Yakuza"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1186 The_CMP_Engine.xml:1198 The_CMP_Engine.xml:1402
+#: The_CMP_Engine.xml:1414 The_CMP_Engine.xml:1720 The_CMP_Engine.xml:1732
+#: The_CMP_Engine.xml:2095 The_CMP_Engine.xml:2107 The_CMP_Engine.xml:2110
+#, no-c-format
+msgid "<entry>1</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1189 The_CMP_Engine.xml:1405 The_CMP_Engine.xml:1723
+#: The_CMP_Engine.xml:2098
+#, no-c-format
+msgid "Takeshi"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1192 The_CMP_Engine.xml:1408 The_CMP_Engine.xml:1726
+#: The_CMP_Engine.xml:2101
+#, no-c-format
+msgid "Master"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1195 The_CMP_Engine.xml:1411 The_CMP_Engine.xml:1729
+#: The_CMP_Engine.xml:2104
+#, no-c-format
+msgid "<entry>10</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1206 The_CMP_Engine.xml:1218 The_CMP_Engine.xml:1295
+#: The_CMP_Engine.xml:1422 The_CMP_Engine.xml:1434 The_CMP_Engine.xml:1511
+#: The_CMP_Engine.xml:1740 The_CMP_Engine.xml:1752 The_CMP_Engine.xml:1829
+#: The_CMP_Engine.xml:2124 The_CMP_Engine.xml:2136 The_CMP_Engine.xml:2139
+#: The_CMP_Engine.xml:2249
+#, no-c-format
+msgid "<entry>2</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1209 The_CMP_Engine.xml:1425 The_CMP_Engine.xml:1743
+#: The_CMP_Engine.xml:2127
+#, no-c-format
+msgid "Yuriko"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1212 The_CMP_Engine.xml:1428 The_CMP_Engine.xml:1746
+#: The_CMP_Engine.xml:2130
+#, no-c-format
+msgid "Four finger"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1215 The_CMP_Engine.xml:1246 The_CMP_Engine.xml:1258
+#: The_CMP_Engine.xml:1275 The_CMP_Engine.xml:1431 The_CMP_Engine.xml:1462
+#: The_CMP_Engine.xml:1474 The_CMP_Engine.xml:1491 The_CMP_Engine.xml:1749
+#: The_CMP_Engine.xml:1780 The_CMP_Engine.xml:1792 The_CMP_Engine.xml:1809
+#: The_CMP_Engine.xml:2133 The_CMP_Engine.xml:2182 The_CMP_Engine.xml:2194
+#: The_CMP_Engine.xml:2197 The_CMP_Engine.xml:2220
+#, no-c-format
+msgid "<entry>4</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1226 The_CMP_Engine.xml:1238 The_CMP_Engine.xml:1442
+#: The_CMP_Engine.xml:1454 The_CMP_Engine.xml:1760 The_CMP_Engine.xml:1772
+#: The_CMP_Engine.xml:2153 The_CMP_Engine.xml:2165 The_CMP_Engine.xml:2168
+#, no-c-format
+msgid "<entry>3</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1229 The_CMP_Engine.xml:1445 The_CMP_Engine.xml:1763
+#: The_CMP_Engine.xml:2156
+#, no-c-format
+msgid "Chow"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1232 The_CMP_Engine.xml:1448 The_CMP_Engine.xml:1766
+#: The_CMP_Engine.xml:2159
+#, no-c-format
+msgid "Killer"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1235 The_CMP_Engine.xml:1451 The_CMP_Engine.xml:1769
+#: The_CMP_Engine.xml:2162
+#, no-c-format
+msgid "<entry>9</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1241 The_CMP_Engine.xml:1261 The_CMP_Engine.xml:1457
+#: The_CMP_Engine.xml:1477 The_CMP_Engine.xml:1775 The_CMP_Engine.xml:1795
+#, no-c-format
+msgid "Triads"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1249 The_CMP_Engine.xml:1465 The_CMP_Engine.xml:1783
+#: The_CMP_Engine.xml:2185
+#, no-c-format
+msgid "Shogi"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1252 The_CMP_Engine.xml:1468 The_CMP_Engine.xml:1786
+#: The_CMP_Engine.xml:2188
+#, no-c-format
+msgid "Lightning"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1255 The_CMP_Engine.xml:1471 The_CMP_Engine.xml:1789
+#: The_CMP_Engine.xml:2191
+#, no-c-format
+msgid "<entry>8</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1266 The_CMP_Engine.xml:1278 The_CMP_Engine.xml:1482
+#: The_CMP_Engine.xml:1494 The_CMP_Engine.xml:1800 The_CMP_Engine.xml:1812
+#: The_CMP_Engine.xml:2211 The_CMP_Engine.xml:2223 The_CMP_Engine.xml:2226
+#, no-c-format
+msgid "<entry>5</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1269 The_CMP_Engine.xml:1485 The_CMP_Engine.xml:1803
+#: The_CMP_Engine.xml:2214
+#, no-c-format
+msgid "Valentino"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1272 The_CMP_Engine.xml:1488 The_CMP_Engine.xml:1806
+#: The_CMP_Engine.xml:2217
+#, no-c-format
+msgid "Pizza-Face"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1281 The_CMP_Engine.xml:1301 The_CMP_Engine.xml:1321
+#: The_CMP_Engine.xml:1497 The_CMP_Engine.xml:1517 The_CMP_Engine.xml:1537
+#: The_CMP_Engine.xml:1815 The_CMP_Engine.xml:1835 The_CMP_Engine.xml:1855
+#, no-c-format
+msgid "Mafia"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1286 The_CMP_Engine.xml:1298 The_CMP_Engine.xml:1315
+#: The_CMP_Engine.xml:1502 The_CMP_Engine.xml:1514 The_CMP_Engine.xml:1531
+#: The_CMP_Engine.xml:1820 The_CMP_Engine.xml:1832 The_CMP_Engine.xml:1849
+#: The_CMP_Engine.xml:2240 The_CMP_Engine.xml:2252 The_CMP_Engine.xml:2255
+#: The_CMP_Engine.xml:2278
+#, no-c-format
+msgid "<entry>6</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1289 The_CMP_Engine.xml:1505 The_CMP_Engine.xml:1823
+#: The_CMP_Engine.xml:2243
+#, no-c-format
+msgid "Toni"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1292 The_CMP_Engine.xml:1508 The_CMP_Engine.xml:1826
+#: The_CMP_Engine.xml:2246
+#, no-c-format
+msgid "Toothless"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1309 The_CMP_Engine.xml:1525 The_CMP_Engine.xml:1843
+#: The_CMP_Engine.xml:2272
+#, no-c-format
+msgid "Corleone"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:1312 The_CMP_Engine.xml:1528 The_CMP_Engine.xml:1846
+#: The_CMP_Engine.xml:2275
+#, no-c-format
+msgid "Godfather"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1331
+#, no-c-format
+msgid "Load Groups"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1332
+#, no-c-format
+msgid ""
+"The configuration and optimization of the loading system begins with the "
+"declaration of named load groups in the entity. A load group contains the "
+"names of CMP fields and CMR Fields that have a foreign key (e.g., "
+"<literal>Gangster</literal> in the Organization-Gangster example) that will "
+"be loaded in a single operation. An example configuration is shown below:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1335
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name> \n"
+" <!-- ... -->\n"
+" <load-groups>\n"
+" <load-group>\n"
+" <load-group-name>basic</load-group-name>\n"
+" <field-name>name</field-name>\n"
+" <field-name>nickName</field-name>\n"
+" <field-name>badness</field-name>\n"
+" </load-group>\n"
+" <load-group>\n"
+" <load-group-name>contact info</load-group-"
+"name>\n"
+" <field-name>nickName</field-name>\n"
+" <field-name>contactInfo</field-name>\n"
+" <field-name>hangout</field-name>\n"
+" </load-group>\n"
+" </load-groups>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans>\n"
+" <session> \n"
+" <ejb-name>nextgen.StatefulSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatefulSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name>\n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" <session-state-manager-jndi-name> \n"
+" /HASessionState/Default \n"
+" </session-state-manager-jndi-name> \n"
+" </cluster-config> \n"
+" </session> \n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1336
+#, no-c-format
+msgid ""
+"In this example, two load groups are declared: <literal>basic</literal> and "
+"<literal>contact info</literal>. Note that the load groups do not need to be "
+"mutually exclusive. For example, both of the load groups contain the "
+"<literal>nickName</literal> field. In addition to the declared load groups, "
+"JBoss automatically adds a group named <literal>*</literal> (the star group) "
+"that contains every CMP field and CMR field with a foreign key in the entity."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1342
+#, no-c-format
+msgid "Read-ahead"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1343
+#, no-c-format
+msgid ""
+"Optimized loading in JBoss is called read-ahead. This refers to the "
+"technique of reading the row for an entity being loaded, as well as the next "
+"several rows; hence the term read-ahead. JBoss implements two main "
+"strategies (<literal>on-find</literal> and <literal>on-load</literal>) to "
+"optimize the loading problem identified in the previous section. The extra "
+"data loaded during read-ahead is not immediately associated with an entity "
+"object in memory, as entities are not materialized in JBoss until actually "
+"accessed. Instead, it is stored in the preload cache where it remains until "
+"it is loaded into an entity or the end of the transaction occurs. The "
+"following sections describe the read-ahead strategies."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1347
+#, no-c-format
+msgid "on-find"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1348
+#, no-c-format
+msgid ""
+"The <literal>on-find</literal> strategy reads additional columns when the "
+"query is invoked. If the query is <literal>on-find</literal> optimized, "
+"JBoss will execute the following query when the query is executed."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1351
+#, no-c-format
+msgid ""
+"SELECT t0_g.id, t0_g.name, t0_g.nick_name, t0_g.badness \n"
+" FROM gangster t0_g\n"
+" ORDER BY t0_g.id ASC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1352
+#, no-c-format
+msgid ""
+"All of the required data would be in the preload cache, so no additional "
+"queries would need to be executed while iterating through the query results. "
+"This strategy is effective for queries that return a small amount of data, "
+"but it becomes very inefficient when trying to load a large result set into "
+"memory. The following table shows the execution of this query:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1356
+#, no-c-format
+msgid "on-find Optimized Query Execution"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1544
+#, no-c-format
+msgid ""
+"The <literal>read-ahead</literal> strategy and <literal>load-group</literal> "
+"for a query is defined in the <literal>query</literal> element. If a "
+"<literal>read-ahead</literal> strategy is not declared in the "
+"<literal>query</literal> element, the strategy declared in the "
+"<literal>entity</literal> element or <literal>defaults</literal> element is "
+"used. The <literal>on-find</literal> configuration follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1547
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!--...-->\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findAll_onfind</method-name>\n"
+" <method-params/>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[\n"
+" SELECT OBJECT(g)\n"
+" FROM gangster g\n"
+" ORDER BY g.gangsterId\n"
+" ]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>basic</eager-load-group>\n"
+" </read-ahead>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1548
+#, no-c-format
+msgid ""
+"One problem with the <literal>on-find</literal> strategy is that it must "
+"load additional data for every entity selected. Commonly in web applications "
+"only a fixed number of results are rendered on a page. Since the preloaded "
+"data is only valid for the length of the transaction, and a transaction is "
+"limited to a single web HTTP hit, most of the preloaded data is not used. "
+"The <literal>on-load</literal> strategy discussed in the next section does "
+"not suffer from this problem."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1552
+#, no-c-format
+msgid "Left join read ahead"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1553
+#, no-c-format
+msgid ""
+"Left join read ahead is an enhanced <literal>on-find</literal><literal>read-"
+"ahead</literal> strategy. It allows you to preload in one SQL query not only "
+"fields from the base instance but also related instances which can be "
+"reached from the base instance by CMR navigation. There are no limitation "
+"for the depth of CMR navigations. There are also no limitations for "
+"cardinality of CMR fields used in navigation and relationship type mapping, "
+"i.e. both foreign key and relation-table mapping styles are supported. "
+"Let's look at some examples. Entity and relationship declarations can be "
+"found below."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1559
+#, no-c-format
+msgid "D#findByPrimaryKey"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1560
+#, no-c-format
+msgid ""
+"Suppose we have an entity <literal>D</literal>. A typical SQL query "
+"generated for the <literal>findByPrimaryKey</literal> would look like this:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1563
+#, no-c-format
+msgid "SELECT t0_D.id, t0_D.name FROM D t0_D WHERE t0_D.id=?"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1564
+#, no-c-format
+msgid ""
+"Suppose that while executing <literal>findByPrimaryKey</literal> we also "
+"want to preload two collection-valued CMR fields <literal>bs</literal> and "
+"<literal>cs</literal>."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1567
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findByPrimaryKey</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.Long</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[SELECT OBJECT(o) FROM D AS o WHERE o.id = ?"
+"1]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>basic</eager-load-group>\n"
+" <left-join cmr-field=\"bs\" eager-load-group=\"basic\"/>\n"
+" <left-join cmr-field=\"cs\" eager-load-group=\"basic\"/>\n"
+" </read-ahead>\n"
+"</query>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1568
+#, no-c-format
+msgid ""
+"The <literal>left-join</literal> declares the relations to be eager loaded. "
+"The generated SQL would look like this:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1571
+#, no-c-format
+msgid ""
+"SELECT t0_D.id, t0_D.name,\n"
+" t1_D_bs.id, t1_D_bs.name,\n"
+" t2_D_cs.id, t2_D_cs.name\n"
+" FROM D t0_D\n"
+" LEFT OUTER JOIN B t1_D_bs ON t0_D.id=t1_D_bs.D_FK\n"
+" LEFT OUTER JOIN C t2_D_cs ON t0_D.id=t2_D_cs.D_FK\n"
+" WHERE t0_D.id=?"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1572
+#, no-c-format
+msgid ""
+"For the <literal>D</literal> with the specific id we preload all its related "
+"<literal>B</literal>'s and <literal>C</literal>'s and can access "
+"those instance loading them from the read ahead cache, not from the database."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1578
+#, no-c-format
+msgid "D#findAll"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1579
+#, no-c-format
+msgid ""
+"In the same way, we could optimize the <literal>findAll</literal> method on "
+"<literal>D</literal> selects all the <literal>D</literal>'s. A normal "
+"findAll query would look like this:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1582
+#, no-c-format
+msgid "SELECT DISTINCT t0_o.id, t0_o.name FROM D t0_o ORDER BY t0_o.id DESC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1583
+#, no-c-format
+msgid ""
+"To preload the relations, we simply need to add the <literal>left-join</"
+"literal> elements to the query."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1586
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findAll</method-name>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[SELECT DISTINCT OBJECT(o) FROM D AS o ORDER "
+"BY o.id DESC]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>basic</eager-load-group>\n"
+" <left-join cmr-field=\"bs\" eager-load-group=\"basic\"/>\n"
+" <left-join cmr-field=\"cs\" eager-load-group=\"basic\"/>\n"
+" </read-ahead>\n"
+"</query>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1587
+#, no-c-format
+msgid "And here is the generated SQL:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1590
+#, no-c-format
+msgid ""
+"SELECT DISTINCT t0_o.id, t0_o.name,\n"
+" t1_o_bs.id, t1_o_bs.name,\n"
+" t2_o_cs.id, t2_o_cs.name\n"
+" FROM D t0_o\n"
+" LEFT OUTER JOIN B t1_o_bs ON t0_o.id=t1_o_bs.D_FK\n"
+" LEFT OUTER JOIN C t2_o_cs ON t0_o.id=t2_o_cs.D_FK\n"
+" ORDER BY t0_o.id DESC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1591
+#, fuzzy, no-c-format
+msgid ""
+"Now the simple <literal>findAll</literal> query now preloads the related "
+"<literal>B</literal> and <literal>C</literal> objects for each <literal>D</"
+"literal> object."
+msgstr ""
+"<literal>Alias</literal> 元素是 <literal>Host</literal> 参数的一个可选子参"
+"数。每个 <literal>Alias</literal> 为对应的 <literal>Host</literal> 指定一个"
+"替代的 DNS 名。"
+
+#. Tag: title
+#: The_CMP_Engine.xml:1597
+#, no-c-format
+msgid "A#findAll"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1598
+#, no-c-format
+msgid ""
+"Now let's look at a more complex configuration. Here we want to preload "
+"instance <literal>A</literal> along with several relations."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1603
+#, no-c-format
+msgid ""
+"its parent (self-relation) reached from <literal>A</literal> with CMR field "
+"<literal>parent</literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1608
+#, fuzzy, no-c-format
+msgid ""
+"the <literal>B</literal> reached from <literal>A</literal> with CMR field "
+"<literal>b</literal>, and the related <literal>C</literal> reached from "
+"<literal>B</literal> with CMR field <literal>c</literal>"
+msgstr ""
+"JAXP JAR是<literal>crimson.jar</literal>还是 <literal>xerces.jar</literal>依"
+"赖于<literal>Main</literal>入口的<literal>-j</literal>选项。缺省是"
+"<literal>crimson.jar</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1613
+#, no-c-format
+msgid ""
+"<literal>B</literal> reached from <literal>A</literal> but this time with "
+"CMR field <literal>b2</literal> and related to it <literal>C</literal> "
+"reached from B with CMR field c."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1618
+#, no-c-format
+msgid "For reference, the standard query would be:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1621
+#, no-c-format
+msgid "SELECT t0_o.id, t0_o.name FROM A t0_o ORDER BY t0_o.id DESC FOR UPDATE"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1622
+#, no-c-format
+msgid "The following metadata describes our preloading plan."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1625
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findAll</method-name>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[SELECT OBJECT(o) FROM A AS o ORDER BY o.id "
+"DESC]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>basic</eager-load-group>\n"
+" <left-join cmr-field=\"parent\" eager-load-group=\"basic\"/>\n"
+" <left-join cmr-field=\"b\" eager-load-group=\"basic\">\n"
+" <left-join cmr-field=\"c\" eager-load-group=\"basic\"/>\n"
+" </left-join>\n"
+" <left-join cmr-field=\"b2\" eager-load-group=\"basic\">\n"
+" <left-join cmr-field=\"c\" eager-load-group=\"basic\"/>\n"
+" </left-join>\n"
+" </read-ahead>\n"
+"</query>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1626
+#, no-c-format
+msgid "The SQL query generated would be:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1629
+#, no-c-format
+msgid ""
+"SELECT t0_o.id, t0_o.name,\n"
+" t1_o_parent.id, t1_o_parent.name,\n"
+" t2_o_b.id, t2_o_b.name,\n"
+" t3_o_b_c.id, t3_o_b_c.name,\n"
+" t4_o_b2.id, t4_o_b2.name,\n"
+" t5_o_b2_c.id, t5_o_b2_c.name\n"
+" FROM A t0_o\n"
+" LEFT OUTER JOIN A t1_o_parent ON t0_o.PARENT=t1_o_parent.id\n"
+" LEFT OUTER JOIN B t2_o_b ON t0_o.B_FK=t2_o_b.id\n"
+" LEFT OUTER JOIN C t3_o_b_c ON t2_o_b.C_FK=t3_o_b_c.id\n"
+" LEFT OUTER JOIN B t4_o_b2 ON t0_o.B2_FK=t4_o_b2.id\n"
+" LEFT OUTER JOIN C t5_o_b2_c ON t4_o_b2.C_FK=t5_o_b2_c.id\n"
+" ORDER BY t0_o.id DESC FOR UPDATE"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1630
+#, no-c-format
+msgid ""
+"With this configuration, you can navigate CMRs from any found instance of "
+"<literal>A</literal> without an additional database load."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1636
+#, no-c-format
+msgid "A#findMeParentGrandParent"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1637
+#, no-c-format
+msgid ""
+"Here is another example of self-relation. Suppose, we want to write a method "
+"that would preload an instance, its parent, grand-parent and its grand-grand-"
+"parent in one query. To do this, we would used nested <literal>left-join</"
+"literal> declaration."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1640
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findMeParentGrandParent</method-name>\n"
+" <method-params>\n"
+" <method-param>java.lang.Long</method-param>\n"
+" </method-params>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[SELECT OBJECT(o) FROM A AS o WHERE o.id = ?"
+"1]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>*</eager-load-group>\n"
+" <left-join cmr-field=\"parent\" eager-load-group=\"basic\">\n"
+" <left-join cmr-field=\"parent\" eager-load-group=\"basic"
+"\">\n"
+" <left-join cmr-field=\"parent\" eager-load-group=\"basic"
+"\"/>\n"
+" </left-join>\n"
+" </left-join>\n"
+" </read-ahead>\n"
+"</query>"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1644
+#, no-c-format
+msgid ""
+"SELECT t0_o.id, t0_o.name, t0_o.secondName, t0_o.B_FK, t0_o.B2_FK, t0_o."
+"PARENT,\n"
+" t1_o_parent.id, t1_o_parent.name,\n"
+" t2_o_parent_parent.id, t2_o_parent_parent.name,\n"
+" t3_o_parent_parent_parent.id, t3_o_parent_parent_parent.name\n"
+" FROM A t0_o\n"
+" LEFT OUTER JOIN A t1_o_parent ON t0_o.PARENT=t1_o_parent.id\n"
+" LEFT OUTER JOIN A t2_o_parent_parent ON t1_o_parent."
+"PARENT=t2_o_parent_parent.id\n"
+" LEFT OUTER JOIN A t3_o_parent_parent_parent \n"
+" ON t2_o_parent_parent.PARENT=t3_o_parent_parent_parent.id\n"
+" WHERE (t0_o.id = ?) FOR UPDATE"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1645
+#, no-c-format
+msgid ""
+"Note, if we remove <literal>left-join</literal> metadata we will have only"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1648
+#, no-c-format
+msgid ""
+"SELECT t0_o.id, t0_o.name, t0_o.secondName, t0_o.B2_FK, t0_o.PARENT FOR "
+"UPDATE"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1654
+#, no-c-format
+msgid "on-load"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1655
+#, no-c-format
+msgid ""
+"The <literal>on-load</literal> strategy block-loads additional data for "
+"several entities when an entity is loaded, starting with the requested "
+"entity and the next several entities in the order they were selected. This "
+"strategy is based on the theory that the results of a find or select will be "
+"accessed in forward order. When a query is executed, JBoss stores the order "
+"of the entities found in the list cache. Later, when one of the entities is "
+"loaded, JBoss uses this list to determine the block of entities to load. The "
+"number of lists stored in the cache is specified with the <literal>list-"
+"cachemax</literal> element of the entity. This strategy is also used when "
+"faulting in data not loaded in the <literal>on-find</literal> strategy."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1658
+#, fuzzy, no-c-format
+msgid ""
+"As with the <literal>on-find</literal> strategy, <literal>on-load</literal> "
+"is declared in the <literal>read-ahead</literal> element. The <literal>on-"
+"load</literal> configuration for this example is shown below."
+msgstr ""
+"JAXP JAR是<literal>crimson.jar</literal>还是 <literal>xerces.jar</literal>依"
+"赖于<literal>Main</literal>入口的<literal>-j</literal>选项。缺省是"
+"<literal>crimson.jar</literal>。"
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1661
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!-- ... -->\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findAll_onload</method-name>\n"
+" <method-params/>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[\n"
+" SELECT OBJECT(g)\n"
+" FROM gangster g\n"
+" ORDER BY g.gangsterId\n"
+" ]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>on-load</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>basic</eager-load-group>\n"
+" </read-ahead>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1662
+#, no-c-format
+msgid ""
+"With this strategy, the query for the finder method in remains unchanged."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1665
+#, no-c-format
+msgid ""
+"SELECT t0_g.id\n"
+" FROM gangster t0_g\n"
+" ORDER BY t0_g.id ASC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1666
+#, no-c-format
+msgid ""
+"However, the data will be loaded differently as we iterate through the "
+"result set. For a page size of four, JBoss will only need to execute the "
+"following two queries to load the <literal>name</literal>, "
+"<literal>nickName</literal> and <literal>badness</literal> fields for the "
+"entities:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1669
+#, no-c-format
+msgid ""
+"SELECT id, name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=0) OR (id=1) OR (id=2) OR (id=3)\n"
+"SELECT id, name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=4) OR (id=5) OR (id=6) OR (id=7)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1670
+#, no-c-format
+msgid "The following table shows the execution of these queries:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1674
+#, no-c-format
+msgid "on-load Optimized Query Execution"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1865
+#, no-c-format
+msgid "none"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1866
+#, no-c-format
+msgid ""
+"The <literal>none</literal> strategy is really an anti-strategy. This "
+"strategy causes the system to fall back to the default lazy-load code, and "
+"specifically does not read-ahead any data or remember the order of the found "
+"entities. This results in the queries and performance shown at the beginning "
+"of this chapter. The none strategy is declared with a read-ahead element. If "
+"the <literal>read-ahead</literal> element contains a <literal>page-size</"
+"literal> element or <literal>eager-load-group</literal>, it is ignored. The "
+"none strategy is declared the following example."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1869
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!-- ... -->\n"
+" <query>\n"
+" <query-method>\n"
+" <method-name>findAll_none</method-name>\n"
+" <method-params/>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[\n"
+" SELECT OBJECT(g)\n"
+" FROM gangster g\n"
+" ORDER BY g.gangsterId\n"
+" ]]></jboss-ql>\n"
+" <read-ahead>\n"
+" <strategy>none</strategy>\n"
+" </read-ahead>\n"
+" </query>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <entity> \n"
+" <ejb-name>nextgen.EnterpriseEntity</ejb-"
+"name> \n"
+" <jndi-name>nextgen.EnterpriseEntity</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces."
+"FirstAvailable \n"
+" </bean-load-balance-policy> \n"
+" </cluster-config> \n"
+" </entity> \n"
+" </enterprise-beans> \n"
+"</jboss>"
+
+#. Tag: title
+#: The_CMP_Engine.xml:1877
+#, fuzzy, no-c-format
+msgid "Loading Process"
+msgstr "负载平衡策略"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1878
+#, no-c-format
+msgid ""
+"In the previous section several steps use the phrase \"when the entity is "
+"loaded.\" This was intentionally left vague because the commit option "
+"specified for the entity and the current state of the transaction determine "
+"when an entity is loaded. The following section describes the commit options "
+"and the loading processes."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1882
+#, no-c-format
+msgid "Commit Options"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1883
+#, no-c-format
+msgid ""
+"Central to the loading process are the commit options, which control when "
+"the data for an entity expires. JBoss supports four commit options "
+"<literal>A</literal>, <literal>B</literal>, <literal>C</literal> and "
+"<literal>D</literal>. The first three are described in the Enterprise "
+"JavaBeans Specification, but the last one is specific to JBoss. A detailed "
+"description of each commit option follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1888
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">A</emphasis>: JBoss assumes it is the sole user of "
+"the database; therefore, JBoss can cache the current value of an entity "
+"between transactions, which can result is substantial performance gains. As "
+"a result of this assumption, no data managed by JBoss can be changed outside "
+"of JBoss. For example, changing data in another program or with the use of "
+"direct JDBC (even within JBoss) will result in an inconsistent database "
+"state."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1893
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">B</emphasis>: JBoss assumes that there is more than "
+"one user of the database but keeps the context information about entities "
+"between transactions. This context information is used for optimizing "
+"loading of the entity. This is the default commit option."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1898
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">C</emphasis>: JBoss discards all entity context "
+"information at the end of the transaction."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含操作的名字。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1903
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">D</emphasis>: This is a JBoss specific commit "
+"option. This option is similar to commit option <literal>A</literal>, except "
+"that the data only remains valid for a specified amount of time."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1908
+#, no-c-format
+msgid ""
+"The commit option is declared in the <literal>jboss.xml</literal> file. For "
+"a detailed description of this file see <xref linkend=\"EJBs_on_JBoss\"/>. "
+"The following example changes the commit option to <literal>A</literal> for "
+"all entity beans in the application:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1911
+#, no-c-format
+msgid "The jboss.xml Commit Option Declaration"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1912
+#, no-c-format
+msgid ""
+"<jboss>\n"
+" <container-configurations>\n"
+" <container-configuration>\n"
+" <container-name>Standard CMP 2.x EntityBean</container-"
+"name>\n"
+" <commit-option>A</commit-option>\n"
+" </container-configuration>\n"
+" </container-configurations>\n"
+"</jboss>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1917
+#, no-c-format
+msgid "Eager-loading Process"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1918
+#, no-c-format
+msgid ""
+"When an entity is loaded, JBoss must determine the fields that need to be "
+"loaded. By default, JBoss will use the <literal>eager-load-group</literal> "
+"of the last query that selected this entity. If the entity has not been "
+"selected in a query, or the last query used the <literal>none</literal> read-"
+"ahead strategy, JBoss will use the default <literal>eager-load-group</"
+"literal> declared for the entity. In the following example configuration, "
+"the <literal>basic</literal> load group is set as the default <literal>eager-"
+"load-group</literal> for the gangster entity bean:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1921
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!-- ... -->\n"
+" <load-groups>\n"
+" <load-group>\n"
+" <load-group-name>most</load-group-name>\n"
+" <field-name>name</field-name>\n"
+" <field-name>nickName</field-name>\n"
+" <field-name>badness</field-name>\n"
+" <field-name>hangout</field-name>\n"
+" <field-name>organization</field-name>\n"
+" </load-group>\n"
+" </load-groups>\n"
+" <eager-load-group>most</eager-load-group>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1922
+#, no-c-format
+msgid ""
+"The eager loading process is initiated the first time a method is called on "
+"an entity in a transaction. A detailed description of the load process "
+"follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1927
+#, no-c-format
+msgid ""
+"If the entity context is still valid, no loading is necessary, and therefore "
+"the loading process is done. The entity context will be valid when using "
+"commit option <literal>A</literal>, or when using commit option <literal>D</"
+"literal>, and the data has not timed out."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1932
+#, no-c-format
+msgid ""
+"Any residual data in the entity context is flushed. This assures that old "
+"data does not bleed into the new load."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1937
+#, no-c-format
+msgid ""
+"The primary key value is injected back into the primary key fields. The "
+"primary key object is actually independent of the fields and needs to be "
+"reloaded after the flush in step 2."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1942 The_CMP_Engine.xml:1975
+#, no-c-format
+msgid ""
+"All data in the preload cache for this entity is loaded into the fields."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1947
+#, no-c-format
+msgid ""
+"JBoss determines the additional fields that still need to be loaded. "
+"Normally the fields to load are determined by the eager-load group of the "
+"entity, but can be overridden if the entity was located using a query or CMR "
+"field with an <literal>on-find</literal> or <literal>on-load</literal> read "
+"ahead strategy. If all of the fields have already been loaded, the load "
+"process skips to step 7."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1952
+#, no-c-format
+msgid ""
+"A query is executed to select the necessary column. If this entity is using "
+"the <literal>on-load</literal> strategy, a page of data is loaded as "
+"described in <xref linkend=\"Read_ahead-on_load\"/>. The data for the "
+"current entity is stored in the context and the data for the other entities "
+"is stored in the preload cache."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1957
+#, fuzzy, no-c-format
+msgid "The <literal>ejbLoad</literal> method of the entity is called."
+msgstr "<literal>attribute</literal>元素所支持的属性包括:"
+
+#. Tag: title
+#: The_CMP_Engine.xml:1965
+#, fuzzy, no-c-format
+msgid "Lazy loading Process"
+msgstr "负载平衡策略"
+
+#. Tag: para
+#: The_CMP_Engine.xml:1966
+#, no-c-format
+msgid ""
+"Lazy loading is the other half of eager loading. If a field is not eager "
+"loaded, it must be lazy loaded. When an access to an unloaded field of a "
+"bean is made, JBoss loads the field and all the fields of any <literal>lazy-"
+"load-group</literal> the field belong to. JBoss performs a set join and then "
+"removes any field that is already loaded. An example configuration is shown "
+"below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:1969
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>GangsterEJB</ejb-name>\n"
+" <!-- ... -->\n"
+" <load-groups>\n"
+" <load-group>\n"
+" <load-group-name>basic</load-group-name>\n"
+" <field-name>name</field-name>\n"
+" <field-name>nickName</field-name>\n"
+" <field-name>badness</field-name>\n"
+" </load-group>\n"
+" <load-group>\n"
+" <load-group-name>contact info</load-group-"
+"name>\n"
+" <field-name>nickName</field-name>\n"
+" <field-name>contactInfo</field-name>\n"
+" <field-name>hangout</field-name>\n"
+" </load-group>\n"
+" </load-groups>\n"
+" <!-- ... -->\n"
+" <lazy-load-groups>\n"
+" <load-group-name>basic</load-group-name>\n"
+" <load-group-name>contact info</load-group-name>\n"
+" </lazy-load-groups>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1970
+#, no-c-format
+msgid ""
+"When the bean provider calls <literal>getName()</literal> with this "
+"configuration, JBoss loads <literal>name</literal>, <literal>nickName</"
+"literal> and <literal>badness</literal>, assuming they are not already "
+"loaded. When the bean provider calls <literal>getNickName()</literal>, the "
+"<literal>name</literal>, <literal>nickName</literal>, <literal>badness</"
+"literal>, <literal>contactInfo</literal>, and <literal>hangout</literal> are "
+"loaded. A detailed description of the lazy loading process follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1980
+#, no-c-format
+msgid ""
+"If the field value was loaded by the preload cache the lazy load process is "
+"finished."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1985
+#, no-c-format
+msgid ""
+"JBoss finds all of the lazy load groups that contain this field, performs a "
+"set join on the groups, and removes any field that has already been loaded."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1990
+#, no-c-format
+msgid ""
+"A query is executed to select the necessary columns. As in the basic load "
+"process, JBoss may load a block of entities. The data for the current entity "
+"is stored in the context and the data for the other entities is stored in "
+"the preload cache."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:1996
+#, no-c-format
+msgid "Relationships"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:1997
+#, no-c-format
+msgid ""
+"Relationships are a special case in lazy loading because a CMR field is both "
+"a field and query. As a field it can be <literal>on-load</literal> block "
+"loaded, meaning the value of the currently sought entity and the values of "
+"the CMR field for the next several entities are loaded. As a query, the "
+"field values of the related entity can be preloaded using <literal>on-find</"
+"literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2000
+#, no-c-format
+msgid ""
+"Again, the easiest way to investigate the loading is to look at a usage "
+"scenario. In this example, an HTML table is generated containing each "
+"gangster and their hangout. The example code follows:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2003
+#, no-c-format
+msgid "Relationship Lazy Loading Example Code"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2004
+#, no-c-format
+msgid ""
+"public String createGangsterHangoutHtmlTable() \n"
+" throws FinderException\n"
+"{\n"
+" StringBuffer table = new StringBuffer();\n"
+" table.append(\"<table>\");\n"
+" Collection gangsters = gangsterHome.findAll_onfind();\n"
+" for (Iterator iter = gangsters.iterator(); iter.hasNext(); ) {\n"
+" Gangster gangster = (Gangster)iter.next();\n"
+"\n"
+" Location hangout = gangster.getHangout();\n"
+" table.append(\"<tr>\");\n"
+" table.append(\"<td>\").append(gangster.getName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getNickName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getBadness());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(hangout.getCity());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(hangout.getState());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(hangout.getZipCode());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"</tr>\");\n"
+" }\n"
+"\n"
+" table.append(\"</table>\");return table.toString();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2005
+#, no-c-format
+msgid ""
+"For this example, the configuration of the gangster's "
+"<literal>findAll_onfind</literal> query is unchanged from the <literal>on-"
+"find</literal> section. The configuration of the <literal>Location</literal> "
+"entity and <literal>Gangster-Hangout</literal> relationship follows:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2008
+#, no-c-format
+msgid "The jbosscmp-jdbc.xml Relationship Lazy Loading Configuration"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2009
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>LocationEJB</ejb-name>\n"
+" <load-groups>\n"
+" <load-group>\n"
+" <load-group-name>quick info</load-group-"
+"name>\n"
+" <field-name>city</field-name>\n"
+" <field-name>state</field-name>\n"
+" <field-name>zipCode</field-name>\n"
+" </load-group>\n"
+" </load-groups>\n"
+" <eager-load-group/>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+" <relationships>\n"
+" <ejb-relation>\n"
+" <ejb-relation-name>Gangster-Hangout</ejb-relation-"
+"name>\n"
+" <foreign-key-mapping/>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>\n"
+" gangster-has-a-hangout\n"
+" </ejb-relationship-role-name>\n"
+" <key-fields/>\n"
+" <read-ahead>\n"
+" <strategy>on-find</strategy>\n"
+" <page-size>4</page-size>\n"
+" <eager-load-group>quick info</eager-load-"
+"group>\n"
+" </read-ahead>\n"
+" </ejb-relationship-role>\n"
+" <ejb-relationship-role>\n"
+" <ejb-relationship-role-name>\n"
+" hangout-for-a-gangster\n"
+" </ejb-relationship-role-name>\n"
+" <key-fields>\n"
+" <key-field>\n"
+" <field-name>locationID</field-name>\n"
+" <column-name>hangout</column-name>\n"
+" </key-field>\n"
+" </key-filaelds>\n"
+" </ejb-relationship-role>\n"
+" </ejb-relation>\n"
+" </relationships>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2010
+#, no-c-format
+msgid "JBoss will execute the following query for the finder:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2013
+#, no-c-format
+msgid ""
+"SELECT t0_g.id, t0_g.name, t0_g.nick_name, t0_g.badness\n"
+" FROM gangster t0_g\n"
+" ORDER BY t0_g.id ASC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2014
+#, no-c-format
+msgid ""
+"Then when the hangout is accessed, JBoss executes the following two queries "
+"to load the <literal>city</literal>, <literal>state</literal>, and "
+"<literal>zip</literal> fields of the hangout:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2017
+#, no-c-format
+msgid ""
+"SELECT gangster.id, gangster.hangout,\n"
+" location.city, location.st, location.zip\n"
+" FROM gangster, location\n"
+" WHERE (gangster.hangout=location.id) AND\n"
+" ((gangster.id=0) OR (gangster.id=1) OR\n"
+" (gangster.id=2) OR (gangster.id=3))\n"
+"SELECT gangster.id, gangster.hangout,\n"
+" location.city, location.st, location.zip\n"
+" FROM gangster, location\n"
+" WHERE (gangster.hangout=location.id) AND\n"
+" ((gangster.id=4) OR (gangster.id=5) OR\n"
+" (gangster.id=6) OR (gangster.id=7))"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2022
+#, no-c-format
+msgid "on-find Optimized Relationship Query Execution"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2053
+#, fuzzy, no-c-format
+msgid "city"
+msgstr "client"
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2056
+#, no-c-format
+msgid "<entry>st</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2059
+#, no-c-format
+msgid "<entry>zip</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2084 The_CMP_Engine.xml:2113 The_CMP_Engine.xml:2142
+#: The_CMP_Engine.xml:2171 The_CMP_Engine.xml:2200
+#, no-c-format
+msgid "San Fran"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2087 The_CMP_Engine.xml:2116 The_CMP_Engine.xml:2145
+#: The_CMP_Engine.xml:2174 The_CMP_Engine.xml:2203
+#, no-c-format
+msgid "<entry>CA</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2090
+#, no-c-format
+msgid "94108"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2119 The_CMP_Engine.xml:2148 The_CMP_Engine.xml:2177
+#: The_CMP_Engine.xml:2206
+#, no-c-format
+msgid "94133"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2229
+#, no-c-format
+msgid "New York"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2232
+#, no-c-format
+msgid "<entry>NY</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2235
+#, no-c-format
+msgid "10017"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2258
+#, no-c-format
+msgid "Chicago"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2261
+#, no-c-format
+msgid "<entry>IL</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2264
+#, no-c-format
+msgid "60661"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2287
+#, no-c-format
+msgid "Las Vegas"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2290
+#, no-c-format
+msgid "<entry>NV</entry>"
+msgstr ""
+
+#. Tag: entry
+#: The_CMP_Engine.xml:2293
+#, no-c-format
+msgid "89109"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2305
+#, no-c-format
+msgid "Lazy loading result sets"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2306
+#, no-c-format
+msgid ""
+"By default, when a multi-object finder or select method is executed the JDBC "
+"result set is read to the end immediately. The client receives a collection "
+"of <literal>EJBLocalObject</literal> or CMP field values which it can then "
+"iterate through. For big result sets this approach is not efficient. In some "
+"cases it is better to delay reading the next row in the result set until the "
+"client tries to read the corresponding value from the collection. You can "
+"get this behavior for a query using the <literal>lazy-resultset-loading</"
+"literal> element."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2309
+#, no-c-format
+msgid ""
+"<query>\n"
+" <query-method>\n"
+" <method-name>findAll</method-name>\n"
+" </query-method>\n"
+" <jboss-ql><![CDATA[select object(o) from A o]]></jboss-"
+"ql>\n"
+" <emphasis role=\"bold\"><lazy-resultset-loading>true</lazy-"
+"resultset-loading></emphasis>\n"
+"</query>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2310
+#, no-c-format
+msgid ""
+"The are some issues you should be aware of when using lazy result set "
+"loading. Special care should be taken when working with a "
+"<literal>Collection</literal> associated with a lazily loaded result set. "
+"The first call to <literal>iterator()</literal> returns a special "
+"<literal>Iterator</literal> that reads from the <literal>ResultSet</"
+"literal>. Until this <literal>Iterator</literal> has been exhausted, "
+"subsequent calls to <literal>iterator()</literal> or calls to the "
+"<literal>add()</literal> method will result in an exception. The "
+"<literal>remove()</literal> and <literal>size()</literal> methods work as "
+"would be expected."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2318
+#, fuzzy, no-c-format
+msgid "Transactions"
+msgstr "The Operations"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2319
+#, no-c-format
+msgid ""
+"All of the examples presented in this chapter have been defined to run in a "
+"transaction. Transaction granularity is a dominating factor in optimized "
+"loading because transactions define the lifetime of preloaded data. If the "
+"transaction completes, commits, or rolls back, the data in the preload cache "
+"is lost. This can result in a severe negative performance impact."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2322
+#, no-c-format
+msgid ""
+"The performance impact of running without a transaction will be demonstrated "
+"with an example that uses an <literal>on-find</literal> optimized query that "
+"selects the first four gangsters (to keep the result set small), and it is "
+"executed without a wrapper transaction. The example code follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2325
+#, no-c-format
+msgid ""
+"public String createGangsterHtmlTable_no_tx() throws FinderException\n"
+"{\n"
+" StringBuffer table = new StringBuffer();\n"
+" table.append(\"<table>\");\n"
+"\n"
+" Collection gangsters = gangsterHome.findFour();\n"
+" for(Iterator iter = gangsters.iterator(); iter.hasNext(); ) {\n"
+" Gangster gangster = (Gangster)iter.next();\n"
+" table.append(\"<tr>\");\n"
+" table.append(\"<td>\").append(gangster.getName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getNickName());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"<td>\").append(gangster.getBadness());\n"
+" table.append(\"</td>\");\n"
+" table.append(\"</tr>\");\n"
+" }\n"
+" \n"
+" table.append(\"</table>\");\n"
+" return table.toString();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2326
+#, fuzzy, no-c-format
+msgid "The finder results in the following query being executed:"
+msgstr "HttpInvoker 支持下面的属性:"
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2329
+#, no-c-format
+msgid ""
+"SELECT t0_g.id, t0_g.name, t0_g.nick_name, t0_g.badness\n"
+" FROM gangster t0_g\n"
+" WHERE t0_g.id < 4\n"
+" ORDER BY t0_g.id ASC"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2330
+#, no-c-format
+msgid ""
+"Normally this would be the only query executed, but since this code is not "
+"running in a transaction, all of the preloaded data is thrown away as soon "
+"as finder returns. Then when the CMP field is accessed JBoss executes the "
+"following four queries (one for each loop):"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2333
+#, no-c-format
+msgid ""
+"SELECT id, name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=0) OR (id=1) OR (id=2) OR (id=3)\n"
+"SELECT id, name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=1) OR (id=2) OR (id=3)\n"
+"SELECT id, name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=2) OR (id=3)\n"
+"SELECT name, nick_name, badness\n"
+" FROM gangster\n"
+" WHERE (id=3)"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2334
+#, no-c-format
+msgid ""
+"It's actually worse than this. JBoss executes each of these queries "
+"three times; once for each CMP field that is accessed. This is because the "
+"preloaded values are discarded between the CMP field accessor calls."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2337
+#, no-c-format
+msgid "The following figure shows the execution of the queries:"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2341
+#, no-c-format
+msgid "No Transaction on-find optimized query execution"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2348
+#, no-c-format
+msgid ""
+"This performance is much worse than read ahead none because of the amount of "
+"data loaded from the database. The number of rows loaded is determined by "
+"the following equation:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2356
+#, no-c-format
+msgid ""
+"This all happens because the transaction in the example is bounded by a "
+"single call on the entity. This brings up the important question \"How do I "
+"run my code in a transaction?\" The answer depends on where the code runs. "
+"If it runs in an EJB (session, entity, or message driven), the method must "
+"be marked with the <literal>Required</literal> or <literal>RequiresNew</"
+"literal><literal>trans-attribute</literal> in the <literal>assembly-"
+"descriptor</literal>. If the code is not running in an EJB, a user "
+"transaction is necessary. The following code wraps a call to the declared "
+"method with a user transaction:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2359
+#, no-c-format
+msgid ""
+"public String createGangsterHtmlTable_with_tx()\n"
+" throws FinderException\n"
+"{\n"
+" UserTransaction tx = null;\n"
+" try {\n"
+" InitialContext ctx = new InitialContext();\n"
+" tx = (UserTransaction) ctx.lookup(\"UserTransaction\");\n"
+" tx.begin();\n"
+"\n"
+" String table = createGangsterHtmlTable_no_tx();\n"
+" \n"
+" if (tx.getStatus() == Status.STATUS_ACTIVE) {\n"
+" tx.commit();\n"
+" }\n"
+" return table;\n"
+" } catch (Exception e) {\n"
+" try {\n"
+" if (tx != null) tx.rollback();\n"
+" } catch (SystemException unused) {\n"
+" // eat the exception we are exceptioning out anyway\n"
+" }\n"
+" if (e instanceof FinderException) {\n"
+" throw (FinderException) e;\n"
+" }\n"
+" if (e instanceof RuntimeException) {\n"
+" throw (RuntimeException) e;\n"
+" }\n"
+"\n"
+" throw new EJBException(e);\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2363
+#, no-c-format
+msgid "Optimistic Locking"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2364
+#, no-c-format
+msgid ""
+"JBoss has supports for optimistic locking of entity beans. Optimistic "
+"locking allows multiple instances of the same entity bean to be active "
+"simultaneously. Consistency is enforced based on the optimistic locking "
+"policy choice. The optimistic locking policy choice defines the set of "
+"fields that are used in the commit time write of modified data to the "
+"database. The optimistic consistency check asserts that the values of the "
+"chosen set of fields has the same values in the database as existed when the "
+"current transaction was started. This is done using a <literal>select for "
+"UPDATE WHERE ...</literal> statement that contains the value assertions."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2367
+#, no-c-format
+msgid ""
+"You specify the optimistic locking policy choice using an "
+"<literal>optimistic-locking</literal> element in the <literal>jbosscmp-jdbc."
+"xml</literal> descriptor. The content model of the <literal>optimistic-"
+"locking</literal> element is shown below and the description of the elements "
+"follows."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2371
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc optimistic-locking element content model"
+msgstr "The XMBean notification element and content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2380
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">group-name</emphasis>: This element specifies that "
+"optimistic locking is based on the fields of a <literal>load-group</"
+"literal>. This value of this element must match one of the entity's "
+"<literal>load-group-name</literal>. The fields in this group will be used "
+"for optimistic locking."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2385
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">modified-strategy</emphasis>: This element specifies "
+"that optimistic locking is based on the modified fields. This strategy "
+"implies that the fields that were modified during transaction will be used "
+"for optimistic locking."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2390
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-strategy</emphasis>: This element specifies "
+"that optimistic locking is based on the fields read. This strategy implies "
+"that the fields that were read/changed in the transaction will be used for "
+"optimistic locking."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2395
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">version-column</emphasis>: This element specifies "
+"that optimistic locking is based on a version column strategy. Specifying "
+"this element will add an additional version field of type <literal>java.lang."
+"Long</literal> to the entity bean for optimistic locking. Each update of the "
+"entity will increase the value of this field. The <literal>field-name</"
+"literal> element allows for the specification of the name of the CMP field "
+"while the <literal>column-name</literal> element allows for the "
+"specification of the corresponding table column."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2400
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">timestamp-column</emphasis>: This element specifies "
+"that optimistic locking is based on a timestamp column strategy. Specifying "
+"this element will add an additional version field of type <literal>java.util."
+"Date</literal> to the entity bean for optimistic locking. Each update of the "
+"entity will set the value of this field to the current time. The "
+"<literal>field-name</literal> element allows for the specification of the "
+"name of the CMP field while the <literal>column-name</literal> element "
+"allows for the specification of the corresponding table column."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2405
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">key-generator-factory</emphasis>: This element "
+"specifies that optimistic locking is based on key generation. The value of "
+"the element is the JNDI name of a <literal>org.jboss.ejb.plugins."
+"keygenerator.KeyGeneratorFactory</literal> implementation. Specifying this "
+"element will add an additional version field to the entity bean for "
+"optimistic locking. The type of the field must be specified via the "
+"<literal>field-type</literal> element. Each update of the entity will update "
+"the key field by obtaining a new value from the key generator. The "
+"<literal>field-name</literal> element allows for the specification of the "
+"name of the CMP field while the <literal>column-name</literal> element "
+"allows for the specification of the corresponding table column."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2410
+#, no-c-format
+msgid ""
+"A sample <literal>jbosscmp-jdbc.xml</literal> descriptor illustrating all of "
+"the optimistic locking strategies is given below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2413
+#, no-c-format
+msgid ""
+"<!DOCTYPE jbosscmp-jdbc PUBLIC \n"
+" \"-//JBoss//DTD JBOSSCMP-JDBC 3.2//EN\"\n"
+" \"http://www.jboss.org/j2ee/dtd/jbosscmp-jdbc_3_2.dtd\">\n"
+"<jbosscmp-jdbc>\n"
+" <defaults>\n"
+" <datasource>java:/DefaultDS</datasource>\n"
+" <datasource-mapping>Hypersonic SQL</datasource-mapping>\n"
+" </defaults>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>EntityGroupLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entitygrouplocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <load-groups>\n"
+" <load-group>\n"
+" <load-group-name>string</load-group-name>\n"
+" <field-name>stringField</field-name>\n"
+" </load-group>\n"
+" <load-group>\n"
+" <load-group-name>all</load-group-name>\n"
+" <field-name>stringField</field-name>\n"
+" <field-name>dateField</field-name>\n"
+" </load-group>\n"
+" </load-groups>\n"
+" <optimistic-locking>\n"
+" <group-name>string</group-name>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>EntityModifiedLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entitymodifiedlocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <optimistic-locking>\n"
+" <modified-strategy/>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>EntityReadLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entityreadlocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <optimistic-locking>\n"
+" <read-strategy/>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>EntityVersionLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entityversionlocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <optimistic-locking>\n"
+" <version-column/>\n"
+" <field-name>versionField</field-name>\n"
+" <column-name>ol_version</column-name>\n"
+" <jdbc-type>INTEGER</jdbc-type>\n"
+" <sql-type>INTEGER(5)</sql-type>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>EntityTimestampLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entitytimestamplocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <optimistic-locking>\n"
+" <timestamp-column/>\n"
+" <field-name>versionField</field-name>\n"
+" <column-name>ol_timestamp</column-name>\n"
+" <jdbc-type>TIMESTAMP</jdbc-type>\n"
+" <sql-type>DATETIME</sql-type>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" <entity>\n"
+" <ejb-name>EntityKeyGeneratorLocking</ejb-name>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>true</remove-table>\n"
+" <table-name>entitykeygenlocking</table-name>\n"
+" <cmp-field>\n"
+" <field-name>dateField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>integerField</field-name>\n"
+" </cmp-field>\n"
+" <cmp-field>\n"
+" <field-name>stringField</field-name>\n"
+" </cmp-field>\n"
+" <optimistic-locking>\n"
+" <key-generator-factory>UUIDKeyGeneratorFactory</key-"
+"generator-factory>\n"
+" <field-type>java.lang.String</field-type>\n"
+" <field-name>uuidField</field-name>\n"
+" <column-name>ol_uuid</column-name>\n"
+" <jdbc-type>VARCHAR</jdbc-type>\n"
+" <sql-type>VARCHAR(32)</sql-type>\n"
+" </optimistic-locking>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2417
+#, no-c-format
+msgid "Entity Commands and Primary Key Generation"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2418
+#, no-c-format
+msgid ""
+"Support for primary key generation outside of the entity bean is available "
+"through custom implementations of the entity creation command objects used "
+"to insert entities into a persistent store. The list of available commands "
+"is specified in entity-commands element of the <literal>jbosscmp-jdbc.xml</"
+"literal> descriptor. The default <literal>entity-command</literal> may be "
+"specified in the <literal>jbosscmp-jdbc.xml</literal> in defaults element. "
+"Each entity element can override the <literal>entity-command</literal> in "
+"defaults by specifying its own <literal>entity-command</literal>. The "
+"content model of the <literal>entity-commands</literal> and child elements "
+"is given below."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2422
+#, no-c-format
+msgid "The jbosscmp-jdbc.xml entity-commands element model"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2429
+#, no-c-format
+msgid ""
+"Each <literal>entity-command</literal> element specifies an entity "
+"generation implementation. The <literal>name</literal> attribute specifies a "
+"name that allows the command defined in an <literal>entity-commands</"
+"literal> section to be referenced in the defaults and entity elements. The "
+"<literal>class</literal> attribute specifies the implementation of the "
+"<literal>org.jboss.ejb.plugins.cmp.jdbc</literal>. "
+"<literal>JDBCCreateEntityCommand</literal> that supports the key generation. "
+"Database vendor specific commands typically subclass the <literal>org.jboss."
+"ejb.plugins.cmp.jdbc</literal>. <literal>JDBCIdentityColumnCreateCommand</"
+"literal> if the database generates the primary key as a side effect of doing "
+"an insert, or the <literal>org.jboss.ejb.plugins.cmp.jdbc."
+"JDBCInsertPKCreateCommand</literal> if the command must insert the generated "
+"key."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2432
+#, no-c-format
+msgid ""
+"The optional <literal>attribute</literal> element(s) allows for the "
+"specification of arbitrary name/value property pairs that will be available "
+"to the entity command implementation class. The <literal>attribute</literal> "
+"element has a required <literal>name</literal> attribute that specifies the "
+"name property, and the <literal>attribute</literal> element content is the "
+"value of the property. The attribute values are accessible through the "
+"<literal>org.jboss.ejb.plugins.cmp.jdbc.metadata.JDBCEntityCommandMetaData."
+"getAttribute</literal>(String) method."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2436
+#, no-c-format
+msgid "Existing Entity Commands"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2437
+#, no-c-format
+msgid ""
+"The following are the current <literal>entity-command</literal> definitions "
+"found in the <literal>standardjbosscmp-jdbc.xml</literal> descriptor:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2442
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">default</emphasis>: (<literal>org.jboss.ejb.plugins."
+"cmp.jdbc.JDBCCreateEntityCommand</literal>) The "
+"<literal>JDBCCreateEntityCommand</literal> is the default entity creation as "
+"it is the <literal>entity-command</literal> referenced in the "
+"<literal>standardjbosscmp-jdbc.xml</literal> defaults element. This entity-"
+"command executes an <literal>INSERT INTO</literal> query using the assigned "
+"primary key value."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2447
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">no-select-before-insert</emphasis>: (<literal>org."
+"jboss.ejb.plugins.cmp.jdbc.JDBCCreateEntityCommand</literal>) This is a "
+"variation on <literal>default</literal> that skips select before insert by "
+"specifying an attribute <literal>name=\"SQLExceptionProcessor\"</literal> "
+"that points to the <literal>jboss.jdbc:service=SQLExceptionProcessor</"
+"literal> service. The <literal>SQLExceptionProcessor</literal> service "
+"provides a <literal>boolean isDuplicateKey(SQLException e)</literal> "
+"operation that allows a for determination of any unique constraint violation."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2452
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">pk-sql</emphasis> (<literal>org.jboss.ejb.plugins."
+"cmp.jdbc.keygen.JDBCPkSqlCreateCommand</literal>) The "
+"<literal>JDBCPkSqlCreateCommand</literal> executes an <literal>INSERT INTO</"
+"literal> query statement provided by the <literal>pk-sql</literal> attribute "
+"to obtain the next primary key value. Its primary target usage are databases "
+"with sequence support."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2457
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mysql-get-generated-keys</emphasis>: (<literal>org."
+"jboss.ejb.plugins.cmp.jdbc.keygen.JDBCMySQLCreateCommand</literal>) The "
+"<literal>JDBCMySQLCreateCommand</literal> executes an <literal>INSERT INTO</"
+"literal> query using the <literal>getGeneratedKeys</literal> method from "
+"MySQL native <literal>java.sql.Statement</literal> interface implementation "
+"to fetch the generated key."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2462
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">oracle-sequence</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCOracleCreateCommand</literal>) The "
+"<literal>JDBCOracleCreateCommand</literal> is a create command for use with "
+"Oracle that uses a sequence in conjunction with a <literal>RETURNING</"
+"literal> clause to generate keys in a single statement. It has a required "
+"<literal>sequence</literal> element that specifies the name of the sequence "
+"column."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2467
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">hsqldb-fetch-key</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCHsqldbCreateCommand</literal>) The "
+"<literal>JDBCHsqldbCreateCommand</literal> executes an <literal>INSERT INTO</"
+"literal> query after executing a <literal>CALL IDENTITY()</literal> "
+"statement to fetch the generated key."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2472
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sybase-fetch-key</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCSybaseCreateCommand</literal>) The "
+"<literal>JDBCSybaseCreateCommand</literal> executes an <literal>INSERT</"
+"literal> INTO query after executing a <literal>SELECT @@IDENTITY</literal> "
+"statement to fetch the generated key."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2477
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mssql-fetch-key</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCSQLServerCreateCommand</literal>) The "
+"<literal>JDBCSQLServerCreateCommand</literal> for Microsoft SQL Server that "
+"uses the value from an <literal>IDENTITY</literal> columns. By default uses "
+"<literal>SELECT SCOPE_IDENTITY()</literal> to reduce the impact of triggers; "
+"can be overridden with <literal>pk-sql</literal> attribute e.g. for V7."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2482
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">informix-serial</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCInformixCreateCommand</literal>) The "
+"<literal>JDBCInformixCreateCommand</literal> executes an <literal>INSERT</"
+"literal> INTO query after using the <literal>getSerial</literal> method from "
+"Informix native <literal>java.sql.Statement</literal> interface "
+"implementation to fetch the generated key."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2487
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">postgresql-fetch-seq</emphasis>: (<literal>org.jboss."
+"ejb.plugins.cmp.jdbc.keygen.JDBCPostgreSQLCreateCommand</literal>) The "
+"<literal>JDBCPostgreSQLCreateCommand</literal> for PostgreSQL that fetches "
+"the current value of the sequence. The optional <literal>sequence</literal> "
+"attribute can be used to change the name of the sequence, with the default "
+"being <literal>table_pkColumn_seq</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2492
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">key-generator</emphasis>: (<literal>org.jboss.ejb."
+"plugins.cmp.jdbc.keygen.JDBCKeyGeneratorCreateCommand</literal>) The "
+"<literal>JDBCKeyGeneratorCreateCommand</literal> executes an <literal>INSERT "
+"INTO</literal> query after obtaining a value for the primary key from the "
+"key generator referenced by the <literal>key-generator-factory</literal>. "
+"The <literal>key-generator-factory</literal> attribute must provide the name "
+"of a JNDI binding of the <literal>org.jboss.ejb.plugins.keygenerator."
+"KeyGeneratorFactory</literal> implementation."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2497
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">get-generated-keys</emphasis>: (org.jboss.ejb."
+"plugins.cmp.jdbc.jdbc3.JDBCGetGeneratedKeysCreateCommand) The "
+"<literal>JDBCGetGeneratedKeysCreateCommand</literal> executes an "
+"<literal>INSERT INTO</literal> query using a statement built using the JDBC3 "
+"<literal>prepareStatement(String, Statement.RETURN_GENERATED_KEYS)</literal> "
+"that has the capability to retrieve the auto-generated key. The generated "
+"key is obtained by calling the <literal>PreparedStatement.getGeneratedKeys</"
+"literal> method. Since this requires JDBC3 support it is only available in "
+"JDK1.4.1+ with a supporting JDBC driver."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2502
+#, no-c-format
+msgid ""
+"An example configuration using the <literal>hsqldb-fetch-key</"
+"literal><literal>entity-command</literal> with the generated key mapped to a "
+"known primary key <literal>cmp-field</literal> is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2505
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>LocationEJB</ejb-name>\n"
+" <pk-constraint>false</pk-constraint>\n"
+" <table-name>location</table-name>\n"
+" \n"
+" <cmp-field>\n"
+" <field-name>locationID</field-name>\n"
+" <column-name>id</column-name>\n"
+" <auto-increment/>\n"
+" </cmp-field>\n"
+" <!-- ... -->\n"
+" <entity-command name=\"hsqldb-fetch-key\"/>\n"
+" \n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2506
+#, no-c-format
+msgid ""
+"An alternate example using an unknown primary key without an explicit "
+"<literal>cmp-field</literal> is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2509
+#, fuzzy, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <enterprise-beans>\n"
+" <entity>\n"
+" <ejb-name>LocationEJB</ejb-name>\n"
+" <pk-constraint>false</pk-constraint>\n"
+" <table-name>location</table-name>\n"
+" <unknown-pk>\n"
+" <unknown-pk-class>java.lang.Integer</unknown-pk-"
+"class>\n"
+" <field-name>locationID</field-name>\n"
+" <column-name>id</column-name>\n"
+" <jdbc-type>INTEGER</jdbc-type>\n"
+" <sql-type>INTEGER</sql-type>\n"
+" <auto-increment/>\n"
+" </unknown-pk>\n"
+" <!--...-->\n"
+" <entity-command name=\"hsqldb-fetch-key\"/>\n"
+" </entity>\n"
+" </enterprise-beans>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+"<jboss> \n"
+" <enterprise-beans> \n"
+" <session> \n"
+" <ejb-name>nextgen.StatelessSession</ejb-"
+"name> \n"
+" <jndi-name>nextgen.StatelessSession</jndi-"
+"name> \n"
+" <clustered>True</clustered> \n"
+" <cluster-config> \n"
+" <partition-name>DefaultPartition</partition-"
+"name> \n"
+" <home-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin \n"
+" </home-load-balance-policy> \n"
+" <bean-load-balance-policy> \n"
+" org.jboss.ha.framework.interfaces.RoundRobin\n"
+" </bean-load-balance-policy>\n"
+" </cluster-config>\n"
+" </session>\n"
+" </enterprise-beans>\n"
+"</jboss>"
+
+#. Tag: title
+#: The_CMP_Engine.xml:2515
+#, fuzzy, no-c-format
+msgid "Defaults"
+msgstr "default"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2516
+#, no-c-format
+msgid ""
+"JBoss global defaults are defined in the <literal>standardjbosscmp-jdbc.xml</"
+"literal> file of the <literal>server/<server-name>/conf/</literal> "
+"directory. Each application can override the global defaults in the "
+"<literal>jbosscmp-jdbc.xml</literal> file. The default options are contained "
+"in a defaults element of the configuration file, and the content model is "
+"shown below."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2520
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc.xml defaults content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2527
+#, no-c-format
+msgid "An example of the defaults section follows:"
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2530
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <defaults>\n"
+" <datasource>java:/DefaultDS</datasource>\n"
+" <datasource-mapping>Hypersonic SQL</datasource-mapping>\n"
+" <create-table>true</create-table>\n"
+" <remove-table>false</remove-table>\n"
+" <read-only>false</read-only>\n"
+" <read-time-out>300000</read-time-out>\n"
+" <pk-constraint>true</pk-constraint>\n"
+" <fk-constraint>false</fk-constraint>\n"
+" <row-locking>false</row-locking>\n"
+" <preferred-relation-mapping>foreign-key</preferred-relation-"
+"mapping>\n"
+" <read-ahead>\n"
+" <strategy>on-load</strategy>\n"
+" <page-size>1000</page-size>\n"
+" <eager-load-group>*</eager-load-group>\n"
+" </read-ahead>\n"
+" <list-cache-max>1000</list-cache-max>\n"
+" </defaults>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2532
+#, no-c-format
+msgid "A sample jbosscmp-jdbc.xml defaults declaration"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2533
+#, no-c-format
+msgid ""
+"Each option can apply to entities, relationships, or both, and can be "
+"overridden in the specific entity or relationship. A detailed description of "
+"each option follows:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2538
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasource</emphasis>: This optional element is the "
+"<literal>jndi-name</literal> used to look up the datasource. All database "
+"connections used by an entity or <literal>relation-table</literal> are "
+"obtained from the datasource. Having different datasources for entities is "
+"not recommended, as it vastly constrains the domain over which finders and "
+"ejbSelects can query."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2543
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">datasource-mapping</emphasis>: This optional element "
+"specifies the name of the <literal>type-mapping</literal>, which determines "
+"how Java types are mapped to SQL types, and how EJB-QL functions are mapped "
+"to database specific functions. Type mappings are discussed in <xref linkend="
+"\"Datasource_Customization-Mapping\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2548
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">create-table</emphasis>: This optional element when "
+"true, specifies that JBoss should attempt to create a table for the entity. "
+"When the application is deployed, JBoss checks if a table already exists "
+"before creating the table. If a table is found, it is logged, and the table "
+"is not created. This option is very useful during the early stages of "
+"development when the table structure changes often. The default is false."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2575
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">remove-table</emphasis>: This optional element when "
+"true, JBoss will attempt to drop the table for each entity and each relation "
+"table mapped relationship. When the application is undeployed, JBoss will "
+"attempt to drop the table. This option is very useful during the early "
+"stages of development when the table structure changes often. The default is "
+"false."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2580
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-only</emphasis>: This optional element when "
+"true specifies that the bean provider will not be allowed to change the "
+"value of any fields. A field that is read-only will not be stored in, or "
+"inserted into, the database. If a primary key field is read-only, the create "
+"method will throw a <literal>CreateException</literal>. If a set accessor is "
+"called on a <literal>read-only</literal> field, it throws an "
+"<literal>EJBException</literal>. Read only fields are useful for fields that "
+"are filled in by database triggers, such as last update. The <literal>read-"
+"only</literal> option can be overridden on a per field basis. The default is "
+"false."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2585
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-time-out</emphasis>: This optional element is "
+"the amount of time in milliseconds that a read on a read only field is "
+"valid. A value of 0 means that the value is always reloaded at the start of "
+"a transaction, and a value of -1 means that the value never times out. This "
+"option can also be overridden on a per CMP field basis. If <literal>read-"
+"only</literal> is false, this value is ignored. The default is -1."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2590
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">row-locking</emphasis>: This optional element if "
+"true specifies that JBoss will lock all rows loaded in a transaction. Most "
+"databases implement this by using the <literal>SELECT FOR UPDATE</literal> "
+"syntax when loading the entity, but the actual syntax is determined by the "
+"<literal>row-locking-template</literal> in the <literal>datasource-mapping</"
+"literal> used by this entity. The default is false."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2595
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">pk-constraint</emphasis>: This optional element if "
+"true specifies that JBoss will add a primary key constraint when creating "
+"tables. The default is true."
+msgstr ""
+"<emphasis role=\"bold\">cookies</emphasis>:这个标记表示是否用 cookies 记录会"
+"话。它的缺省值是 true。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2600
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">preferred-relation-mapping</emphasis>: This optional "
+"element specifies the preferred mapping style for relationships. The "
+"<literal>preferred-relation-mapping</literal> element must be either "
+"<literal>foreign-key</literal> or <literal>relation-table</literal>."
+msgstr ""
+"<emphasis role=\"bold\">persistPeriod</emphasis>:如果"
+"<literal>perisitPolicy</literal>属性是<literal>NoMoreOftenThan</literal> 或"
+"者 <literal>OnTimer</literal>,<literal>persistPeriod</literal>属性指定更新的"
+"频率(毫秒)。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2605
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">read-ahead</emphasis>: This optional element "
+"controls caching of query results and CMR fields for the entity. This option "
+"is discussed in <xref linkend=\"Optimized_Loading-Read_ahead\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2610
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">list-cache-max</emphasis>: This optional element "
+"specifies the number of <literal>read-lists</literal> that can be tracked by "
+"this entity. This option is discussed in <xref linkend=\"Read_ahead-on_load"
+"\"/>. The default is 1000."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2620
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">fetch-size</emphasis>: This optional element "
+"specifies the number of entities to read in one round-trip to the underlying "
+"datastore. The default is 0."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定操作的易读的描"
+"述。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2625
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">unknown-pk</emphasis>: This optional element allows "
+"one to define the default mapping of an unknown primary key type of "
+"<literal>java.lang.Object</literal> maps to the persistent store."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2630
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">entity-command</emphasis>: This optional element "
+"allows one to define the default command for entity creation. This is "
+"described in detail in <xref linkend=\"The_CMP_Engine-"
+"Entity_Commands_and_Primary_Key_Generation\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2635
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">ql-compiler</emphasis>: This optional elements "
+"allows a replacement query compiler to be specified. Alternate query "
+"compilers were discussed in <xref linkend=\"Queries-"
+"EJBQL_2.1_and_SQL92_queries\"/>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2640
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">throw-runtime-exceptions</emphasis>: This attribute, "
+"if set to true, indicates that an error in connecting to the database should "
+"be seen in the application as runtime <literal>EJBException</literal> rather "
+"than as a checked exception."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2650
+#, no-c-format
+msgid "Datasource Customization"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2651
+#, no-c-format
+msgid ""
+"JBoss includes predefined type-mappings for many databases including: "
+"Cloudscape, DB2, DB2/400, Hypersonic SQL, InformixDB, InterBase, MS "
+"SQLSERVER, MS SQLSERVER2000, mySQL, Oracle7, Oracle8, Oracle9i, PointBase, "
+"PostgreSQL, PostgreSQL 7.2, SapDB, SOLID, and Sybase. If you do not like the "
+"supplied mapping, or a mapping is not supplied for your database, you will "
+"have to define a new mapping. If you find an error in one of the supplied "
+"mappings, or if you create a new mapping for a new database, please consider "
+"posting a patch at the JBoss project page on SourceForge."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2655
+#, no-c-format
+msgid "Type Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2656
+#, no-c-format
+msgid ""
+"Customization of a database is done through the <literal>type-mapping</"
+"literal> section of the <literal>jbosscmp-jdbc.xml</literal> descriptor. The "
+"content model for the type-mapping element is given in <xref linkend="
+"\"Type_Mapping-The_jbosscmp_jdbc_type_mapping_element_content_model.\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2661
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc type-mapping element content model."
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2669
+#, fuzzy, no-c-format
+msgid "The elements are:"
+msgstr "子元素是:"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2674
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">name</emphasis>: This required element provides the "
+"name identifying the database customization. It is used to refer to the "
+"mapping by the <literal>datasource-mapping</literal> elements found in "
+"defaults and entity."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2679
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">row-locking-template</emphasis>: This required "
+"element gives the <literal>PreparedStatement</literal> template used to "
+"create a row lock on the selected rows. The template must support three "
+"arguments:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2684
+#, no-c-format
+msgid "the select clause"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2689
+#, no-c-format
+msgid "the from clause. The order of the tables is currently not guaranteed"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2694
+#, no-c-format
+msgid "the where clause"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2699
+#, no-c-format
+msgid ""
+"If row locking is not supported in select statement this element should be "
+"empty. The most common form of row locking is select for update as in: "
+"<literal>SELECT ?1 FROM ?2 WHERE ?3 FOR UPDATE</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2704
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">pk-constraint-template</emphasis>: This required "
+"element gives the <literal>PreparedStatement</literal> template used to "
+"create a primary key constraint in the create table statement. The template "
+"must support two arguments"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2709
+#, no-c-format
+msgid ""
+"Primary key constraint name; which is always <literal>pk_{table-name}</"
+"literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2714
+#, no-c-format
+msgid "Comma separated list of primary key column names"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2719
+#, no-c-format
+msgid ""
+"If a primary key constraint clause is not supported in a create table "
+"statement this element should be empty. The most common form of a primary "
+"key constraint is: <literal>CONSTRAINT ?1 PRIMARY KEY (?2)</literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2724
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">fk-constraint-template</emphasis>: This is the "
+"template used to create a foreign key constraint in separate statement. The "
+"template must support five arguments:"
+msgstr ""
+"<emphasis role=\"bold\">SessionIdAlphabet</emphasis>:这是一个用来创建会话 "
+"ID 的字符集。它必须由刚好 65 个唯一的字符组成."
+
+#. Tag: para
+#: The_CMP_Engine.xml:2729
+#, no-c-format
+msgid "Table name"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2734
+#, no-c-format
+msgid ""
+"Foreign key constraint name; which is always <literal>fk_{table-name}_{cmr-"
+"field-name}</literal>"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2739
+#, no-c-format
+msgid "Comma separated list of foreign key column names"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2744
+#, no-c-format
+msgid "References table name"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2749
+#, no-c-format
+msgid "Comma separated list of the referenced primary key column names"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2754
+#, no-c-format
+msgid ""
+"If the datasource does not support foreign key constraints this element "
+"should be empty. The most common form of a foreign key constraint is: "
+"<literal>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)"
+"</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2759
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">auto-increment-template</emphasis>: This declares "
+"the SQL template for specifying auto increment columns."
+msgstr ""
+"<emphasis role=\"bold\">parameter</emphasis>:这个元素描述了操作的签名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2764
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">add-column-template</emphasis>: When <literal>alter-"
+"table</literal> is true, this SQL template specifies the syntax for adding a "
+"column to an existing table. The default value is <literal>ALTER TABLE ?1 "
+"ADD ?2 ?3</literal>. The parameters are:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2769 The_CMP_Engine.xml:2791 The_CMP_Engine.xml:2813
+#, no-c-format
+msgid "the table name"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2774 The_CMP_Engine.xml:2796 The_CMP_Engine.xml:2818
+#, no-c-format
+msgid "the column name"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2779 The_CMP_Engine.xml:2801
+#, no-c-format
+msgid "the column type"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2786
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alter-column-template</emphasis>: When "
+"<literal>alter-table</literal> is true, this SQL template specifies the "
+"syntax for dropping a column to from an existing table. The default value is "
+"<literal>ALTER TABLE ?1 ALTER ?2 TYPE ?3</literal>. The parameters are:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2808
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">drop-column-template</emphasis>: When <literal>alter-"
+"table</literal> is true, this SQL template specifies the syntax for dropping "
+"a column to from an existing table. The default value is <literal>ALTER "
+"TABLE ?1 DROP ?2</literal>. The parameters are:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2825
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alias-header-prefix</emphasis>: This required "
+"element gives the prefix used in creating the alias header. An alias header "
+"is prepended to a generated table alias by the EJB-QL compiler to prevent "
+"name collisions. The alias header is constructed as follows: alias-header-"
+"prefix + int_counter + alias-header-suffix. An example alias header would be "
+"<literal>t0_</literal> for an alias-header-prefix of \"<literal>t</literal>"
+"\" and an alias-header-suffix of \"<literal>_</literal>\"."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2830
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alias-header-suffix</emphasis>: This required "
+"element gives the suffix portion of the generated alias header."
+msgstr ""
+"<emphasis role=\"bold\">description</emphasis>:这个元素指定通知的易读的描"
+"述。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2835
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">alias-max-length</emphasis>: This required element "
+"gives the maximum allowed length for the generated alias header."
+msgstr "<emphasis role=\"bold\">name</emphasis>:这个元素包含通知类的类全名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2840
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">subquery-supported</emphasis>: This required element "
+"specifies if this <literal>type-mapping</literal> subqueries as either true "
+"or false. Some EJB-QL operators are mapped to exists subqueries. If "
+"<literal>subquery-supported</literal> is false, the EJB-QL compiler will use "
+"a left join and is null."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2845
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">true-mapping</emphasis>: This required element "
+"defines <emphasis>true</emphasis> identity in EJB-QL queries. Examples "
+"include <literal>TRUE</literal>, <literal>1</literal>, and <literal>(1=1)</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">CacheMode</emphasis> 指定怎么在节点间使缓存同步。可能"
+"的值是 <literal>LOCAL</literal>,<literal>REPL_SYNC</literal> 或 "
+"<literal>REPL_ASYNC</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2850
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">false-mapping</emphasis>: This required element "
+"defines <emphasis>false</emphasis> identity in EJB-QL queries. Examples "
+"include <literal>FALSE</literal>, <literal>0</literal>, and <literal>(1=0)</"
+"literal>."
+msgstr ""
+"<emphasis role=\"bold\">CacheMode</emphasis> 指定怎么在节点间使缓存同步。可能"
+"的值是 <literal>LOCAL</literal>,<literal>REPL_SYNC</literal> 或 "
+"<literal>REPL_ASYNC</literal>。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2855
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">function-mapping</emphasis>: This optional element "
+"specifies one or more the mappings from an EJB-QL function to an SQL "
+"implementation. See <xref linkend=\"Datasource_Customization-Function_Mapping"
+"\"/> for the details."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2860
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mapping</emphasis>: This required element specifies "
+"the mappings from a Java type to the corresponding JDBC and SQL type. See "
+"<xref linkend=\"Datasource_Customization-Mapping\"/> for the details."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2868
+#, no-c-format
+msgid "Function Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2869
+#, no-c-format
+msgid "The function-mapping element model is show below."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2873
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc function-mapping element content model"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2880
+#, fuzzy, no-c-format
+msgid "The allowed child elements are:"
+msgstr "子元素是:"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2885
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">function-name</emphasis>: This required element "
+"gives the EJB-QL function name, e.g., <literal>concat</literal>, "
+"<literal>substring</literal>."
+msgstr ""
+"<emphasis role=\"bold\">CacheLoaderPreload</emphasis> 包含了需要预先加载的用"
+"逗号隔开的节点列表(如:<literal>/aop</literal>,<literal>/productcatalogue</"
+"literal>)"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2890
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">function-sql</emphasis>: This required element gives "
+"the SQL for the function as appropriate for the underlying database. "
+"Examples for a <literal>concat</literal> function include: <literal>(?1 || ?"
+"2)</literal>, <literal>concat(?1, ?2)</literal>, <literal>(?1 + ?2)</"
+"literal>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2898
+#, no-c-format
+msgid "Mapping"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2899
+#, no-c-format
+msgid ""
+"A <literal>type-mapping</literal> is simply a set of mappings between Java "
+"class types and database types. A set of type mappings is defined by a set "
+"of <literal>mapping</literal> elements, the content model for which is shown "
+"in <xref linkend=\"Mapping-The_jbosscmp_jdbc_mapping_element_content_model."
+"\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2903
+#, fuzzy, no-c-format
+msgid "The jbosscmp-jdbc mapping element content model."
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2910
+#, no-c-format
+msgid ""
+"If JBoss cannot find a mapping for a type, it will serialize the object and "
+"use the <literal>java.lang.Object</literal> mapping. The following describes "
+"the three child elements of the mapping element:"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2915
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java-type</emphasis>: This required element gives "
+"the fully qualified name of the Java class to be mapped. If the class is a "
+"primitive wrapper class such as <literal>java.lang.Short</literal>, the "
+"mapping also applies to the primitive type."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2920
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">jdbc-type</emphasis>: This required element gives "
+"the JDBC type that is used when setting parameters in a JDBC "
+"<literal>PreparedStatement</literal> or loading data from a JDBC "
+"<literal>ResultSet</literal>. The valid types are defined in <literal>java."
+"sql.Types</literal>."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2925
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">sql-type</emphasis>: This required element gives the "
+"SQL type that is used in create table statements. Valid types are only "
+"limited by your database vendor."
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2930
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">param-setter</emphasis>: This optional element "
+"specifies the fully qualified name of the <literal>JDBCParameterSetter</"
+"literal> implementation for this mapping."
+msgstr ""
+"<emphasis role=\"bold\">CacheLoaderClass</emphasis> 指定了 "
+"<literal>CacheLoader</literal> 实现的完整类名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2935
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">result-reader</emphasis>: This option element "
+"specifies the fully qualified name of the <literal>JDBCResultSetReader</"
+"literal> implementation for this mapping."
+msgstr ""
+"<emphasis role=\"bold\">CacheLoaderClass</emphasis> 指定了 "
+"<literal>CacheLoader</literal> 实现的完整类名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2940
+#, no-c-format
+msgid "An example mapping element for a short in Oracle9i is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2943
+#, no-c-format
+msgid ""
+"<jbosscmp-jdbc>\n"
+" <type-mappings>\n"
+" <type-mapping>\n"
+" <name>Oracle9i</name>\n"
+" <!--...-->\n"
+" <mapping>\n"
+" <java-type>java.lang.Short</java-type>\n"
+" <jdbc-type>NUMERIC</jdbc-type>\n"
+" <sql-type>NUMBER(5)</sql-type>\n"
+" </mapping>\n"
+" </type-mapping>\n"
+" </type-mappings>\n"
+"</jbosscmp-jdbc>"
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2947
+#, no-c-format
+msgid "User Type Mappings"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2948
+#, no-c-format
+msgid ""
+"User type mappings allow one to map from JDBC column types to custom CMP "
+"fields types by specifying an instance of <literal>org.jboss.ejb.plugins.cmp."
+"jdbc.Mapper</literal> interface, the definition of which is shown below."
+msgstr ""
+
+#. Tag: programlisting
+#: The_CMP_Engine.xml:2951
+#, no-c-format
+msgid ""
+"public interface Mapper\n"
+"{\n"
+" /**\n"
+" * This method is called when CMP field is stored.\n"
+" * @param fieldValue - CMP field value\n"
+" * @return column value.\n"
+" */\n"
+" Object toColumnValue(Object fieldValue); \n"
+"\n"
+" /** \n"
+" * This method is called when CMP field is loaded.\n"
+" * @param columnValue - loaded column value.\n"
+" * @return CMP field value.\n"
+" */\n"
+" Object toFieldValue(Object columnValue);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: The_CMP_Engine.xml:2952
+#, no-c-format
+msgid ""
+"A prototypical use case is the mapping of an integer type to its type-safe "
+"Java enumeration instance. The content model of the <literal>user-type-"
+"mappings</literal> element consists of one or more <literal>user-type-"
+"mapping</literal> elements, the content model of which is shown in <xref "
+"linkend=\"User_Type_Mappings-The_user_type_mapping_content_model_\"/>."
+msgstr ""
+
+#. Tag: title
+#: The_CMP_Engine.xml:2957
+#, fuzzy, no-c-format
+msgid "The user-type-mapping content model >"
+msgstr "The descriptors element content model"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2967
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">java-type</emphasis>: the fully qualified name of "
+"the CMP field type in the mapping."
+msgstr "<emphasis role=\"bold\">type</emphasis>:attribute类型的类全名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2972
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mapped-type</emphasis>: the fully qualified name of "
+"the database type in the mapping."
+msgstr "<emphasis role=\"bold\">type</emphasis>:attribute类型的类全名。"
+
+#. Tag: para
+#: The_CMP_Engine.xml:2977
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">mapper</emphasis>: the fully qualified name of the "
+"<literal>Mapper</literal> interface implementation that handles the "
+"conversion between the <literal>java-type</literal> and <literal>mapped-"
+"type</literal>."
+msgstr ""
+"<emphasis role=\"bold\">className</emphasis>:这是 <literal>org.apache."
+"catalina.Host</literal> 接口实现的类的全名。它的缺省值是 <literal>org.apache."
+"catalina.core.StandardHost</literal>。"
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Transactions.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Transactions.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Transactions.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,635 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Transactions.xml:6
+#, fuzzy, no-c-format
+msgid "Transactions on JBoss"
+msgstr "Naming on JBoss"
+
+#. Tag: subtitle
+#: Transactions.xml:7
+#, fuzzy, no-c-format
+msgid "The JTA Transaction Service"
+msgstr "JNDI 命名服务"
+
+#. Tag: para
+#: Transactions.xml:8
+#, no-c-format
+msgid ""
+"This chapter discusses transaction management in JBoss and the JBossTX "
+"architecture. The JBossTX architecture allows for any Java Transaction API "
+"(JTA) transaction manager implementation to be used. JBossTX includes a fast "
+"in-VM implementation of a JTA compatible transaction manager that is used as "
+"the default transaction manager. We will first provide an overview of the "
+"key transaction concepts and notions in the JTA to provide sufficient "
+"background for the JBossTX architecture discussion. We will then discuss the "
+"interfaces that make up the JBossTX architecture and conclude with a "
+"discussion of the MBeans available for integration of alternate transaction "
+"managers."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:12
+#, no-c-format
+msgid "Transaction/JTA Overview"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:13
+#, no-c-format
+msgid ""
+"For the purpose of this discussion, we can define a transaction as a unit of "
+"work containing one or more operations involving one or more shared "
+"resources having ACID properties. ACID is an acronym for atomicity, "
+"consistency, isolation and durability, the four important properties of "
+"transactions. The meanings of these terms is:"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:18
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Atomicity</emphasis>: A transaction must be atomic. "
+"This means that either all the work done in the transaction must be "
+"performed, or none of it must be performed. Doing part of a transaction is "
+"not allowed."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:23
+#, fuzzy, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Consistency</emphasis>: When a transaction is "
+"completed, the system must be in a stable and consistent condition."
+msgstr ""
+"<emphasis role=\"bold\">INFO</emphasis>:操作不应该修改MBean组件的状态(读操"
+"作)。"
+
+#. Tag: para
+#: Transactions.xml:28
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Isolation</emphasis>: Different transactions must be "
+"isolated from each other. This means that the partial work done in one "
+"transaction is not visible to other transactions until the transaction is "
+"committed, and that each process in a multi-user system can be programmed as "
+"if it was the only process accessing the system."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:33
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Durability</emphasis>: The changes made during a "
+"transaction are made persistent when it is committed. When a transaction is "
+"committed, its changes will not be lost, even if the server crashes "
+"afterwards."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:38
+#, no-c-format
+msgid ""
+"To illustrate these concepts, consider a simple banking account application. "
+"The banking application has a database with a number of accounts. The sum of "
+"the amounts of all accounts must always be 0. An amount of money M is moved "
+"from account A to account B by subtracting M from account A and adding M to "
+"account B. This operation must be done in a transaction, and all four ACID "
+"properties are important."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:41
+#, no-c-format
+msgid ""
+"The atomicity property means that both the withdrawal and deposit is "
+"performed as an indivisible unit. If, for some reason, both cannot be done "
+"nothing will be done."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:44
+#, no-c-format
+msgid ""
+"The consistency property means that after the transaction, the sum of the "
+"amounts of all accounts must still be 0."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:47
+#, no-c-format
+msgid ""
+"The isolation property is important when more than one bank clerk uses the "
+"system at the same time. A withdrawal or deposit could be implemented as a "
+"three-step process: First the amount of the account is read from the "
+"database; then something is subtracted from or added to the amount read from "
+"the database; and at last the new amount is written to the database. Without "
+"transaction isolation several bad things could happen. For example, if two "
+"processes read the amount of account A at the same time, and each "
+"independently added or subtracted something before writing the new amount to "
+"the database, the first change would be incorrectly overwritten by the last."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:50
+#, no-c-format
+msgid ""
+"The durability property is also important. If a money transfer transaction "
+"is committed, the bank must trust that some subsequent failure cannot undo "
+"the money transfer."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:54
+#, no-c-format
+msgid "Pessimistic and optimistic locking"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:55
+#, no-c-format
+msgid ""
+"Transactional isolation is usually implemented by locking whatever is "
+"accessed in a transaction. There are two different approaches to "
+"transactional locking: Pessimistic locking and optimistic locking."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:58
+#, no-c-format
+msgid ""
+"The disadvantage of pessimistic locking is that a resource is locked from "
+"the time it is first accessed in a transaction until the transaction is "
+"finished, making it inaccessible to other transactions during that time. If "
+"most transactions simply look at the resource and never change it, an "
+"exclusive lock may be overkill as it may cause lock contention, and "
+"optimistic locking may be a better approach. With pessimistic locking, locks "
+"are applied in a fail-safe way. In the banking application example, an "
+"account is locked as soon as it is accessed in a transaction. Attempts to "
+"use the account in other transactions while it is locked will either result "
+"in the other process being delayed until the account lock is released, or "
+"that the process transaction will be rolled back. The lock exists until the "
+"transaction has either been committed or rolled back."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:61
+#, no-c-format
+msgid ""
+"With optimistic locking, a resource is not actually locked when it is first "
+"is accessed by a transaction. Instead, the state of the resource at the time "
+"when it would have been locked with the pessimistic locking approach is "
+"saved. Other transactions are able to concurrently access to the resource "
+"and the possibility of conflicting changes is possible. At commit time, when "
+"the resource is about to be updated in persistent storage, the state of the "
+"resource is read from storage again and compared to the state that was saved "
+"when the resource was first accessed in the transaction. If the two states "
+"differ, a conflicting update was made, and the transaction will be rolled "
+"back."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:64
+#, no-c-format
+msgid ""
+"In the banking application example, the amount of an account is saved when "
+"the account is first accessed in a transaction. If the transaction changes "
+"the account amount, the amount is read from the store again just before the "
+"amount is about to be updated. If the amount has changed since the "
+"transaction began, the transaction will fail itself, otherwise the new "
+"amount is written to persistent storage."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:70
+#, no-c-format
+msgid "The components of a distributed transaction"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:71
+#, no-c-format
+msgid ""
+"There are a number of participants in a distributed transaction. These "
+"include:"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:76
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transaction Manager</emphasis>: This component is "
+"distributed across the transactional system. It manages and coordinates the "
+"work involved in the transaction. The transaction manager is exposed by the "
+"<literal>javax.transaction.TransactionManager</literal> interface in JTA."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:81
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transaction Context</emphasis>: A transaction "
+"context identifies a particular transaction. In JTA the corresponding "
+"interface is <literal>javax.transaction.Transaction</literal>."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:86
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transactional Client</emphasis>: A transactional "
+"client can invoke operations on one or more transactional objects in a "
+"single transaction. The transactional client that started the transaction is "
+"called the transaction originator. A transaction client is either an "
+"explicit or implicit user of JTA interfaces and has no interface "
+"representation in the JTA."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:91
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Transactional Object</emphasis>: A transactional "
+"object is an object whose behavior is affected by operations performed on it "
+"within a transactional context. A transactional object can also be a "
+"transactional client. Most Enterprise Java Beans are transactional objects."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:96
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Recoverable Resource</emphasis>: A recoverable "
+"resource is a transactional object whose state is saved to stable storage if "
+"the transaction is committed, and whose state can be reset to what it was at "
+"the beginning of the transaction if the transaction is rolled back. At "
+"commit time, the transaction manager uses the two-phase XA protocol when "
+"communicating with the recoverable resource to ensure transactional "
+"integrity when more than one recoverable resource is involved in the "
+"transaction being committed. Transactional databases and message brokers "
+"like JBossMQ are examples of recoverable resources. A recoverable resource "
+"is represented using the <literal>javax.transaction.xa.XAResource</literal> "
+"interface in JTA."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:104
+#, no-c-format
+msgid "The two-phase XA protocol"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:105
+#, no-c-format
+msgid ""
+"When a transaction is about to be committed, it is the responsibility of the "
+"transaction manager to ensure that either all of it is committed, or that "
+"all of is rolled back. If only a single recoverable resource is involved in "
+"the transaction, the task of the transaction manager is simple: It just has "
+"to tell the resource to commit the changes to stable storage."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:108
+#, no-c-format
+msgid ""
+"When more than one recoverable resource is involved in the transaction, "
+"management of the commit gets more complicated. Simply asking each of the "
+"recoverable resources to commit changes to stable storage is not enough to "
+"maintain the atomic property of the transaction. The reason for this is that "
+"if one recoverable resource has committed and another fails to commit, part "
+"of the transaction would be committed and the other part rolled back."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:111
+#, no-c-format
+msgid ""
+"To get around this problem, the two-phase XA protocol is used. The XA "
+"protocol involves an extra prepare phase before the actual commit phase. "
+"Before asking any of the recoverable resources to commit the changes, the "
+"transaction manager asks all the recoverable resources to prepare to commit. "
+"When a recoverable resource indicates it is prepared to commit the "
+"transaction, it has ensured that it can commit the transaction. The resource "
+"is still able to rollback the transaction if necessary as well."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:114
+#, no-c-format
+msgid ""
+"So the first phase consists of the transaction manager asking all the "
+"recoverable resources to prepare to commit. If any of the recoverable "
+"resources fails to prepare, the transaction will be rolled back. But if all "
+"recoverable resources indicate they were able to prepare to commit, the "
+"second phase of the XA protocol begins. This consists of the transaction "
+"manager asking all the recoverable resources to commit the transaction. "
+"Because all the recoverable resources have indicated they are prepared, this "
+"step cannot fail."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:120
+#, no-c-format
+msgid "Heuristic exceptions"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:121
+#, no-c-format
+msgid ""
+"In a distributed environment communications failures can happen. If "
+"communication between the transaction manager and a recoverable resource is "
+"not possible for an extended period of time, the recoverable resource may "
+"decide to unilaterally commit or rollback changes done in the context of a "
+"transaction. Such a decision is called a heuristic decision. It is one of "
+"the worst errors that may happen in a transaction system, as it can lead to "
+"parts of the transaction being committed while other parts are rolled back, "
+"thus violating the atomicity property of transaction and possibly leading to "
+"data integrity corruption."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:124
+#, no-c-format
+msgid ""
+"Because of the dangers of heuristic exceptions, a recoverable resource that "
+"makes a heuristic decision is required to maintain all information about the "
+"decision in stable storage until the transaction manager tells it to forget "
+"about the heuristic decision. The actual data about the heuristic decision "
+"that is saved in stable storage depends on the type of recoverable resource "
+"and is not standardized. The idea is that a system manager can look at the "
+"data, and possibly edit the resource to correct any data integrity problems."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:127
+#, no-c-format
+msgid ""
+"There are several different kinds of heuristic exceptions defined by the "
+"JTA. The <literal>javax.transaction.HeuristicCommitException</literal> is "
+"thrown when a recoverable resource is asked to rollback to report that a "
+"heuristic decision was made and that all relevant updates have been "
+"committed. On the opposite end is the <literal>javax.transaction."
+"HeuristicRollbackException</literal>, which is thrown by a recoverable "
+"resource when it is asked to commit to indicate that a heuristic decision "
+"was made and that all relevant updates have been rolled back."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:130
+#, no-c-format
+msgid ""
+"The <literal>javax.transaction.HeuristicMixedException</literal> is the "
+"worst heuristic exception. It is thrown to indicate that parts of the "
+"transaction were committed, while other parts were rolled back. The "
+"transaction manager throws this exception when some recoverable resources "
+"did a heuristic commit, while other recoverable resources did a heuristic "
+"rollback."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:136
+#, no-c-format
+msgid "Transaction IDs and branches"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:137
+#, no-c-format
+msgid ""
+"In JTA, the identity of transactions is encapsulated in objects implementing "
+"the <literal>javax.transaction.xa.Xid</literal> interface. The transaction "
+"ID is an aggregate of three parts:"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:142
+#, no-c-format
+msgid ""
+"The format identifier indicates the transaction family and tells how the "
+"other two parts should be interpreted."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:147
+#, no-c-format
+msgid ""
+"The global transaction id identified the global transaction within the "
+"transaction family."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:152
+#, no-c-format
+msgid ""
+"The branch qualifier denotes a particular branch of the global transaction."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:157
+#, no-c-format
+msgid ""
+"Transaction branches are used to identify different parts of the same global "
+"transaction. Whenever the transaction manager involves a new recoverable "
+"resource in a transaction it creates a new transaction branch."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:165
+#, no-c-format
+msgid "JTS support"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:166
+#, no-c-format
+msgid ""
+"JBoss Transactions is a 100% Java implementation of a distributed "
+"transaction management system based on the Sun Microsystems J2EE Java "
+"Transaction Service (JTS) standard. Our implementation of the JTS utilizes "
+"the Object Management Group's (OMG) Object Transaction Service (OTS) "
+"model for transaction interoperability as recommended in the J2EE and EJB "
+"standards and leads the market in providing many advanced features such as "
+"fully distributed transactions and ORB portability with POA support."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:172
+#, no-c-format
+msgid "Web Services Transactions"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:173
+#, no-c-format
+msgid ""
+"In traditional ACID transaction systems, transactions are short lived, "
+"resources (such as databases) are locked for the duration of the transaction "
+"and participants have a high degree of trust with each other. With the "
+"advent of the Internet and Web services, the scenario that is now emerging "
+"requires involvement of participants unknown to each other in distributed "
+"transactions. These transactions have the following characteristics:"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:178
+#, no-c-format
+msgid ""
+"Transactions may be of a long duration, sometimes lasting hours, days, or "
+"more."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:183
+#, no-c-format
+msgid ""
+"Participants may not allow their resources to be locked for long durations."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:188
+#, no-c-format
+msgid ""
+"The communication infrastructure between participants may not be reliable."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:193
+#, no-c-format
+msgid ""
+"Some of the ACID properties of traditional transactions are not mandatory."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:198
+#, no-c-format
+msgid ""
+"A transaction may succeed even if only some of the participants choose to "
+"confirm and others cancel."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:203
+#, no-c-format
+msgid ""
+"All participants may choose to have their own coordinator (Transaction "
+"Manager), because of lack of trust."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:208
+#, no-c-format
+msgid "All activities are logged."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:213
+#, no-c-format
+msgid ""
+"Transactions that have to be rolled back have the concept of compensation."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:218
+#, no-c-format
+msgid ""
+"JBoss Transactions adds native support for Web services transactions by "
+"providing all of the components necessary to build interoperable, reliable, "
+"multi-party, Web services-based applications with the minimum of effort. The "
+"programming interfaces are based on the Java API for XML Transactioning "
+"(JAXTX) and the product includes protocol support for the WS-"
+"AtomicTransaction and WS-BusinessActivity specifications. JBossTS 4.2 is "
+"designed to support multiple coordination protocols and therefore helps to "
+"future-proof transactional applications."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:224
+#, fuzzy, no-c-format
+msgid "Configuring JBoss Transactions"
+msgstr "配置 JBoss"
+
+#. Tag: para
+#: Transactions.xml:225
+#, no-c-format
+msgid ""
+"JBossTS is configured through the jbossjts-properties.xml property file. You "
+"should consult the JBossTS documentation for all of the configurable options "
+"it supports."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:231
+#, no-c-format
+msgid "Local versus distributed transactions"
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:233
+#, no-c-format
+msgid "Local Transactions"
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:234
+#, no-c-format
+msgid ""
+"A Local Transaction allows resource enlistment at only one JVM and does not "
+"span across multiple process instances (i.e., VMs). However a separate "
+"client JVM may still manage transaction boundaries (begin/commit/rollback) "
+"for the JTA. Databases and message queues running as separate processes may "
+"still be enlisted as XAResources provided they have drivers that support "
+"this."
+msgstr ""
+
+#. Tag: title
+#: Transactions.xml:237
+#, fuzzy, no-c-format
+msgid "Distributed Transactions"
+msgstr "分布式垃圾收集(Distributed Garbage Collection)"
+
+#. Tag: para
+#: Transactions.xml:238
+#, no-c-format
+msgid ""
+"A transaction is considered to be distributed if it spans multiple process "
+"instances, i.e., VMs. Typically a distributed transaction will contain "
+"participants (e.g., XAResources) that are located within multiple VMs but "
+"the transaction is coordinated in a separate VM (or co-located with one of "
+"the participants)."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:240
+#, no-c-format
+msgid ""
+"JBossTS provides both local and distributed transactions. If your "
+"architecture requires distributed transactions then you should consider "
+"using either the JTS implementation from JBossTS, which uses CORBA for "
+"communication, or the Web Services transactions component, which uses SOAP/"
+"HTTP. Although the JTS/XTS component can be used with JBoss Enterprise "
+"Application Platform, it is not a supported part of the platform."
+msgstr ""
+
+#. Tag: para
+#: Transactions.xml:243
+#, no-c-format
+msgid ""
+"JTS and XTS components are not supported for JBoss Enterprise Application "
+"Platform 4.x"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/Web_Services.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,5069 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: Web_Services.xml:5
+#, fuzzy, no-c-format
+msgid "Web Services"
+msgstr "代理服务"
+
+#. Tag: para
+#: Web_Services.xml:6
+#, no-c-format
+msgid ""
+"The biggest new feature of J2EE 1.4 is the ability of J2EE components to act "
+"both as web service providers and consumers."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:10
+#, no-c-format
+msgid "Document/Literal"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:11
+#, no-c-format
+msgid ""
+"With document style web services two business partners agree on the exchange "
+"of complex business documents that are well defined in XML schema. For "
+"example, one party sends a document describing a purchase order, the other "
+"responds (immediately or later) with a document that describes the status of "
+"the purchase order. No need to agree on such low level details as operation "
+"names and their associated parameters. The payload of the SOAP message is an "
+"XML document that can be validated against XML schema. Document is defined "
+"by the style attribute on the SOAP binding."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:15
+#, no-c-format
+msgid ""
+"<binding name='EndpointInterfaceBinding' type='tns:"
+"EndpointInterface'>\n"
+" <soap:binding style='document' transport='http://"
+"schemas.xmlsoap.org/soap/http'/>\n"
+" <operation name='concat'>\n"
+" <soap:operation soapAction=''/>\n"
+" <input>\n"
+" <soap:body use='literal'/>\n"
+" </input>\n"
+" <output>\n"
+" <soap:body use='literal'/>\n"
+" </output>\n"
+" </operation>\n"
+" </binding>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:17
+#, no-c-format
+msgid ""
+"With document style web services the payload of every message is defined by "
+"a complex type in XML schema."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:19
+#, no-c-format
+msgid ""
+"<complexType name='concatType'>\n"
+" <sequence>\n"
+" <element name='String_1' nillable='true' "
+"type='string'/>\n"
+" <element name='long_1' type='long'/>\n"
+" </sequence>\n"
+" </complexType>\n"
+" <element name='concat' type='tns:concatType'/"
+">\n"
+" Therefore, message parts must refer to an element from the schema. \n"
+" <message name='EndpointInterface_concat'>\n"
+" <part name='parameters' element='tns:"
+"concat'/>\n"
+" </message>\n"
+"The following message definition is invalid. \n"
+"<message name='EndpointInterface_concat'>\n"
+" <part name='parameters' type='tns:concatType'/"
+">\n"
+"</message>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:24
+#, no-c-format
+msgid "Document/Literal (Bare)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:25
+#, no-c-format
+msgid ""
+"Bare is an implementation detail from the Java domain. Neither in the "
+"abstract contract (i.e. wsdl+schema) nor at the SOAP message level is a bare "
+"endpoint recognizable. A bare endpoint or client uses a Java bean that "
+"represents the entire document payload."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:27
+#, no-c-format
+msgid ""
+"@WebService\n"
+" @SOAPBinding(parameterStyle = SOAPBinding.ParameterStyle.BARE)\n"
+" public class DocBareServiceImpl\n"
+" {\n"
+" @WebMethod\n"
+" public SubmitBareResponse submitPO(SubmitBareRequest poRequest)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:29
+#, no-c-format
+msgid ""
+"The trick is that the Java beans representing the payload contain JAXB "
+"annotations that define how the payload is represented on the wire."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:31
+#, no-c-format
+msgid ""
+"@XmlAccessorType(XmlAccessType.FIELD)\n"
+" @XmlType(name = \"SubmitBareRequest\", namespace=\"http://soapbinding."
+"samples.jaxws.ws.test.jboss.org/\", propOrder = { \"product\" })\n"
+" @XmlRootElement(namespace=\"http://soapbinding.samples.jaxws.ws.test.jboss."
+"org/\", name = \"SubmitPO\")\n"
+" public class SubmitBareRequest\n"
+" {\n"
+" @XmlElement(namespace=\"http://soapbinding.samples.jaxws.ws.test.jboss.org/"
+"\", required = true)\n"
+" private String product;\n"
+" ...\n"
+" }"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:36
+#, no-c-format
+msgid "Document/Literal (Wrapped)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:37
+#, no-c-format
+msgid ""
+"Wrapped is an implementation detail from the Java domain. Neither in the "
+"abstract contract (i.e. wsdl+schema) nor at the SOAP message level is a "
+"wrapped endpoint recognizable. A wrapped endpoint or client uses the "
+"individual document payload properties. Wrapped is the default and does not "
+"have to be declared explicitly. <programlisting>\n"
+"\n"
+"@WebService\n"
+"public class DocWrappedServiceImpl\n"
+" {\n"
+" @WebMethod\n"
+" @RequestWrapper (className=\"org.somepackage.SubmitPO\")\n"
+" @ResponseWrapper (className=\"org.somepackage.SubmitPOResponse\")\n"
+" public String submitPO(String product, int quantity)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }\n"
+"</programlisting> Note, that with JBossWS the request/response wrapper "
+"annotations are not required, they will be generated on demand using "
+"sensible defaults."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:45
+#, no-c-format
+msgid "RPC/Literal"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:46
+#, no-c-format
+msgid ""
+"With RPC there is a wrapper element that names the endpoint operation. Child "
+"elements of the RPC parent are the individual parameters. The SOAP body is "
+"constructed based on some simple rules: <itemizedlist> <listitem> <para> The "
+"port type operation name defines the endpoint method name </para> </"
+"listitem> <listitem> <para> Message parts are endpoint method parameters </"
+"para> </listitem> </itemizedlist> RPC is defined by the style attribute on "
+"the SOAP binding."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:60
+#, no-c-format
+msgid ""
+"<binding name='EndpointInterfaceBinding' type='tns:"
+"EndpointInterface'>\n"
+" <soap:binding style='rpc' transport='http://schemas."
+"xmlsoap.org/soap/http'/>\n"
+" <operation name='echo'>\n"
+" <soap:operation soapAction=''/>\n"
+" <input>\n"
+" <soap:body namespace='http://org.jboss.ws/"
+"samples/jsr181pojo' use='literal'/>\n"
+" </input>\n"
+" <output>\n"
+" <soap:body namespace='http://org.jboss.ws/"
+"samples/jsr181pojo' use='literal'/>\n"
+" </output>\n"
+" </operation>\n"
+" </binding>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:62
+#, no-c-format
+msgid ""
+"With rpc style web services the portType names the operation (i.e. the java "
+"method on the endpoint) <programlisting>\n"
+" <portType name='EndpointInterface'>\n"
+" <operation name='echo' parameterOrder='"
+"String_1'>\n"
+" <input message='tns:EndpointInterface_echo'/"
+">\n"
+" <output message='tns:"
+"EndpointInterface_echoResponse'/>\n"
+" </operation>\n"
+" </portType> \n"
+"</programlisting> Operation parameters are defined by individual message "
+"parts. <programlisting>\n"
+" <message name='EndpointInterface_echo'>\n"
+" <part name='String_1' type='xsd:string'/>\n"
+" </message>\n"
+" <message name='EndpointInterface_echoResponse'>\n"
+" <part name='result' type='xsd:string'/>\n"
+" </message>\n"
+"</programlisting> Note, there is no complex type in XML schema that could "
+"validate the entire SOAP message payload. <programlisting>\n"
+"\n"
+" @WebService\n"
+" @SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+" public class JSEBean01\n"
+" {\n"
+" @WebMethod\n"
+" @WebResult(name=\"result\")\n"
+" public String echo(@WebParam(name=\"String_1\") String input)\n"
+" {\n"
+" ...\n"
+" }\n"
+"} \n"
+"</programlisting> The element names of RPC parameters/return values may be "
+"defined using the JAX-WS Annotations#javax.jws.WebParam and JAX-WS "
+"Annotations#javax.jws.WebResult respectively."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:72
+#, no-c-format
+msgid "RPC/Encoded"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:73
+#, no-c-format
+msgid ""
+"SOAP encodeding style is defined by the infamous <ulink url=\"http://www.w3."
+"org/TR/2000/NOTE-SOAP-20000508/#_Toc478383512\">chapter 5</ulink> of the "
+"<ulink url=\"http://www.w3.org/TR/2000/NOTE-SOAP-20000508/\">SOAP-1.1</"
+"ulink> specification. It has inherent interoperability issues that cannot be "
+"fixed. The <ulink url=\"http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-"
+"04-16.html\">Basic Profile-1.0</ulink> prohibits this encoding style in "
+"<ulink url=\"http://www.ws-i.org/Profiles/BasicProfile-1.0-2004-04-16."
+"html#refinement16448072\">4.1.7 SOAP encodingStyle Attribute</ulink>. "
+"JBossWS has basic support for rpc/encoded that is provided as is for simple "
+"interop scenarios with SOAP stacks that do not support literal encoding. "
+"Specifically, JBossWS does not support:-"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:76
+#, no-c-format
+msgid "element references"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:81
+#, no-c-format
+msgid "soap arrays as bean properties"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:90
+#, no-c-format
+msgid "Web Service Endpoints"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:91
+#, no-c-format
+msgid ""
+"JAX-WS simplifies the development model for a web service endpoint a great "
+"deal. In short, an endpoint implementation bean is annotated with JAX-WS "
+"annotations and deployed to the server. The server automatically generates "
+"and publishes the abstract contract (i.e. wsdl+schema) for client "
+"consumption. All marshalling/unmarshalling is delegated to JAXB [2]."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:97
+#, no-c-format
+msgid "Plain old Java Object (POJO)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:98
+#, no-c-format
+msgid ""
+"Let's take a look at simple POJO endpoint implementation. All endpoint "
+"associated metadata is provided via JSR-181 annotations"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:100
+#, no-c-format
+msgid ""
+"@WebService\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class JSEBean01\n"
+" {\n"
+" @WebMethod\n"
+" public String echo(String input)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:105
+#, fuzzy, no-c-format
+msgid "The endpoint as a web application"
+msgstr "设置 web 应用程序的上下文根目录(context root)"
+
+#. Tag: para
+#: Web_Services.xml:106
+#, no-c-format
+msgid "A JAX-WS java service endpoint (JSE) is deployed as a web application."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:108
+#, fuzzy, no-c-format
+msgid ""
+"<web-app ...>\n"
+" <servlet>\n"
+" <servlet-name>TestService</servlet-name>\n"
+" <servlet-class>org.jboss.test.ws.jaxws.samples.jsr181pojo."
+"JSEBean01</servlet-class>\n"
+" </servlet>\n"
+" <servlet-mapping>\n"
+" <servlet-name>TestService</servlet-name>\n"
+" <url-pattern>/*</url-pattern>\n"
+" </servlet-mapping>\n"
+"</web-app>"
+msgstr ""
+"<servlet>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <servlet-class>javax.faces.webapp.FacesServlet</servlet-"
+"class>\n"
+" <load-on-startup>1</load-on-startup>\n"
+"</servlet>\n"
+"\n"
+"<servlet-mapping>\n"
+" <servlet-name>Faces Servlet</servlet-name>\n"
+" <url-pattern>*.jsf</url-pattern>\n"
+"</servlet-mapping>"
+
+#. Tag: title
+#: Web_Services.xml:113
+#, no-c-format
+msgid "<title>Packaging the endpoint</title>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:114
+#, no-c-format
+msgid ""
+"A JSR-181 java service endpoint (JSE) is packaged as a web application in a "
+"*.war file. <programlisting>\n"
+"\n"
+" <war warfile=\"${build.dir}/libs/jbossws-samples-jsr181pojo.war\" \n"
+" webxml=\"${build.resources.dir}/samples/jsr181pojo/WEB-"
+"INF/web.xml\">\n"
+" <classes dir=\"${build.dir}/classes\">\n"
+" <include name=\"org/jboss/test/ws/samples/jsr181pojo/JSEBean01.class\"/"
+">\n"
+" </classes>\n"
+"</war> \n"
+"</programlisting> Note, only the endpoint implementation bean and web.xml "
+"are required."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:122
+#, no-c-format
+msgid "<title>Accessing the generated WSDL</title>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:123 Web_Services.xml:151
+#, no-c-format
+msgid ""
+"A successfully deployed service endpoint will show up in the service "
+"endpoint manager. This is also where you find the links to the generated "
+"wsdl."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:127 Web_Services.xml:154
+#, no-c-format
+msgid "http://yourhost:8080/jbossws/services"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:127 Web_Services.xml:155
+#, no-c-format
+msgid ""
+"Note, it is also possible to generate the abstract contract off line using "
+"jbossw tools. For details of that please see <ulink url=\"http://jbws.dyndns."
+"org/mediawiki/index.php?title=JAX-WS_User_Guide#Top_Down_.28Java_to_WSDL.29"
+"\">#Top Down (Java to WSDL)</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:133
+#, fuzzy, no-c-format
+msgid "EJB3 Stateless Session Bean (SLSB)"
+msgstr "EJB 2.x 里的 Stateless Session Bean"
+
+#. Tag: para
+#: Web_Services.xml:134
+#, no-c-format
+msgid ""
+"The JAX-WS programming model support the same set of annotations on EJB3 "
+"stateless session beans as on <ulink url=\"http://jbws.dyndns.org/mediawiki/"
+"index.php?title=JAX-WS_User_Guide#_Plain_old_Java_Object_.28POJO.29\"># "
+"Plain old Java Object (POJO)</ulink> endpoints. EJB-2.1 endpoints are "
+"supported using the JAX-RPC progamming model."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:137
+#, no-c-format
+msgid ""
+"@Stateless\n"
+" @Remote(EJB3RemoteInterface.class)\n"
+" @RemoteBinding(jndiBinding = "/ejb3/EJB3EndpointInterface")\n"
+" \n"
+" @WebService\n"
+" @SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+" public class EJB3Bean01 implements EJB3RemoteInterface\n"
+" {\n"
+" @WebMethod\n"
+" public String echo(String input)\n"
+" {\n"
+" ...\n"
+" }\n"
+" }"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:138
+#, no-c-format
+msgid ""
+"Above you see an EJB-3.0 stateless session bean that exposes one method both "
+"on the remote interface and on and as an endpoint operation."
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:142
+#, no-c-format
+msgid "<emphasis>Packaging the endpoint</emphasis>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:144
+#, no-c-format
+msgid ""
+"A JSR-181 EJB service endpoint is packaged as an ordinary ejb deployment."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:147
+#, no-c-format
+msgid ""
+"<jar jarfile="${build.dir}/libs/jbossws-samples-jsr181ejb.jar""
+">\n"
+"<fileset dir="${build.dir}/classes">\n"
+"<include name="org/jboss/test/ws/samples/jsr181ejb/EJB3Bean01."
+"class"/>\n"
+"<include name="org/jboss/test/ws/samples/jsr181ejb/"
+"EJB3RemoteInterface.class"/>\n"
+"</fileset>\n"
+"</jar>"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:149
+#, no-c-format
+msgid "<emphasis>Accessing the generated WSDL</emphasis>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:161
+#, no-c-format
+msgid "Endpoint Provider"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:162
+#, no-c-format
+msgid ""
+"JAX-WS services typically implement a native Java service endpoint interface "
+"(SEI), perhaps mapped from a WSDL port type, either directly or via the use "
+"of annotations."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:165
+#, no-c-format
+msgid ""
+"Java SEIs provide a high level Java-centric abstraction that hides the "
+"details of converting between Java objects and their XML representations for "
+"use in XML-based messages. However, in some cases it is desirable for "
+"services to be able to operate at the XML message level. The Provider "
+"interface offers an alternative to SEIs and may be implemented by services "
+"wishing to work at the XML message level."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:168
+#, no-c-format
+msgid ""
+"A Provider based service instance’s invoke method is called for each message "
+"received for the service."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:171
+#, no-c-format
+msgid ""
+"@WebServiceProvider\n"
+"@ServiceMode(value = Service.Mode.PAYLOAD)\n"
+"public class ProviderBeanPayload implements Provider<Source>\n"
+"{\n"
+"public Source invoke(Source req)\n"
+"{\n"
+"// Access the entire request PAYLOAD and return the response PAYLOAD\n"
+" }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:172
+#, no-c-format
+msgid ""
+"Note, Service.Mode.PAYLOAD is the default and does not have to be declared "
+"explicitly. You can also use Service.Mode.MESSAGE to access the entire SOAP "
+"message (i.e. with MESSAGE the Provider can also see SOAP Headers)"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:178
+#, fuzzy, no-c-format
+msgid "WebServiceContext"
+msgstr "处理静态内容"
+
+#. Tag: para
+#: Web_Services.xml:179
+#, no-c-format
+msgid ""
+"The WebServiceContext is treated as an injectable resource that can be set "
+"at the time an endpoint is initialized. The WebServiceContext object will "
+"then use thread-local information to return the correct information "
+"regardless of how many threads are concurrently being used to serve requests "
+"addressed to the same endpoint object."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:182
+#, no-c-format
+msgid ""
+"@WebService\n"
+"public class EndpointJSE\n"
+"{\n"
+"@Resource\n"
+"WebServiceContext wsCtx;\n"
+" \n"
+"@WebMethod\n"
+"public String testGetMessageContext()\n"
+"{\n"
+"SOAPMessageContext jaxwsContext = (SOAPMessageContext)wsCtx.getMessageContext"
+"();\n"
+"return jaxwsContext != null ? "pass" : "fail";\n"
+"}\n"
+"..\n"
+"@WebMethod\n"
+"public String testGetUserPrincipal()\n"
+"{\n"
+"Principal principal = wsCtx.getUserPrincipal();\n"
+"return principal.getName();\n"
+"}\n"
+" \n"
+"@WebMethod\n"
+"public boolean testIsUserInRole(String role)\n"
+"{\n"
+"return wsCtx.isUserInRole(role);\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:186
+#, fuzzy, no-c-format
+msgid "Web Service Clients"
+msgstr "代理服务"
+
+#. Tag: title
+#: Web_Services.xml:188
+#, fuzzy, no-c-format
+msgid "Service"
+msgstr "HTTP 服务"
+
+#. Tag: para
+#: Web_Services.xml:189
+#, no-c-format
+msgid ""
+"<literal>Service</literal> is an abstraction that represents a WSDL service. "
+"A WSDL service is a collection of related ports, each of which consists of a "
+"port type bound to a particular protocol and available at a particular "
+"endpoint address."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:192
+#, no-c-format
+msgid ""
+"For most clients, you will start with a set of stubs generated from the "
+"WSDL. One of these will be the service, and you will create objects of that "
+"class in order to work with the service (see \"static case\" below)."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:196
+#, fuzzy, no-c-format
+msgid "Service Usage"
+msgstr "HTTP 服务"
+
+#. Tag: emphasis
+#: Web_Services.xml:198
+#, fuzzy, no-c-format
+msgid "Static case"
+msgstr "状态传输(State Transfer)"
+
+#. Tag: para
+#: Web_Services.xml:200
+#, no-c-format
+msgid ""
+"Most clients will start with a WSDL file, and generate some stubs using "
+"jbossws tools like <emphasis>wsconsume</emphasis>. This usually gives a mass "
+"of files, one of which is the top of the tree. This is the service "
+"implementation class."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:203
+#, no-c-format
+msgid ""
+"The generated implementation class can be recognised as it will have two "
+"public constructors, one with no arguments and one with two arguments, "
+"representing the wsdl location (a java.net.URL) and the service name (a "
+"javax.xml.namespace.QName) respectively."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:206
+#, no-c-format
+msgid ""
+"Usually you will use the no-argument constructor. In this case the WSDL "
+"location and service name are those found in the WSDL. These are set "
+"implicitly from the WebServiceClient annotation that decorates the generated "
+"class."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:209
+#, no-c-format
+msgid ""
+"The following code snippet shows the generated constructors from the "
+"generated class:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:212
+#, no-c-format
+msgid ""
+"// Generated Service Class\n"
+" \n"
+" @WebServiceClient(name="StockQuoteService", targetNamespace=""
+"http://example.com/stocks", wsdlLocation="http://example.com/"
+"stocks.wsdl")\n"
+"public class StockQuoteService extends javax.xml.ws.Service \n"
+"{\n"
+"public StockQuoteService() \n"
+"{\n"
+"super(new URL("http://example.com/stocks.wsdl"), new QName(""
+"http://example.com/stocks", "StockQuoteService"));\n"
+"}\n"
+" \n"
+"public StockQuoteService(String wsdlLocation, QName serviceName) \n"
+"{\n"
+"super(wsdlLocation, serviceName);\n"
+"}\n"
+" \n"
+"...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:213
+#, no-c-format
+msgid ""
+"Section <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_User_Guide#Dynamic_Proxy\">#Dynamic Proxy</ulink> explains how to obtain "
+"a port from the service and how to invoke an operation on the port. If you "
+"need to work with the XML payload directly or with the XML representation of "
+"the entire SOAP message, have a look at <ulink url=\"http://jbws.dyndns.org/"
+"mediawiki/index.php?title=JAX-WS_User_Guide#Dispatch\">#Dispatch</ulink>."
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:217
+#, no-c-format
+msgid "Dynamic case"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:219
+#, no-c-format
+msgid ""
+"In the dynamic case, when nothing is generated, a web service client uses "
+"<literal>Service.create</literal> to create Service instances, the following "
+"code illustrates this process."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:222
+#, no-c-format
+msgid ""
+"URL wsdlLocation = new URL("http://example.org/my.wsdl");\n"
+"QName serviceName = new QName("http://example.org/sample", ""
+"MyService");\n"
+"Service service = Service.create(wsdlLocation, serviceName);"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:223
+#, no-c-format
+msgid ""
+"This is the nastiest way to work with JBossWs. Older versions have extensive "
+"details on DII as it was then known."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:229
+#, fuzzy, no-c-format
+msgid "Handler Resolver"
+msgstr "处理群集系统重启"
+
+#. Tag: para
+#: Web_Services.xml:230
+#, no-c-format
+msgid ""
+"JAX-WS provides a flexible plug-in framework for message processing modules, "
+"known as handlers, that may be used to extend the capabilities of a JAX-WS "
+"runtime system. <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?"
+"title=JAX-WS_User_Guide#Handler_Framework\">#Handler Framework</ulink> "
+"describes the handler framework in detail. A Service instance provides "
+"access to a HandlerResolver via a pair of getHandlerResolver/"
+"setHandlerResolver methods that may be used to configure a set of handlers "
+"on a per-service, per-port or per-protocol binding basis."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:233
+#, no-c-format
+msgid ""
+"When a Service instance is used to create a proxy or a Dispatch instance "
+"then the handler resolver currently registered with the service is used to "
+"create the required handler chain. Subsequent changes to the handler "
+"resolver configured for a Service instance do not affect the handlers on "
+"previously created proxies, or Dispatch instances."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:239
+#, no-c-format
+msgid "Executor"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:240
+#, no-c-format
+msgid ""
+"Service instances can be configured with a java.util.concurrent.Executor. "
+"The executor will then be used to invoke any asynchronous callbacks "
+"requested by the application. The setExecutor and getExecutor methods of "
+"Service can be used to modify and retrieve the executor configured for a "
+"service."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:248
+#, no-c-format
+msgid "Dynamic Proxy"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:249
+#, no-c-format
+msgid ""
+"You can create an instance of a client proxy using one of getPort methods on "
+"the <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_User_Guide#Service\">#Service</ulink>."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:252
+#, no-c-format
+msgid ""
+"/** \n"
+" * The getPort method returns a proxy. A service client\n"
+" * uses this proxy to invoke operations on the target\n"
+" * service endpoint. The <code>serviceEndpointInterface</code>\n"
+" * specifies the service endpoint interface that is supported by\n"
+" * the created dynamic proxy instance.\n"
+" **/\n"
+" public <T> T getPort(QName portName, Class<T> "
+"serviceEndpointInterface)\n"
+" {\n"
+" ...\n"
+" }\n"
+" \n"
+" /** \n"
+" * The getPort method returns a proxy. The parameter\n"
+" * <code>serviceEndpointInterface</code> specifies the service\n"
+" * endpoint interface that is supported by the returned proxy.\n"
+" * In the implementation of this method, the JAX-WS\n"
+" * runtime system takes the responsibility of selecting a protocol\n"
+" * binding (and a port) and configuring the proxy accordingly.\n"
+" * The returned proxy should not be reconfigured by the client.\n"
+" *\n"
+" **/\n"
+" public <T> T getPort(Class<T> serviceEndpointInterface)\n"
+" {\n"
+" ...\n"
+" }"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:253
+#, no-c-format
+msgid ""
+"The service endpoint interface (SEI) is usually generated using tools. For "
+"details see <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?"
+"title=JAX-WS_User_Guide#_Top_Down_.28WSDL_to_Java.29\"># Top Down (WSDL to "
+"Java)</ulink>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:256
+#, no-c-format
+msgid ""
+"A generated static <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?"
+"title=JAX-WS_User_Guide#Service\">#Service</ulink> usually also offers typed "
+"methods to get ports. These methods also return dynamic proxies that "
+"implement the SEI."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:259
+#, no-c-format
+msgid ""
+"@WebServiceClient(name = "TestEndpointService", targetNamespace = "
+""http://org.jboss.ws/wsref", \n"
+" wsdlLocation = "http://localhost.localdomain:8080/jaxws-samples-"
+"webserviceref?wsdl")\n"
+" \n"
+" public class TestEndpointService extends Service\n"
+" {\n"
+" ...\n"
+" \n"
+" public TestEndpointService(URL wsdlLocation, QName serviceName) {\n"
+" super(wsdlLocation, serviceName);\n"
+" }\n"
+" \n"
+" @WebEndpoint(name = "TestEndpointPort")\n"
+" public TestEndpoint getTestEndpointPort() \n"
+" {\n"
+" return (TestEndpoint)super.getPort(TESTENDPOINTPORT, TestEndpoint."
+"class);\n"
+" }\n"
+" }"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:263
+#, no-c-format
+msgid "WebServiceRef"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:264
+#, no-c-format
+msgid ""
+"The WebServiceRef annotation is used to declare a reference to a Web "
+"service. It follows the resource pattern exemplified by the javax.annotation."
+"Resource annotation in JSR-250 [5]"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:267
+#, no-c-format
+msgid "There are two uses to the WebServiceRef annotation:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:272
+#, no-c-format
+msgid ""
+"To define a reference whose type is a generated service class. In this case, "
+"the type and value element will both refer to the generated service class "
+"type. Moreover, if the reference type can be inferred by the field/method "
+"declaration the annotation is applied to, the type and value elements MAY "
+"have the default value (Object.class, that is). If the type cannot be "
+"inferred, then at least the type element MUST be present with a non-default "
+"value."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:277
+#, no-c-format
+msgid ""
+"To define a reference whose type is a SEI. In this case, the type element "
+"MAY be present with its default value if the type of the reference can be "
+"inferred from the annotated field/method declaration, but the value element "
+"MUST always be present and refer to a generated service class type (a "
+"subtype of javax.xml.ws.Service). The wsdlLocation element, if present, "
+"overrides theWSDL location information specified in the WebService "
+"annotation of the referenced generated service class."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:282
+#, no-c-format
+msgid ""
+"public class EJB3Client implements EJB3Remote\n"
+"{\n"
+" @WebServiceRef\n"
+" public TestEndpointService service4;\n"
+" \n"
+" @WebServiceRef\n"
+" public TestEndpoint port3;"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:284
+#, no-c-format
+msgid "WebServiceRef Customization"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:286
+#, no-c-format
+msgid ""
+"In jboss-5.0.x we offer a number of overrides and extensions to the "
+"WebServiceRef annotation. These include"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:291
+#, no-c-format
+msgid "define the port that should be used to resolve a container-managed port"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:296
+#, no-c-format
+msgid "define default Stub property settings for Stub objects"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:301
+#, no-c-format
+msgid "define the URL of a final WSDL document to be used"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:306
+#, fuzzy, no-c-format
+msgid "Example:"
+msgstr "XMBean示例"
+
+#. Tag: programlisting
+#: Web_Services.xml:309
+#, no-c-format
+msgid ""
+"<service-ref>\n"
+"<service-ref-name>OrganizationService</service-ref-name>\n"
+"<wsdl-override>file:/wsdlRepository/organization-service.wsdl</wsdl-"
+"override>\n"
+"</service-ref>\n"
+".. \n"
+"<service-ref>\n"
+"<service-ref-name>OrganizationService</service-ref-name>\n"
+"<config-name>Secure Client Config</config-name>\n"
+"<config-file>META-INF/jbossws-client-config.xml</config-file>\n"
+"<handler-chain>META-INF/jbossws-client-handlers.xml</handler-"
+"chain>\n"
+"</service-ref>\n"
+" \n"
+"<service-ref>\n"
+"<service-ref-name>SecureService</service-ref-name>\n"
+"<service-class-name>org.jboss.tests.ws.jaxws.webserviceref."
+"SecureEndpointService</service-class-name>\n"
+"<service-qname>{http://org.jboss.ws/wsref}SecureEndpointService</"
+"service-qname>\n"
+"<port-info>\n"
+"<service-endpoint-interface>org.jboss.tests.ws.jaxws.webserviceref."
+"SecureEndpoint</service-endpoint-interface>\n"
+"<port-qname>{http://org.jboss.ws/wsref}SecureEndpointPort</port-"
+"qname>\n"
+"<stub-property>\n"
+"<name>javax.xml.ws.security.auth.username</name>\n"
+"<value>kermit</value>\n"
+"</stub-property>\n"
+"<stub-property>\n"
+"<name>javax.xml.ws.security.auth.password</name>\n"
+"<value>thefrog</value>\n"
+"</stub-property>\n"
+"</port-info>\n"
+"</service-ref>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:310
+#, fuzzy, no-c-format
+msgid ""
+"For details please see <emphasis role=\"bold\">service-ref_5_0.dtd</"
+"emphasis> in the jboss docs directory."
+msgstr "<emphasis role=\"bold\">file:/var/opt/apps/</emphasis>扫描指定的目录"
+
+#. Tag: title
+#: Web_Services.xml:316
+#, no-c-format
+msgid "Dispatch"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:317
+#, no-c-format
+msgid ""
+"XMLWeb Services use XML messages for communication between services and "
+"service clients. The higher level JAX-WS APIs are designed to hide the "
+"details of converting between Java method invocations and the corresponding "
+"XML messages, but in some cases operating at the XML message level is "
+"desirable. The Dispatch interface provides support for this mode of "
+"interaction."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:320
+#, no-c-format
+msgid ""
+"Dispatch supports two usage modes, identified by the constants javax.xml.ws."
+"Service.Mode.MESSAGE and javax.xml.ws.Service.Mode.PAYLOAD respectively:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:323
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Message</emphasis> In this mode, client applications "
+"work directly with protocol-specific message structures. E.g., when used "
+"with a SOAP protocol binding, a client application would work directly with "
+"a SOAP message."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:326
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">Message Payload</emphasis> In this mode, client "
+"applications work with the payload of messages rather than the messages "
+"themselves. E.g., when used with a SOAP protocol binding, a client "
+"application would work with the contents of the SOAP Body rather than the "
+"SOAP message as a whole."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:329
+#, no-c-format
+msgid ""
+"Dispatch is a low level API that requires clients to construct messages or "
+"message payloads as XML and requires an intimate knowledge of the desired "
+"message or payload structure. Dispatch is a generic class that supports "
+"input and output of messages or message payloads of any type."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:332
+#, no-c-format
+msgid ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"Dispatch dispatch = service.createDispatch(portName, StreamSource.class, "
+"Mode.PAYLOAD);\n"
+" \n"
+"String payload = "<ns1:ping xmlns:ns1='http://oneway.samples."
+"jaxws.ws.test.jboss.org/'/>";\n"
+"dispatch.invokeOneWay(new StreamSource(new StringReader(payload)));\n"
+" \n"
+"payload = "<ns1:feedback xmlns:ns1='http://oneway.samples.jaxws."
+"ws.test.jboss.org/'/>";\n"
+"Source retObj = (Source)dispatch.invoke(new StreamSource(new StringReader"
+"(payload)));"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:336
+#, no-c-format
+msgid "Asynchronous Invocations"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:337
+#, no-c-format
+msgid ""
+"The BindingProvider interface represents a component that provides a "
+"protocol binding for use by clients, it is implemented by proxies and is "
+"extended by the Dispatch interface."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:340
+#, no-c-format
+msgid ""
+"BindingProvider instances may provide asynchronous operation capabilities. "
+"When used, asynchronous operation invocations are decoupled from the "
+"BindingProvider instance at invocation time such that the response context "
+"is not updated when the operation completes. Instead a separate response "
+"context is made available using the Response interface."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:343
+#, no-c-format
+msgid ""
+"public void testInvokeAsync() throws Exception\n"
+"{\n"
+"URL wsdlURL = new URL("http://" + getServerHost() + ":8080/"
+"jaxws-samples-asynchronous?wsdl");\n"
+"QName serviceName = new QName(targetNS, "TestEndpointService");\n"
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"TestEndpoint port = service.getPort(TestEndpoint.class);\n"
+" \n"
+"Response response = port.echoAsync("Async");\n"
+" \n"
+"// access future\n"
+"String retStr = (String) response.get();\n"
+"assertEquals("Async", retStr);\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:347
+#, no-c-format
+msgid "Oneway Invocations"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:348
+#, no-c-format
+msgid ""
+"@Oneway indicates that the given web method has only an input message and no "
+"output. Typically, a oneway method returns the thread of control to the "
+"calling application prior to executing the actual business method."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:351
+#, no-c-format
+msgid ""
+"@WebService (name="PingEndpoint")\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class PingEndpointImpl\n"
+"{\n"
+" private static String feedback;\n"
+".. \n"
+"@WebMethod\n"
+"@Oneway\n"
+"public void ping()\n"
+"{\n"
+"log.info("ping");\n"
+"feedback = "ok";\n"
+"}\n"
+".. \n"
+"@WebMethod\n"
+"public String feedback()\n"
+"{\n"
+"log.info("feedback");\n"
+"return feedback;\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:357
+#, no-c-format
+msgid "Common API"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:358
+#, no-c-format
+msgid ""
+"This sections describes concepts that apply equally to <ulink url=\"http://"
+"jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_User_Guide#Web_Service_Endpoints\">#Web Service Endpoints</ulink> and "
+"<ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_User_Guide#Web_Service_Clients\">#Web Service Clients</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:362
+#, no-c-format
+msgid "Handler Framework"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:363
+#, no-c-format
+msgid ""
+"The handler framework is implemented by a JAX-WS protocol binding in both "
+"client and server side runtimes. Proxies, and Dispatch instances, known "
+"collectively as binding providers, each use protocol bindings to bind their "
+"abstract functionality to specific protocols."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:366
+#, no-c-format
+msgid ""
+"Client and server-side handlers are organized into an ordered list known as "
+"a handler chain. The handlers within a handler chain are invoked each time a "
+"message is sent or received. Inbound messages are processed by handlers "
+"prior to binding provider processing. Outbound messages are processed by "
+"handlers after any binding provider processing."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:369
+#, no-c-format
+msgid ""
+"Handlers are invoked with a message context that provides methods to access "
+"and modify inbound and outbound messages and to manage a set of properties. "
+"Message context properties may be used to facilitate communication between "
+"individual handlers and between handlers and client and service "
+"implementations. Different types of handlers are invoked with different "
+"types of message context."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:373
+#, no-c-format
+msgid "Logical Handler"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:374
+#, no-c-format
+msgid ""
+"Handlers that only operate on message context properties and message "
+"payloads. Logical handlers are protocol agnostic and are unable to affect "
+"protocol specific parts of a message. Logical handlers are handlers that "
+"implement javax.xml.ws.handler.LogicalHandler."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:380
+#, no-c-format
+msgid "Protocol Handler"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:381
+#, no-c-format
+msgid ""
+"Handlers that operate on message context properties and protocol specific "
+"messages. Protocol handlers are specific to a particular protocol and may "
+"access and change protocol specific aspects of a message. Protocol handlers "
+"are handlers that implement any interface derived from javax.xml.ws.handler."
+"Handler except javax.xml.ws.handler.LogicalHandler."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:387
+#, no-c-format
+msgid "Service endpoint handlers"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:388
+#, no-c-format
+msgid ""
+"On the service endpoint, handlers are defined using the @HandlerChain "
+"annotation."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:391
+#, no-c-format
+msgid ""
+"@WebService\n"
+"@HandlerChain(file = "jaxws-server-source-handlers.xml")\n"
+"public class SOAPEndpointSourceImpl\n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:392
+#, no-c-format
+msgid "The location of the handler chain file supports 2 formats"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:395
+#, no-c-format
+msgid ""
+"1. An absolute java.net.URL in externalForm. (ex: <ulink url=\"http://"
+"myhandlers.foo.com/handlerfile1.xml\">http://myhandlers.foo.com/handlerfile1."
+"xml</ulink>)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:398
+#, no-c-format
+msgid ""
+"2. A relative path from the source file or class file. (ex: bar/handlerfile1."
+"xml)"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:404
+#, fuzzy, no-c-format
+msgid "Service client handlers"
+msgstr "服务架构"
+
+#. Tag: para
+#: Web_Services.xml:405
+#, no-c-format
+msgid ""
+"On the client side, handler can be configured using the @HandlerChain "
+"annotation on the SEI or dynamically using the API."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:408
+#, no-c-format
+msgid ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"Endpoint port = (Endpoint)service.getPort(Endpoint.class);\n"
+" \n"
+"BindingProvider bindingProvider = (BindingProvider)port;\n"
+"List<Handler> handlerChain = new ArrayList<Handler>();\n"
+"handlerChain.add(new LogHandler());\n"
+"handlerChain.add(new AuthorizationHandler());\n"
+"handlerChain.add(new RoutingHandler());\n"
+"bindingProvider.getBinding().setHandlerChain(handlerChain); // important!"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:414
+#, fuzzy, no-c-format
+msgid "Message Context"
+msgstr "上下文"
+
+#. Tag: para
+#: Web_Services.xml:415
+#, no-c-format
+msgid ""
+"MessageContext is the super interface for all JAX-WS message contexts. It "
+"extends Map<String,Object> with additional methods and constants to "
+"manage a set of properties that enable handlers in a handler chain to share "
+"processing related state. For example, a handler may use the put method to "
+"insert a property in the message context that one or more other handlers in "
+"the handler chain may subsequently obtain via the get method."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:418
+#, no-c-format
+msgid ""
+"Properties are scoped as either APPLICATION or HANDLER. All properties are "
+"available to all handlers for an instance of an MEP on a particular "
+"endpoint. E.g., if a logical handler puts a property in the message context, "
+"that property will also be available to any protocol handlers in the chain "
+"during the execution of an MEP instance. APPLICATION scoped properties are "
+"also made available to client applications and service endpoint "
+"implementations. The defaultscope for a property is HANDLER."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:422
+#, no-c-format
+msgid "Logical Message Context"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:423
+#, no-c-format
+msgid ""
+"<ulink url=\"#\">#Logical Handlers</ulink> are passed a message context of "
+"type LogicalMessageContext when invoked. LogicalMessageContext extends "
+"MessageContext with methods to obtain and modify the message payload, it "
+"does not provide access to the protocol specific aspects of amessage. A "
+"protocol binding defines what component of a message are available via a "
+"logical message context. The SOAP binding defines that a logical handler "
+"deployed in a SOAP binding can access the contents of the SOAP body but not "
+"the SOAP headers whereas the XML/HTTP binding defines that a logical handler "
+"can access the entire XML payload of a message."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:429
+#, no-c-format
+msgid "SOAP Message Context"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:430
+#, no-c-format
+msgid ""
+"SOAP handlers are passed a SOAPMessageContext when invoked. "
+"SOAPMessageContext extends MessageContext with methods to obtain and modify "
+"the SOAP message payload."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:438
+#, no-c-format
+msgid "Fault Handling"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:439
+#, no-c-format
+msgid "An implementation may thow a SOAPFaultException"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:442
+#, no-c-format
+msgid ""
+"public void throwSoapFaultException()\n"
+"{\n"
+"SOAPFactory factory = SOAPFactory.newInstance();\n"
+"SOAPFault fault = factory.createFault("this is a fault string!", "
+"new QName("http://foo", "FooCode"));\n"
+"fault.setFaultActor("mr.actor");\n"
+"fault.addDetail().addChildElement("test");\n"
+"throw new SOAPFaultException(fault);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:443
+#, fuzzy, no-c-format
+msgid "or an application specific user exception"
+msgstr "EJB 应用程序配置"
+
+#. Tag: programlisting
+#: Web_Services.xml:446
+#, no-c-format
+msgid ""
+"public void throwApplicationException() throws UserException\n"
+"{\n"
+"throw new UserException("validation", 123, "Some validation "
+"error");\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:449 Web_Services.xml:576 Web_Services.xml:609
+#: Web_Services.xml:781 Web_Services.xml:814 Web_Services.xml:956
+#: Web_Services.xml:1128 Web_Services.xml:1362 Web_Services.xml:1486
+#: Web_Services.xml:1501
+#, fuzzy, no-c-format
+msgid "Note"
+msgstr "备注"
+
+#. Tag: para
+#: Web_Services.xml:450
+#, no-c-format
+msgid ""
+"In case of the latter JBossWS generates the required fault wrapper beans at "
+"runtime if they are not part of the deployment"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:460
+#, no-c-format
+msgid "DataBinding"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:462
+#, no-c-format
+msgid "Using JAXB with non annotated classes"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:463
+#, no-c-format
+msgid "Since 2.0.2"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:466
+#, no-c-format
+msgid ""
+"JAXB is heavily driven by Java Annotations on the Java Bindings. It "
+"currently doesn't support an external binding configuration. This "
+"recently became an issue for us on JBossESB since the JBossWS 2.0.0 native "
+"SOAP stack uses JAXB to perform the SOAP to Java bindings (see 1, 2). It'"
+"s an issue for JBossESB simply because it needs to be able to support user "
+"definition of JBossWS native Webservice Endpoints (e.g. JSR 181) using Java "
+"typesets that have not been \"JAXB Annotated\" (see JAXB Introductions On "
+"JBossWS)."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:469
+#, no-c-format
+msgid ""
+"In order to support this, we built on a JAXB RI feature whereby it allows "
+"you to specify a RuntimeInlineAnnotationReader implementation during "
+"JAXBContext creation (see JAXBRIContext)."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:472
+#, no-c-format
+msgid ""
+"We call this feature \"JAXB Annotation Introduction\" and we've made it "
+"available for general consumption i.e. it can be checked out, built and used "
+"from SVN:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:478
+#, no-c-format
+msgid "http://anonsvn.jboss.org/repos/jbossws/projects/jaxbintros/"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:482
+#, no-c-format
+msgid "Complete documentation can be found here:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:488
+#, fuzzy, no-c-format
+msgid "JAXB Introductions"
+msgstr "简介"
+
+#. Tag: title
+#: Web_Services.xml:497
+#, no-c-format
+msgid "Attachments"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:499
+#, no-c-format
+msgid "MTOM/XOP"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:500
+#, no-c-format
+msgid ""
+"This section describes Message Transmission Optimization Mechanism (MTOM) "
+"and XML-binary Optimized Packaging (XOP), a means of more efficiently "
+"serializing XML Infosets that have certain types of content. The related "
+"specifications are"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:506
+#, no-c-format
+msgid "SOAP Message Transmission Optimization Mechanism (MTOM)"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:511
+#, no-c-format
+msgid "XML-binary Optimized Packaging (XOP)"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:516
+#, no-c-format
+msgid "Supported MTOM parameter types"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:523
+#, no-c-format
+msgid "image/jpeg"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:528
+#, no-c-format
+msgid "java.awt.Image"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:535
+#, no-c-format
+msgid "text/xml"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:540 Web_Services.xml:552
+#, no-c-format
+msgid "javax.xml.transform.Source"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:547
+#, fuzzy, no-c-format
+msgid "application/xml"
+msgstr "Web 应用程序"
+
+#. Tag: para
+#: Web_Services.xml:559
+#, no-c-format
+msgid "application/octet-stream"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:564
+#, no-c-format
+msgid "javax.activation.DataHandler"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:571
+#, no-c-format
+msgid ""
+"The above table shows a list of supported endpoint parameter types. The "
+"recommended approach is to use the <ulink url=\"http://java.sun.com/j2ee/1.4/"
+"docs/api/javax/activation/DataHandler.html\">javax.activation.DataHandler</"
+"ulink> classes to represent binary data as service endpoint parameters."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:577
+#, no-c-format
+msgid ""
+"Microsoft endpoints tend to send any data as application/octet-stream. The "
+"only Java type that can easily cope with this ambiguity is javax.activation."
+"DataHandler"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:585
+#, no-c-format
+msgid "Enabling MTOM per endpoint"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:586
+#, no-c-format
+msgid ""
+"On the server side MTOM processing is enabled through the "
+"<literal>@BindingType</literal> annotation. JBossWS does handle SOAP1.1 and "
+"SOAP1.2. Both come with or without MTOM flavours:"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:590
+#, no-c-format
+msgid "MTOM enabled service implementations"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:592
+#, no-c-format
+msgid ""
+"package org.jboss.test.ws.jaxws.samples.xop.doclit;\n"
+" \n"
+"import javax.ejb.Remote;\n"
+"import javax.jws.WebService;\n"
+"import javax.jws.soap.SOAPBinding;\n"
+"import javax.xml.ws.BindingType;\n"
+" \n"
+"@Remote\n"
+"@WebService(targetNamespace = "http://org.jboss.ws/xop/doclit")\n"
+"@SOAPBinding(style = SOAPBinding.Style.DOCUMENT, parameterStyle = "
+"SOAPBinding.ParameterStyle.BARE)\n"
+"@BindingType(value="http://schemas.xmlsoap.org/wsdl/soap/http?"
+"mtom=true") (1)\n"
+"public interface MTOMEndpoint {\n"
+" \n"
+"[...]\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:595
+#, no-c-format
+msgid "The MTOM enabled SOAP 1.1 binding ID"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:601
+#, no-c-format
+msgid "MTOM enabled clients"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:603
+#, no-c-format
+msgid ""
+"Web service clients can use the same approach described above or rely on the "
+"<literal>Binding</literal> API to enable MTOM (Excerpt taken from the "
+"<literal>org.jboss.test.ws.jaxws.samples.xop.doclit.XOPTestCase</literal>):"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:606
+#, no-c-format
+msgid ""
+"[...]\n"
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"port = service.getPort(MTOMEndpoint.class);\n"
+" \n"
+"// enable MTOM\n"
+"binding = (SOAPBinding)((BindingProvider)port).getBinding();\n"
+"binding.setMTOMEnabled(true);"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:610
+#, no-c-format
+msgid ""
+"You might as well use the JBossWS configuration templates to setup "
+"deployment defaults."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:620
+#, no-c-format
+msgid "SwaRef"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:621
+#, no-c-format
+msgid "Since 2.0"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:624
+#, no-c-format
+msgid ""
+"<ulink url=\"http://www.ws-i.org/Profiles/AttachmentsProfile-1.0-2004-08-24."
+"html\">WS-I Attachment Profile 1.0</ulink> defines mechanism to reference "
+"MIME attachment parts using <ulink url=\"http://www.ws-i.org/Profiles/"
+"AttachmentsProfile-1.0-2004-08-24."
+"html#Referencing_Attachments_from_the_SOAP_Envelope\">swaRef</ulink>. In "
+"this mechanism the content of XML element of type wsi:swaRef is sent as MIME "
+"attachment and the element inside SOAP Body holds the reference to this "
+"attachment in the CID URI scheme as defined by <ulink url=\"http://www.ietf."
+"org/rfc/rfc2111.txt\">RFC 2111</ulink>."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:628
+#, no-c-format
+msgid "Using SwaRef with JAX-WS endpoints"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:629
+#, no-c-format
+msgid ""
+"JAX-WS endpoints delegate all marshalling/unmarshalling to the JAXB API. The "
+"most simple way to enable SwaRef encoding for <literal>DataHandler</literal> "
+"types is to annotate a payload bean with the <literal>@XmlAttachmentRef</"
+"literal> annotation as shown below:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:632
+#, no-c-format
+msgid ""
+"/**\n"
+"* Payload bean that will use SwaRef encoding\n"
+"*/\n"
+"@XmlRootElement\n"
+"public class DocumentPayload\n"
+"{\n"
+"private DataHandler data;\n"
+" \n"
+"public DocumentPayload()\n"
+"{\n"
+"}\n"
+" \n"
+"public DocumentPayload(DataHandler data)\n"
+"{\n"
+"this.data = data;\n"
+"}\n"
+" \n"
+"@XmlElement\n"
+"@XmlAttachmentRef\n"
+"public DataHandler getData()\n"
+"{\n"
+"return data;\n"
+"}\n"
+" \n"
+"public void setData(DataHandler data)\n"
+"{\n"
+"this.data = data;\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:633
+#, no-c-format
+msgid ""
+"With document wrapped endpoints you may even specify the "
+"<literal>@XmlAttachmentRef</literal> annotation on the service endpoint "
+"interface:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:636
+#, no-c-format
+msgid ""
+"@WebService\n"
+"public interface DocWrappedEndpoint\n"
+"{\n"
+"@WebMethod\n"
+"DocumentPayload beanAnnotation(DocumentPayload dhw, String test);\n"
+" \n"
+"@WebMethod\n"
+"@XmlAttachmentRef\n"
+"DataHandler parameterAnnotation(@XmlAttachmentRef DataHandler data, String "
+"test);\n"
+" \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:637
+#, no-c-format
+msgid "The message would then refer to the attachment part by CID:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:640
+#, no-c-format
+msgid ""
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header/>\n"
+"<env:Body>\n"
+"<ns2:parameterAnnotation xmlns:ns2='http://swaref.samples.jaxws.ws."
+"test.jboss.org/'>\n"
+"<arg0>cid:0-1180017772935-32455963 at ws.jboss.org</arg0>\n"
+"<arg1>Wrapped test</arg1>\n"
+"</ns2:parameterAnnotation>\n"
+"</env:Body>\n"
+"</env:Envelope>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:644
+#, no-c-format
+msgid "Starting from WSDL"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:645
+#, no-c-format
+msgid ""
+"If you chose the contract first approach then you need to ensure that any "
+"element declaration that should use SwaRef encoding simply refers to wsi:"
+"swaRef schema type:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:648
+#, no-c-format
+msgid ""
+"<element name="data" type="wsi:swaRef" \n"
+"xmlns:wsi="http://ws-i.org/profiles/basic/1.1/xsd"/>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:649
+#, no-c-format
+msgid "Any wsi:swaRef schema type would then be mapped to DataHandler."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:659
+#, no-c-format
+msgid "Tools"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:660
+#, no-c-format
+msgid ""
+"The JAX-WS tools provided by JBossWS can be used in a variety of ways. First "
+"we will look at server-side development strategies, and then proceed to the "
+"client. When developing a Web Service Endpoint (the server-side) you have "
+"the option of starting from Java (bottom-up development), or from the "
+"abstact contract (WSDL) that defines your service (top-down development). If "
+"this is a new service (no existing contract), the bottom-up approach is the "
+"fastest route; you only need to add a few annotations to your classes to get "
+"a service up and running. However, if you are developing a service with an "
+"already defined contract, it is far simpler to use the top-down approach, "
+"since the provided tool will generate the annotated code for you."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:663
+#, no-c-format
+msgid "Bottom-up use cases:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:668
+#, no-c-format
+msgid "Exposing an already existing EJB3 bean as a Web Service"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:673
+#, no-c-format
+msgid ""
+"Providing a new service, and you want the contract to be generated for you"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:678
+#, no-c-format
+msgid "Top-down use cases:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:683
+#, no-c-format
+msgid ""
+"Replacing the implementation of an existing Web Service, and you can't "
+"break compatibility with older clients"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:688
+#, no-c-format
+msgid ""
+"Exposing a service that conforms to a contract specified by a third party (e."
+"g. a vender that calls you back using an already defined protocol)."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:693
+#, no-c-format
+msgid ""
+"Creating a service that adheres to the XML Schema and WSDL you developed by "
+"hand up front"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:698
+#, no-c-format
+msgid "The following JAX-WS command line tools are included in JBossWS:"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:708
+#, no-c-format
+msgid "Command"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:713
+#, no-c-format
+msgid "Description"
+msgstr "描述"
+
+#. Tag: ulink
+#: Web_Services.xml:720
+#, no-c-format
+msgid "wsprovide"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:724
+#, no-c-format
+msgid ""
+"Generates JAX-WS portable artifacts, and provides the abstract contract. "
+"Used for bottom-up development."
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:732
+#, no-c-format
+msgid "wsconsume"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:736
+#, no-c-format
+msgid ""
+"Consumes the abstract contract (WSDL and Schema files), and produces "
+"artifacts for both a server and client. Used for top-down and client "
+"development"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:744
+#, fuzzy, no-c-format
+msgid "wsrunclient"
+msgstr "client"
+
+#. Tag: para
+#: Web_Services.xml:748
+#, no-c-format
+msgid "Executes a Java client (has a main method) using the JBossWS classpath."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:756
+#, no-c-format
+msgid "Bottom-Up (Using wsprovide)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:757
+#, no-c-format
+msgid ""
+"The bottom-up strategy involves developing the Java code for your service, "
+"and then annotating it using JAX-WS annotations. These annotations can be "
+"used to customize the contract that is generated for your service. For "
+"example, you can change the operation name to map to anything you like. "
+"However, all of the annotations have sensible defaults, so only the "
+"@WebService annotation is required."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:760
+#, no-c-format
+msgid "This can be as simple as creating a single class:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:763
+#, no-c-format
+msgid ""
+"package echo;\n"
+" \n"
+"@javax.jws.WebService\n"
+"public class Echo\n"
+"{\n"
+"public String echo(String input)\n"
+"{\n"
+"return input;\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:764
+#, no-c-format
+msgid ""
+"A JSE or EJB3 deployment can be built using this class, and it is the only "
+"Java code needed to deploy on JBossWS. The WSDL, and all other Java "
+"artifacts called \"wrapper classes\" will be generated for you at deploy "
+"time. This actually goes beyond the JAX-WS specification, which requires "
+"that wrapper classes be generated using an offline tool. The reason for this "
+"requirement is purely a vender implementation problem, and since we do not "
+"believe in burdening a developer with a bunch of additional steps, we "
+"generate these as well. However, if you want your deployment to be portable "
+"to other application servers, you will unfortunately need to use a tool and "
+"add the generated classes to your deployment."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:767
+#, no-c-format
+msgid ""
+"This is the primary purpose of the <ulink url=\"http://jbws.dyndns.org/"
+"mediawiki/index.php?title=Wsprovide\">wsprovide</ulink> tool, to generate "
+"portable JAX-WS artifacts. Additionally, it can be used to \"provide\" the "
+"abstract contract (WSDL file) for your service. This can be obtained by "
+"invoking <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?"
+"title=Wsprovide\">wsprovide</ulink> using the \"-w\" option:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:770
+#, no-c-format
+msgid ""
+"$ javac -d . -classpath jboss-jaxws.jar Echo.java\n"
+"$ wsprovide -w echo.Echo\n"
+"Generating WSDL:\n"
+"EchoService.wsdl\n"
+"Writing Classes:\n"
+"echo/jaxws/Echo.class\n"
+"echo/jaxws/EchoResponse.class"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:771
+#, no-c-format
+msgid "Inspecting the WSDL reveals a service called EchoService:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:774 Web_Services.xml:938
+#, no-c-format
+msgid ""
+"<service name='EchoService'>\n"
+"<port binding='tns:EchoBinding' name='EchoPort'>\n"
+"<soap:address location='REPLACE_WITH_ACTUAL_URL'/>\n"
+"</port>\n"
+"</service>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:775
+#, no-c-format
+msgid "As expected, this service defines one operation, \"echo\":"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:778
+#, no-c-format
+msgid ""
+"<portType name='Echo'>\n"
+"<operation name='echo' parameterOrder='echo'>\n"
+"<input message='tns:Echo_echo'/>\n"
+"<output message='tns:Echo_echoResponse'/>\n"
+"</operation>\n"
+"</portType>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:782
+#, no-c-format
+msgid ""
+"Remember that <emphasis role=\"bold\">when deploying on JBossWS you do not "
+"need to run this tool.</emphasis> You only need it for generating portable "
+"artifacts and/or the abstract contract for your service."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:787
+#, no-c-format
+msgid ""
+"Let's create a POJO endpoint for deployment on JBoss AS. A simple web."
+"xml needs to be created:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:790
+#, no-c-format
+msgid ""
+"<web-app xmlns="http://java.sun.com/xml/ns/j2ee"\n"
+"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n"
+"xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/"
+"xml/ns/j2ee/web-app_2_4.xsd"\n"
+"version="2.4">\n"
+" \n"
+"<servlet>\n"
+"<servlet-name>Echo</servlet-name>\n"
+"<servlet-class>echo.Echo</servlet-class>\n"
+"</servlet>\n"
+" \n"
+"<servlet-mapping>\n"
+"<servlet-name>Echo</servlet-name>\n"
+"<url-pattern>/Echo</url-pattern>\n"
+"</servlet-mapping>\n"
+"</web-app>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:791
+#, no-c-format
+msgid "The web.xml and the single class can now be used to create a war:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:794
+#, no-c-format
+msgid ""
+"$ mkdir -p WEB-INF/classes\n"
+"$ cp -rp echo WEB-INF/classes/\n"
+"$ cp web.xml WEB-INF\n"
+"$ jar cvf echo.war WEB-INF\n"
+"added manifest\n"
+"adding: WEB-INF/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/echo/(in = 0) (out= 0)(stored 0%)\n"
+"adding: WEB-INF/classes/echo/Echo.class(in = 340) (out= 247)(deflated 27%)\n"
+"adding: WEB-INF/web.xml(in = 576) (out= 271)(deflated 52%)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:795
+#, no-c-format
+msgid "The war can then be deployed:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:798
+#, no-c-format
+msgid "cp echo.war jboss-as/server/default/deploy"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:799
+#, no-c-format
+msgid ""
+"This will internally invoke <ulink url=\"http://jbws.dyndns.org/mediawiki/"
+"index.php?title=Wsprovide\">wsprovide</ulink>, which will generate the WSDL. "
+"If deployment was successful, and you are using the default settings, it "
+"should be available here: <ulink url=\"http://localhost:8080/echo/Echo?wsdl"
+"\">http://localhost:8080/echo/Echo?wsdl</ulink>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:802
+#, no-c-format
+msgid ""
+"For a portable JAX-WS deployment, the wrapper classes generated earlier "
+"could be added to the deployment."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:808
+#, no-c-format
+msgid "Top-Down (Using wsconsume)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:809
+#, no-c-format
+msgid ""
+"The top-down development strategy begins with the abstract contract for the "
+"service, which includes the WSDL file and zero or more schema files. The "
+"<ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=Wsconsume"
+"\">wsconsume</ulink> tool is then used to consume this contract, and produce "
+"annotated Java classes (and optionally sources) that define it."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:815
+#, no-c-format
+msgid "wsconsume seems to have a problem with symlinks on unix systems"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:820
+#, no-c-format
+msgid ""
+"Using the WSDL file from the bottom-up example, a new Java implementation "
+"that adheres to this service can be generated. The \"-k\" option is passed "
+"to <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=Wsconsume"
+"\">wsconsume</ulink> to preserve the Java source files that are generated, "
+"instead of providing just classes:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:823
+#, no-c-format
+msgid ""
+"$ wsconsume -k EchoService.wsdl\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:824
+#, no-c-format
+msgid "The following table shows the purpose of each generated file:"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:834
+#, no-c-format
+msgid "File"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:839
+#, no-c-format
+msgid "Purpose"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:845
+#, no-c-format
+msgid "Echo.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:850
+#, fuzzy, no-c-format
+msgid "Service Endpoint Interface"
+msgstr "服务生命周期接口"
+
+#. Tag: para
+#: Web_Services.xml:857
+#, no-c-format
+msgid "Echo_Type.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:862
+#, no-c-format
+msgid "Wrapper bean for request message"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:869
+#, no-c-format
+msgid "EchoResponse.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:874
+#, no-c-format
+msgid "Wrapper bean for response message"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:881
+#, no-c-format
+msgid "ObjectFactory.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:886
+#, no-c-format
+msgid "JAXB XML Registry"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:893
+#, no-c-format
+msgid "package-info.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:898
+#, no-c-format
+msgid "Holder for JAXB package annotations"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:905
+#, no-c-format
+msgid "EchoService.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:910
+#, no-c-format
+msgid "Used only by JAX-WS clients"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:917
+#, no-c-format
+msgid ""
+"Examining the Service Endpoint Interface reveals annotations that are more "
+"explicit than in the class written by hand in the bottom-up example, "
+"however, these evaluate to the same contract:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:920
+#, no-c-format
+msgid ""
+"@WebService(name = "Echo", targetNamespace = "http://echo/"
+"")\n"
+"public interface Echo {\n"
+"@WebMethod\n"
+"@WebResult(targetNamespace = "")\n"
+"@RequestWrapper(localName = "echo", targetNamespace = "http://"
+"echo/", className = "echo.Echo_Type")\n"
+"@ResponseWrapper(localName = "echoResponse", targetNamespace = "
+""http://echo/", className = "echo.EchoResponse")\n"
+"public String echo(\n"
+"@WebParam(name = "arg0", targetNamespace = "")\n"
+"String arg0);\n"
+" \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:921
+#, no-c-format
+msgid ""
+"The only missing piece (besides the packaging) is the implementation class, "
+"which can now be written, using the above interface."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:924
+#, no-c-format
+msgid ""
+"package echo;\n"
+" \n"
+"@javax.jws.WebService(endpointInterface="echo.Echo")\n"
+"public class EchoImpl implements Echo\n"
+"{\n"
+"public String echo(String arg0)\n"
+"{\n"
+"return arg0;\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:928
+#, no-c-format
+msgid "Client Side"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:929
+#, no-c-format
+msgid ""
+"Before going to detail on the client-side it is important to understand the "
+"decoupling concept that is central to Web Services. Web Services are not the "
+"best fit for internal RPC, even though they can be used in this way. There "
+"are much better technologies for this (CORBA, and RMI for example). Web "
+"Services were designed specifically for interoperable coarse-grained "
+"correspondence. There is no expectation or guarantee that any party "
+"participating in a Web Service interaction will be at any particular "
+"location, running on any particular OS, or written in any particular "
+"programming language. So because of this, it is important to clearly "
+"separate client and server implementations. The only thing they should have "
+"in common is the abstract contract definition. If, for whatever reason, your "
+"software does not adhere to this principal, then you should not be using Web "
+"Services. For the above reasons, the <emphasis role=\"bold"
+"\"><emphasis>recommended methodology for developing a client is</emphasis></"
+"emphasis> to follow <emphasis role=\"bold\"><emphasis>the top-down approach</"
+"emphasis></emphasis> , even if the client is running on the same server."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:932
+#, no-c-format
+msgid ""
+"Let's repeat the process of the top-down section, although using the "
+"deployed WSDL, instead of the one generated offline by <ulink url=\"http://"
+"jbws.dyndns.org/mediawiki/index.php?title=Wsprovide\">wsprovide</ulink>. The "
+"reason why we do this is just to get the right value for soap:address. This "
+"value must be computed at deploy time, since it is based on container "
+"configuration specifics. You could of course edit the WSDL file yourself, "
+"although you need to ensure that the path is correct."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:935
+#, no-c-format
+msgid "Offline version:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:939
+#, no-c-format
+msgid "Online version:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:942
+#, no-c-format
+msgid ""
+"<service name="EchoService">\n"
+"<port binding="tns:EchoBinding" name="EchoPort">\n"
+"<soap:address location="http://localhost.localdomain:8080/echo/"
+"Echo"/>\n"
+"</port>\n"
+"</service>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:943
+#, no-c-format
+msgid ""
+"Using the online deployed version with <ulink url=\"http://jbws.dyndns.org/"
+"mediawiki/index.php?title=Wsconsume\">wsconsume</ulink>:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:946
+#, no-c-format
+msgid ""
+"$ wsconsume -k http://localhost:8080/echo/Echo?wsdl\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java\n"
+"echo/Echo.java\n"
+"echo/EchoResponse.java\n"
+"echo/EchoService.java\n"
+"echo/Echo_Type.java\n"
+"echo/ObjectFactory.java\n"
+"echo/package-info.java"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:947
+#, no-c-format
+msgid ""
+"The one class that was not examined in the top-down section, was EchoService."
+"java. Notice how it stores the location the WSDL was obtained from."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:950
+#, no-c-format
+msgid ""
+"@WebServiceClient(name = "EchoService", targetNamespace = ""
+"http://echo/", wsdlLocation = "http://localhost:8080/echo/Echo?"
+"wsdl")\n"
+"public class EchoService extends Service\n"
+"{\n"
+"private final static URL ECHOSERVICE_WSDL_LOCATION;\n"
+" \n"
+"static {\n"
+"URL url = null;\n"
+"try {\n"
+"url = new URL("http://localhost:8080/echo/Echo?wsdl");\n"
+"} catch (MalformedURLException e) {\n"
+"e.printStackTrace();\n"
+"}\n"
+"ECHOSERVICE_WSDL_LOCATION = url;\n"
+"}\n"
+" \n"
+"public EchoService(URL wsdlLocation, QName serviceName) {\n"
+"super(wsdlLocation, serviceName);\n"
+"}\n"
+" \n"
+"public EchoService() {\n"
+"super(ECHOSERVICE_WSDL_LOCATION, new QName("http://echo/", ""
+"EchoService"));\n"
+"}\n"
+" \n"
+"@WebEndpoint(name = "EchoPort")\n"
+"public Echo getEchoPort() {\n"
+"return (Echo)super.getPort(new QName("http://echo/", ""
+"EchoPort"), Echo.class);\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:951
+#, no-c-format
+msgid ""
+"As you can see, this generated class extends the main client entry point in "
+"JAX-WS, javax.xml.ws.Service. While you can use Service directly, this is "
+"far simpler since it provides the configuration info for you. The only "
+"method we really care about is the getEchoPort() method, which returns an "
+"instance of our Service Endpoint Interface. Any WS operation can then be "
+"called by just invoking a method on the returned interface."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:957
+#, no-c-format
+msgid ""
+"It's not recommended to refer to a remote WSDL URL in a production "
+"application. This causes network I/O every time you instantiate the Service "
+"Object. Instead, use the tool on a saved local copy, or use the URL version "
+"of the constructor to provide a new WSDL location."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:962
+#, no-c-format
+msgid "All that is left to do, is write and compile the client:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:965
+#, no-c-format
+msgid ""
+"import echo.*;\n"
+"..\n"
+"public class EchoClient\n"
+"{\n"
+"public static void main(String args[])\n"
+"{\n"
+"if (args.length != 1)\n"
+"{\n"
+"System.err.println("usage: EchoClient <message>");\n"
+"System.exit(1);\n"
+"}\n"
+" \n"
+"EchoService service = new EchoService();\n"
+"Echo echo = service.getEchoPort();\n"
+"System.out.println("Server said: " + echo.echo(args[0]));\n"
+"} \n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:966
+#, no-c-format
+msgid ""
+"It can then be easily executed using the <ulink url=\"http://jbws.dyndns.org/"
+"mediawiki/index.php?title=Wsrunclient\">wsrunclient</ulink> tool. This is "
+"just a convenience tool that invokes java with the needed classpath:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:969
+#, no-c-format
+msgid ""
+"$ wsrunclient EchoClient 'Hello World!'\n"
+"Server said: Hello World!"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:970
+#, no-c-format
+msgid ""
+"It is easy to change the endpoint address of your operation at runtime, "
+"setting the ENDPOINT_ADDRESS_PROPERTY as shown below:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:973
+#, no-c-format
+msgid ""
+"...\n"
+"EchoService service = new EchoService();\n"
+"Echo echo = service.getEchoPort();\n"
+" \n"
+"/* Set NEW Endpoint Location */\n"
+"String endpointURL = "http://NEW_ENDPOINT_URL";\n"
+"BindingProvider bp = (BindingProvider)echo;\n"
+"bp.getRequestContext().put(BindingProvider.ENDPOINT_ADDRESS_PROPERTY, "
+"endpointURL);\n"
+" \n"
+"System.out.println("Server said: " + echo.echo(args[0]));\n"
+"..."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:977
+#, no-c-format
+msgid "Command-line & Ant Task Reference"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:981
+#, no-c-format
+msgid "wsconsume reference page"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:986
+#, no-c-format
+msgid "wsprovide reference page"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:991
+#, no-c-format
+msgid "wsrunclient reference page"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:998
+#, no-c-format
+msgid "JAX-WS binding customization"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:999
+#, no-c-format
+msgid "An introduction to binding customizations:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1005
+#, no-c-format
+msgid "http://java.sun.com/webservices/docs/2.0/jaxws/customizations.html"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1009
+#, no-c-format
+msgid "The schema for the binding customization files can be found here:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1015
+#, no-c-format
+msgid "binding customization"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1024
+#, no-c-format
+msgid "Web Service Extensions"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1026
+#, no-c-format
+msgid "WS-Addressing"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1027
+#, no-c-format
+msgid ""
+"This section describes how <ulink url=\"http://www.w3.org/TR/ws-addr-core"
+"\">WS-Addressing</ulink> can be used to provide a staful service endpoint."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1031 Web_Services.xml:1107
+#, fuzzy, no-c-format
+msgid "<title>Specifications</title>"
+msgstr "<title>FD</title>"
+
+#. Tag: para
+#: Web_Services.xml:1032
+#, no-c-format
+msgid ""
+"WS-Addressing is defined by a combination of the following specifications "
+"from the W3C Candidate Recommendation 17 August 2005. The WS-Addressing API "
+"is standardized by <ulink url=\"http://www.jcp.org/en/jsr/detail?id=261"
+"\">JSR-261 - Java API for XML Web Services Addressing</ulink>"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1038
+#, no-c-format
+msgid "Web Services Addressing 1.0 - Core"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1043
+#, no-c-format
+msgid "Web Services Addressing 1.0 - SOAP Binding"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1050
+#, no-c-format
+msgid "Addressing Endpoint"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1051
+#, no-c-format
+msgid ""
+"The following endpoint implementation has a set of operation for a typical "
+"stateful shopping chart application."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1054
+#, no-c-format
+msgid ""
+"@WebService(name = "StatefulEndpoint", targetNamespace = ""
+"http://org.jboss.ws/samples/wsaddressing\n"
+" ", serviceName = ""
+"TestService")\n"
+"@EndpointConfig(configName = "Standard WSAddressing Endpoint")\n"
+"@HandlerChain(file = "WEB-INF/jaxws-handlers.xml")\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class StatefulEndpointImpl implements StatefulEndpoint, "
+"ServiceLifecycle\n"
+"{\n"
+"@WebMethod\n"
+"public void addItem(String item)\n"
+"{ ... }\n"
+" \n"
+"@WebMethod\n"
+"public void checkout()\n"
+"{ ... }\n"
+" \n"
+"@WebMethod\n"
+"public String getItems()\n"
+"{ ... }\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1055
+#, no-c-format
+msgid ""
+"It uses the <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?"
+"title=JAX-WS_Endpoint_Configuration#_Standard_WSAddressing_Endpoint\">JAX-WS "
+"Endpoint Configuration# Standard WSAddressing Endpoint</ulink> to enable the "
+"server side addressing handler. It processes the incomming WS-Addressing "
+"header elements and provides access to them through the JSR-261 API."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1058
+#, no-c-format
+msgid "The endpoint handler chain"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1061
+#, no-c-format
+msgid ""
+"<handler-chains xmlns="http://java.sun.com/xml/ns/javaee" \n"
+" xmlns:xsi="http://www.w3.org/2001/"
+"XMLSchema-instance"\n"
+"xsi:schemaLocation="http://java.sun.com/xml/ns/javaee "
+"javaee_web_services_1_2.xsd">\n"
+" \n"
+"<handler-chain>\n"
+"<protocol-bindings>##SOAP11_HTTP</protocol-bindings>\n"
+"<handler>\n"
+"<handler-name>Application Server Handler</handler-name>\n"
+"<handler-class>org.jboss.test.ws.jaxws.samples.wsaddressing."
+"ServerHandler</handler-class>\n"
+"</handler>\n"
+"</handler-chain>\n"
+" \n"
+"</handler-chains>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1062
+#, no-c-format
+msgid ""
+"defines an application specific hander that assignes/processes stateful "
+"client ids."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1068
+#, no-c-format
+msgid "Addressing Client"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1069
+#, no-c-format
+msgid ""
+"On the client side there are simmilar handlers that does the reverse. It "
+"uses the JSR-261 API to add WS-Addressing header elements including the "
+"clientid association."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1072
+#, no-c-format
+msgid "The client sets a custom handler chain in the binding"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1075
+#, no-c-format
+msgid ""
+"Service service = Service.create(wsdlURL, serviceName);\n"
+"port1 = (StatefulEndpoint)service.getPort(StatefulEndpoint.class);\n"
+"BindingProvider bindingProvider = (BindingProvider)port1;\n"
+" \n"
+"List<Handler> customHandlerChain = new ArrayList<Handler>();\n"
+"customHandlerChain.add(new ClientHandler());\n"
+"customHandlerChain.add(new WSAddressingClientHandler());\n"
+"bindingProvider.getBinding().setHandlerChain(customHandlerChain);"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1076
+#, no-c-format
+msgid ""
+"The WSAddressingClientHandler is provided by JBossWS and reads/writes the "
+"addressing properties and puts then into the message context."
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:1080
+#, no-c-format
+msgid "A client connecting to the stateful endpoint"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1082
+#, no-c-format
+msgid ""
+"public class AddressingStatefulTestCase extends JBossWSTest\n"
+"{\n"
+"public void testAddItem() throws Exception\n"
+"{\n"
+"port1.addItem("Ice Cream");\n"
+"port1.addItem("Ferrari");\n"
+" \n"
+"port2.addItem("Mars Bar");\n"
+"port2.addItem("Porsche");\n"
+"}\n"
+" \n"
+"public void testGetItems() throws Exception\n"
+"{\n"
+"String items1 = port1.getItems();\n"
+"assertEquals("[Ice Cream, Ferrari]", items1);\n"
+" \n"
+"String items2 = port2.getItems();\n"
+"assertEquals("[Mars Bar, Porsche]", items2);\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:1084 Web_Services.xml:1459
+#, no-c-format
+msgid "SOAP message exchange"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1086
+#, no-c-format
+msgid "Below you see the SOAP messages that are beeing exchanged."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1089
+#, no-c-format
+msgid ""
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/"
+"addressing'>\n"
+"<wsa:To>uri:jbossws-samples-wsaddr/TestService</wsa:To>\n"
+"<wsa:Action>http://org.jboss.ws/addressing/stateful/action</wsa:"
+"Action>\n"
+"<wsa:ReferenceParameters>\n"
+"<ns1:clientid xmlns:ns1='http://somens'>clientid-1</ns1:"
+"clientid>\n"
+"</wsa:ReferenceParameters>\n"
+"</env:Header>\n"
+"<env:Body>\n"
+"<ns1:addItem xmlns:ns1='http://org.jboss.ws/samples/wsaddr'"
+">\n"
+"<String_1>Ice Cream</String_1>\n"
+"</ns1:addItem>\n"
+"</env:Body>\n"
+"</env:Envelope>\n"
+" \n"
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/"
+"addressing'>\n"
+"<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>\n"
+"<wsa:Action>http://org.jboss.ws/addressing/stateful/actionReply</"
+"wsa:Action>\n"
+"<ns1:clientid xmlns:ns1='http://somens'>clientid-1</ns1:"
+"clientid>\n"
+"</env:Header>\n"
+"<env:Body>\n"
+"<ns1:addItemResponse xmlns:ns1='http://org.jboss.ws/samples/"
+"wsaddr'/>\n"
+"</env:Body>\n"
+"</env:Envelope>\n"
+" \n"
+"...\n"
+" \n"
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/"
+"addressing'>\n"
+"<wsa:To>uri:jbossws-samples-wsaddr/TestService</wsa:To>\n"
+"<wsa:Action>http://org.jboss.ws/addressing/stateful/action</wsa:"
+"Action>\n"
+"<wsa:ReferenceParameters>\n"
+"<ns1:clientid xmlns:ns1='http://somens'>clientid-1</ns1:"
+"clientid>\n"
+"</wsa:ReferenceParameters>\n"
+"</env:Header>\n"
+"<env:Body>\n"
+"<ns1:getItems xmlns:ns1='http://org.jboss.ws/samples/wsaddr'/"
+">\n"
+"</env:Body>\n"
+"</env:Envelope>\n"
+" \n"
+"<env:Envelope xmlns:env='http://schemas.xmlsoap.org/soap/envelope/"
+"'>\n"
+"<env:Header xmlns:wsa='http://schemas.xmlsoap.org/ws/2004/08/"
+"addressing'>\n"
+"<wsa:To>http://www.w3.org/2005/08/addressing/anonymous</wsa:To>\n"
+"<wsa:Action>http://org.jboss.ws/addressing/stateful/actionReply</"
+"wsa:Action>\n"
+"<ns1:clientid xmlns:ns1='http://somens'>clientid-1</ns1:"
+"clientid>\n"
+"</env:Header>\n"
+"<env:Body>\n"
+"<ns1:getItemsResponse xmlns:ns1='http://org.jboss.ws/samples/"
+"wsaddr'>\n"
+"<result>[Ice Cream, Ferrari]</result>\n"
+"</ns1:getItemsResponse>\n"
+"</env:Body>\n"
+"</env:Envelope>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1095
+#, no-c-format
+msgid "WS-BPEL"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1096
+#, no-c-format
+msgid ""
+"WS-BPEL is not supported with JAX-WS, please refer to <ulink url=\"http://"
+"jbws.dyndns.org/mediawiki/index.php?title=JAX-RPC_User_Guide#WS-BPEL\">JAX-"
+"RPC User Guide#WS-BPEL</ulink>."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1102
+#, no-c-format
+msgid "WS-Eventing"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1103
+#, no-c-format
+msgid ""
+"WS-Eventing specifies a set of operations that allow an event consumer to "
+"register (subscribe) with an event producer (source) to receive events "
+"(notifications) in an asynchronous fashion."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1108
+#, no-c-format
+msgid ""
+"WS-Eventing is defined by the combination of the following specifications:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1114
+#, no-c-format
+msgid "WS-Eventing specification"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1119
+#, no-c-format
+msgid "WS-Addressing Specifications"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1123
+#, fuzzy, no-c-format
+msgid ""
+"The following section will introduce the main eventing actors and their "
+"responsiblities."
+msgstr "下面是关于 deploy 目录下的一些文件以及它们的功能。"
+
+#. Tag: para
+#: Web_Services.xml:1129
+#, no-c-format
+msgid ""
+"The original eventing specification builds upon WS-Addressing 2004/08. "
+"JBossWS however decided to stick to the latest version, which is the W3C "
+"candidate release."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1137
+#, no-c-format
+msgid "Collaboration"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1141
+#, no-c-format
+msgid ""
+"An event sink (web service client) sends a subscribtion request to the event "
+"source endpoint. This includes the event sink endpoint address where "
+"notifications should delivered. Upon successful subscription the sink "
+"receives a leased subscription ID that can be used to identify the client in "
+"subsequent requests."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1146
+#, no-c-format
+msgid ""
+"A successfully registered event sink directs management requests (Renew, "
+"GetStatus, Unsubscribe) to the subscription manager endpoint using the "
+"previously received subscription ID. The subscription manager endpoint "
+"address was returned as part of the subscription response in the first place."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1151
+#, no-c-format
+msgid ""
+"The actual event sink (application) emits notification messages through the "
+"JBossWS-Eventing module. JBossWS-Eventing dispatches the notification to any "
+"subscriber endpoint that is registered with a particular event source.s"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1156
+#, no-c-format
+msgid ""
+"Besides notifications JBossWS-Eventing may emit lifecycle events at any "
+"time, i.e. to inform an event sink that a subscription was canceled. This "
+"can be the case when the subscription expired or the event source was "
+"undeployed."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1162
+#, no-c-format
+msgid ""
+"It is the users responsibilty to supply the web service endpoints "
+"(EventSourceEndpoint, SubscriptionManagerEndpoint) that are required for a "
+"complete event source deployment. Fortunatly JBossWS-Eventing already ships "
+"with a implementation that can be used right away. All that's left todo "
+"is packaging of standard JSR-109 deployment archive that includes the event "
+"source specific WSDL and points to the JBossWS-Eventing endpoint "
+"implementations."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1165
+#, fuzzy, no-c-format
+msgid "The relevant steps are:"
+msgstr "DTD的元素是:"
+
+#. Tag: para
+#: Web_Services.xml:1170
+#, no-c-format
+msgid ""
+"Create a custom WSDL that describes your event source, in respect to the "
+"notification schema (1) and the fact that is actually contains an event "
+"source port (2)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1175
+#, no-c-format
+msgid ""
+"Use the JBossWS SEI (3) and endpoint (4) implementations (webservices.xml, "
+"web.xml)."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1183
+#, no-c-format
+msgid "Setup an event source endpoint"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1184
+#, no-c-format
+msgid ""
+"With JAX-WS the event source setup has actually become quiet easy. All you "
+"need to do is to subclass your endpoint implementation from "
+"<literal>AbstractEventSourceEndpoint</literal> and a subscription manager "
+"from <literal>AbstractSubscriptionManagerEndpoint</literal> and finally "
+"point that implementation to a <ulink url=\"http://jbws.dyndns.org/mediawiki/"
+"index.php?title=JAX-WS_User_Guide#The_WSDL_that_describes_an_event_source"
+"\">event source specific WSDL</ulink>."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1187
+#, no-c-format
+msgid ""
+"package org.jboss.test.ws.jaxws.samples.wseventing;\n"
+"..\n"
+"import javax.jws.WebService;\n"
+"\n"
+"import org.jboss.logging.Logger;\n"
+"import org.jboss.ws.annotation.EndpointConfig;\n"
+"import org.jboss.ws.extensions.eventing.jaxws.AbstractEventSourceEndpoint;\n"
+" \n"
+"/**\n"
+"* @author Heiko.Braun at jboss.org\n"
+"* @version $Id: Web_Services.xml,v 1.2 2007/11/22 13:30:13 vrenish Exp $\n"
+"* @since 18.01.2007\n"
+"*/\n"
+"@WebService"
+"( (1)\n"
+"name = "EventSource",\n"
+"portName = "EventSourcePort",\n"
+"targetNamespace = "http://schemas.xmlsoap.org/ws/2004/08/"
+"eventing",\n"
+"wsdlLocation = "/WEB-INF/wsdl/sysmon."
+"wsdl", (2)\n"
+"endpointInterface = "org.jboss.ws.extensions.eventing.jaxws."
+"EventSourceEndpoint")\n"
+"@EndpointConfig(configName = "Standard WSAddressing "
+"Endpoint") (3)\n"
+"public class SysmonRegistrationEndpoint extends AbstractEventSourceEndpoint "
+"{ (4)\n"
+" \n"
+"private static final Logger log = Logger.getLogger"
+"(SysmonRegistrationEndpoint.class);\n"
+" \n"
+"protected Logger getLogger()\n"
+"{\n"
+"return log;\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1190
+#, no-c-format
+msgid "Of course we need a <literal>@WebService</literal> annotation"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1195
+#, no-c-format
+msgid "It's important to override the WSDL here"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1200
+#, no-c-format
+msgid ""
+"You need to tell JBossWS that it requires WS-Addressing for this endpoint"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1205
+#, no-c-format
+msgid ""
+"Subclass a predefined implementation that knows how to delegate to the "
+"actual eventing service implementation"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1213
+#, no-c-format
+msgid "The WSDL that describes an event source"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1214
+#, no-c-format
+msgid ""
+"Even though we are already using the annotation driven approach, JBossWS "
+"eventing still requires an event source specific WSDL."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1217
+#, no-c-format
+msgid ""
+"The following excerpt shows the relevant WSDL details that describe an event "
+"source."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1220
+#, no-c-format
+msgid ""
+"<?xml version="1.0" encoding="UTF-8"?>\n"
+" \n"
+"<wsdl:definitions\n"
+"targetNamespace="http://www.jboss.org/sysmon"\n"
+"xmlns:tns="http://www.jboss.org/sysmon"\n"
+"xmlns:wse='http://schemas.xmlsoap.org/ws/2004/08/eventing'\n"
+"xmlns:wsdl='http://schemas.xmlsoap.org/wsdl/'\n"
+"xmlns:wsa10='http://www.w3.org/2005/08/addressing'\n"
+"xmlns:xs='http://www.w3.org/2001/XMLSchema'\n"
+"xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/">\n"
+" \n"
+"<wsdl:import\n"
+"(1) namespace='http://schemas.xmlsoap.org/ws/2004/08/"
+"eventing'\n"
+"location='jbwse.wsdl' />\n"
+" \n"
+"<wsdl:types>\n"
+" \n"
+"<xs:schema targetNamespace='http://schemas.xmlsoap.org/ws/2004/08/"
+"eventing'>\n"
+"(2) <xs:include schemaLocation='jbwse.xsd'/>\n"
+"</xs:schema>\n"
+" \n"
+"(3) <xs:schema\n"
+"targetNamespace="http://www.jboss.org/sysmon"\n"
+"elementFormDefault="qualified"\n"
+"blockDefault="#all">\n"
+"<xs:element name="SystemStatus">\n"
+"<xs:complexType>\n"
+"<xs:sequence>\n"
+"<xs:element name="Time " type="xs:dateTime"/>\n"
+"<xs:element name="HostName" type="xs:string"/>\n"
+"<xs:element name="HostAddress" type="xs:string"/>\n"
+"<xs:element name="ActiveThreadCount" type="xs:int"/"
+">\n"
+"<xs:element name="FreeMemory" type="xs:string"/>\n"
+"<xs:element name="MaxMemory" type="xs:string"/>\n"
+"</xs:sequence>\n"
+"</xs:complexType>\n"
+"</xs:element>\n"
+"</xs:schema>\n"
+" \n"
+"</wsdl:types>\n"
+" \n"
+"<wsdl:message name='SystemInfoMsg'>\n"
+"<wsdl:part name='body' element='tns:SystemStatus'/"
+">\n"
+"</wsdl:message>\n"
+" \n"
+"(4) <wsdl:portType name='SystemInfo' wse:EventSource='"
+"true'>\n"
+"<wsdl:operation name='SysmonOp'>\n"
+"<wsdl:output message='tns:SystemInfoMsg'/>\n"
+"</wsdl:operation>\n"
+"</wsdl:portType>\n"
+" \n"
+"<wsdl:binding name="SystemInfoBinding" type="tns:"
+"SystemInfo">\n"
+"<soap:binding style="document" transport="http://schemas."
+"xmlsoap.org/soap/http"/>\n"
+"<wsdl:operation name="SysmonOp">\n"
+"<soap:operation soapAction=""/>\n"
+"<wsdl:output>\n"
+"<soap:body use="literal"/>\n"
+"</wsdl:output>\n"
+"</wsdl:operation>\n"
+"</wsdl:binding>\n"
+" \n"
+"</wsdl:definitions>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1223
+#, no-c-format
+msgid ""
+"Import the default eventing WSDL, that includes service and port "
+"declarations."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1228
+#, no-c-format
+msgid "Include the default eventing Types"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1233
+#, no-c-format
+msgid "Specifiy the notitification message schema."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1238
+#, no-c-format
+msgid ""
+"Declare a port type, attributed \"wse:EventSource='true'\" that "
+"points to your notification message schema."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1246
+#, fuzzy, no-c-format
+msgid "Emitting notifications"
+msgstr "Notifications"
+
+#. Tag: para
+#: Web_Services.xml:1247
+#, no-c-format
+msgid ""
+"JBossWS-Eventing registeres a event dispatcher within local JNDI tree that "
+"can be used to emit notifications from applications."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1250
+#, no-c-format
+msgid "java:/EventDispatcher"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1251
+#, fuzzy, no-c-format
+msgid "The event dispatcher interface:"
+msgstr "服务生命周期接口"
+
+#. Tag: programlisting
+#: Web_Services.xml:1254
+#, no-c-format
+msgid ""
+"public interface EventDispatcher\n"
+"{\n"
+"void dispatch(URI eventSourceNS, Element payload);\n"
+"}"
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:1256
+#, fuzzy, no-c-format
+msgid "Example notification"
+msgstr "Notifications"
+
+#. Tag: programlisting
+#: Web_Services.xml:1258
+#, no-c-format
+msgid ""
+"(1) URI eventSourceURI = new URI("http://http://www.jboss.org/sysmon/"
+"SystemInfo");\n"
+"(2) Element payload = DOMUtils.parse("SOME XML STRING");\n"
+"try\n"
+"{\n"
+"InitialContext iniCtx = getInitialContext();\n"
+"(3) EventDispatcher delegate = (EventDispatcher)\n"
+"iniCtx.lookup(EventingConstants.DISPATCHER_JNDI_NAME);\n"
+"(4) delegate.dispatch(eventSourceURI, payload);\n"
+"}\n"
+"catch (Exception e)\n"
+"{\n"
+"//\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1261
+#, no-c-format
+msgid "Address your event source correctly (TargetNamespace+PortTypeName)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1266
+#, no-c-format
+msgid "Create your payload"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1271
+#, no-c-format
+msgid "Lookup dispatcher from JNDI"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1276
+#, fuzzy, no-c-format
+msgid "Dispatch notification."
+msgstr "Notifications"
+
+#. Tag: para
+#: Web_Services.xml:1281
+#, no-c-format
+msgid ""
+"The SubscriptionManager MBean is the actual core component that drives the "
+"JBossWS-Eventing implementation. It can be accessed through the jmx-console."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1284
+#, no-c-format
+msgid "jboss.ws.eventing:service=SubscriptionManager"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1285
+#, no-c-format
+msgid ""
+"Management operations exist to monitor and maintain active subscritions and "
+"deployed event sources. The current implementation is backed by a "
+"ThreadPoolExecutor, that asynchronously delivers messages to event sink "
+"endpoints. It can be configured through the following attributes:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1290
+#, no-c-format
+msgid "corePoolSize - average number of idle threads"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1295
+#, no-c-format
+msgid "maximumPoolSize - maximum number of threads"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1300
+#, no-c-format
+msgid ""
+"eventKeepAlive - keep alive before an undelivered event message is discarded."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1310
+#, no-c-format
+msgid "WS-Security"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1311
+#, no-c-format
+msgid ""
+"WS-Security addresses message level security. It standardizes authorization, "
+"encryption, and digital signature processing of web services. Unlike "
+"transport security models, such as SSL, WS-Security applies security "
+"directly to the elements of the web service message. This increases the "
+"flexibility of your web services, by allowing any message model to be used "
+"(point to point, multi-hop relay, etc)."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1314
+#, no-c-format
+msgid ""
+"This chapter describes how to use WS-Security to sign and encrypt a simple "
+"SOAP message."
+msgstr ""
+
+#. Tag: emphasis
+#: Web_Services.xml:1318
+#, no-c-format
+msgid "<emphasis>Specifications</emphasis>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1320
+#, no-c-format
+msgid ""
+"WS-Security is defined by the combination of the following specifications:"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1326
+#, no-c-format
+msgid "SOAP Message Security 1.0"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1331
+#, no-c-format
+msgid "Username Token Profile 1.0"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1336
+#, no-c-format
+msgid "X.509 Token Profile 1.0"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1341
+#, no-c-format
+msgid "W3C XML Encryption"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1346
+#, no-c-format
+msgid "W3C XML Signature"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1351
+#, no-c-format
+msgid "Basic Security Profile 1.0 (Still in Draft)"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1356
+#, fuzzy, no-c-format
+msgid "Endpoint configuration"
+msgstr "客户端配置"
+
+#. Tag: para
+#: Web_Services.xml:1357
+#, no-c-format
+msgid ""
+"JBossWS uses handlers to identify ws-security encoded requests and invoke "
+"the security components to sign and encrypt messages. In order to enable "
+"security processing, the client and server side need to include a "
+"corressponding handler configuration. The preferred way is to reference a "
+"predefined <ulink url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_Endpoint_Configuration\">JAX-WS Endpoint Configuration</ulink> or <ulink "
+"url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_Client_Configuration\">JAX-WS Client Configuration</ulink> respectively."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1363
+#, no-c-format
+msgid ""
+"You need to setup both the endpoint configuration and the WSSE declarations. "
+"That's two separate steps."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1371
+#, no-c-format
+msgid "Server side WSSE declaration (jboss-wsse-server.xml)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1372
+#, no-c-format
+msgid ""
+"In this example we configure both the client and the server to sign the "
+"message body. Both also require this from each other. So, if you remove "
+"either the client or the server security deployment descriptor, you will "
+"notice that the other party will throw a fault explaining that the message "
+"did not conform to the proper security requirements."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1375
+#, no-c-format
+msgid ""
+"<jboss-ws-security xmlns="http://www.jboss.com/ws-security/"
+"config" \n"
+"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n"
+"xsi:schemaLocation="http://www.jboss.com/ws-security/config \n"
+"http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">\n"
+"(1) <key-store-file>WEB-INF/wsse.keystore</key-store-file>\n"
+"(2) <key-store-password>jbossws</key-store-password>\n"
+"(3) <trust-store-file>WEB-INF/wsse.truststore</trust-store-"
+"file>\n"
+"(4) <trust-store-password>jbossws</trust-store-password>\n"
+"(5) <config>\n"
+"(6) <sign type="x509v3" alias="wsse"/>\n"
+"(7) <requires>\n"
+"(8) <signature/>\n"
+"</requires>\n"
+"</config>\n"
+"</jboss-ws-security>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1378
+#, no-c-format
+msgid ""
+"This specifies that the key store we wish to use is WEB-INF/wsse.keystore, "
+"which is located in our war file."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1383
+#, no-c-format
+msgid ""
+"This specifies that the store password is \"jbossws\". Password can be "
+"encypted using the {EXT} and {CLASS} commands. Please see samples for their "
+"usage."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1388
+#, no-c-format
+msgid ""
+"This specifies that the trust store we wish to use is WEB-INF/wsse."
+"truststore, which is located in our war file."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1393
+#, no-c-format
+msgid ""
+"This specifies that the trust store password is also \"jbossws\". Password "
+"can be encrypted using the {EXT} and {CLASS} commands. Please see samples "
+"for their usage."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1398
+#, no-c-format
+msgid ""
+"Here we start our root config block. The root config block is the default "
+"configuration for all services in this war file."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1403
+#, no-c-format
+msgid ""
+"This means that the server must sign the message body of all responses. Type "
+"means that we are to use a X.509v3 certificate (a standard certificate). The "
+"alias option says that the certificate/key pair to use for signing is in the "
+"key store under the \"wsse\" alias"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1408
+#, no-c-format
+msgid ""
+"Here we start our optional requires block. This block specifies all security "
+"requirements that must be met when the server receives a message."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1413
+#, no-c-format
+msgid ""
+"This means that all web services in this war file require the message body "
+"to be signed."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1418
+#, no-c-format
+msgid ""
+"By default an endpoint does not use the WS-Security configuration. Use the "
+"proprietary @EndpointConfig annotation to set the config name. See <ulink "
+"url=\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-"
+"WS_Endpoint_Configuration\">JAX-WS_Endpoint_Configuration</ulink> for the "
+"list of available config names."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1421
+#, no-c-format
+msgid ""
+"@WebService\n"
+"@EndpointConfig(configName = "Standard WSSecurity Endpoint")\n"
+"public class HelloJavaBean\n"
+"{\n"
+"...\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1425
+#, no-c-format
+msgid "Client side WSSE declaration (jboss-wsse-client.xml)"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1426
+#, no-c-format
+msgid ""
+"<jboss-ws-security xmlns="http://www.jboss.com/ws-security/"
+"config" \n"
+"xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"\n"
+"xsi:schemaLocation="http://www.jboss.com/ws-security/config \n"
+"http://www.jboss.com/ws-security/schema/jboss-ws-security_1_0.xsd">\n"
+"(1) <config>\n"
+"(2) <sign type="x509v3" alias="wsse"/>\n"
+"(3) <requires>\n"
+"(4) <signature/>\n"
+"</requires>\n"
+"</config>\n"
+"</jboss-ws-security>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1429
+#, no-c-format
+msgid ""
+"Here we start our root config block. The root config block is the default "
+"configuration for all web service clients (Call, Proxy objects)."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1434
+#, no-c-format
+msgid ""
+"This means that the client must sign the message body of all requests it "
+"sends. Type means that we are to use a X.509v3 certificate (a standard "
+"certificate). The alias option says that the certificate/key pair to use for "
+"signing is in the key store under the \"wsse\" alias"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1439
+#, no-c-format
+msgid ""
+"Here we start our optional requires block. This block specifies all security "
+"requirements that must be met when the client receives a response."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1444
+#, no-c-format
+msgid ""
+"This means that all web service clients must receive signed response "
+"messages."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1450
+#, fuzzy, no-c-format
+msgid "Client side key store configuration"
+msgstr "客户端配置"
+
+#. Tag: para
+#: Web_Services.xml:1451
+#, no-c-format
+msgid ""
+"We did not specify a key store or trust store, because client apps instead "
+"use the wsse System properties instead. If this was a web or ejb client "
+"(meaning a webservice client in a war or ejb jar file), then we would have "
+"specified them in the client descriptor."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1454
+#, no-c-format
+msgid "Here is an excerpt from the JBossWS samples:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1457
+#, no-c-format
+msgid ""
+"<sysproperty key="org.jboss.ws.wsse.keyStore"\n"
+"value="${tests.output.dir}/resources/jaxrpc/samples/wssecurity/wsse."
+"keystore"/>\n"
+"<sysproperty key="org.jboss.ws.wsse.trustStore" \n"
+"value="${tests.output.dir}/resources/jaxrpc/samples/wssecurity/wsse."
+"truststore"/>\n"
+"<sysproperty key="org.jboss.ws.wsse.keyStorePassword" "
+"value="jbossws"/>\n"
+"<sysproperty key="org.jboss.ws.wsse.trustStorePassword" "
+"value="jbossws"/>\n"
+"<sysproperty key="org.jboss.ws.wsse.keyStoreType" value=""
+"jks"/>\n"
+"<sysproperty key="org.jboss.ws.wsse.trustStoreType" value=""
+"jks"/>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1461
+#, no-c-format
+msgid ""
+"Below you see the incomming SOAP message with the details of the security "
+"headers ommited. The idea is, that the SOAP body is still plain text, but it "
+"is signed in the security header and can therefore not manipulated in "
+"transit."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1464
+#, no-c-format
+msgid "Incomming SOAPMessage"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1467
+#, no-c-format
+msgid ""
+"<env:Envelope xmlns:env="http://schemas.xmlsoap.org/soap/envelope/"
+"">\n"
+"<env:Header>\n"
+"<wsse:Security env:mustUnderstand="1" ...>\n"
+"<wsu:Timestamp wsu:Id="timestamp">...</wsu:Timestamp>\n"
+"<wsse:BinarySecurityToken ...>\n"
+"...\n"
+"</wsse:BinarySecurityToken>\n"
+"<ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#""
+">\n"
+"...\n"
+"</ds:Signature>\n"
+"</wsse:Security>\n"
+"</env:Header>\n"
+"<env:Body wsu:Id="element-1-1140197309843-12388840" ...>\n"
+"<ns1:echoUserType xmlns:ns1="http://org.jboss.ws/samples/"
+"wssecurity">\n"
+"<UserType_1 xmlns:xsi="http://www.w3.org/2001/XMLSchema-"
+"instance">\n"
+"<msg>Kermit</msg>\n"
+"</UserType_1>\n"
+"</ns1:echoUserType>\n"
+"</env:Body>\n"
+"</env:Envelope>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1473
+#, no-c-format
+msgid "Installing the BouncyCastle JCE provider (JDK 1.4)"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1474
+#, no-c-format
+msgid ""
+"The information below has originaly been provided by <ulink url=\"http://www."
+"bouncycastle.org/specifications.html#install\">The Legion of the Bouncy "
+"Castle</ulink>."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1477
+#, no-c-format
+msgid ""
+"The provider can be configured as part of your environment via static "
+"registration by adding an entry to the java.security properties file (found "
+"in $JAVA_HOME/jre/lib/security/java.security, where $JAVA_HOME is the "
+"location of your JDK/JRE distribution). You'll find detailed "
+"instructions in the file but basically it comes down to adding a line:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1480
+#, no-c-format
+msgid ""
+"security.provider.<n>=org.bouncycastle.jce.provider."
+"BouncyCastleProvider"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1481
+#, no-c-format
+msgid "Where <n> is the preference you want the provider at."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1487
+#, no-c-format
+msgid "Issues may arise if the Sun provided providers are not first."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1492
+#, no-c-format
+msgid ""
+"Where you put the jar is mostly up to you, although with jdk1.4 the best "
+"(and in some cases only) place to have it is in $JAVA_HOME/jre/lib/ext. "
+"Under Windows there will normally be a JRE and a JDK install of Java if you "
+"think you have installed it correctly and it still doesn't work chances "
+"are you have added the provider to the installation not being used."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1498
+#, no-c-format
+msgid "Keystore, truststore - What?"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1502
+#, no-c-format
+msgid ""
+"If you having a hard time understanding how the different trust- and "
+"keystore configurations are used for signature and encryption, then read "
+"this thread first: <ulink url=\"http://www.jboss.org/index.html?"
+"module=bb&op=viewtopic&t=94406\"></ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1512
+#, no-c-format
+msgid "WS-Transaction"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1513
+#, no-c-format
+msgid ""
+"Support for the WS-Coordination, WS-AtomicTransaction and WS-"
+"BusinessActivity specifications will be provided by technology recently "
+"acquired from Arjuna Technologies Ltd. This technology will be present "
+"within the JBoss Transactions 4.2.1 release. Further information can be "
+"obtained from the <ulink url=\"http://labs.jboss.org/portal/jbosstm\">JBoss "
+"Transactions Project</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1519
+#, no-c-format
+msgid "XML Registries"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1520
+#, no-c-format
+msgid ""
+"J2EE 1.4 mandates support for Java API for XML Registries (JAXR). Inclusion "
+"of a XML Registry with the J2EE 1.4 certified Application Server is "
+"optional. Starting jboss-4.0.2, JBoss ships a UDDI v2.0 compliant registry, "
+"the Apache jUDDI registry. We also provide support for JAXR Capability Level "
+"0 (UDDI Registries) via integration of Apache Scout."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1523
+#, no-c-format
+msgid ""
+"This chapter describes how to configure the jUDDI registry in JBoss and some "
+"sample code outlines for using JAXR API to publish and query the jUDDI "
+"registry."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1527
+#, fuzzy, no-c-format
+msgid "Apache jUDDI Configuration"
+msgstr "JBossCache 配置"
+
+#. Tag: para
+#: Web_Services.xml:1528
+#, no-c-format
+msgid ""
+"Configuration of the jUDDI registry happens via an MBean Service that is "
+"deployed in the juddi-service.sar archive in the \"all\" configuration. The "
+"configuration of this service can be done in the jboss-service.xml of the "
+"META-INF directory in the juddi-service.sar"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1531
+#, no-c-format
+msgid "Let us look at the individual configuration items that can be changed."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1534
+#, fuzzy, no-c-format
+msgid "DataSources configuration"
+msgstr "JBoss 配置"
+
+#. Tag: programlisting
+#: Web_Services.xml:1537
+#, no-c-format
+msgid ""
+"<!-- Datasource to Database-->\n"
+"<attribute name="DataSourceUrl">java:/DefaultDS</"
+"attribute>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1538
+#, no-c-format
+msgid ""
+"Database Tables (Should they be created on start, Should they be dropped on "
+"stop, Should they be dropped on start etc)"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1541
+#, no-c-format
+msgid ""
+"<!-- Should all tables be created on Start-->\n"
+" <attribute "
+"name="CreateOnStart">false</attribute>\n"
+" <!-- Should all "
+"tables be dropped on Stop-->\n"
+" <attribute "
+"name="DropOnStop">true</attribute>\n"
+" <!-- Should all "
+"tables be dropped on Start-->\n"
+" <attribute "
+"name="DropOnStart">false</attribute>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1542
+#, no-c-format
+msgid ""
+"JAXR Connection Factory to be bound in JNDI. (Should it be bound? and under "
+"what name?)"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1545
+#, no-c-format
+msgid ""
+"<!-- Should I bind a Context to which JaxrConnectionFactory bound-->\n"
+"<attribute name="ShouldBindJaxr">true</attribute>\n"
+" \n"
+"<!-- Context to which JaxrConnectionFactory to bind to. \n"
+"If you have remote clients, please bind it to the global namespace(default "
+"behavior). \n"
+"To just cater to clients running on the same VM as JBoss, change to java:/"
+"JAXR -->\n"
+"<attribute name="BindJaxr">JAXR</attribute>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1546
+#, fuzzy, no-c-format
+msgid "Other common configuration:"
+msgstr "客户端配置"
+
+#. Tag: para
+#: Web_Services.xml:1549
+#, no-c-format
+msgid ""
+"Add authorized users to access the jUDDI registry. (Add a sql insert "
+"statement in a single line)"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1552
+#, no-c-format
+msgid ""
+"Look at the script META-INF/ddl/juddi_data.ddl for more details. Example for "
+"a user 'jboss'\n"
+" \n"
+"INSERT INTO PUBLISHER (PUBLISHER_ID,PUBLISHER_NAME,\n"
+"EMAIL_ADDRESS,IS_ENABLED,IS_ADMIN) \n"
+"VALUES ('jboss','JBoss User','jboss at xxx','"
+"true','true');"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1556
+#, fuzzy, no-c-format
+msgid "JBoss JAXR Configuration"
+msgstr "JBoss 配置"
+
+#. Tag: para
+#: Web_Services.xml:1557
+#, no-c-format
+msgid ""
+"In this section, we will discuss the configuration needed to run the JAXR "
+"API. The JAXR configuration relies on System properties passed to the JVM. "
+"The System properties that are needed are:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1560
+#, no-c-format
+msgid ""
+"javax.xml.registry.ConnectionFactoryClass=org.apache.ws.scout.registry."
+"ConnectionFactoryImpl \n"
+"jaxr.query.url=http://localhost:8080/juddi/inquiry \n"
+"jaxr.publish.url=http://localhost:8080/juddi/publish\n"
+"juddi.proxy.transportClass=org.jboss.jaxr.juddi.transport.SaajTransport"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1561
+#, no-c-format
+msgid ""
+"Please remember to change the hostname from \"localhost\" to the hostname of "
+"the UDDI service/JBoss Server."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1564
+#, no-c-format
+msgid "You can pass the System Properties to the JVM in the following ways:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1569
+#, no-c-format
+msgid ""
+"When the client code is running inside JBoss (maybe a servlet or an EJB). "
+"Then you will need to pass the System properties in the run.sh/run.bat "
+"scripts to the java process via the \"-D\" option."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1574
+#, no-c-format
+msgid ""
+"When the client code is running in an external JVM. Then you can pass the "
+"properties either as \"-D\" options to the java process or explicitly set "
+"them in the client code(not recommended)."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1579
+#, no-c-format
+msgid "System.setProperty(propertyname, propertyvalue);"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1583
+#, no-c-format
+msgid "JAXR Sample Code"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1584
+#, no-c-format
+msgid ""
+"There are two categories of API: JAXR Publish API and JAXR Inquiry API. The "
+"important JAXR interfaces that any JAXR client code will use are the "
+"following."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1589
+#, no-c-format
+msgid ""
+"<ulink url=\"http://java.sun.com/j2ee/1.4/docs/api/javax/xml/registry/"
+"RegistryService.html\">javax.xml.registry.RegistryService</ulink> From J2EE "
+"1.4 JavaDoc: \"This is the principal interface implemented by a JAXR "
+"provider. A registry client can get this interface from a Connection to a "
+"registry. It provides the methods that are used by the client to discover "
+"various capability specific interfaces implemented by the JAXR provider.\""
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1594
+#, no-c-format
+msgid ""
+"<ulink url=\"http://java.sun.com/j2ee/1.4/docs/api/javax/xml/registry/"
+"BusinessLifeCycleManager.html\">javax.xml.registry.BusinessLifeCycleManager</"
+"ulink> From J2EE 1.4 JavaDoc: \"The BusinessLifeCycleManager interface, "
+"which is exposed by the Registry Service, implements the life cycle "
+"management functionality of the Registry as part of a business level API. "
+"Note that there is no authentication information provided, because the "
+"Connection interface keeps that state and context on behalf of the client.\""
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1599
+#, no-c-format
+msgid ""
+"<ulink url=\"http://java.sun.com/j2ee/1.4/docs/api/javax/xml/registry/"
+"BusinessQueryManager.html\">javax.xml.registry.BusinessQueryManager</ulink> "
+"From J2EE 1.4 JavaDoc: \"The BusinessQueryManager interface, which is "
+"exposed by the Registry Service, implements the business style query "
+"interface. It is also referred to as the focused query interface.\""
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1604
+#, no-c-format
+msgid ""
+"Let us now look at some of the common programming tasks performed while "
+"using the JAXR API:"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1607
+#, no-c-format
+msgid "Getting a JAXR Connection to the registry."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1610
+#, no-c-format
+msgid ""
+"String queryurl = System.getProperty("jaxr.query.url", ""
+"http://localhost:8080/juddi/inquiry");\n"
+"String puburl = System.getProperty("jaxr.publish.url", ""
+"http://localhost:8080/juddi/publish");\n"
+".. \n"
+"Properties props = new Properties();\n"
+"props.setProperty("javax.xml.registry.queryManagerURL", "
+"queryurl);\n"
+"props.setProperty("javax.xml.registry.lifeCycleManagerURL", "
+"puburl);\n"
+" \n"
+"String transportClass = System.getProperty("juddi.proxy."
+"transportClass", \n"
+" "org.jboss.jaxr.juddi."
+"transport.SaajTransport");\n"
+"System.setProperty("juddi.proxy.transportClass", transportClass);\n"
+" \n"
+"// Create the connection, passing it the configuration properties\n"
+"factory = ConnectionFactory.newInstance();\n"
+"factory.setProperties(props);\n"
+"connection = factory.createConnection();"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1611
+#, no-c-format
+msgid "Authentication with the registry."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1614
+#, no-c-format
+msgid ""
+"/**\n"
+"* Does authentication with the uddi registry\n"
+"*/\n"
+"protected void login() throws JAXRException\n"
+"{\n"
+"PasswordAuthentication passwdAuth = new PasswordAuthentication(userid, "
+"passwd.toCharArray());\n"
+"Set creds = new HashSet();\n"
+"creds.add(passwdAuth);\n"
+" \n"
+"connection.setCredentials(creds);\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1615
+#, no-c-format
+msgid "Save a Business"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1618
+#, no-c-format
+msgid ""
+"/**\n"
+"* Creates a Jaxr Organization with 1 or more services\n"
+"*/\n"
+"protected Organization createOrganization(String orgname) throws "
+"JAXRException\n"
+"{\n"
+"Organization org = blm.createOrganization(getIString(orgname));\n"
+"org.setDescription(getIString("JBoss Inc"));\n"
+"Service service = blm.createService(getIString("JBOSS JAXR "
+"Service"));\n"
+"service.setDescription(getIString("Services of XML Registry"));\n"
+"//Create serviceBinding\n"
+"ServiceBinding serviceBinding = blm.createServiceBinding();\n"
+"serviceBinding.setDescription(blm.createInternationalString("Test "
+"Service Binding"));\n"
+" \n"
+"//Turn validation of URI off\n"
+"serviceBinding.setValidateURI(false);\n"
+"serviceBinding.setAccessURI("http://testjboss.org");\n"
+".. \n"
+"// Add the serviceBinding to the service\n"
+"service.addServiceBinding(serviceBinding);\n"
+" \n"
+"User user = blm.createUser();\n"
+"org.setPrimaryContact(user);\n"
+"PersonName personName = blm.createPersonName("Anil S");\n"
+"TelephoneNumber telephoneNumber = blm.createTelephoneNumber();\n"
+"telephoneNumber.setNumber("111-111-7777");\n"
+"telephoneNumber.setType(null);\n"
+"PostalAddress address = blm.createPostalAddress("111", "My "
+"Drive", "BuckHead", "GA", "USA", "
+""1111-111", "");\n"
+"Collection postalAddresses = new ArrayList();\n"
+"postalAddresses.add(address);\n"
+"Collection emailAddresses = new ArrayList();\n"
+"EmailAddress emailAddress = blm.createEmailAddress("anil at apache."
+"org");\n"
+"emailAddresses.add(emailAddress);\n"
+" \n"
+"Collection numbers = new ArrayList();\n"
+"numbers.add(telephoneNumber);\n"
+"user.setPersonName(personName);\n"
+"user.setPostalAddresses(postalAddresses);\n"
+"user.setEmailAddresses(emailAddresses);\n"
+"user.setTelephoneNumbers(numbers);\n"
+" \n"
+"ClassificationScheme cScheme = getClassificationScheme("ntis-gov:"
+"naics", "");\n"
+"Key cKey = blm.createKey("uuid:C0B9FE13-324F-413D-5A5B-"
+"2004DB8E5CC2");\n"
+"cScheme.setKey(cKey);\n"
+"Classification classification = blm.createClassification(cScheme, \n"
+" "Computer Systems Design and Related "
+"Services", "5415");\n"
+"org.addClassification(classification);\n"
+"ClassificationScheme cScheme1 = getClassificationScheme("D-U-N-S", "
+""");\n"
+"Key cKey1 = blm.createKey("uuid:3367C81E-FF1F-4D5A-B202-"
+"3EB13AD02423");\n"
+"cScheme1.setKey(cKey1);\n"
+"ExternalIdentifier ei = blm.createExternalIdentifier(cScheme1, "D-U-N-S "
+"number", "08-146-6849");\n"
+"org.addExternalIdentifier(ei);\n"
+"org.addService(service);\n"
+"return org;\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1619
+#, no-c-format
+msgid "Query a Business"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1622
+#, no-c-format
+msgid ""
+"/**\n"
+"* Locale aware Search a business in the registry\n"
+"*/\n"
+"public void searchBusiness(String bizname) throws JAXRException\n"
+"{\n"
+"try\n"
+"{\n"
+"// Get registry service and business query manager\n"
+"this.getJAXREssentials();\n"
+" \n"
+"// Define find qualifiers and name patterns\n"
+"Collection findQualifiers = new ArrayList();\n"
+"findQualifiers.add(FindQualifier.SORT_BY_NAME_ASC);\n"
+"Collection namePatterns = new ArrayList();\n"
+"String pattern = "%" + bizname + "%";\n"
+"LocalizedString ls = blm.createLocalizedString(Locale.getDefault(), "
+"pattern);\n"
+"namePatterns.add(ls);\n"
+" \n"
+"// Find based upon qualifier type and values\n"
+"BulkResponse response = bqm.findOrganizations(findQualifiers, namePatterns, "
+"null, null, null, null);\n"
+" \n"
+"// check how many organisation we have matched\n"
+"Collection orgs = response.getCollection();\n"
+"if (orgs == null)\n"
+"{\n"
+"log.debug(" -- Matched 0 orgs");\n"
+" \n"
+"}\n"
+"else\n"
+"{\n"
+"log.debug(" -- Matched " + orgs.size() + " organizations -- "
+"");\n"
+" \n"
+"// then step through them\n"
+"for (Iterator orgIter = orgs.iterator(); orgIter.hasNext();)\n"
+"{\n"
+"Organization org = (Organization)orgIter.next();\n"
+"log.debug("Org name: " + getName(org));\n"
+"log.debug("Org description: " + getDescription(org));\n"
+"log.debug("Org key id: " + getKey(org));\n"
+"checkUser(org);\n"
+"checkServices(org);\n"
+"}\n"
+"}\n"
+"}\n"
+"finally\n"
+"{\n"
+"connection.close();\n"
+"}\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1623
+#, no-c-format
+msgid ""
+"For more examples of code using the JAXR API, please refer to the resources "
+"in the Resources Section."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1629
+#, no-c-format
+msgid "Troubleshooting"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1632
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">I cannot connect to the registry from JAXR.</"
+"emphasis> Please check the inquiry and publish url passed to the JAXR "
+"ConnectionFactory."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1637
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">I cannot connect to the jUDDI registry.</emphasis> "
+"Please check the jUDDI configuration and see if there are any errors in the "
+"server.log. And also remember that the jUDDI registry is available only in "
+"the \"all\" configuration."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1642
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">I cannot authenticate to the jUDDI registry.</"
+"emphasis>Have you added an authorized user to the jUDDI database, as "
+"described earlier in the chapter?"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1647
+#, no-c-format
+msgid ""
+"<emphasis role=\"bold\">I would like to view the SOAP messages in transit "
+"between the client and the UDDI Registry.</emphasis> Please use the tcpmon "
+"tool to view the messages in transit. <ulink url=\"http://tcpmon.dev.java."
+"net/\">TCPMon</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1655
+#, no-c-format
+msgid "Resources"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1659
+#, no-c-format
+msgid "JAXR Tutorial and Code Camps"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1664
+#, no-c-format
+msgid "J2EE 1.4 Tutorial"
+msgstr ""
+
+#. Tag: ulink
+#: Web_Services.xml:1669
+#, no-c-format
+msgid "J2EE Web Services by Richard Monson-Haefel"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1678
+#, no-c-format
+msgid "WS-Policy"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1679
+#, no-c-format
+msgid ""
+"The Web Services Policy Framework (WS-Policy) provides a general purpose "
+"model and corresponding syntax to describe the policies of a Web Service."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1682
+#, no-c-format
+msgid ""
+"WS-Policy defines a base set of constructs that can be used and extended by "
+"other Web services specifications to describe a broad range of service "
+"requirements and capabilities."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1685
+#, no-c-format
+msgid ""
+"Current JBoss implementation can instrument a webservice with policies "
+"attached at endpoint, port or port-type scope level only. There are two "
+"different methods to attach policies: providing a wsdl decorated with "
+"policies and policy attachments as defined by specifications, or using JBoss "
+"proprietary annotations. The first way has the advantage of being standard, "
+"while the second one is much more simple to implement. Of course the wsdl "
+"generated by these annotations conforms to standard defined in "
+"specifications and can be used with any ws-policy compliant client."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1688
+#, no-c-format
+msgid ""
+"Please note that ws-policy specifications only define policy requirements "
+"and their attachment method to wsdl through specific extensions. It is out "
+"of the scope of ws-policy specifications and thus implementation to define "
+"and use the content of assertions. The way these assertions (called domain "
+"assertions or domain policies) have to be deployed and used is left to other "
+"specification like WS-Security-Policy or more generally to domain specific "
+"implementation."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1692
+#, fuzzy, no-c-format
+msgid "Specification"
+msgstr "Notifications"
+
+#. Tag: para
+#: Web_Services.xml:1693
+#, no-c-format
+msgid ""
+"WS-Policy is defined by the combination of the following specifications:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1696
+#, no-c-format
+msgid ""
+"* <ulink url=\"http://www.w3.org/Submission/WS-Policy/\"> WS-Policy "
+"specification</ulink>\n"
+"* <ulink url=\"http://www.w3.org/Submission/WS-PolicyAttachment/\"> WS-"
+"Policy-Attachment specification</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1700
+#, no-c-format
+msgid "Using policies in a user provided wsdl"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1701
+#, no-c-format
+msgid ""
+"To attach policies in this manner, the only thing you have to do in a "
+"webservice class is to provide a custom wsdl. This will cause JBossws to "
+"skip wsdl generation at deploy time, since the wsdl file you provided will "
+"be published. Please refer to specification (WS-Policy-Attachment) to learn "
+"how to modify wsdl to attach a policy."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1704
+#, no-c-format
+msgid ""
+"Here you find an example of a webservice class and provided wsdl with a "
+"policy containing a domain assertion for JBoss wssecurity."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1707
+#, no-c-format
+msgid ""
+"@WebService(name = "Hello", \n"
+"targetNamespace = "http://org.jboss.ws/samples/wssecuritypolicy",\n"
+"wsdlLocation="WEB-INF/wsdl/HelloService.wsdl")\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class HelloJavaBean\n"
+"{\n"
+"private Logger log = Logger.getLogger(HelloJavaBean.class);\n"
+"..\n"
+"@WebMethod\n"
+"public UserType echoUserType(@WebParam(name = "user") UserType "
+"in0)\n"
+"{\n"
+"log.info(in0);\n"
+"return in0;\n"
+"}\n"
+"}\n"
+"<?xml version="1.0" encoding="UTF-8"?>\n"
+"<definitions name='HelloService' targetNamespace='http://"
+"org.jboss.ws/samples/wssecuritypolicy' xmlns='http://schemas."
+"xmlsoap.org/wsdl/' xmlns:ns1='http://org.jboss.ws/samples/"
+"wssecurity' xmlns:soap='http://schemas.xmlsoap.org/wsdl/soap/"
+"' xmlns:tns='http://org.jboss.ws/samples/wssecuritypolicy' "
+"xmlns:wsp='http://schemas.xmlsoap.org/ws/2004/09/policy' xmlns:"
+"xsd='http://www.w3.org/2001/XMLSchema'>\n"
+"<types>\n"
+"<xs:schema targetNamespace='http://org.jboss.ws/samples/"
+"wssecurity' version='1.0' \n"
+" xmlns:xs='http://www.w3.org/2001/XMLSchema'>\n"
+"<xs:complexType name='UserType'>\n"
+"<xs:sequence>\n"
+"<xs:element minOccurs='0' name='msg' type='xs:"
+"string'/>\n"
+"</xs:sequence>\n"
+"</xs:complexType>\n"
+"</xs:schema>\n"
+"</types>\n"
+"<wsp:Policy wsu:Id='X509EndpointPolicy'\n"
+" xmlns:wsu='http://docs.oasis-open.org/wss/2004/01/oasis-200401-"
+"wss-wssecurity-utility-1.0.xsd'>\n"
+"<wsp:All>\n"
+"<sp:jboss-ws-security xmlns:sp='http://www.jboss.com/ws-security/"
+"schema/jboss-ws-security_1_0.xsd'>\n"
+"<sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>\n"
+"<sp:key-store-password>jbossws</sp:key-store-password>\n"
+"<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-"
+"file>\n"
+"<sp:trust-store-password>jbossws</sp:trust-store-password>\n"
+"<sp:config>\n"
+"<sp:encrypt alias='wsse' type='x509v3'/>\n"
+"<sp:requires>\n"
+"<sp:encryption/>\n"
+"</sp:requires>\n"
+"</sp:config>\n"
+"</sp:jboss-ws-security>\n"
+"</wsp:All>\n"
+"</wsp:Policy>\n"
+"<message name='Hello_echoUserType'>\n"
+"<part name='user' type='ns1:UserType'/>\n"
+"</message>\n"
+"<message name='Hello_echoUserTypeResponse'>\n"
+"<part name='return' type='ns1:UserType'/>\n"
+"</message>\n"
+"<portType name='Hello'>\n"
+"<operation name='echoUserType' parameterOrder='user'"
+">\n"
+"<input message='tns:Hello_echoUserType'/>\n"
+"<output message='tns:Hello_echoUserTypeResponse'/>\n"
+"</operation>\n"
+"</portType>\n"
+"<binding name='HelloBinding' type='tns:Hello'>\n"
+"<wsp:PolicyReference URI='#X509EndpointPolicy'/>\n"
+"<soap:binding style='rpc' transport='http://schemas."
+"xmlsoap.org/soap/http'/>\n"
+"<operation name='echoUserType'>\n"
+"<soap:operation soapAction=''/>\n"
+"<input>\n"
+"<soap:body namespace='http://org.jboss.ws/samples/"
+"wssecuritypolicy' use='literal'/>\n"
+"</input>\n"
+"<output>\n"
+"<soap:body namespace='http://org.jboss.ws/samples/"
+"wssecuritypolicy' use='literal'/>\n"
+"</output>\n"
+"</operation>\n"
+"</binding>\n"
+"<service name='HelloService'>\n"
+"<port binding='tns:HelloBinding' name='HelloPort'"
+">\n"
+"<soap:address location='REPLACE_WITH_ACTUAL_URL'/>\n"
+"</port>\n"
+"</service>\n"
+"</definitions>"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1708
+#, no-c-format
+msgid ""
+"Please note in the wsdl file the wsp:Policy element and the wsp:"
+"PolicyReference in 'HelloBinding' binding Element."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1714
+#, no-c-format
+msgid "Using policies with JBoss annotations"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1715
+#, no-c-format
+msgid ""
+"Using JBoss proprietary annotation you only have to provide the policy xml, "
+"leaving wsdl generation to the JBossWS deployer."
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1718
+#, no-c-format
+msgid ""
+"There are two annotations to use, the first one (@PolicyAttachment) "
+"containing an array of the second one (@Policy): this lets you have many "
+"policies attached to a class or method. In future domain policy "
+"implementations might ship domain annotations extending the @Policy "
+"annotation to provide needed metadata directly as annotation parameters. The "
+"current @Policy annotation takes a reference to a xml file containing a "
+"generic policy description written respecting ws-policy specification rules."
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1721
+#, no-c-format
+msgid ""
+"/**\n"
+" \n"
+"@Target(ElementType.TYPE) \n"
+"@Retention(RetentionPolicy.RUNTIME)\n"
+"public @interface PolicyAttachment {\n"
+"Policy[] value();\n"
+"}\n"
+"...\n"
+"@Retention(RetentionPolicy.RUNTIME)\n"
+"public @interface Policy {\n"
+" \n"
+"public String policyFileLocation();\n"
+" \n"
+"public PolicyScopeLevel scope();\n"
+"}"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1722
+#, no-c-format
+msgid ""
+"And here you have the previous section example re-implemented using "
+"annotations and xml policy file:"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1725
+#, no-c-format
+msgid ""
+"@WebService(name = "Hello", targetNamespace = "http://org."
+"jboss.ws/samples/wssecurityAnnotatedpolicy")\n"
+"@PolicyAttachment({@Policy( policyFileLocation="WEB-INF/Policy."
+"xml", scope = PolicyScopeLevel.WSDL_PORT ) })\n"
+"@SOAPBinding(style = SOAPBinding.Style.RPC)\n"
+"public class HelloJavaBean\n"
+"{\n"
+"private Logger log = Logger.getLogger(HelloJavaBean.class);\n"
+" \n"
+"@WebMethod\n"
+"public UserType echoUserType(@WebParam(name = "user") UserType "
+"in0)\n"
+"{\n"
+"log.info(in0);\n"
+"return in0;\n"
+"}\n"
+"}\n"
+"<?xml version="1.0" encoding="UTF-8"?>\n"
+"...\n"
+"<wsp:Policy wsu:Id="X509EndpointPolicy" xmlns:wsp="http://"
+"schemas.xmlsoap.org/ws/2004/09/policy" \n"
+"xmlns:wsu="http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-"
+"wssecurity-utility-1.0.xsd">\n"
+"<wsp:ExactlyOne>\n"
+"<wsp:All>\n"
+"<sp:jboss-ws-security xmlns:sp="http://www.jboss.com/ws-security/"
+"schema/jboss-ws-security_1_0.xsd">\n"
+"<sp:key-store-file>WEB-INF/wsse.keystore</sp:key-store-file>\n"
+"<sp:key-store-password>jbossws</sp:key-store-password>\n"
+"<sp:trust-store-file>WEB-INF/wsse.truststore</sp:trust-store-"
+"file>\n"
+"<sp:trust-store-password>jbossws</sp:trust-store-password>\n"
+"<sp:config>\n"
+"<sp:encrypt type="x509v3" alias="wsse"/>\n"
+"<sp:requires>\n"
+"<sp:encryption/>\n"
+"</sp:requires>\n"
+"</sp:config>\n"
+"</sp:jboss-ws-security>\n"
+"</wsp:All>\n"
+"</wsp:ExactlyOne> \n"
+"</wsp:Policy>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1733
+#, no-c-format
+msgid "JBossWS Extensions"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1734
+#, no-c-format
+msgid "This section describes propriatary JBoss extensions to JAX-WS."
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1738
+#, no-c-format
+msgid "Proprietary Annotations"
+msgstr ""
+
+#. Tag: para
+#: Web_Services.xml:1739
+#, no-c-format
+msgid ""
+"For the set of standard annotations, please have a look at <ulink url="
+"\"http://jbws.dyndns.org/mediawiki/index.php?title=JAX-WS_Annotations\">JAX-"
+"WS Annotations</ulink>"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1743
+#, no-c-format
+msgid "EndpointConfig"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1744
+#, no-c-format
+msgid ""
+"/**\n"
+"* Defines an endpoint or client configuration. \n"
+"* This annotation is valid on an endpoint implementaion bean or a SEI.\n"
+"* \n"
+"* @author Heiko.Braun at jboss.org\n"
+"* @since 16.01.2007\n"
+"*/\n"
+"@Retention(value = RetentionPolicy.RUNTIME)\n"
+"@Target(value = { ElementType.TYPE })\n"
+"public @interface EndpointConfig {\n"
+"... \n"
+"/**\n"
+"* The optional config-name element gives the configuration name that must be "
+"present in\n"
+"* the configuration given by element config-file.\n"
+"* \n"
+"* Server side default: Standard Endpoint\n"
+"* Client side default: Standard Client\n"
+"*/\n"
+"String configName() default "";\n"
+"...\n"
+"/**\n"
+"* The optional config-file element is a URL or resource name for the "
+"configuration.\n"
+"*\n"
+"* Server side default: standard-jaxws-endpoint-config.xml\n"
+"* Client side default: standard-jaxws-client-config.xml\n"
+"*/\n"
+"String configFile() default "";\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1748
+#, fuzzy, no-c-format
+msgid "WebContext"
+msgstr "上下文"
+
+#. Tag: programlisting
+#: Web_Services.xml:1749
+#, no-c-format
+msgid ""
+"/**\n"
+"* Provides web context specific meta data to EJB based web service "
+"endpoints.\n"
+"*\n"
+"* @author thomas.diesler at jboss.org\n"
+"* @since 26-Apr-2005\n"
+"*/\n"
+"@Retention(value = RetentionPolicy.RUNTIME)\n"
+"@Target(value = { ElementType.TYPE })\n"
+"public @interface WebContext {\n"
+"... \n"
+"/** \n"
+"* The contextRoot element specifies the context root that the web service "
+"endpoint is deployed to.\n"
+"* If it is not specified it will be derived from the deployment short name.\n"
+"* \n"
+"* Applies to server side port components only. \n"
+"*/\n"
+"String contextRoot() default "";\n"
+"...\n"
+"/** \n"
+"* The virtual hosts that the web service endpoint is deployed to.\n"
+"* \n"
+"* Applies to server side port components only.\n"
+"*/\n"
+"String[] virtualHosts() default {};\n"
+" \n"
+"/** \n"
+"* Relative path that is appended to the contextRoot to form fully qualified\n"
+"* endpoint address for the web service endpoint.\n"
+"* \n"
+"* Applies to server side port components only. \n"
+"*/\n"
+"String urlPattern() default "";\n"
+" \n"
+"/**\n"
+"* The authMethod is used to configure the authentication mechanism for the "
+"web service. \n"
+"* As a prerequisite to gaining access to any web service which are protected "
+"by an authorization\n"
+"* constraint, a user must have authenticated using the configured "
+"mechanism.\n"
+"*\n"
+"* Legal values for this element are "BASIC", or "CLIENT-"
+"CERT".\n"
+"*/\n"
+"String authMethod() default "";\n"
+" \n"
+"/**\n"
+"* The transportGuarantee specifies that the communication\n"
+"* between client and server should be NONE, INTEGRAL, or\n"
+"* CONFIDENTIAL. NONE means that the application does not require any\n"
+"* transport guarantees. A value of INTEGRAL means that the application\n"
+"* requires that the data sent between the client and server be sent in\n"
+"* such a way that it can't be changed in transit. CONFIDENTIAL means\n"
+"* that the application requires that the data be transmitted in a\n"
+"* fashion that prevents other entities from observing the contents of\n"
+"* the transmission. In most cases, the presence of the INTEGRAL or\n"
+"* CONFIDENTIAL flag will indicate that the use of SSL is required.\n"
+"*/\n"
+"String transportGuarantee() default "";\n"
+" \n"
+"/**\n"
+"* A secure endpoint does not by default publish it's wsdl on an "
+"unsecure transport.\n"
+"* You can override this behaviour by explicitly setting the secureWSDLAccess "
+"flag to false.\n"
+"* \n"
+"* Protect access to WSDL. See http://jira.jboss.org/jira/browse/JBWS-723 \n"
+"*/\n"
+"boolean secureWSDLAccess() default true;\n"
+"}"
+msgstr ""
+
+#. Tag: title
+#: Web_Services.xml:1753
+#, no-c-format
+msgid "SecurityDomain"
+msgstr ""
+
+#. Tag: programlisting
+#: Web_Services.xml:1754
+#, no-c-format
+msgid ""
+"/**\n"
+"* Annotation for specifying the JBoss security domain for an EJB\n"
+"* \n"
+"* @author <a href="mailto:bill at jboss.org">Bill Burke</"
+"a>\n"
+"**/\n"
+"@Target(ElementType.TYPE) @Retention(RetentionPolicy.RUNTIME)\n"
+"public @interface SecurityDomain\n"
+"{\n"
+"/**\n"
+"* The required name for the security domain.\n"
+"* \n"
+"* Do not use the JNDI name\n"
+"* \n"
+"* Good: "MyDomain"\n"
+"* Bad: "java:/jaas/MyDomain"\n"
+"*/\n"
+"String value();\n"
+" \n"
+"/**\n"
+"* The name for the unauthenticated pricipal\n"
+"*/\n"
+"String unauthenticatedPrincipal() default "";\n"
+"}"
+msgstr ""
Added: projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/What_This_Book_Covers.po
===================================================================
--- projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/What_This_Book_Covers.po (rev 0)
+++ projects/docs/enterprise/4.3.3/Server_Configuration_Guide/zh-CN/What_This_Book_Covers.po 2009-01-20 23:22:23 UTC (rev 83114)
@@ -0,0 +1,46 @@
+# Language /tmp/mike/JBEAP420/JBAS translations for JBEAP package.
+# Copyright (C) 2007 Free Software Foundation, Inc.
+# Automatically generated, 2007.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: JBEAP 420\n"
+"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
+"POT-Creation-Date: 2009-01-20 02:37+0000\n"
+"PO-Revision-Date: 2001-02-09 01:25+0100\n"
+"Last-Translator: Automatically generated\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#. Tag: title
+#: What_This_Book_Covers.xml:5
+#, no-c-format
+msgid "What this Book Covers"
+msgstr ""
+
+#. Tag: para
+#: What_This_Book_Covers.xml:6
+#, no-c-format
+msgid ""
+"The primary focus of this book is the presentation of the standard &JBPAPP; "
+"&VER; architecture components from both the perspective of their "
+"configuration and architecture. As a user of a standard JBoss distribution "
+"you will be given an understanding of how to configure the standard "
+"components. Note that this book is not an introduction to J2EE or how to use "
+"J2EE in applications. It focuses on the internal details of the JBoss server "
+"architecture and how our implementation of a given J2EE container can be "
+"configured and extended."
+msgstr ""
+
+#. Tag: para
+#: What_This_Book_Covers.xml:9
+#, no-c-format
+msgid ""
+"As a JBoss developer, you will be given a good understanding of the "
+"architecture and integration of the standard components to enable you to "
+"extend or replace the standard components for your infrastructure needs. We "
+"also show you how to obtain the JBoss source code, along with how to build "
+"and debug the JBoss server."
+msgstr ""
More information about the jboss-cvs-commits
mailing list