createSIBJMSActivationSpec command
Use the createSIBJMSActivationSpec command to create a new JMS activation specification for the default messaging provider at a specific scope.
如果要執行這個指令,請使用 wsadmin Scripting 用戶端的 AdminTask 物件。
wsadmin Scripting 用戶端是從 Qshell 執行.
如需相關資訊,請參閱利用 wsadmin Script 配置 Qshell 來執行 WebSphere Script.
- 如需 Jython 中可用的服務整合匯流排 JMS 指令清單,以及每個指令的簡要說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('SIBJMSAdminCommands')
- 如需給定指令的概觀說明,請在 wsadmin 提示下,輸入下列指令:
print AdminTask.help('command_name')
AdminConfig.save()
Purpose
The createSIBJMSActivationSpec command creates a new JMS activation specification at a specific scope.
Target object
The scope of the default messaging provider at which the JMS activation specification is to be created.
Required parameters
- -name
- The administrative name assigned to this activation specification.
- -jndiName
- The JNDI name that is specified in the bindings for message-driven beans associated with this activation specification.
Optional parameters
- -description
- An optional description for the activation specification.
- -destinationJndiName
- The JNDI name of the destination JMS queue or topic used by the message-driven bean. The destination JNDI name and destination lookup name parameters serve the same purpose of storing the destination JNDI name in the configuration. Although the two fields individually are not mandatory, you must ensure that at least one of them has a value. When both destinationLookup and destinationJndiName parameters have values, then the destinationLookup parameter takes precedence over destinationJndiName parameter.
- -destinationLookup
- The JNDI name of the destination JMS queue or topic used by the message-driven bean. The destination JNDI name and destination lookup name parameters serve the same purpose of storing the destination JNDI name in the configuration. Although the two fields individually are not mandatory, you must ensure that at least one of them has a value. When both destinationLookup and destinationJndiName parameters have values, then the destinationLookup parameter takes precedence over destinationJndiName parameter.
- -connectionFactoryLookup
- The JNDI name of the connection factory lookup. When connection factory lookup is defined in the activation specification as the JNDI name, the connection factory properties take precedence over the properties set on an activation specification configuration. For example, the client ID set as part of connection factory JNDI takes precedence over the client ID set on an activation specification configuration property.
- -destinationType
- An option to determine whether the message_driven bean uses a
JMS queue or a JMS topic. Select one of the following values:
- 佇列
- 訊息驅動 Bean 使用 JMS 佇列。JMS 佇列的 JNDI 名稱指定在 Destination JNDI name 內容中。
- 主題
- 訊息驅動 Bean 使用 JMS 主題。JMS 主題的 JNDI 名稱指定在 Destination JNDI name 內容中。
- -messageSelector
-
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.
- -busName
- The name of the service integration bus to which connections are made. This must be the name of the bus on which the destination identified by the -destinationJndiName property is defined.
- -acknowledgeMode
- The acknowledge mode indicates how a message received by a message-driven
bean should be acknowledged. Select one of the following values:
- Auto-acknowledge
- 階段作業會自動確認訊息的遞送。
- Duplicates-ok auto-acknowledge
- 階段作業會慢慢地確認訊息遞送,這可增進效能,但會導致訊息驅動 Bean 多次接收訊息。
- -target
- The name of a target that identifies a group of messaging engines. Specify the type of target by using the Target type property.
- -targetType
- The type of target named in the -target property.
Select one of the following values:
- 匯流排成員名稱
- 匯流排成員的名稱。這個選項會擷取指定的匯流排成員(應用程式伺服器或伺服器叢集)所管理的作用中傳訊引擎。
- 自訂傳訊引擎群組名稱
- 傳訊引擎自訂群組(形成自我宣告的叢集)的名稱。這個選項會擷取登錄在指名自訂群組中的作用中傳訊引擎。
- 傳訊引擎名稱
- 傳訊引擎的名稱。這個選項會擷取可用來連接指名的傳訊引擎的端點。
- -targetSignificance
- Select
one of the following values:
- 偏好的
- 傳訊引擎最好是選自目標群組。如果目標群組中有可用的傳訊引擎,就會選取它。如果目標群組中沒有可用的傳訊引擎,而在相同的服務整合匯流排中有可用的傳訊引擎,則會選取目標群組外的傳訊引擎。
- 必要
- 傳訊引擎必須選自目標群組。如果目標群組中有可用的傳訊引擎,就會選取它。如果目標群組中沒有可用的傳訊引擎,連線程序會失敗。
- -targetTransportChain
如果所選傳訊引擎位於應用程式所在相同伺服器,則會進行直接的進行中連線,且會忽略這個傳輸鏈內容。
傳輸鏈代表在伺服器內作業的網路通訊協定堆疊。 您指定的名稱必須是如所列,是管理傳訊引擎的伺服器所提供的傳輸鏈之一。 提供的傳輸鏈如下,但您可以在這個畫面中定義您自己的傳輸鏈。- InboundBasicMessaging
- 這是一個使用標準 TCP/IP 連線 (JFAP-TCP/IP) 的連線導向通訊協定。它支援兩段式交易 (遠端 XA) 流程,所以在用戶端或伺服器系統上執行的訊息生產者或消費者,都可以參與該用戶端或伺服器系統所管理的廣域交易。 XA 流程的特定用途,是支援從執行於某伺服器的應用程式存取在第二部伺服器上的傳訊引擎,原因可能是第一部伺服器沒有適當的傳訊引擎。 如果使用遠端 XA 流程,應用程式必須能夠在本端使用交易協調程式。
- InboundSecureMessaging
- 這是包裝在 SSL 中的 InboundBasicMessaging 通訊協定。
- -providerEndPoints
- A comma-separated list of endpoint triplets, with the syntax host_name:port_number:chain_name,
that is used to connect to a bootstrap server. For example Merlin:7276:BootstrapBasicMessaging,Gandalf:5557:BootstrapSecureMessaging.
Provider endpoints are used if the specified bus cannot be found in the local cell. Message-driven bean applications first attempt to connect the specified bus in the local cell. If this attempt fails, provider endpoints are used to allow the applications to consume messages from a remote cell.
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.
- -authenticationAlias
-
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.
- -maxBatchSize
- The maximum number of messages in a single batch delivered serially to a single message-driven bean instance. Batching of messages can improve performance particularly when used with 確認模式 set to Duplicates-ok auto-acknowledge. If message ordering must be retained across failed deliveries, set the batch size to 1.
- -maxConcurrency
-
Increasing this number can improve performance but can increase the number of threads that are in use at any one time. If message ordering must be retained across failed deliveries, set the maximum concurrent endpoints to 1. Message ordering applies only if the destination that the message-driven bean is consuming from is not a partitioned destination. Partitioned destinations are used in a workload sharing scenario in a cluster.
- -subscriptionDurability
- This option specifies whether a JMS topic subscription is durable
or nondurable. Usually, only one application at a time can have a consumer for a particular durable subscription. This property enables you to override this behavior, to enable a durable subscription to have multiple simultaneous consumers. Select one of the following values:
- 可延續
- 傳訊提供者會在訊息驅動 Bean 無法使用時儲存訊息,並在訊息驅動 Bean 重新變成可用時遞送訊息。
- 不可延續
- 如果訊息驅動 Bean 無法使用,傳訊提供者就不會儲存和重新遞送訊息。
- -subscriptionName
-
Each JMS durable subscription is identified by a subscription name (specified on this property). A JMS connection also has an associated client identifier (specified on the 用戶端 ID property), which is used to associate a connection and its objects with the list of messages (on the durable subscription) that is maintained by the JMS provider for the client.
This subscription name must be unique within a given client identifier.
- -clientId
-
The value specified is a unique identifier for a client (message-driven bean). The client identifier is used to associate a client connection with the list of messages (on a durable subscription) that the messaging provider keeps for the client. When a client becomes available, after it has been unavailable, the messaging provider uses the client identifier to re-deliver stored messages to the correct client.
- -durableSubscriptionHome
-
Administrators can manage the runtime state of durable subscriptions through publication points for this messaging engine.
- -shareDurableSubscriptions
Usually, only one session at a time can have a TopicSubscriber for a particular durable subscription. This property enables you to override this behavior, to enable a durable subscription to have multiple simultaneous consumers, one on each application server in the server cluster.
Select one of the following values:- 在叢集中
- 在伺服器叢集中建立連線時,容許共用可延續訂閱。
- 一律共用
- 各連線可以共用可延續的訂閱。
- 絕不共用
- 各連線絕不共用可延續的訂閱
- -shareDataSourceWithCmp
True | False
這個選項用在「使儲存器管理持續性 (CMP) Entity Bean 能夠共用傳訊引擎的資料儲存庫所用的資料庫連線」的作業中。 經過評估,這有可能使整體通訊量增進 15% 的效能,不過,只適用於連接至傳訊引擎所在的應用程式伺服器之 Entity Bean。 不可對使用檔案儲存庫作為其資料儲存庫的傳訊引擎啟用這個選項。
For more information about using this option, see Enabling CMP entity beans and messaging engine data stores to share database connections.
- -readAhead
指派給消費者的訊息已在伺服器上鎖定,而該目的地的任何其他消費者都無法使用那些訊息。指派給消費者的訊息,如果在這個消費者關閉之前都未使用,之後便會在伺服器中解開鎖定,任何其他消費者都可以接收它。
您可以設定個別 JMS 目的地的 Read ahead 內容來置換 JMS 目的地的這個內容。
Select one of the following values:- 已啟用
- 傳訊提供者會事先將訊息指派給消費端。這會改進滿足消費者要求所花的時間。
- 已停用
- 傳訊提供者不會事先將訊息指派給消費端。
- 預設值
- 訊息提供者會事先將訊息指派給不可延續的訂閱和非共用的可延續訂閱的消費端。也就是說,必須在只能有單一消費端時,才會開啟先讀最佳化。
- -forwarderDoesNotModifyPayloadAfterSet
- true | false (default false)
- 利用這個啟動規格來重新傳送原來收到的訊息之應用程式必須遵循下列規則:
- 如果資料物件尚未設在訊息中,應用程式可以取代 JMS 物件訊息中的資料物件。 在訊息內設定資料物件之後,應用程式就不會修改或取代資料物件。
- 應用程式可以取代 JMS 位元組訊息中的位元組陣列,但必須是尚未在訊息內設定位元組訊息,且只能使用對於 writeBytes(byte[]) 的單一呼叫。在訊息內設定位元組陣列之後,應用程式就不會修改或取代位元組陣列。
- -consumerDoesNotModifyPayloadAfterGet
- true | false (default false)
- 利用這個啟動規格來接收訊息的應用程式必須遵循下列規則: 應用程式不會修改從 JMS 物件訊息取得的資料物件。資料物件是當作唯讀來處理。
- -alwaysActivateAllMDBs
- True | False
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.
For MDB applications connecting to a cluster bus member, you can also use this option to enable either of the following additional configurations:- 叢集內的所有伺服器都可以從 MDB 應用程式接收訊息,以充分運用叢集的處理能力。
- 每次只有一部伺服器能夠接收來自 MDB 應用程式的訊息,以確保會循序處理訊息。
For more information, see 叢集中的訊息驅動 Bean 連接方式.
- -retryInterval
- -userName
- The user identity for Java 2 connector security to use.
- -password
- The password for Java 2 connector security to use.
- -WAS_EndpointInitialState
- ACTIVE |INACTIVE
- This property determines whether the endpoint is activated when the endpoint is registered. If the property is set to active, message consumption begins from the JMS destination as soon as the activation specification is used for a message-driven bean to connect with the destination.
Example
- The following example shows the creation of an activation specification
using Jython:
wsadmin>AdminConfig.getid("/Node:9994GKCNode01" )
"9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)"
wsadmin>AdminTask.createSIBJMSActivationSpec("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml"), ["-name", "myjmsas", "-jndiName", "jms/myjmsas", "-destinationJndiName", "jms/mqueue", "-busName", "abus"])
"myjmsas(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098726667851)"
wsadmin>AdminTask.listSIBJMSActivationSpecs("9994GKCNode01(cells/9994GKCNode01Cell/ nodes/9994GKCNode01|node.xml)")
"myjmsas(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098726667851)"
- The following example shows the creation of an activation specification
using Jacl:
wsadmin>$AdminConfig getid /Node:9994GKCNode01
9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)
wsadmin>$AdminTask createSIBJMSActivationSpec 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name myjmsas -jndiName jms/myjmsas -destinationJndiName jms/mqueue -busName abus}
wsadmin>$AdminTask listSIBJMSActivationSpecs 9994GKCNode01 (cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)myjmsas(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098726667851)
myjmsas(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CActivationSpec_1098726667851)