Wednesday, October 2, 2013

Dumping JMS messages from a Weblogic 10.3.6 persistent store

Load you environment

[weblogic@morenji ~]$ source /home/weblogic/10.3.3/user_projects/domains/morenji_domain/bin/setDomainEnv.sh

Then launch the Webogic's store utility

[weblogic@morenji morenji_domain]$ java weblogic.store.Admin

List the available filestore in a given directory

storeadmin->list -dir /home/weblogic/store
INFO: Stores in directory /home/weblogic/store :
  ESB_JMS_DEFAULT_FILESTORE

Then open the filestore

storeadmin->openfile -store ESB_JMS_DEFAULT_FILESTORE -dir /home/weblogic/store
<Oct 1, 2013 5:28:21 PM CEST> <Info> <Store> <BEA-280008> <Opening the persistent file store "ESB_JMS_DEFAULT_FILESTORE" for recovery: directory=/home/weblogic/store requestedWritePolicy="Cache-Flush" fileLockingEnabled=true driver="wlfileio3".>
<Oct 1, 2013 5:28:29 PM CEST> <Info> <Store> <BEA-280009> <The persistent file store "ESB_JMS_DEFAULT_FILESTORE" (b654b79e-9c67-4ca7-86c0-f0ea5582c915) has been opened: blockSize=512 actualWritePolicy="Cache-Flush(single-handle-non-direct)" explicitIOEnforced=false records=803.>
INFO: Store ESB_JMS_DEFAULT_FILESTORE opened successfully

And proceed to the dump

storeadmin->dump -store ESB_JMS_DEFAULT_FILESTORE -out store.xml -conn –deep
INFO: Dump from ESB_JMS_DEFAULT_FILESTORE to store.xml successful

Close

storeadmin->close -store ESB_JMS_DEFAULT_FILESTORE
INFO: Store ESB_JMS_DEFAULT_FILESTORE closed successfully

And quit 

storeadmin->quit
EXIT: done

You will now have a XML (store.xml) containing all the messages in your persistent store. Anyway they are dumped in hex so they are not straightforward to read. At Oracle support is available a sample java code to extract the actual content and print to stdout.