[jboss-cvs] JBossAS SVN: r69478 - projects/docs/trunk/AS_4/Server_Configuration_Guide/ja-JP.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 30 01:32:46 EST 2008
Author: noriko
Date: 2008-01-30 01:32:45 -0500 (Wed, 30 Jan 2008)
New Revision: 69478
Modified:
projects/docs/trunk/AS_4/Server_Configuration_Guide/ja-JP/J2EE_Messaging_On_JBOSS.po
Log:
translating...
Modified: projects/docs/trunk/AS_4/Server_Configuration_Guide/ja-JP/J2EE_Messaging_On_JBOSS.po
===================================================================
--- projects/docs/trunk/AS_4/Server_Configuration_Guide/ja-JP/J2EE_Messaging_On_JBOSS.po 2008-01-30 06:28:33 UTC (rev 69477)
+++ projects/docs/trunk/AS_4/Server_Configuration_Guide/ja-JP/J2EE_Messaging_On_JBOSS.po 2008-01-30 06:32:45 UTC (rev 69478)
@@ -9,7 +9,7 @@
"Project-Id-Version: J2EE_Messaging_On_JBOSS\n"
"Report-Msgid-Bugs-To: http://bugs.kde.org\n"
"POT-Creation-Date: 2007-11-05 06:01+0000\n"
-"PO-Revision-Date: 2008-01-29 17:18+1000\n"
+"PO-Revision-Date: 2008-01-30 16:32+1000\n"
"Last-Translator: Noriko Mizumoto <noriko at redhat.com>\n"
"Language-Team: Japanese <fedora-trans-ja at redhat.com>\n"
"MIME-Version: 1.0\n"
@@ -146,7 +146,7 @@
"testQueue</literal> and asynchronously receives the message from the same "
"queue."
msgstr ""
-"ポイントツーポイント (P2P) のサンプルからスタートします。 P2P モデルでは、 送信側はメッセージをキューに配信し、 単一の受信側がそのメッセージをキューから引き取ります。 受信側はメッセージが送信されるときにキューをリッスンしている必要はありません。 <xreflinkend=\"A_Point_To_Point_Example-A_P2P_JMS_client_example\"/> では、 <literal>javax.jms.TextMessage</literal> を <literal>queue/"
+"ポイントツーポイント (P2P) のサンプルからスタートします。 P2P モデルでは、 送信側はメッセージをキューに配信し、 単一の受信側がそのメッセージをキューから引き取ります。 受信側はメッセージが送信されるときにキューをリッスンしている必要はありません。 <xref linkend=\"A_Point_To_Point_Example-A_P2P_JMS_client_example\"/> では、 <literal>javax.jms.TextMessage</literal> を <literal>queue/"
"testQueue</literal> キューに送信して非同期的に同じキューからメッセージを受け取る P2P の例を示します。"
#. Tag: title
@@ -679,14 +679,14 @@
"only client is shown in <xref linkend=\"A_Pub_Sub_Example-"
"A_JMS_subscriber_client\"/>."
msgstr ""
-"ここで発行元と加入者を別々のプログラムに分け、 トピックをリッスンしている間のみ加入者がメッセージを受信するところを見てみます。 <xreflinkend=\"A_Pub_Sub_Example-A_JMS_publisher_client\"/> では <literal>topic/testTopic</literal> トピックにのみメッセージを公開する前述の pub-sub クライアントの変形を示します。 加入者のみのクライアントを <xref linkend=\"A_Pub_Sub_Example-"
+"ここで発行元と加入者を別々のプログラムに分け、 トピックをリッスンしている間のみ加入者がメッセージを受信するところを見てみます。 <xref linkend=\"A_Pub_Sub_Example-A_JMS_publisher_client\"/> では <literal>topic/testTopic</literal> トピックにのみメッセージを公開する前述の pub-sub クライアントの変形を示します。 加入者のみのクライアントを <xref linkend=\"A_Pub_Sub_Example-"
"A_JMS_subscriber_client\"/> に示します。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:69
#, no-c-format
msgid "A JMS publisher client"
-msgstr ""
+msgstr "JMS 発行元クライアント"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:70
@@ -770,12 +770,89 @@
" \n"
"}"
msgstr ""
+"package org.jboss.book.jms.ex1;\n"
+"\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.MessageListener;\n"
+"import javax.jms.Topic;\n"
+"import javax.jms.TopicConnection;\n"
+"import javax.jms.TopicConnectionFactory;\n"
+"import javax.jms.TopicPublisher;\n"
+"import javax.jms.TopicSlistubscriber;\n"
+"import javax.jms.TopicSession;\n"
+"import javax.jms.TextMessage;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"/** \n"
+" * A JMS client example program that sends a TextMessage to a Topic\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.9 $\n"
+" */\n"
+"public class TopicSendClient\n"
+"{\n"
+" TopicConnection conn = null;\n"
+" TopicSession session = null;\n"
+" Topic topic = null;\n"
+" \n"
+" public void setupPubSub()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object tmp = iniCtx.lookup(\"ConnectionFactory\");\n"
+" TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;\n"
+" conn = tcf.createTopicConnection();\n"
+" topic = (Topic) iniCtx.lookup(\"topic/testTopic\");\n"
+" session = conn.createTopicSession(false,\n"
+" TopicSession.AUTO_ACKNOWLEDGE);\n"
+" conn.start();\n"
+" }\n"
+" \n"
+" public void sendAsync(String text)\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" System.out.println(\"Begin sendAsync\");\n"
+" // Setup the pub/sub connection, session\n"
+" setupPubSub();\n"
+" // Send a text msg\n"
+" TopicPublisher send = session.createPublisher(topic);\n"
+" TextMessage tm = session.createTextMessage(text);\n"
+" send.publish(tm);\n"
+" System.out.println(\"sendAsync, sent text=\" + tm.getText());\n"
+" send.close();\n"
+" System.out.println(\"End sendAsync\");\n"
+" }\n"
+" \n"
+" public void stop() \n"
+" throws JMSException\n"
+" {\n"
+" conn.stop();\n"
+" session.close();\n"
+" conn.close();\n"
+" }\n"
+" \n"
+" public static void main(String args[]) \n"
+" throws Exception\n"
+" {\n"
+" System.out.println(\"Begin TopicSendClient, now=\" + \n"
+" System.currentTimeMillis());\n"
+" TopicSendClient client = new TopicSendClient();\n"
+" client.sendAsync(\"A text msg, now=\"+System.currentTimeMillis"
+"());\n"
+" client.stop();\n"
+" System.out.println(\"End TopicSendClient\");\n"
+" System.exit(0);\n"
+" }\n"
+" \n"
+"}"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:71
#, no-c-format
msgid "A JMS subscriber client"
-msgstr ""
+msgstr "JMS 加入側クライアント"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:72
@@ -861,6 +938,85 @@
" \n"
"}"
msgstr ""
+"package org.jboss.book.jms.ex1;\n"
+"\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.MessageListener;\n"
+"import javax.jms.Topic;\n"
+"import javax.jms.TopicConnection;\n"
+"import javax.jms.TopicConnectionFactory;\n"
+"import javax.jms.TopicPublisher;\n"
+"import javax.jms.TopicSubscriber;\n"
+"import javax.jms.TopicSession;\n"
+"import javax.jms.TextMessage;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"/**\n"
+" * A JMS client example program that synchronously receives a message a "
+"Topic\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.9 $\n"
+" */\n"
+"public class TopicRecvClient\n"
+"{\n"
+" TopicConnection conn = null;\n"
+" TopicSession session = null;\n"
+" Topic topic = null;\n"
+" \n"
+" public void setupPubSub()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object tmp = iniCtx.lookup(\"ConnectionFactory\");\n"
+" TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;\n"
+" conn = tcf.createTopicConnection();\n"
+" topic = (Topic) iniCtx.lookup(\"topic/testTopic\");\n"
+" session = conn.createTopicSession(false,\n"
+" TopicSession.AUTO_ACKNOWLEDGE);\n"
+" conn.start();\n"
+" }\n"
+" \n"
+" public void recvSync()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" System.out.println(\"Begin recvSync\");\n"
+" // Setup the pub/sub connection, session\n"
+" setupPubSub();\n"
+"\n"
+" // Wait upto 5 seconds for the message\n"
+" TopicSubscriber recv = session.createSubscriber(topic);\n"
+" Message msg = recv.receive(5000);\n"
+" if (msg == null) {\n"
+" System.out.println(\"Timed out waiting for msg\");\n"
+" } else {\n"
+" System.out.println(\"TopicSubscriber.recv, msgt=\"+msg);\n"
+" }\n"
+" }\n"
+" \n"
+" public void stop()\n"
+" throws JMSException\n"
+" {\n"
+" conn.stop();\n"
+" session.close();\n"
+" conn.close();\n"
+" }\n"
+" \n"
+" public static void main(String args[]) \n"
+" throws Exception\n"
+" {\n"
+" System.out.println(\"Begin TopicRecvClient, now=\" +\n"
+" System.currentTimeMillis());\n"
+" TopicRecvClient client = new TopicRecvClient();\n"
+" client.recvSync();\n"
+" client.stop();\n"
+" System.out.println(\"End TopicRecvClient\");\n"
+" System.exit(0);\n"
+" }\n"
+" \n"
+"}"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:73
@@ -868,7 +1024,7 @@
msgid ""
"Run the <literal>TopicSendClient</literal> followed by the "
"<literal>TopicRecvClient</literal> as follows:"
-msgstr ""
+msgstr "次のように、 <literal>TopicSendClient</literal> の後に <literal>TopicRecvClient</literal> を付けて実行します。"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:76
@@ -887,6 +1043,18 @@
" [java] Timed out waiting for msg\n"
" [java] End TopicRecvClient"
msgstr ""
+"[examples]$ ant -Dchap=jms -Dex=1ps2 run-example\n"
+"...\n"
+"run-example1ps2:\n"
+" [java] Begin TopicSendClient, now=1102810007899\n"
+" [java] Begin sendAsync\n"
+" [java] sendAsync, sent text=A text msg, now=1102810007909\n"
+" [java] End sendAsync\n"
+" [java] End TopicSendClient\n"
+" [java] Begin TopicRecvClient, now=1102810011524\n"
+" [java] Begin recvSync\n"
+" [java] Timed out waiting for msg\n"
+" [java] End TopicRecvClient"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:77
@@ -896,16 +1064,19 @@
"literal>) fails to receive the message sent by the publisher due to a "
"timeout."
msgstr ""
+"トピック加入側クライアント (<literal>TopicRecvClient</"
+"literal>) はタイムアウトのため発行元より送信されたメッセージの受信に失敗していることを出力が示しています。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:83
#, no-c-format
msgid "A Pub-Sub With Durable Topic Example"
-msgstr ""
+msgstr "永続的なトピックを持つ Pub-Sub の例"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:84
#, no-c-format
+#, fuzzy
msgid ""
"JMS supports a messaging model that is a cross between the P2P and pub-sub "
"models. When a pub-sub client wants to receive all messages posted to the "
@@ -919,12 +1090,15 @@
"linkend=\"A_Pub_Sub_Example-A_JMS_subscriber_client\"/> client highlighted "
"in bold."
msgstr ""
+"JMS は P2P モデルと pub-sub モデルのクロスとなるメッセージングモデルに対応しています。 pub-sub クライアントが加入しているトピックをアクティブにリッスンしていなくてもそのトピックに投稿されたすべてのメッセージを受信したい場合、 永続的なトピックを使用するとこの動作を行うことができます。 クライアントがリッスンしていないときに発行されたトピックも含め、 すべてのメッセージを必ず受信するよう永続的なトピックを使用している先行加入側クライアントの変形を見てみます。 <xref linkend="
+"\"A_Pub_Sub_With_Durable_Topic_Example-A_durable_topic_JMS_client_example\"/> では、 太字で強調された <xref "
+"linkend=\"A_Pub_Sub_Example-A_JMS_subscriber_client\"/> クライアント間との主な違いを表す永続的なトピックのクライアントを示しています。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:87
#, no-c-format
msgid "A durable topic JMS client example"
-msgstr ""
+msgstr "永続的なトピック JMS クライアントの例"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:88
@@ -1013,6 +1187,88 @@
" \n"
"}"
msgstr ""
+"package org.jboss.book.jms.ex1;\n"
+"\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.MessageListener;\n"
+"import javax.jms.Topic;\n"
+"import javax.jms.TopicConnection;\n"
+"import javax.jms.TopicConnectionFactory;\n"
+"import javax.jms.TopicPublisher;\n"
+"import javax.jms.TopicSubscriber;\n"
+"import javax.jms.TopicSession;\n"
+"import javax.jms.TextMessage;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"/**\n"
+" * A JMS client example program that synchronously receives a message a "
+"Topic\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.9 $\n"
+" */\n"
+"public class DurableTopicRecvClient\n"
+"{\n"
+" TopicConnection conn = null;\n"
+" TopicSession session = null;\n"
+" Topic topic = null;\n"
+" \n"
+" public void setupPubSub()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object tmp = iniCtx.lookup(\"ConnectionFactory\");\n"
+"\n"
+" TopicConnectionFactory tcf = (TopicConnectionFactory) tmp;\n"
+" conn = tcf.createTopicConnection(\"john\", \"needle\");\n"
+" topic = (Topic) iniCtx.lookup(\"topic/testTopic\");\n"
+"\n"
+" session = conn.createTopicSession(false,\n"
+" TopicSession.AUTO_ACKNOWLEDGE);\n"
+" conn.start();\n"
+" }\n"
+" \n"
+" public void recvSync()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" System.out.println(\"Begin recvSync\");\n"
+" // Setup the pub/sub connection, session\n"
+" setupPubSub();\n"
+" // Wait upto 5 seconds for the message\n"
+" TopicSubscriber recv = session.createDurableSubscriber(topic, \"jms-"
+"ex1dtps\");\n"
+" Message msg = recv.receive(5000);\n"
+" if (msg == null) {\n"
+" System.out.println(\"Timed out waiting for msg\");\n"
+" } else {\n"
+" System.out.println(\"DurableTopicRecvClient.recv, msgt=\" + "
+"msg);\n"
+" } \n"
+" }\n"
+" \n"
+" public void stop() \n"
+" throws JMSException\n"
+" {\n"
+" conn.stop();\n"
+" session.close();\n"
+" conn.close();\n"
+" }\n"
+" \n"
+" public static void main(String args[]) \n"
+" throws Exception\n"
+" {\n"
+" System.out.println(\"Begin DurableTopicRecvClient, now=\" + \n"
+" System.currentTimeMillis());\n"
+" DurableTopicRecvClient client = new DurableTopicRecvClient();\n"
+" client.recvSync();\n"
+" client.stop();\n"
+" System.out.println(\"End DurableTopicRecvClient\");\n"
+" System.exit(0);\n"
+" }\n"
+" \n"
+"}"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:89
@@ -1020,7 +1276,7 @@
msgid ""
"Now run the previous topic publisher with the durable topic subscriber as "
"follows:"
-msgstr ""
+msgstr "次のように、 永続的なトピックの加入者で前述のトピック発行元を実行します。"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:92
@@ -1063,12 +1319,48 @@
" [java] }\n"
" [java] End DurableTopicRecvClient"
msgstr ""
+"[examples]$ ant -Dchap=jms -Dex=1psdt run-example\n"
+"... \n"
+"run-example1psdt:\n"
+" [java] Begin DurableTopicSetup\n"
+" [java] End DurableTopicSetup\n"
+" [java] Begin TopicSendClient, now=1102899834273\n"
+" [java] Begin sendAsync\n"
+" [java] sendAsync, sent text=A text msg, now=1102899834345\n"
+" [java] End sendAsync\n"
+" [java] End TopicSendClient\n"
+" [java] Begin DurableTopicRecvClient, now=1102899840043\n"
+" [java] Begin recvSync\n"
+" [java] DurableTopicRecvClient.recv, msgt=SpyTextMessage {\n"
+" [java] Header { \n"
+" [java] jmsDestination : TOPIC.testTopic.DurableSubscription[\n"
+" clientId=DurableSubscriberExample name=jms-ex1dtps "
+"selector=null]\n"
+" [java] jmsDeliveryMode : 2\n"
+" [java] jmsExpiration : 0\n"
+" [java] jmsPriority : 4\n"
+" [java] jmsMessageID : ID:3-11028998375501\n"
+" [java] jmsTimeStamp : 1102899837550\n"
+" [java] jmsCorrelationID: null\n"
+" [java] jmsReplyTo : null\n"
+" [java] jmsType : null\n"
+" [java] jmsRedelivered : false\n"
+" [java] jmsProperties : {}\n"
+" [java] jmsPropReadWrite: false\n"
+" [java] msgReadOnly : true\n"
+" [java] producerClientId: ID:3\n"
+" [java] }\n"
+" [java] Body {\n"
+" [java] text :A text msg, now=1102899834345\n"
+" [java] }\n"
+" [java] }\n"
+" [java] End DurableTopicRecvClient"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:93
#, no-c-format
msgid "Items of note for the durable topic example include:"
-msgstr ""
+msgstr "永続的なトピックの例で注意すべき点には次のようなものが含まれます。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:98
@@ -1081,11 +1373,12 @@
"subscribers. The messaging server needs to know what client is requesting "
"the durable topic and what the name of the durable topic subscription is. We "
"will discuss the details of durable topic setup in the configuration section."
-msgstr ""
+msgstr "永続的なトピックのクライアントでの <literal>TopicConnectionFactory</literal> の作成はユーザー名およびパスワードを使用し、 <literal>TopicSubscriber</literal> の作成は <literal>createDurableSubscriber(Topic, String)</literal> メソッドを使って行われました。 これは永続的なトピック加入側の必須事項になります。 メッセージングサーバーは永続的なトピックを要求しているクライアントおよび永続的なトピックのサブスクリプション名を識別する必要があります。 永続的なトピックの設定については設定のセクションで詳しく説明します。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:103
#, no-c-format
+#, fuzzy
msgid ""
"An <literal>org.jboss.book.jms.DurableTopicSetup</literal> client was run "
"prior to the <literal>TopicSendClient</literal>. The reason for this is a "
@@ -1097,7 +1390,7 @@
"subscriber on the <literal>topic/testTopic</literal> and the messaging "
"server knows that any messages posted to this topic must be saved for latter "
"delivery."
-msgstr ""
+msgstr "<literal>org.jboss.book.jms.DurableTopicSetup</literal> クライアントは <literal>TopicSendClient</literal> の前に実行されました。 メッセージングサーバーがメッセージを保存するためには、 この前のいずれかの時点で永続的なトピックの加入側がサブスクリプションを登録完了していなければならないためです。 JBoss は動的な永続トピック加入側に対応するため、 <literal>DurableTopicSetup</literal> クライアントは単純に永続的なサブスクリプション受信者とその終了を作成するだけです。 これによりアクティブな永続的トピックの加入側が <literal>topic/testTopic</literal> に残り、 メッセージングサーバーがこのトピックに投稿されるメッセージはすべて後日配信するため保存しなければならないことを認識します。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:108
@@ -1105,7 +1398,7 @@
msgid ""
"The <literal>TopicSendClient</literal> does not change for the durable "
"topic. The notion of a durable topic is a subscriber only notion."
-msgstr ""
+msgstr "<literal>TopicSendClient</literal> は永続的なトピックに対して変わりません。 永続的なトピックの概念は加入側のみの概念となります。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:113
@@ -1114,13 +1407,13 @@
"The <literal>DurableTopicRecvClient</literal> sees the message published to "
"the <literal>topic/testTopic</literal> even though it was not listening to "
"the topic at the time the message was published."
-msgstr ""
+msgstr "<literal>DurableTopicRecvClient</literal> は、 メッセージが発行された時点で <literal>topic/testTopic</literal> をリッスンしていなくてもそのトピックに発行されたメッセージが見えます。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:121
#, no-c-format
msgid "A Point-To-Point With MDB Example"
-msgstr ""
+msgstr "MDB でのポイントツーポイントの例"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:122
@@ -1130,7 +1423,7 @@
"<literal>TextMessages</literal> it receives and sends the transformed "
"messages to the queue found in the incoming message <literal>JMSReplyTo</"
"literal> header."
-msgstr ""
+msgstr "<literal>TextMessages</literal> を変換する message driven bean (MDB) を示しています。 変換されたメッセージを着信メッセージの <literal>JMSReplyTo</literal> ヘッダーにあるキューに送受信します。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:125
@@ -1249,6 +1542,112 @@
" }\n"
"}"
msgstr ""
+"package org.jboss.book.jms.ex2;\n"
+" \n"
+"import javax.ejb.MessageDrivenBean;\n"
+"import javax.ejb.MessageDrivenContext;\n"
+"import javax.ejb.EJBException;\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.MessageListener;\n"
+"import javax.jms.Queue;\n"
+"import javax.jms.QueueConnection;\n"
+"import javax.jms.QueueConnectionFactory;\n"
+"import javax.jms.QueueSender;\n"
+"import javax.jms.QueueSession;\n"
+"import javax.jms.TextMessage;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"/** \n"
+" * An MDB that transforms the TextMessages it receives and send the\n"
+" * transformed messages to the Queue found in the incoming message\n"
+" * JMSReplyTo header.\n"
+" * \n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.9 $\n"
+" */\n"
+"public class TextMDB \n"
+" implements MessageDrivenBean, MessageListener\n"
+"{\n"
+" private MessageDrivenContext ctx = null;\n"
+" private QueueConnection conn;\n"
+" private QueueSession session;\n"
+" \n"
+" public TextMDB()\n"
+" {\n"
+" System.out.println(\"TextMDB.ctor, this=\"+hashCode());\n"
+" }\n"
+" \n"
+" public void setMessageDrivenContext(MessageDrivenContext ctx)\n"
+" {\n"
+" this.ctx = ctx;\n"
+" System.out.println(\"TextMDB.setMessageDrivenContext, this=\" + \n"
+" hashCode());\n"
+" }\n"
+" \n"
+" public void ejbCreate()\n"
+" {\n"
+" System.out.println(\"TextMDB.ejbCreate, this=\"+hashCode());\n"
+" try {\n"
+" setupPTP();\n"
+" } catch (Exception e) {\n"
+" throw new EJBException(\"Failed to init TextMDB\", e);\n"
+" }\n"
+" }\n"
+"\n"
+" public void ejbRemove()\n"
+" {\n"
+" System.out.println(\"TextMDB.ejbRemove, this=\"+hashCode());\n"
+" ctx = null;\n"
+" try {\n"
+" if (session != null) {\n"
+" session.close();\n"
+" }\n"
+" if (conn != null) {\n"
+" conn.close();\n"
+" }\n"
+" } catch(JMSException e) {\n"
+" e.printStackTrace();\n"
+" }\n"
+" }\n"
+" \n"
+" public void onMessage(Message msg)\n"
+" {\n"
+" System.out.println(\"TextMDB.onMessage, this=\"+hashCode());\n"
+" try {\n"
+" TextMessage tm = (TextMessage) msg;\n"
+" String text = tm.getText() + \"processed by: \"+hashCode();\n"
+" Queue dest = (Queue) msg.getJMSReplyTo();\n"
+" sendReply(text, dest);\n"
+" } catch(Throwable t) {\n"
+" t.printStackTrace();\n"
+" }\n"
+" }\n"
+" \n"
+" private void setupPTP()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object tmp = iniCtx.lookup(\"java:comp/env/jms/QCF\");\n"
+" QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;\n"
+" conn = qcf.createQueueConnection();\n"
+" session = conn.createQueueSession(false,\n"
+" QueueSession.AUTO_ACKNOWLEDGE);\n"
+" conn.start();\n"
+" }\n"
+"\n"
+" private void sendReply(String text, Queue dest)\n"
+" throws JMSException\n"
+" {\n"
+" System.out.println(\"TextMDB.sendReply, this=\" + \n"
+" hashCode() + \", dest=\"+dest);\n"
+" QueueSender sender = session.createSender(dest);\n"
+" TextMessage tm = session.createTextMessage(text);\n"
+" sender.send(tm);\n"
+" sender.close();\n"
+" }\n"
+"}"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:127
@@ -1260,12 +1659,16 @@
"<xref linkend=\"A_Point_To_Point_With_MDB_Example-The_MDB_jboss."
"xml_descriptor\"/>."
msgstr ""
+"MDB <literal>ejb-jar.xml</literal> と <literal>jboss.xml</literal> デプロイメント記述子を <xref linkend="
+"\"A_Point_To_Point_With_MDB_Example-The_MDB_ejb_jar.xml_descriptor\"/> と "
+"<xref linkend=\"A_Point_To_Point_With_MDB_Example-The_MDB_jboss."
+"xml_descriptor\"/> に示します。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:130
#, no-c-format
msgid "The MDB ejb-jar.xml descriptor"
-msgstr ""
+msgstr "MDB ejb-jar.xml 記述子"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:131
@@ -1298,12 +1701,38 @@
" </enterprise-beans>\n"
"</ejb-jar>"
msgstr ""
+"<?xml version=\"1.0\"?>\n"
+"<!DOCTYPE ejb-jar PUBLIC \n"
+" \"-//Sun Microsystems, Inc.//DTD Enterprise JavaBeans 2.0//EN\"\n"
+" \"http://java.sun.com/dtd/ejb-jar_2_0.dtd\">\n"
+"<ejb-jar>\n"
+" <enterprise-beans>\n"
+" <message-driven>\n"
+" <ejb-name>TextMDB</ejb-name>\n"
+" <ejb-class>org.jboss.book.jms.ex2.TextMDB</ejb-"
+"class>\n"
+" <transaction-type>Container</transaction-type>\n"
+" <acknowledge-mode>AUTO_ACKNOWLEDGE</acknowledge-"
+"mode>\n"
+" <message-driven-destination>\n"
+" <destination-type>javax.jms.Queue</destination-"
+"type>\n"
+" </message-driven-destination>\n"
+" <res-ref-name>jms/QCF</res-ref-name>\n"
+" <resource-ref>\n"
+" <res-type>javax.jms.QueueConnectionFactory</res-"
+"type>\n"
+" <res-auth>Container</res-auth>\n"
+" </resource-ref>\n"
+" </message-driven>\n"
+" </enterprise-beans>\n"
+"</ejb-jar>"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:132
#, no-c-format
msgid "The MDB jboss.xml descriptor"
-msgstr ""
+msgstr "MDB jboss.xml 記述子"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:133
@@ -1324,6 +1753,20 @@
" </enterprise-beans>\n"
"</jboss>"
msgstr ""
+"<?xml version=\"1.0\"?>\n"
+"<jboss>\n"
+" <enterprise-beans>\n"
+" <message-driven>\n"
+" <ejb-name>TextMDB</ejb-name>\n"
+" <destination-jndi-name>queue/B</destination-jndi-"
+"name>\n"
+" <resource-ref>\n"
+" <res-ref-name>jms/QCF</res-ref-name>\n"
+" <jndi-name>ConnectionFactory</jndi-name>\n"
+" </resource-ref>\n"
+" </message-driven>\n"
+" </enterprise-beans>\n"
+"</jboss>"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:134
@@ -1333,13 +1776,13 @@
"<literal>queue/B</literal> destination and asynchronously receives the "
"messages as modified by <literal>TextMDB</literal> from queue <literal>A</"
"literal>."
-msgstr ""
+msgstr "<literal>queue/B</literal> 目的地にいくつかのメッセージを送信し、 またキュー <literal>A</literal> からの <literal>TextMDB</literal> で変更されるためそのメッセージを非同期的に受け取る P2P の変形を示します。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:137
#, no-c-format
msgid "A JMS client that interacts with the TextMDB"
-msgstr ""
+msgstr "TextMDB と交信する JMS クライアント"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:138
@@ -1457,12 +1900,123 @@
" \n"
"}"
msgstr ""
+"package org.jboss.book.jms.ex2;\n"
+"\n"
+"import javax.jms.JMSException;\n"
+"import javax.jms.Message;\n"
+"import javax.jms.MessageListener;\n"
+"import javax.jms.Queue;\n"
+"import javax.jms.QueueConnection;\n"
+"import javax.jms.QueueConnectionFactory;\n"
+"import javax.jms.QueueReceiver;\n"
+"import javax.jms.QueueSender;\n"
+"import javax.jms.QueueSession;\n"
+"import javax.jms.TextMessage;\n"
+"import javax.naming.InitialContext;\n"
+"import javax.naming.NamingException;\n"
+"\n"
+"import EDU.oswego.cs.dl.util.concurrent.CountDown;\n"
+"\n"
+"/**\n"
+" * A complete JMS client example program that sends N TextMessages to\n"
+" * a Queue B and asynchronously receives the messages as modified by\n"
+" * TextMDB from Queue A.\n"
+" *\n"
+" * @author Scott.Stark at jboss.org\n"
+" * @version $Revision: 1.9 $\n"
+" */\n"
+"public class SendRecvClient\n"
+"{\n"
+" static final int N = 10;\n"
+" static CountDown done = new CountDown(N);\n"
+"\n"
+" QueueConnection conn;\n"
+" QueueSession session;\n"
+" Queue queA;\n"
+" Queue queB;\n"
+" \n"
+" public static class ExListener \n"
+" implements MessageListener\n"
+" {\n"
+" public void onMessage(Message msg)\n"
+" {\n"
+" done.release();\n"
+" TextMessage tm = (TextMessage) msg;\n"
+" try {\n"
+" System.out.println(\"onMessage, recv text=\"+tm.getText());\n"
+" } catch(Throwable t) {\n"
+" t.printStackTrace();\n"
+" }\n"
+" }\n"
+" }\n"
+" \n"
+" public void setupPTP()\n"
+" throws JMSException, NamingException\n"
+" {\n"
+" InitialContext iniCtx = new InitialContext();\n"
+" Object tmp = iniCtx.lookup(\"ConnectionFactory\");\n"
+" QueueConnectionFactory qcf = (QueueConnectionFactory) tmp;\n"
+" conn = qcf.createQueueConnection();\n"
+" queA = (Queue) iniCtx.lookup(\"queue/A\");\n"
+" queB = (Queue) iniCtx.lookup(\"queue/B\");\n"
+" session = conn.createQueueSession(false,\n"
+" QueueSession.AUTO_ACKNOWLEDGE);\n"
+" conn.start();\n"
+" }\n"
+" \n"
+" public void sendRecvAsync(String textBase)\n"
+" throws JMSException, NamingException, InterruptedException\n"
+" {\n"
+" System.out.println(\"Begin sendRecvAsync\");\n"
+"\n"
+" // Setup the PTP connection, session\n"
+" setupPTP();\n"
+"\n"
+" // Set the async listener for queA\n"
+" QueueReceiver recv = session.createReceiver(queA);\n"
+" recv.setMessageListener(new ExListener());\n"
+"\n"
+" // Send a few text msgs to queB\n"
+" QueueSender send = session.createSender(queB);\n"
+"\n"
+" for(int m = 0; m < 10; m ++) {\n"
+" TextMessage tm = session.createTextMessage(textBase+\"#\"+m);\n"
+" tm.setJMSReplyTo(queA);\n"
+" send.send(tm);\n"
+" System.out.println(\"sendRecvAsync, sent text=\" + tm.getText"
+"());\n"
+" }\n"
+" System.out.println(\"End sendRecvAsync\");\n"
+" }\n"
+" \n"
+" public void stop() \n"
+" throws JMSException\n"
+" {\n"
+" conn.stop();\n"
+" session.close();\n"
+" conn.close();\n"
+" }\n"
+" \n"
+" public static void main(String args[]) \n"
+" throws Exception\n"
+" {\n"
+" System.out.println(\"Begin SendRecvClient,now=\" + \n"
+" System.currentTimeMillis());\n"
+" SendRecvClient client = new SendRecvClient();\n"
+" client.sendRecvAsync(\"A text msg\");\n"
+" client.done.acquire();\n"
+" client.stop();\n"
+" System.exit(0);\n"
+" System.out.println(\"End SendRecvClient\");\n"
+" }\n"
+" \n"
+"}"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:139
#, no-c-format
msgid "Run the client as follows:"
-msgstr ""
+msgstr "次のようにクライアントを実行します。"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:142
@@ -1496,12 +2050,39 @@
" [java] onMessage, recv text=A text msg#8processed by: 6056676\n"
" [java] onMessage, recv text=A text msg#6processed by: 15679078"
msgstr ""
+"[examples]$ ant -Dchap=jms -Dex=2 run-example\n"
+"...\n"
+"run-example2:\n"
+"...\n"
+" [java] Begin SendRecvClient, now=1102900541558\n"
+" [java] Begin sendRecvAsync\n"
+" [java] sendRecvAsync, sent text=A text msg#0\n"
+" [java] sendRecvAsync, sent text=A text msg#1\n"
+" [java] sendRecvAsync, sent text=A text msg#2\n"
+" [java] sendRecvAsync, sent text=A text msg#3\n"
+" [java] sendRecvAsync, sent text=A text msg#4\n"
+" [java] sendRecvAsync, sent text=A text msg#5\n"
+" [java] sendRecvAsync, sent text=A text msg#6\n"
+" [java] sendRecvAsync, sent text=A text msg#7\n"
+" [java] sendRecvAsync, sent text=A text msg#8\n"
+" [java] sendRecvAsync, sent text=A text msg#9\n"
+" [java] End sendRecvAsync\n"
+" [java] onMessage, recv text=A text msg#0processed by: 12855623\n"
+" [java] onMessage, recv text=A text msg#5processed by: 9399816\n"
+" [java] onMessage, recv text=A text msg#9processed by: 6598158\n"
+" [java] onMessage, recv text=A text msg#3processed by: 8153998\n"
+" [java] onMessage, recv text=A text msg#4processed by: 10118602\n"
+" [java] onMessage, recv text=A text msg#2processed by: 1792333\n"
+" [java] onMessage, recv text=A text msg#7processed by: 14251014\n"
+" [java] onMessage, recv text=A text msg#1processed by: 10775981\n"
+" [java] onMessage, recv text=A text msg#8processed by: 6056676\n"
+" [java] onMessage, recv text=A text msg#6processed by: 15679078"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:143
#, no-c-format
msgid "The corresponding JBoss server console output is:"
-msgstr ""
+msgstr "該当の JBoss サーバーコンソールの出力は次のようになります。"
#. Tag: programlisting
#: J2EE_Messaging_On_JBOSS.xml:146
@@ -1562,12 +2143,66 @@
"19:15:47,064 INFO [TextMDB] TextMDB.onMessage, this=15679078\n"
"19:15:47,065 INFO [TextMDB] TextMDB.sendReply, this=15679078, dest=QUEUE.A"
msgstr ""
+"19:15:40,232 INFO [EjbModule] Deploying TextMDB\n"
+" 19:15:41,498 INFO [EJBDeployer] Deployed: file:/jboss-4.2.0.GA/"
+"server/production/deploy/\n"
+" jms-ex2.jar\n"
+"19:15:45,606 INFO [TextMDB] TextMDB.ctor, this=10775981\n"
+"19:15:45,620 INFO [TextMDB] TextMDB.ctor, this=1792333\n"
+"19:15:45,627 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=10775981\n"
+"19:15:45,638 INFO [TextMDB] TextMDB.ejbCreate, this=10775981\n"
+"19:15:45,640 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=1792333\n"
+"19:15:45,640 INFO [TextMDB] TextMDB.ejbCreate, this=1792333\n"
+"19:15:45,649 INFO [TextMDB] TextMDB.ctor, this=12855623\n"
+"19:15:45,658 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=12855623\n"
+"19:15:45,661 INFO [TextMDB] TextMDB.ejbCreate, this=12855623\n"
+"19:15:45,742 INFO [TextMDB] TextMDB.ctor, this=8153998\n"
+"19:15:45,744 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=8153998\n"
+"19:15:45,744 INFO [TextMDB] TextMDB.ejbCreate, this=8153998\n"
+"19:15:45,763 INFO [TextMDB] TextMDB.ctor, this=10118602\n"
+"19:15:45,764 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=10118602\n"
+"19:15:45,764 INFO [TextMDB] TextMDB.ejbCreate, this=10118602\n"
+"19:15:45,777 INFO [TextMDB] TextMDB.ctor, this=9399816\n"
+"19:15:45,779 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=9399816\n"
+"19:15:45,779 INFO [TextMDB] TextMDB.ejbCreate, this=9399816\n"
+"19:15:45,792 INFO [TextMDB] TextMDB.ctor, this=15679078\n"
+"19:15:45,798 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=15679078\n"
+"19:15:45,799 INFO [TextMDB] TextMDB.ejbCreate, this=15679078\n"
+"19:15:45,815 INFO [TextMDB] TextMDB.ctor, this=14251014\n"
+"19:15:45,816 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=14251014\n"
+"19:15:45,817 INFO [TextMDB] TextMDB.ejbCreate, this=14251014\n"
+"19:15:45,829 INFO [TextMDB] TextMDB.ctor, this=6056676\n"
+"19:15:45,831 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=6056676\n"
+"19:15:45,864 INFO [TextMDB] TextMDB.ctor, this=6598158\n"
+"19:15:45,903 INFO [TextMDB] TextMDB.ejbCreate, this=6056676\n"
+"19:15:45,906 INFO [TextMDB] TextMDB.setMessageDrivenContext, this=6598158\n"
+"19:15:45,906 INFO [TextMDB] TextMDB.ejbCreate, this=6598158\n"
+"19:15:46,236 INFO [TextMDB] TextMDB.onMessage, this=12855623\n"
+"19:15:46,238 INFO [TextMDB] TextMDB.sendReply, this=12855623, dest=QUEUE.A\n"
+"19:15:46,734 INFO [TextMDB] TextMDB.onMessage, this=9399816\n"
+"19:15:46,736 INFO [TextMDB] TextMDB.onMessage, this=8153998\n"
+"19:15:46,737 INFO [TextMDB] TextMDB.onMessage, this=6598158\n"
+"19:15:46,768 INFO [TextMDB] TextMDB.sendReply, this=9399816, dest=QUEUE.A\n"
+"19:15:46,768 INFO [TextMDB] TextMDB.sendReply, this=6598158, dest=QUEUE.A\n"
+"19:15:46,774 INFO [TextMDB] TextMDB.sendReply, this=8153998, dest=QUEUE.A\n"
+"19:15:46,903 INFO [TextMDB] TextMDB.onMessage, this=10118602\n"
+"19:15:46,904 INFO [TextMDB] TextMDB.sendReply, this=10118602, dest=QUEUE.A\n"
+"19:15:46,927 INFO [TextMDB] TextMDB.onMessage, this=1792333\n"
+"19:15:46,928 INFO [TextMDB] TextMDB.sendReply, this=1792333, dest=QUEUE.A\n"
+"19:15:47,002 INFO [TextMDB] TextMDB.onMessage, this=14251014\n"
+"19:15:47,007 INFO [TextMDB] TextMDB.sendReply, this=14251014, dest=QUEUE.A\n"
+"19:15:47,051 INFO [TextMDB] TextMDB.onMessage, this=10775981\n"
+"19:15:47,051 INFO [TextMDB] TextMDB.sendReply, this=10775981, dest=QUEUE.A\n"
+"19:15:47,060 INFO [TextMDB] TextMDB.onMessage, this=6056676\n"
+"19:15:47,061 INFO [TextMDB] TextMDB.sendReply, this=6056676, dest=QUEUE.A\n"
+"19:15:47,064 INFO [TextMDB] TextMDB.onMessage, this=15679078\n"
+"19:15:47,065 INFO [TextMDB] TextMDB.sendReply, this=15679078, dest=QUEUE.A"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:147
#, no-c-format
msgid "Items of note in this example include:"
-msgstr ""
+msgstr "この例で注意すべき点には次のようなものが含まれます。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:152
@@ -1576,7 +2211,7 @@
"The JMS client has no explicit knowledge that it is dealing with an MDB. The "
"client simply uses the standard JMS APIs to send messages to a queue and "
"receive messages from another queue."
-msgstr ""
+msgstr "JMS クライアントには MDB とやりとりを行っているという明示的な認識はありません。 クライアントは単純に標準 JMS API を使ってメッセージをキューに送信し別のキューからメッセージを受信します。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:157
@@ -1588,7 +2223,7 @@
"example the MDB also sends messages to a JMS queue. MDBs may act as queue "
"senders or topic publishers within their <literal>onMessage</literal> "
"callback."
-msgstr ""
+msgstr "MDB は <literal>ejb-jar.xml</literal> 記述子内でキューまたはトピックをリッスンするかどうかを宣言します。 キューまたはトピックの名前を <literal>jboss.xml</literal> 記述子を使って指定する必要があります。 この例では、 MDB は JMS キューにもメッセージを送信します。 MDB はその <literal>onMessage</literal> コールバック内でキュー送信側またはトピック発行側として動作することができます。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:162
@@ -1599,13 +2234,13 @@
"processed the message. This shows that many MDBs may actively process "
"messages posted to a destination. Concurrent processing is one of the "
"benefits of MDBs."
-msgstr ""
+msgstr "クライアントによって受信されるメッセージには \"processed by: NNN\" サフィックスが含まれ、 NNN はメッセージを処理した MDB インスタンスの <literal>hashCode</literal> 値です。 多くの MDB が目的地に投稿されたメッセージをアクティブに処理する可能性があることを示しています。 同時処理は MDB の利点のひとつになります。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:172
#, no-c-format
msgid "JBoss MQ Overview"
-msgstr ""
+msgstr "JBoss MQ の概要"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:173
@@ -1614,13 +2249,13 @@
"JBossMQ is composed of several services working together to provide JMS API "
"level services to client applications. The services that make up the JBossMQ "
"JMS implementation are introduced in this section."
-msgstr ""
+msgstr "JBossMQ は JMS API レベルのサービスをクライアントのアプリケーションに提供するため連携して動作するいくつかのサービスから構成されます。 JBossMQ JMS 実装を構成するサービスを本セクションで説明していきます。"
#. Tag: title
#: J2EE_Messaging_On_JBOSS.xml:177
#, no-c-format
msgid "Invocation Layer"
-msgstr ""
+msgstr "呼び出し層"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:178
@@ -1634,7 +2269,7 @@
"handle the transport details of messaging. They delegate messages to the JMS "
"server JMX gateway service known as the invoker. This is similar to how the "
"detached invokers expose the EJB container via different transports."
-msgstr ""
+msgstr "呼び出し層 (IL - Invocation Layer) のサービスは、 クライアントがメッセージの送受信に使用する通信プロトコルを処理する役目を担います。 JBossMQ はタイプの異なる呼び出し層の同時実行に対応しています。 すべての呼び出し層は、 クライアントがメッセージを同時に送信、 受信できる双方向通信をサポートしています。 IL はメッセージングの転送詳細を処理するだけです。 メッセージを呼び出し側として知られる JMS サーバー JMX ゲートウェイサービスに委任します。 分離された呼び出し側が異なるトランスポートで EJB コンテナを公開する方法に似ています。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:181
@@ -1644,7 +2279,7 @@
"JNDI tree. Clients choose the protocol they wish to use by the JNDI location "
"used to obtain the JMS connection factory. JBossMQ currently has several "
"different invocation layers."
-msgstr ""
+msgstr "各 IL サービスは JMS 接続ファクトリを JMDI ツリー内の特定の場所に結合します。 クライアント郡は JMS 接続ファクトリの取得に用いられる JNDI の場所で使用したいプロトコルを選択します。 JBossMQ には現在、 異なる呼び出し層が複数あります。"
#. Tag: para
#: J2EE_Messaging_On_JBOSS.xml:186
More information about the jboss-cvs-commits
mailing list