Connect to the server using WLST by entering the command java weblogic.WLST Enter the command connect()
Enter the username, password, and the admin server url you want to connect to.
Chagne the location to serverRuntime by entering the command serverRuntime().
Traverse to the below location:
-cd('JMSRuntime')
-cd('AdminServer.jms')
-cd('JMSServers')
-cd('FEJMSServer')
-cd('Destinations')
-cd('FRModule!FRQ')
-ls()
It shows all the attributes and fuctions of Queue.
wls:/lab_domain/serverRuntimes/JMSRuntime/AdminServer.jms/JMSServers/FMWServer/Destinations/FRModule!FRQ>ls()
wls:/aiaDomain/domainRuntime/ServerRuntimes/aiaSvr21/JMSRuntime/aiaSvr#1.jms/KTOSSJMSServer#1/Destinations/KTOSSJMSModule!KTOSSJMSServer#1@ProcessProvisioningOrderWIFISOHOReqJmsQueue
wls:/lab_domain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers/FEJMSServer/Destinations/FRModule!FRQ> ls()
dr– DurableSubscribers
-r– BytesCurrentCount 11
-r– BytesHighCount 11
-r– BytesPendingCount 0
-r– BytesReceivedCount 0
-r– BytesThresholdTime 0
-r– ConsumersCurrentCount 0
-r– ConsumersHighCount 0
-r– ConsumersTotalCount 0
-r– ConsumptionPaused false
-r– ConsumptionPausedState Consumption-Enabled
-r– DestinationInfo
-r– DestinationType Queue
-r– DurableSubscribers null
-r– InsertionPaused false
-r– InsertionPausedState Insertion-Enabled
-r– MessagesCurrentCount 3
-r– MessagesDeletedCurrentCount 0
-r– MessagesHighCount 3
-r– MessagesMovedCurrentCount 0
-r– MessagesPendingCount 0
-r– MessagesReceivedCount 0
-r– MessagesThresholdTime 0
-r– Name FRModule!FRQ
-r– Paused false
-r– ProductionPaused false
-r– ProductionPausedState Production-Enabled
-r– State advertised_in_cluster_jndi
-r– Type JMSDestinationRuntime
-r-x closeCursor Void : String(cursorHandle)
-r-x deleteMessages Integer : String(selector)
-r-x getCursorEndPosition Long : String(cursorHandle)
-r-x getCursorSize Long : String(cursorHandle)
-r-x getCursorStartPosition Long : String(cursorHandle)
-r-x getItems javax.management.openmbean.CompositeData[] : String(cursorHandle),Long(start),Integer(count)
-r-x getMessage javax.management.openmbean.CompositeData : String(cursorHandle),Long(messageHandle)
-r-x getMessage javax.management.openmbean.CompositeData : String(cursorHandle),String(messageID)
-r-x getMessage javax.management.openmbean.CompositeData : String(messageID)
-r-x getMessages String : String(selector),Integer(timeout)
-r-x getMessages String : String(selector),Integer(timeout),Integer(state)
-r-x getNext javax.management.openmbean.CompositeData[] : String(cursorHandle),Integer(count)
-r-x getPrevious javax.management.openmbean.CompositeData[] : String(cursorHandle),Integer(count)
-r-x importMessages Void : javax.management.openmbean.CompositeData[],Boolean(replaceOnly)
-r-x moveMessages Integer : String(java.lang.String),javax.management.openmbean.CompositeData,Integer(java.lang.Inte
ger)
-r-x moveMessages Integer : String(selector),javax.management.openmbean.CompositeData
-r-x pause Void :
-r-x pauseConsumption Void :
-r-x pauseInsertion Void :
-r-x pauseProduction Void :
-r-x preDeregister Void :
-r-x resume Void :
-r-x resumeConsumption Void :
-r-x resumeInsertion Void :
-r-x resumeProduction Void :
-r-x sort Long : String(cursorHandle),Long(start),String[](fields),Boolean[](ascending)
For deleting messages, type the below command:
wls:/lab_domain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers/FEJMSServer/Destinations/FRModule!FRQ> cmo.deleteMessages(“JMSMessageID IN(‘ID:<840637.1277114817339.0>’)”)
cmo.deleteMessages(" ") {This command delete all messaged in queue and will return the number of messages deleted.}
Results will be:
1
It will delete a message having id ID:<840637.1277114817339.0>
※ 참고사이트 : http://vivek-samples.blogspot.kr/2013_02_26_archive.html