JMS

This section contains scripts to create and configure different JMS services.

Create a JMS Server

The following script creates a JMS Server with a JMS JDBC Store. The JMS Server is deployed to a WebLogic Server. See the section below on how to create JMS JDBC Stores.

#create a JMS server and target it to a server

target    = $SERVER                #the server to deploy the JMS server to
store     = /JMSJDBCStore/myStore  #an existing JMS JDBC Store
jmsserver = /JMSServer/myJMSServer #the JMS Server name

md $jmsserver
cd $LAST
set Store $store
invoke addTarget /Server/$target

cd /

invoke $savedom $DOMAIN

        

Create JMS Queue and Error Destination Queue

This script shows how to create JMS Queues. The script can be used to create queues required by Workshop applications.

#this script creates two queues in a JMS Server and configures one of them
#to be the error destination of the other one

jmsserver = /JMSServer/cgServer                #an existing JMS Server
errorq    = myApp.queue.AsyncDispatcher_error  #error queue name
queue     = myApp.queue.AsyncDispatcher        #queue name

#the error queue must be configured first
md /JMSQueue/$errorq
cd $LAST
set JNDIName $errorq
set RedeliveryLimit 0
set Parent $jmsserver

#the regular queue
md /JMSQueue/$queue
cd $LAST
set JNDIName $queue
set Parent $jmsserver
set ErrorDestination /JMSQueue/$errorq

cd /

invoke $savedom $DOMAIN

        

Create JMS Distributed Queue

This script creates a JMS Distributed Destination (Queue) using two existing physical queues.

# creates a distributed queue using two physical queues
distq    = distQueue               #the server to deploy the JMS server to
store     = /JMSJDBCStore/myStore  #an existing JMS JDBC Store
jmsserver = /JMSServer/myJMSServer #the JMS Server name

md $jmsserver
cd $LAST
set Store $store
invoke addTarget /Server/$target

cd /

invoke $savedom $DOMAIN





md /JMSDistributedQueue/dq1
cd /JMSDistributedQueue/dq1
set JNDIName "dq1"
set Template /JMSTemplate/dq1

### this might not be required!!!
invoke addTarget $target00

md /JMSDistributedQueueMember/qm1
cd /JMSDistributedQueueMember/qm1
set JMSQueue /JMSQueue/rec.queue
set Parent /JMSDistributedQueue/dq1

        

Create JMS JDBC Store

This script creates a JMS JDBC Store to be used by a JMS Server. The store uses an existing JDBC Connection Pool.

#this script creates a JMS JDBC Store

pool  = /JDBCConnectionPool/cgPool  #an existing JDBC Connection Pool
store = /JMSJDBCStore/myStore       #store name

md $store
cd $LAST
set PrefixName weblogic
set ConnectionPool $pool

cd /

invoke $savedom $DOMAIN