How To Read JMS File Store .DAT file | Weblogic

Oracle Weblogic Server

The JMS file store created will be with .DAT extension and is not in human readable format.

You will have to use the weblogic.store.Admin utility to extract the content of file store into an XML file to read it.

Follow below steps to read the DAT file:

Run the setDomainEnv.sh script:

Go to the directory of the JMS File Store location and type this command to display the store admin prompt.

java weblogic.store.Admin

Once logged into the WebLogic store admin prompt, use this command to open the JMS File store.

openfile -store <JMSFileStoreName>

Once file store is open use the next command to dump the content of the file store. This command will dump the output of file store into specified <filename>.xml file in location from where you launched store admin utility.

dump -store <JMSFileStoreName> -out <filename> -conn -deep

Close the file store.

close -store <JMSFileStoreName>

Run the quit command to exit from store admin utility.

quit

You can open the XML file to read the content of JMS File store.

Note:
You can type help at the store admin prompt for getting a list of commands that can be executed.

Below is an example file snippet of generated dump XML file.

<PersistentStore Name="JMSFILESTR" Open="true">
<IOLayer>
<FileStore Directory="." WritePolicy="Cache-Flush" BlockSize="452" SupportOSDirectIO="true" HeapVersion="2"></FileStore>
</IOLayer>
<Statistics>
<NumObjects>2034</NumObjects>
<Creates>0</Creates>
<Reads>0</Reads>
<Updates>0</Updates>
<Deletes>0</Deletes>
..
</Statistics>
<Records>
<Record TypeCode="3" SlotNum="0" HandleNum="15367929857" FileNum="0" BlockNum="916" NumBlocks="1">
<RecordContents> 0: 0001 0000 0101 0000 0000 0000 0001 0000 ................
16: 0000 0000 0fd2 0000 0000 0005 0801 0000 ................
32: 0000 0000 0fd3 0000 0000 0000 0004 7fff ................
48: ffff 000a 1e04 0204 0000 0000 0c00 0001 ................
64: 2ee5 f204 2a00 0000 0000 00c7 7303 0182 ....*.......s...
80: 0000 0004 7465 7374 ....test
</RecordContents>
</Record>
<Record TypeCode="3" SlotNum="1" HandleNum="8472494081" FileNum="0" BlockNum="505" NumBlocks="1">
<RecordContents> 0: 0001 0000 0101 0000 0000 0000 0001 0000 ................
16: 0000 0000 0fcd 0000 0000 0005 0801 0000 ................
32: 0000 0000 0fce 0000 0000 0000 0004 7fff ................
48: ffff 000a 1e04 0204 0000 0000 0c00 0001 ................
64: 2ee5 f202 e500 0000 0000 00c7 7303 0182 ............s...
80: 0000 0004 7465 7374 ....test
</RecordContents>

Is There a Way to Check Which Messages Were Processed and Which Messages are Still Persisted and Yet to be Processed in a JMS File Store?

JMS persisted messages will be cleaned up from file store once the persisted messages are picked up.

Therefore, if you use the store admin commands to dump the store to an XML file, it will only show those messages which have not been processed.

The JMS file store continues to grow over a period of time.

It automatically re-uses space freed by deleted records and expands only when there is insufficient internal space for new records.

The JMS file store size itself will never shrink in size.

You can either use the compact command to shrink the JMS file store manually, or you can use the “-Dweblogic.store.MaxFileSize” setting in the startup to limit the size of JMS file store.

For More information on the JMS file store please visit below link

http://download.oracle.com/docs/cd/E12840_01/wls/docs103/config_wls/store.html

In case of any ©Copyright or missing credits issue please check CopyRights page for faster resolutions.

2 Responses

  1. Davide Lentini says:

    i would to read each message inside dat file, is possible?

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.