4 Replies Latest reply on Apr 24, 2006 12:44 PM by Andrew Oliver

    Quick Question if anyone has a moment and has dealt with dba

    Jay Glass Novice

      I am attempting to figure out how to get the message data out of the database.

      You can tell my newbiness when I ask the following

      Can anyone give me a little insight into how to go about reading the data from the database?

      I.e. completely outside the context of JBoss and JBMS?

      Just trying to do some simple testing of reading it using java or c# or .net, but it appears to be possibly compressed?

      Can anyone help with the steps I should go about, other than "read a book", as i have no time for reading at the moment, like I said, this is just R & D.

      Steps could be just:
      Uncompress data using zlib format
      base64 decode the data
      etc.

      Any help would be greatly appreciated, I looked around this form, but seems it deals more with design, do you kids happen to know of any other forums I might also look in?

      Utmost Sincerity,

      Jay Glass

        • 1. Re: Quick Question if anyone has a moment and has dealt with
          Jay Glass Novice

          Okay, thanks figure it out! Turn off compression in
          ..JBossMailServer\versions\1.0M4\server\default\deploy\mail.ear\mail.sar\META-INF\jboss-service.xml

          i imagine there is probably also away to do this through web interface, but didnt think to look, just edited the file setting

          <mbean code="org.jboss.mail.store.paged.PagedStore"
           name="jboss.mail:type=MailServices,name=PagedStore">
           <attribute name="PageSize">65536</attribute>
           <attribute name="Compress">false</attribute>
           <attribute name="CompressBufferSize">65536</attribute>
           <attribute name="StartIndex">0</attribute>
           <attribute name="Hashed">false</attribute>
           <!--depends>jboss.mail:service=Hibernate</depends-->
           </mbean>


          changing the Compress atrribute...
          false

          but it does not look like the mail headers are here...

          anyone know how to enable the storage of the headers, or where they might be stored currentlly?

          Thanks,

          Jay

          • 2. Re: Quick Question if anyone has a moment and has dealt with
            Andrew Oliver Master

            Hi,

            I love it "I have no time to read doco" ;-) Rather than complain about the doco despite often not having read it! Just flat honesty :-)

            You need to understand two central concepts to JBMS. "Mailboxes" and "MailStore". Mailboxes use an OR mapping tool and store your folder structure. Mail store deals with the idosynchracies of your DB's blob support. Bodies are stored in the STORE and referenced by id by the Mailbox. The Mailbox in turn has the headers (presently in a big string except for a few like date that get normalized).

            There is no "book" at this point. we do all of our doco on the wiki. At release 1.0 we will capture/complete save it as doco.
            wiki.jboss.org . Much of what you needed to know is right here: (http://wiki.jboss.org/wiki/Wiki.jsp?page=JBMSInstallingM4)

            • 3. Re: Quick Question if anyone has a moment and has dealt with
              Jay Glass Novice

              Thankyou much Andrew for the information.

              Looked in my database, and still didnt see any headers in messagedata, but then wondered if, during setup of the mail account in outlook, maybe i forgot to uncheck "delete messages from server".

              Could this cause the headers not to be found?

              Sure enough, when i unchecked that checkbox, the headers began appearing in dbase, and looks as if they had been, but kept getting deleted when the pop client retrieved them.

              It does seem though that the actual message body, doesnt get deleted as the headers do, but I would have to verify, as maybe I was just looking at the data at the wrong times...

              Again, thanks for the help Andrew!

              Sincerely,

              Jason Glass
              http://IChiBanComputers.Com

              • 4. Re: Quick Question if anyone has a moment and has dealt with
                Andrew Oliver Master

                No the bodies don't get deleted. You need a cron job for that (there is another thread on this subject) in 1.0M4. In 1.0M5 we will do it for you (still deciding whether this is a good idea or not).

                -Andy