Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # This WLST will connect to the 'local' weblogic server
- # and create a remote SAF connection as mentioned below.
- # It is written to create a SystemModule-0 JMS Module,
- # Create two connection factories (XA and non-XA),
- # RemoteContext, SAFImportedDestination
- # and a remorte queue for EDN setup on a non-SOA weblogic.
- # However, the script can be modified to create any JMS object.
- # Make sure to edit/verify the lines at <---XXX---> comments
- # to suit the environment
- #connect('weblogic', 'welcome1', 'soabpm-vm.site:7001')
- connect()
- edit()
- startEdit()
- #Create SAF Agent
- cd('/')
- cmo.createSAFAgent('SAFAgent-0')
- cd('/SAFAgents/SAFAgent-0')
- cmo.setServiceType('Sending-only')
- #JMS Module
- cd('/')
- cmo.createJMSSystemResource('SystemModule-0')
- cd('/SystemResources/SystemModule-0')
- #<-------------Specify the JMS Module target- server, cluster,etc. ------->
- set('Targets',jarray.array([ObjectName('com.bea:Name=AdminServer,Type=Server')], ObjectName))
- #Remote SAF Context
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')
- cmo.createSAFRemoteContext('RemoteSAFContext-0')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFRemoteContexts/RemoteSAFContext-0/SAFLoginContext/RemoteSAFContext-0')
- #<----Specify remote server host, user,pwd ------>
- cmo.setLoginURL('t3://soabpm-vm.site:7001')
- cmo.setUsername('weblogic')
- cmo.setPassword('welcome1')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')
- #Create EDN connection factories
- #<--------Specify connection factory JNDI names -------->
- cmo.createConnectionFactory('EDNConnectionFactory');
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/EDNConnectionFactory')
- cmo.setJNDIName('jms/fabric/EDNConnectionFactory')
- cmo.setDefaultTargetingEnabled(true)
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/EDNConnectionFactory/TransactionParams/EDNConnectionFactory')
- cmo.setXAConnectionFactoryEnabled(true)
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')
- cmo.createConnectionFactory('XAEDNConnectionFactory')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/ConnectionFactories/XAEDNConnectionFactory')
- cmo.setJNDIName('jms/fabric/xaEDNConnectionFactory1')
- cmo.setDefaultTargetingEnabled(true)
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0')
- cmo.createSAFImportedDestinations('SAFImportedDestinations-0')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0')
- cmo.setSAFRemoteContext(getMBean('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFRemoteContexts/RemoteSAFContext-0'))
- cmo.setSAFErrorHandling(None)
- cmo.setTimeToLiveDefault(0)
- cmo.setUseSAFTimeToLiveDefault(false)
- cmo.setDefaultTargetingEnabled(true)
- #SAF Queue
- cmo.createSAFQueue('SAFQueue-1')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0/SAFQueues/SAFQueue-1')
- #<---------Specify the remote queue name. Currently configured for EDN Queue------------>
- cmo.setRemoteJNDIName('jms/fabric/EDNQueue')
- cmo.setNonPersistentQos('At-Least-Once')
- cmo.setTimeToLiveDefault(0)
- cmo.setUseSAFTimeToLiveDefault(false)
- cmo.setUnitOfOrderRouting('Hash')
- cd('/JMSSystemResources/SystemModule-0/JMSResource/SystemModule-0/SAFImportedDestinations/SAFImportedDestinations-0/MessageLoggingParams/SAFImportedDestinations-0')
- cmo.setMessageLoggingEnabled(false)
- cmo.setMessageLoggingEnabled(true)
- cmo.setMessageLoggingFormat('%header%,JMSCorrelationID,JMSDeliveryMode,JMSDestination,JMSExpiration,JMSMessageID,JMSPriority,JMSRedelivered,JMSReplyTo,JMSTimestamp,JMSType,%properties%')
- cd('/')
- activate()
Advertisement
Add Comment
Please, Sign In to add comment