createSIBJMSConnectionFactory command
Use the createSIBJMSConnectionFactory command to create a new JMS connection factory 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
This command creates a new JMS connection factory at a specific scope.
Target object
Scope of the default messaging provider at which the JMS connection factory is to be created.
Required parameters
- -name
- The administrative name assigned to this connection factory.
- -jndiName
- The JNDI name that is specified in the bindings for message-driven beans associated with this connection factory.
- -busName
- Enter 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.
Optional parameters
- -type
- queue | topic
- The type parameter is used to specify the type of connection factory to create. To create a queue connection factory, set this parameter to queue. To create a topic connection factory, set this parameter to topic. Leave this parameter unset to create a generic connection factory.
- -category
- An optional category string to use when classifying or grouping the resource.
- -description
- text
- -logMissingTransactionContext
- True | False
- -manageCachedHandles
- True | False
- -clientID
- id
- -userName
- name
- -password
- password
- -target
-
在執行連線近似性搜尋來選取適當的傳訊引擎之前,會先選取本身是指定目標群組成員的一組傳訊引擎。之後,會將連線近似性搜尋限制於這些傳訊引擎中。 如果未指定目標群組(預設值),在連線近似性搜尋期間會考量匯流排中的所有傳訊引擎。 比方說,如果將 目標類型 內容設為 匯流排成員名稱,則 目標 內容指定可從中選擇合適傳訊引擎的匯流排成員名稱。
- -targetType
- Select one of the following values:
- 匯流排成員名稱
- 匯流排成員的名稱。這個選項會擷取指定的匯流排成員(應用程式伺服器或伺服器叢集)所管理的作用中傳訊引擎。
To specify a non-clustered bus member the -target property must be set to node_name.server_name, for example Node01.server1. For a cluster bus member the -target property must be set to the cluster name.
- 自訂傳訊引擎群組名稱
- 傳訊引擎自訂群組(形成自我宣告的叢集)的名稱。這個選項會擷取登錄在指名自訂群組中的作用中傳訊引擎。
- 傳訊引擎名稱
- 傳訊引擎的名稱。這個選項會擷取可用來連接指名的傳訊引擎的端點。
- -targetSignificance
此內容定義連線近似性搜尋是否要限制為只有目標群組中的傳訊引擎。
Select one of the following values:- 偏好的
- 傳訊引擎最好是選自目標群組。如果目標群組中有可用的傳訊引擎,就會選取它。如果目標群組中沒有可用的傳訊引擎,而在相同的服務整合匯流排中有可用的傳訊引擎,則會選取目標群組外的傳訊引擎。Note: A connection to a non-preferred target might be returned even if a preferred one is available. This can happen when connection pooling is enabled for a ConnectionFactory, which it is by default when you use a JMS ConnectionFactory in a server environment:
- When a preferred messaging engine is not available, a connection to a non-preferred one can be created and stored in the connection pool.
- The next time the application requests a connection it receives this pooled connection even if the preferred messaging engine has subsequently become available.
- 必要
- 傳訊引擎必須選自目標群組。如果目標群組中有可用的傳訊引擎,就會選取它。如果目標群組中沒有可用的傳訊引擎,連線程序會失敗。
- -targetTransportChain
-
這些傳輸鏈指定可用來與用戶端應用程式連接之應用程式伺服器通訊的通訊協定。
如果所選傳訊引擎位於應用程式所在相同伺服器,則會進行直接的進行中連線,且會忽略這個傳輸鏈內容。
傳輸鏈代表在伺服器內作業的網路通訊協定堆疊。 您指定的名稱必須是如所列,是管理傳訊引擎的伺服器所提供的傳輸鏈之一。 提供的傳輸鏈如下,但您可以在這個畫面中定義您自己的傳輸鏈。- InboundBasicMessaging
- 這是一個使用標準 TCP/IP 連線 (JFAP-TCP/IP) 的連線導向通訊協定。它支援兩段式交易 (遠端 XA) 流程,所以在用戶端或伺服器系統上執行的訊息生產者或消費者,都可以參與該用戶端或伺服器系統所管理的廣域交易。 XA 流程的特定用途,是支援從執行於某伺服器的應用程式存取在第二部伺服器上的傳訊引擎,原因可能是第一部伺服器沒有適當的傳訊引擎。 如果使用遠端 XA 流程,應用程式必須能夠在本端使用交易協調程式。
- InboundSecureMessaging
- 這是包裝在 SSL 中的 InboundBasicMessaging 通訊協定。
- -providerEndPoints
- -connectionProximity
- Bus | Host | Cluster | Server
- -durableSubscriptionHome
- me_name
- -nonPersistentMapping
- BestEffortNonPersistent | ExpressNonPersistent | ReliableNonPersistent | ReliablePersistent | AssuredPersistent | AsSIBDestination | None
- -persistentMapping
- BestEffortNonPersistent | ExpressNonPersistent | ReliableNonPersistent | ReliablePersistent | AssuredPersistent | AsSIBDestination | None
- -readAhead
- Default | AlwaysOn | AlwaysOff
- -tempQueueNamePrefix
- prefix
- -tempTopicNamePrefix
- prefix
- -shareDurableSubscriptions
- AsCluster | AlwaysShared | NeverShared
- -producerDoesNotModifyPayloadAfterSet
- true | false (default false)
- 利用這個 Connection Factory 來傳送訊息的應用程式必須遵循下列規則:
- 應用程式不會修改 JMS 物件訊息所包含的資料物件。
- 應用程式利用對於 writeBytes(byte[]) 的單一呼叫來移入 JMS 位元組訊息,位元組陣列在訊息內設定之後,應用程式就不會修改它。
- -consumerDoesNotModifyPayloadAfterGet
- true | false (default false)
- 利用這個 Connection Factory 來接收訊息的應用程式必須遵循下列規則: 應用程式不會修改從 JMS 物件訊息取得的資料物件。資料物件是當作唯讀來處理。
- -authDataAlias
- alias_name
- -shareDataSourceWithCMP
- True | False
- -xaRecoveryAuthAlias
- alias_name
Example
- Using Jython:
wsadmin>AdminConfig.getid("/Node:9994GKCNode01" )
"9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)"
wsadmin>AdminTask.createSIBJMSConnectionFactory("9994GKCNode01(cells/ 9994GKCNode01Cell/nodes/9994GKCNode01|node.xml)", ["-name", "jmscf1", "-jndiName", "jms/jmscf1", "-busName", "abus"])
"jmscf1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CConnectionFactory_1098733325084)"
wsadmin>AdminTask.createSIBJMSConnectionFactory("9994GKCNode01(cells/ 9994GKCNode01Cell/nodes/9994GKCNode01|node.xml)", ["-name", "jmsqcf2", "-jndiName", "jms/jmsqcf1", "-busName", "abus", "-type", "queue"])
"jmsqcf2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CConnectionFactory_1098733675578)"
- Using Jacl:
wsadmin>$AdminConfig getid /Node:9994GKCNode01
9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1)
wsadmin>$AdminTask createSIBJMSConnectionFactory 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name jmscf1 -jndiName jms/jmscf1 -busName abus}
jmscf1(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CConnectionFactory_1098733325084)
wsadmin>$AdminTask createSIBJMSConnectionFactory 9994GKCNode01(cells/9994GKCNode01Cell/nodes/9994GKCNode01|node.xml#Node_1) {-name jmsqcf2 -jndiName jms/jmsqcf1 -busName abus -type queue}
jmsqcf2(cells/9994GKCNode01Cell/nodes/9994GKCNode01|resources.xml# J2CConnectionFactory_1098733675578)