Cosminexus V9 アプリケーションサーバ Cosminexus Reliable Messaging

[目次][用語][索引][前へ][次へ]

7.4.9 QueueConnectionFactory(ConnectionFactory)インタフェース

QueueConnectionFactory(ConnectionFactory)インタフェースは,QueueConnectionオブジェクトを生成するためのファクトリです。JNDIに登録されているQueueConnectionFactoryのJNDI登録名をアプリケーションがlookupすることによってQueueConnectionFactoryオブジェクトを取得します。

<この項の構成>
(1) キューコネクションの生成
(2) 形式
(3) フィールド
(4) メソッド

(1) キューコネクションの生成

createQueueConnection()メソッドを発行することによってQueueConnectionオブジェクトを生成します。

(2) 形式

 
public interface ConnectionFactory
{ }
 
public interface QueueConnectionFactory 
  extends ConnectionFactory
{
  public QueueConnection
                  createQueueConnection() throws JMSException;
  public QueueConnection
                  createQueueConnection(java.lang.String userName, 
                    java.lang.String password) throws JMSException;
}
 

(3) フィールド

ありません。

(4) メソッド

「(2) 形式」に記載した順序で各メソッドを説明します。

(a) createQueueConnectionメソッド
 
public QueueConnection createQueueConnection()
  throws JMSException
 

キューコネクションを作成します。QueueConnection.start()メソッドが明示的に発行されるまで,メッセージは配送されません。

(b) createQueueConnectionメソッド
 
public QueueConnection createQueueConnection(
  java.lang.String userName, java.lang.String password)
  throws JMSException
 

デフォルトのユーザ識別情報を使用してキューコネクションを作成します。QueueConnection.start()メソッドが明示的に発行されるまで,メッセージは配送されません。