Monday, March 28, 2011

A Few WebLogic and Exalogic Links to end March 2011

This blog was originally posted on when I worked for Oracle.

There is a great amount of activity with Exalogic and WebLogic Server happening. A few links to note quickly:

  • There is a brand new OTN Forum for the Exalogic Elastic Cloud
  • My Oracle Support just launched a WebLogic Information Center to aggregate a bunch of useful WebLogic Server information, see the WebLogic Server blog for more details
  • John Graves has been putting up some excellent content on his blog including developer friendly entries to increase the timeouts for the WLS console, getting FMW Control and the WLS Console to share the same session, Linux Service scripts for Node Manager, and more. Check out his blog for some great WebLogic Server content.

Friday, March 18, 2011

New Exalogic Hardware and Software Whitepapers Available

This blog was originally posted on when I worked for Oracle.

Exalogic [2]Two brand new Exalogic whitepapers are now available. One focuses on the benefits of the Exalogic Elastic Cloud Software and the other provides a deep-dive of the Exalogic hardware. The high-level overview has also been refreshed.

Wednesday, March 9, 2011

Oracle Applications Guidance for Exalogic

This blog was originally posted on when I worked for Oracle.

Exalogic is continuing to help Oracle deliver on the tagline “Hardware and Software – Engineered to Work Together”. My Oracle Support article ID 1302529.1 was just posted and enumerates various Oracle Applications versions that are recommended for deployment on Exalogic. Please access the note via My Oracle Support for the details. These applications currently include:

  • Oracle Applications such as E-Business Suite, Siebel, PeopleSoft Enterprise, and JD Edwards EnterpriseOne
  • Utilities Applications including Mobile Workforce Management, Meter Data Management, and Customer Care and Billing
  • Oracle Retail Applications Merchandising Operations Management and Merchandising Planning & Optimization modules


The reference video below offers a great explanation for how Exalogic can be an ideal platform for Oracle software including Oracle Applications.

Monday, March 7, 2011

Use WLST to Delete All JMS Messages From a Destination

This blog was originally posted on when I worked for Oracle.

I got a question today about whether WebLogic Server has any tools to delete all messages from a JMS Queue. It just so happens that the WLS Console has this capability already. It’s available on the screen after the “Show Messages” button is clicked on a destination’s Monitoring tab as seen in the screen shot below.


The console is great for something ad-hoc, but what if I want to automate this? Well it just so happens that the console is just a weblogic application layered on top of the JMX Management interface. If you look at the MBean Reference, you’ll find a JMSDestinationRuntimeMBean that includes the operation deleteMessages that takes a JMS Message Selector as an argument. If you pass an empty string, that is essentially a wild card that matches all messages.

Coding a stand-alone JMX client for this is kind of lame, so let’s do something more suitable to scripting. In addition to the console, WebLogic Scripting Tool (WLST) based on Jython is another way to browse and invoke MBeans, so an equivalent interactive shell session to delete messages from a destination would looks like this:


D:\Oracle\fmw11gr1ps3\user_projects\domains\hotspot_domain>java weblogic.WLST


Initializing WebLogic Scripting Tool (WLST) ...


Welcome to WebLogic Server Administration Scripting Shell


Type help() for help on available commands


wls:/offline> connect('weblogic','welcome1','t3://localhost:7001')

Connecting to t3://localhost:7001 with userid weblogic ...

Successfully connected to Admin Server 'AdminServer' that belongs to domain 'hotspot_domain'.


Warning: An insecure protocol was used to connect to the

server. To ensure on-the-wire security, the SSL port or

Admin port should be used instead.


wls:/hotspot_domain/serverConfig> serverRuntime()

Location changed to serverRuntime tree. This is a read-only tree with ServerRuntimeMBean as the root.

For more help, use help(serverRuntime)


wls:/hotspot_domain/serverRuntime> cd('JMSRuntime/AdminServer.jms/JMSServers/JMSServer-0/Destinations/SystemModule-0!Queue-0')

wls:/hotspot_domain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers/JMSServer-0/Destinations/SystemModule-0!Queue-0> ls()

dr--   DurableSubscribers


-r--   BytesCurrentCount                            0

-r--   BytesHighCount                               174620

-r--   BytesPendingCount                            0

-r--   BytesReceivedCount                           253548

-r--   BytesThresholdTime                           0

-r--   ConsumersCurrentCount                        0

-r--   ConsumersHighCount                           0

-r--   ConsumersTotalCount                          0

-r--   ConsumptionPaused                            false

-r--   ConsumptionPausedState                       Consumption-Enabled

-r--   DestinationInfo                    ,items=((itemName=ApplicationName,,(itemName=ModuleName,,(itemName


ule-0!Queue-0, Queue=true, SerializedDestination=rO0ABXNyACN3ZWJsb2dpYy5qbXMuY29tbW9uLkRlc3RpbmF0aW9uSW1wbFSmyJ1qZfv8DAAAeHB3kLZBABZTeXN0ZW1Nb2R1bGUtMCFRdWV1ZS0wAAtKTVNTZXJ2ZXItMAAOU3lzdGVtTW9kdWxlLTABAANBbGwCAlb6IS6T5qL/AAAACgEAC0FkbWluU2VydmVyAC2EGgJW+iEuk+ai/wAAAAsBAAtBZG1pblNlcnZlcgAthBoAAQAQX1dMU19BZG1pblNlcnZlcng=, ServerName=JMSServer-0, Topic=false, VersionNumber=1})

-r--   DestinationType                              Queue

-r--   DurableSubscribers                           null

-r--   InsertionPaused                              false

-r--   InsertionPausedState                         Insertion-Enabled

-r--   MessagesCurrentCount                         0

-r--   MessagesDeletedCurrentCount                  3

-r--   MessagesHighCount                            2

-r--   MessagesMovedCurrentCount                    0

-r--   MessagesPendingCount                         0

-r--   MessagesReceivedCount                        3

-r--   MessagesThresholdTime                        0

-r--   Name                                         SystemModule-0!Queue-0

-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                           [] : String(cursorHandle),Long(start),Integer(count)

-r-x   getMessage                          : String(cursorHandle),Long(messageHandle)

-r-x   getMessage                          : String(cursorHandle),String(messageID)

-r-x   getMessage                          : String(messageID)

-r-x   getMessages                                  String : String(selector),Integer(timeout)

-r-x   getMessages                                  String : String(selector),Integer(timeout),Integer(state)

-r-x   getNext                            [] : String(cursorHandle),Integer(count)

-r-x   getPrevious                        [] : String(cursorHandle),Integer(count)

-r-x   importMessages                               Void :[],Boolean(replaceOnly)

-r-x   moveMessages                                 Integer : String(java.lang.String),,Integer(java.lang.Integer)

-r-x   moveMessages                                 Integer : String(selector),

-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)


wls:/hotspot_domain/serverRuntime/JMSRuntime/AdminServer.jms/JMSServers/JMSServer-0/Destinations/SystemModule-0!Queue-0> cmo.deleteMessages('')


where the domain name is “hotspot_domain”, the JMS Server name is “JMSServer-0”, the Queue name is “Queue-0” and the System Module is named “SystemModule-0”. To invoke the operation, I use the “cmo” object, which is the “Current Management Object” that represents the currently navigated to MBean. The 2 indicates that two messages were deleted.

Combining this WLST code with a recent post by my colleague Steve that shows you how to use an encrypted file to store the authentication credentials, you could easily turn this into a secure automated script. If you need help with that step, a long while back I blogged about some WLST basics. Happy scripting.