JMS Node 샘플을 실행하기 전에 JNDI 관리 오브젝트를 작성해야 합니다. 샘플에서는 WebSphere MQ가 JMS 제공자로 사용되므로 JMSAdmin 도구에서 관리 오브젝트를 작성해야 합니다.
JMSAdmin 도구는 Linux의 경우 install_dir/java/bin에, Windows에서는 install_dir\java\bin에 있습니다. 여기서 install_dir은 WebSphere MQ가 설치된 디렉토리입니다.
JMS Nodes Sample Flow 프로젝트에는 JMSAdmin 도구인 JMSSampleObjects.defs와 함께 사용해야 하는 파일이 하나 있습니다.
JMSAdmin 도구를 사용하기 전에 다음과 같이 JMSAdmin.config 파일을 수정하십시오.
JMSAdmin.config 파일을 수정하려면 다음을 수행하십시오.
# The following line specifies which JNDI service provider is in use.
# It currently indicates an LDAP service provider. If a different
# service provider is used, this line should be commented out and the
# appropriate one should be uncommented.
#
#INITIAL_CONTEXT_FACTORY=com.sun.jndi.ldap.LdapCtxFactory
INITIAL_CONTEXT_FACTORY=com.sun.jndi.fscontext.RefFSContextFactory
#INITIAL_CONTEXT_FACTORY=com.ibm.ejs.ns.jndi.CNInitialContextFactory
#INITIAL_CONTEXT_FACTORY=com.ibm.websphere.naming.WsnInitialContextFactory
#
# The following line specifies the URL of the service provider's initial
# context. It currently refers to an LDAP root context. Examples of a
# file system URL and WebSphere's JNDI namespace are also shown, commented out.
#
#PROVIDER_URL=ldap://polaris/o=ibm,c=us
PROVIDER_URL=file:/C:/JNDI-Directory
#PROVIDER_URL=iiop://localhost/
#
파일을 저장한 경우, PROVIDER_URL 행에 표시되는 것처럼 JNDI-Directory 디렉토리를 작성하십시오.
user_name
을 브로커를 실행하려는 사용자 이름으로 바꾸십시오. 파일을 저장한 경우, PROVIDER_URL 행에 표시되는 것처럼 JNDI-Directory 디렉토리를 작성하십시오. # The following line specifies the URL of the service provider's initial
# context. It currently refers to an LDAP root context. Examples of a
# file system URL and WebSphere's JNDI namespace are also shown, commented out.
#
#PROVIDER_URL=ldap://polaris/o=ibm,c=us
PROVIDER_URL=file:///home/user_name/JNDI-Directory
#PROVIDER_URL=iiop://localhost/
#
이제 오브젝트를 작성할 준비가 되었습니다.
WebSphere MQ JMSAdmin 도구를 실행하여 샘플에서 사용되는 JMS 연결 팩토리 및 목적지를 구성할 JNDI 관리 오브젝트를 작성해야 합니다. JMSSampleObjects.defs 파일을 입력으로 선택합니다. JMSSampleObjects.defs 파일을 입력으로 사용하여 JMSAdmin을 실행함으로써 오브젝트를 작성합니다.
명령행에서 다음 명령을 입력하십시오.
그 다음에 JNDI 오브젝트 및 MQInput 노드 속성을 수정하십시오.
WebSphere MQ JMS 제공자 구현 JAR 파일을 WebSphere Message Brokers가 인식하는 위치로 복사해야 합니다.
메시지 플로우에 있는 JMS 노드에게 방금 작성한 .bindings 파일의 위치를 알려야 합니다.
bindings 파일 위치에서 JNS 노드를 구성하려면 다음을 수행하십시오.
메시지 플로우가 구성되어 브로커로 전개할 준비가 되었습니다.
JMSGateway 및 JMSInput_Publication 플로우를 전개하려면 두 메시지 플로우가 들어 있는 브로커 아카이브(BAR) 파일을 작성하십시오.
BAR 파일을 작성하려면 다음을 수행하십시오.
이제 샘플을 실행할 준비가 되었습니다.