Storing and Maintaining messages locally

Once i receive all messages on my client (i currently get all folders and the messages they come with, and place them in a HashMap in the form of (Folder_Name,Messages[]), i want to store them locally so that the next time the client opens, it does not go through the whole process of fetching all messages again..
So when the client starts again, it gets the messages from the disk and forms a new hashmap..Then if new messages are detected, retrieve them and place them in the hashmap again to be stored before the client closes. Is this an efficient way of doing it? Or is there any better way of achieving what i am trying to do here?

If you want to store them on your local disk, the simplest thing would be to run an IMAP server
on your machine and copy the messages into your local server. Or, use one of the local
store providers and copy the messages there. There's several local store providers on the
[JavaMail Third Party Products|http://java.sun.com/products/javamail/Third_Party.html] page.
And it's a well kept secret (:-)) that there's a local store (mbox) provider in the JavaMail
source code, which you might be able to get working. (It's currently only really been tested
on Solaris.)

Similar Messages

  • Store and Retrieve Messages

    I have problem in storing and retrieving messages from Vector
    Following Issues:
    1. In SendMessage() method am i using correct way to store messages in vector
    2. If my ist step is right then how what should i do in retrieveMessage() method
    public void sendMessage(IChatClient client,String msg) throws RemoteException
    if(!clients.contains(client))
    return;
    else
    // Send the message to all clients //
    for(int i=0;i<clients.size();i++)
    String user=client.getName();
    System.out.println(user+"has been connected");
    ((IChatClient)clients.elementAt(i)).sendMessage(user+" : "+msg);
    clients.addElement(msg);
    public  void RetrieveMessage(String msgs) throws RemoteException
         }I am at the end of my complete ChatRoom if i get help will be really appreciated

    ((IChatClient)clients.elementAt(i)).sendMessage(user+" : "+msg);
    clients.addElement(msg);
    you should get a ClassCastException:
    What are you storing in the "clients" vector? it appear you have mix
    String and IChatClient in the vector;
    for (int i = 0; i < clients.size(); i++){
        Object obj = clients.get(i);
        if (obj instanceof IChatClient)
            IChatClient client = (IChatClient) obj;
        else if (obj instanceof String)
            String msg = (String) obj;
    }you should not mix type in a collection. it will just makes thing much difficult (read, write, maintain, etc..)

  • Maintaining messages in English and French

    Hi Experts,
            I have created a custom message class and I have about 60 messages maintained in English, now I have the French translations for the messages and I would like to know how to maintain the messages in French so that when a user signs-in French , he should be able to get the message only in French.

    Hi,
    You can maintain the translations for the messages using the transaction SE91.You can create the messages using English language 'EN' and maintain the translation in other languages.
    Using the menu path GOTO -> Translation, you can specify the translations for any language by selecting the desired language from the drop down list.
    Hope this helps.Please get back in case of any clarification needed.
    Regards,
    Dilli

  • Trying to download iTunes 10.4.1.  I have windows xp.  iTunes would not load.  I followed the directions from this sight to uninstall everything.  When I try to install, I get this message:  C:\Documents and Settings\Kelley\Local Settings\Temporary Intern

    launch so I am trying to reinstall.  I followed the directions from this site about uninstalling and deleting files and making a backup.  When I try to
    install I get this message:  C:\Documents and Settings\Kelley\Local Settings\Temporary Internet Files\Content.IE5\AFYW6D11\iTunesSetup[1].exe is not a valid Win32 application.  I click ok.  Nothing happens.  Any ideas?

    Hi - thanks for your help and sorry not to have replied before - I've been away.
    I use mainly Chrome but also tried IE8 just in case - no difference.  However I finally remembered that when I had a similar problem downloading/installing OS4 for my iPhone (which crashed it and caused total lockup for about 4 days, resolved only after hours of calls to iPhone helpdesk) it turned out that the problem was caused by my home wi-fi connection.  When I hard-wired the network connection the problem was solved.  I tried it with iTunes - and it installed first time.
    Don't know what would cause this problem, which as far as I can see affects only Apple software.  Everything else seems to download and install over the wi-fi without glitches. 
    Best,
    John

  • I am really angry that I get this message every time I try to update Itunes.  "The File 'C:/documents and settings\DEAN\Local Settings\Application Data\Apple\Apple Software Update\itunes.msi' is not a valid installation package for the product itunes.  Tr

    I am really angry that I get this message every time I try to update Itunes.
    “The File ‘C:/documents and settings\DEAN\Local Settings\Application Data\Apple\Apple Software Update\itunes.msi’ is not a valid installation package for the product itunes.  Try to find the installation package ‘itunes.msi’ in a folder from which you can install itunes.
    What kind of gobbledegook is that?  Are you or Microsoft crazy.  Us computer users need simpler instructions.  Or you need to write your programs so that they work.
    Signed,
    Frustrated Apple User
    Dean Weaver

    “The File ‘C:/documents and settings\DEAN\Local Settings\Application Data\Apple\Apple Software Update\itunes.msi’ is not a valid installation package for the product itunes.  Try to find the installation package ‘itunes.msi’ in a folder from which you can install itunes.
    (1) Download the Windows Installer CleanUp utility installer file (msicuu2.exe) from the following Major Geeks page (use one of the links under the "DOWNLOAD LOCATIONS" thingy on the Major Geeks page):
    http://majorgeeks.com/download.php?det=4459
    (2) Doubleclick the msicuu2.exe file and follow the prompts to install the Windows Installer CleanUp utility. (If you're on a Windows Vista or Windows 7 system and you get a Code 800A0046 error message when doubleclicking the msicuu2.exe file, try instead right-clicking on the msicuu2.exe file and selecting "Run as administrator".)
    (3) In your Start menu click All Programs and then click Windows Install Clean Up. The Windows Installer CleanUp utility window appears, listing software that is currently installed on your computer.
    (4) In the list of programs that appears in CleanUp, select any iTunes entries and click "Remove", as per the following screenshot:
    (5) Quit out of CleanUp, restart the PC and try another iTunes install. Does it go through properly this time?

  • Hi i have SE R300 mobile,i need to copy my contacts and sms messages to pc but i don't find pc suite for my mobile.As i ve have some sentimental msgs i need them to be stored in my pc.Is there any alternate softwares to connect my mobile to pc.

    hi i have SE R300 mobile,i need to copy my contacts and sms messages to pc but i don't find pc suite for my mobile.As i ve have some sentimental msgs i need them to be stored in my pc.Is there any alternate softwares to connect my mobile to pc.

    Hey @piyali, I wanted to inform you that your phone doesn't have a software to transfer that information. But for you to know when you transfer the messages to the computer it will just appear a regular notepad document, so basically, you could just copy the information from the text message into a notepad in your computer and you can keep those important memories for yourself.

  • Migration, I put it on a USB drive. How do I install it on my new computer so my contacts and ALL messages come across?

    I used the Easy Transfer application and put Thunderbird on a USB. I am now on the "new computer" and want to load Thunderbird that has all of the contacts and ALL of the past messages folders etc. How do I do this? I tried it once and there were no contacts and only messages from this week!

    did you use the easy transfer wizard to reinstall the files?
    Make sure it has put them in
    C:\Users\[username]\AppData\local and C:\Users\[username]\AppData\remote.
    Make that
    C:\Users\[username]\AppData\roaming

  • Error message: local root folder does not exist

    Greetings,
    I'm working on a MacPro 2x2.66Ghz, running DW from CS2 and
    through a strange combination of keyboard keystrokes while cleaning
    my keyboard yesterday I inadvertantly renamed my hard drive "-OX"
    from it's default. I can't seem to remember what the default name
    of my hard drive was, but i think it was simply "Macintosh". I've
    renamed it that, but on launching DW for the first time today I got
    an error message saying that "The local root folder, web_content,
    does not exist" and it gave me the option to manage sites and set
    my local root folder again. Is there a way to re-establish my local
    root folder for every site that I currently manage in one swipe, or
    do I have to go in and manually do this for each and every Site
    within my Files panel?
    Thanks for your ideas,
    Pedro

    Actually, it solved one issue but seems to have created
    another! So, at least now my Sites are all working okay with
    respect to a local root folder. But let's say I open an .html file
    by double-clicking it in the Files panel. With that file active if
    I choose Preview in Browser I get a "File Not Found" error message
    from Firefox.... even though it looks like the path to that file is
    correct.
    One thing I notice about the path in the address bar of
    Firefox is that there are 3 forward-slashes after the file: bit at
    the beginning of the line.
    For example, the page generating the error has this address:
    file:///Macintosh%20HD/Users/peter/Sites/MySite/web_content/index_vertical.html
    If you notice carefully there are 3 slashes at the beginning
    of the line. If I go to "Manage Sites" I have the settings set to
    "links relative to document" and my root folder and images folder
    show the proper locations. What have I done?
    The error message also says the following in the details
    section: Firefox can't find the file at /Macintosh
    HD/Users/peter/Sites/MySite/web_content/index_vertical.html.
    so there's a forward-slash before the hard drive.... is that
    okay?
    Thanks for your ideas!
    Pedro

  • My ipad mail is synced to my iMac mail account. On iPad, I can only see my inbox and sent messages. I can't see any of the folders I have created on my iMac. How do I do that? Probably a dumb question, but I know there's a lot of smart people out there!

    My iPad mail is synced to my private email account, which I organise on my iMac. On iPad, I can only see inbox and sent messages folders, not any of the other folders in my email account I have created on my iMac. How do I get iPad to show my other folders? Probably a dumb question, but I know there's a lot of smart people out there.

    If you select a mailbox, you should get an Edit button (easier to see in landscape mode). Clicking the button will provide you with check circles for the messages. You also get Delete and Move buttons at the bottom. Check the messages you want to move and then navigate to the mailbox you want to drop them into. I think as long as you can navigate to a mailbox you can move the messages to it.
    In the Mac Mail application and probably Outlook on the Windows side, you also setup rules to move messages to specific mailboxes. If the mailboxes are stored on the server, then you can have the sorting done on the server and they should appear that way on the iPad. If your later messages do not show up, you may need to have the iPad app pulled down more messages until they are all showing.

  • How many ways to read and write a local variable in a called VI?

    Ciao!
    I'm producing my first TestStand sequence. It is called "FirstAttempt" and it is made by a single step which calls a VI. One of the first dilemmas i encountered realizing this sequence is how to read and write a local variable (created going in Variables -> Locals ('FirstAttempt') -> <right click to insert local>) in the called VI.
    The first way (the only one i tried) is to create a control and an indicator on the VI front panel, connect them to their respective terminals in the connector pane and then specify (going in Step Settings -> Module) that these connectors (shown in the Parameter Name column) are linked to the local variable (selected in the Value column).
    The second way (not tried) consists in using TestStand API: create a Sequence Context reference on the VI front panel, link it to a property node in the block diagram, select the property "Locals" and extract from this the local variable name and value which, i think, can be readable and writable.
    So...
    Are the shown ways correct?
    Are there other ways?
    Knowing that a "local" variable can be considered "global" within the whole sequence, is there the possibility to simply create a reference to the local variable and use the reference in the called VI block diagram in order to save space in the connector pane (if using method 1) or in the block diagram (if using method 2)?
    Thanks!
    Message Edited by aRCo on 09-17-2009 05:09 AM

    Hi,
    Before TestStand 3 you would use the second way you quoted as its the only way.
    But now you would use the first way you quoted. You may still what to pass the SequenceContext if you were going to use the TestStand API. For TestStand 3.x and above you would use this way as the first chose. (Personnelly, I would not pass the SequenceContext into a VI if I know it was never going to be used in that VI.)
    Not sure I understand your final comment, maybe you are liking it to passing the reference of a control to a subVI so that the control can be updated from within the subVI.
    If this is the case and you had a situation where you had a step that was running in parallel with the rest of the steps in the sequence either as a separate thread or execution and were dependent on the contents of the  local variable changing from that parallel running step, then you would have to use the API SetVal method to change the local.
    Hope this is clear.
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • I have Firefox 3.6.13 and this message just popped up tonight

    I have Firefox 3.6.13 and this message just popped up tonight while trying to download and listen to the Audio or the Video download. This website has both an audio and video version of the program. I was able to fix the audio by removing Firefox and reinstalling it. The second message (below) keeps popping up when I try to download and view the video version of the same program. The site has both Audio and video and I can listen to the audio using Real Player but I still can’t watch the Video period. I get the Video message below? I do not have this problem using Opera 11.01
    Audio: Ok now, fixed by reloading Firefox
    C:\Users\Gary\AppData\Local\Temp\300-024-16.mp3 could not be opened, because the associated helper application does not exist. Change the association in your preferences.
    Video:
    C:\Users\Gary\AppData\Local\Temp\WorkingInvestor20110202.wmv-3.wvx could not be opened, because the associated helper application does not exist. Change the association in your preferences.
    How do I fix this, again the Audio using Real player is OK but not the video?

    Caused by the Ask Toolbar extension in Firefox 3.6.13, disable that extension or un-install it.

  • Need to add a new release of the segment and maintain that version

    Hi All,
    I want to add one field in the Z segment type using WE31.But i am getting the error message as
    'Current segment definition <segment name> can no longer be changed and The current segment definition
    is already released.You can either add a new segment definition or cancel the release of the current segment definition'.
    The current segment defenition which i am trying to change got the SAP release of 4.6C. But the system has upgraded to Ecc6 recently.
    I tried going to the edit menu and cancel the release, but still it is not allowing.
    Whats the impact of the Add button(Add version) and creating a new version?.will it create a new version for ECC6?.
    I suggested by that
    *You can only edit segments in the current release. You will need to add a new release of the segment and maintain that version with changes. *
    If this is right then
    How to do this settings
    regards,

    'Add version' use this option - a new version will be created in the current release.
    then add your field to that and relase it again.
    Regds,

  • How to disable [drm] and ntpd messages on console ?

    http://s9.postimage.org/e3ymmtxlr/tty1.png
    As you can see in the picture above, i want these messages not to apear on my console.
    I even can not write my user name to login because of them. ANNOYİGGGGGGG.
    I have to pres ENTER and sometimes lots of buttons to find a "Tombik(my hostname) login : ___" inscription.
    Also, the message below appears after the udev in the initscrips at the begining of the system.
    dd-nn-yyyy hh:mm:ss [drm] nouveau xxxx 1:00.0: no native mode, forcing panel scaling
    My /etc/rc.local file includes,
    { ntpd -qg; hwclock -w; } &
    ( I added this code as mentioned "Synchronize once per boot" section on here , for synchronizing my system date.)
    How can i prevent "[drm] nouveau.....forcing panel scaling" and "ntpd" messages not to be shown in the beginning system messages and my main console ?
    ( i use "drm_kms_helper.poll=0" and "quiet" in my /boot/grub/menu.lst . But they only solve screen flashing and "[drm] nouveau.....forcing panel scaling" message in every 10 second .)
    Last edited by ozgursarier (2012-09-16 07:40:39)

    http://s15.postimage.org/ag49k4zmz/tty2.png
    Root and the normal user login are the same. After the login there are "Can't open display" messages.
    This is my /etc/bash.bashrc file. There isn't any .bashrc file in root directory.
    # /etc/bash.bashrc
    # If not running interactively, don't do anything
    [[ $- != *i* ]] && return
    PS1='[\u@\h \W]\$ '
    PS2='> '
    PS3='> '
    PS4='+ '
    case ${TERM} in
    xterm*|rxvt*|Eterm|aterm|kterm|gnome*)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033]0;%s@%s:%s\007" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    screen)
    PROMPT_COMMAND=${PROMPT_COMMAND:+$PROMPT_COMMAND; }'printf "\033_%s@%s:%s\033\\" "${USER}" "${HOSTNAME%%.*}" "${PWD/#$HOME/~}"'
    esac
    [ -r /usr/share/bash-completion/bash_completion ] && . /usr/share/bash-completion/bash_completion
    But my main problem is more inportant then the "Can't open display" issue.

  • Apple Mail and Sent Messages

    I have been having some issues with my iCloud email account and Mavericks. I wasn't sure if this was an iCloud issue or an issue with Apple Mail. It has to do with saving Sent messages. A couple of months ago, I had some issues with Mail. I deleted the com.apple.mail and com.apple.MailServiceAgent folders in ~Library/Containers and I deleted any plist files in Preferences. It worked for a couple months. Then, about two weeks ago, I noticed Sent emails were not be saved any where on my iMac.
    So, I repeated the procedure and created Mail anew. It worked great for about a week. I always have the "save sent messages to server" option turned on. Then, one day I got some kind of message that a folder called "Sent" could not be created on the server. Looking at Mail, my Sent folder was completely gone. All of my previously saved messages in Sent were moved to the folder INBOXToDos.mbox/Sent Messages.
    At first I thought iCloud itself was messed up. I logged into iCloud. There was no Sent mailbox, and there was no INBOXToDo mailbox. So, now I have no sent messages anywhere in iCloud. I sent an email from Safari in iCloud, and then, iCloud created the Sent mailbox.
    Still, my Mavericks iMac will not save sent messages anywhere. I need help sorting this out and don't want to lose my previous sent messages even though they seem to be stored in some wonky folder.

    Where is the Sent Messages folder listed? If it is not under MAILBOXES but in an IMAP folder, select it and go to Mailbox menu, Use this mailbox for>Sent.
    It should disappear and sent messages then appear in the Sent folder.

  • Storing and managing video library

    Hi, I was wondering what software people use cataloguing their video libraries.
    I am trying both FCPX and iMovie 10 and while I prefer FCPX for editing, I have a feeling iMovie might be more intuitive when it comes to managing libraries (perhaps I am mistaken).
    However what I find a bit of a nuisance is that one doesn't seem to be able to just change file names easily (to add a date to title for example) without doing it in finder, and then the 'source file missing' messages will start appearing in projects. Also you don't really have a clear overview of your files in Events (since you can't see file names). So if I want to access a video footage shot on a certain day, it seems it's much easier to go through finder...
    How do people do this?
    i have quite a lot of footage that I would like to store chronologically for easy access (some of it is from old mini dv tapes, some of it is from recent hd cameras and some from iphone, imported into iphotos) and I'd like to organize everything and have easy access to it in a chronological manner.
    I found iMovie quite frustrating to the extent that i thought it might be better to just organize raw footage in finder in folders myself and bypass imovie or fcpx altogether (and only use them for editing, when necessary). But then the time/date data might be lost once you start taking files out of imovie libraries from what I understand. So it seems one headache is replaced by another..

    i need full coding for storing and retrieve video
    files in mysql database.
    It is possible to use blob data type to save those
    data in mysql?Yes.
    Do i need any changes to the mysql?No.

Maybe you are looking for