JMS 啟動規格 [設定]
如果想要利用訊息驅動 Bean,透過「Java™ EE 連接器架構 (JCA) 1.5」來與預設傳訊提供者通訊,您可以建立一個 JMS 啟動規格。JCA 提供在 WebSphere® Application Server 之類應用程式伺服器和企業資訊系統之間的 Java 連線功能。 它提供將 JMS 提供者與 Java EE 應用程式伺服器整合起來的標準方法,並且也提供與企業系統交換資料的架構,以訊息形式來傳送資料。
在相關聯的 EJB 2.1 或更新版本的訊息驅動 Bean 的部署描述子中,適當命名的啟動配置內容,會置換名稱、JNDI 名稱、目的地 JNDI 名稱或目的地查閱,以及鑑別別名以外的所有啟動規格配置內容。 如果是 EJB 2.0 訊息驅動 Bean,部署描述子中對應的元素會置換 Destination type、Subscription durability、Acknowledge mode 和 Message selector 等內容。 不論任何一種 Bean 類型,訊息驅動 Bean 連結中所指定的值都可以置換目的地 JNDI 名稱或目的地查閱內容。
The activation specification properties influence how the default messaging provider chooses the messaging engine to which your message-driven bean application connects. 依預設,環境會自動將應用程式連接到匯流排上可用的傳訊引擎。 不過,您可以指定額外的配置詳細資料來影響連線程序;比方說,識別特殊的引導伺服器,或是限制只能連線到某些可用傳訊引擎的子群組,或改進可用性或效能,或確保收到之訊息的循序處理。 For information about why and how to do this, see the topic How JMS applications connect to a messaging engine on a bus.
「配置」標籤
「配置」標籤顯示這個物件的配置內容。 這些內容會保留下來,即使停止並重新啟動執行時期環境也一樣。請參閱資訊中心作業說明,以取得如何將配置變更套用於執行時期環境的相關資訊。
一般內容
範圍
Specifies the highest topological level at which application servers can use this resource object.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
提供者
Specifies a JMS provider, which enables asynchronous messaging based on the Java Message Service (JMS). It provides J2EE connection factories to create connections for specific JMS queue or topic destinations. JMS provider administrative objects are used to manage JMS resources for the associated JMS provider.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
名稱
The required display name for the resource.
Information | Value |
---|---|
必要 | 是 |
資料類型 | 字串 |
JNDI 名稱
The JNDI name for the resource.
Information | Value |
---|---|
必要 | 是 |
資料類型 | 字串 |
說明
An optional description for the resource.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 文字區 |
目的地類型
Information | Value |
---|---|
必要 | 是 |
資料類型 | 下拉清單 |
範圍 |
|
目的地查閱
Select the type of destination on the 目的地類型 property.
For resource adapters that support JMS you must associate javax.jms.Destinations with an activation specification, such that the resource adapter can service messages from the JMS destination. In this case, the administrator configures a J2C Administered Object that implements the javax.jms.Destination interface and binds it into JNDI.
You can configure a J2C Administered Object to use an ActivationSpec class that implements a setDestination(javax.jms.Destination) method. In this case, you can specify the Destination lookup (that is, the JNDI name for the J2C Administered object that implements the javax.jms.Destination).
Information | Value |
---|---|
必要 | 是 |
資料類型 | 字串 |
Connection factory lookup
JNDI name of the connection factory.
Information | Value |
---|---|
必要 | 是 |
資料類型 | 字串 |
訊息選取器
JMSType='car' AND color='blue' AND weight>2500
The selector string can refer to fields in the JMS message header and fields in the message properties. Message selectors cannot reference message body values.
A null value (an empty string) indicates that there is no message selector for the message consumer.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
匯流排名稱
Information | Value |
---|---|
必要 | 否 |
資料類型 | 自訂 |
確認模式
刪除訊息時會傳送確認通知。
- 如果系統的配置是在 Bean 完成時刪除訊息,則訊息會分派給新的 Bean 實例,因此就有另一次機會可以處理訊息。
- 如果系統的配置是在 Bean 啟動時刪除訊息,則訊息會遺失。
如果服務品質設為最大努力非持續性,訊息會在 Bean 啟動時刪除。如果是所有的其他服務品質,則會在 Bean 完成時刪除訊息。
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |
範圍 |
|
目標
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
目標類型
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |
範圍 |
|
目標重要性
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |
範圍 |
|
目標入埠傳輸鏈
如果所選傳訊引擎位於應用程式所在相同伺服器,則會進行直接的進行中連線,且會忽略這個傳輸鏈內容。
- InboundBasicMessaging
- 這是一個使用標準 TCP/IP 連線 (JFAP-TCP/IP) 的連線導向通訊協定。它支援兩段式交易 (遠端 XA) 流程,所以在用戶端或伺服器系統上執行的訊息生產者或消費者,都可以參與該用戶端或伺服器系統所管理的廣域交易。 XA 流程的特定用途,是支援從執行於某伺服器的應用程式存取在第二部伺服器上的傳訊引擎,原因可能是第一部伺服器沒有適當的傳訊引擎。 如果使用遠端 XA 流程,應用程式必須能夠在本端使用交易協調程式。
- InboundSecureMessaging
- 這是包裝在 SSL 中的 InboundBasicMessaging 通訊協定。
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
提供者端點
A comma-separated list of endpoint triplets, with the syntax hostName:portNumber:chainName, used to connect to a bootstrap server. For example Merlin:7276:BootstrapBasicMessaging,Gandalf:5557:BootstrapSecureMessaging.
If the host name is not specified, localhost is used as a default value.
If the port number is not specified, 7276 is used as the default value.
If the protocol is not specified, a predefined chain such as BootstrapBasicMessaging is used as the default value.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 文字區 |
批次大小上限
Information | Value |
---|---|
必要 | 否 |
資料類型 | 整數 |
範圍 | 1 through 2147483647 |
每個端點的並行 MDB 呼叫數目上限
Information | Value |
---|---|
必要 | 否 |
資料類型 | 整數 |
範圍 | 1 through 2147483647 |
在重複的訊息失敗時自動停止端點
These parameters enable an endpoint to stop automatically when the number of sequentially failing messages reaches a limit that you specify. This helps to distinguish between one or two messages that fail because of problems with the messages themselves, and a system resource problem that results in many sequentially failing messages.
When an endpoint is stopped automatically, its Status on the administrative console panel is red. It must be restarted manually by clicking Resume.
After an endpoint is restarted, any failing messages that caused the endpoint to be stopped are retried. If they continue to fail they are moved to an exception destination, if configured.
啟用
Information | Value |
---|---|
必要 | 否 |
資料類型 | 布林 |
循序失敗訊息臨界值
This property is not enabled unless the 在重複的訊息失敗時自動停止端點 property is enabled.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 整數 |
失敗訊息重試的延遲間隔
Setting a delay between failing message retries reduces the number of messages unnecessarily moved to the exception destination before the MDB is stopped. To minimize the number of messages that are moved, make this delay greater than the expected time interval between messages arriving on the destination.
This property is not enabled unless the 在重複的訊息失敗時自動停止端點 property is enabled.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 整數 |
範圍 | The time in milliseconds. A value of 0 indicates no delay between retries. |
訂閱延續性
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |
範圍 |
|
訂閱名稱
This subscription name must be unique within a given client identifier.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
用戶端 ID
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
訂閱首頁
Information | Value |
---|---|
必要 | 否 |
資料類型 | 字串 |
Pass message payload by reference
利用這個啟動規格來接收訊息的應用程式必須遵循下列規則:
- 應用程式不會修改從 JMS 物件訊息取得的資料物件。資料物件是當作唯讀來處理。
Information | Value |
---|---|
必要 | 否 |
資料類型 | 布林 |
利用這個啟動規格來重新傳送原來收到的訊息之應用程式必須遵循下列規則:
- 如果資料物件尚未設在訊息中,應用程式可以取代 JMS 物件訊息中的資料物件。 在訊息內設定資料物件之後,應用程式就不會修改或取代資料物件。
- 應用程式可以取代 JMS 位元組訊息中的位元組陣列,但必須是尚未在訊息內設定位元組訊息,且只能使用對於 writeBytes(byte[]) 的單一呼叫。在訊息內設定位元組陣列之後,應用程式就不會修改或取代位元組陣列。
Information | Value |
---|---|
必要 | 否 |
資料類型 | 布林 |
先讀
指派給消費者的訊息已在伺服器上鎖定,而該目的地的任何其他消費者都無法使用那些訊息。指派給消費者的訊息,如果在這個消費者關閉之前都未使用,之後便會在伺服器中解開鎖定,任何其他消費者都可以接收它。
您可以設定個別 JMS 目的地的 Read ahead 內容來置換 JMS 目的地的這個內容。
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |
範圍 |
|
一律在所有伺服器中啟動 MDB
This property is only used when the MDB application is running on a server that is a member of the bus that the application is targeting. It has no effect when the MDB is running on a server that is not a member of the target bus.
If the MDB application is running on a server that is a member of the target bus, enabling this option allows the MDB application to process messages whether or not the server also hosts a running messaging engine. If this option is not enabled, then MDB applications on servers that do not have a local ME running do not process messages.
- 叢集內的所有伺服器都可以從 MDB 應用程式接收訊息,以充分運用叢集的處理能力。
- 每次只有一部伺服器能夠接收來自 MDB 應用程式的訊息,以確保會循序處理訊息。
For more information, see the topic How a message-driven bean connects in a cluster.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 布林 |
重試間隔
Information | Value |
---|---|
必要 | 否 |
資料類型 | 整數 |
範圍 | 1 through 2147483647 |
鑑別別名
A Java Platform, Enterprise Edition (Java EE) Connector Architecture (JCA) authentication alias specifies the user ID and password that is used to authenticate the creation of a new connection to the JMS provider.
The user name and password custom properties fields must be left unspecified if the authentication alias field used. Authentication alias properties set as part of application deployment take precedence over properties set on an activation specification administrative object.
Only the authentication alias is ever written to file in an unencrypted form, even for purposes of transaction recovery logging. The security service is used to protect the real user name and password.
During application startup, when the activation specification is being initialized as part of endpoint activation, the server uses the authentication alias to retrieve the real user name and password from security then set it on the activation specification instance.
Information | Value |
---|---|
必要 | 否 |
資料類型 | 下拉清單 |