How to get message which don't contain specified header?

Hello
I have a question:
how to get messages which don't contain specified header?
At this moment I have something like this, but it works to long (2 seconds for 15 messages, 2 minutes for 800 messages:/ )
StringTerm st = new StringTerm("Header name") {
    public boolean match(Message arg0) {
        try {
           return arg0.getHeader(pattern) == null;
        } catch (MessagingException ex) {
           return false;
Message[] m = f.search(st);where f is folder
Does exist way easier and more "time-efficient"
regards
Edited by: moj_ekranik on Dec 4, 2009 1:28 AM
Edited by: moj_ekranik on Dec 4, 2009 1:29 AM

Assuming you're using IMAP...
Try this:
folder.search(new NotTerm(new HeaderTerm("header-name", "")));

Similar Messages

  • How to pick columns which don't contain characters

    Hi Experts,
    I am working with EBS 11I and database 9i. I have bleow requirement.
    TABLE A:
    col1 col2
    1 wi-p02
    2 qss-p009
    3 wi-pwb
    Requirement: I want to pick columns which don't contain 'characters after 'p' in col2.
    my output should be first two records.
    Could somebody help me how to get this.
    Thanks

    Try
    SELECT *
      FROM my_tab
    WHERE DECODE (LENGTH (TRANSLATE (SUBSTR (col2, INSTR (col2, '-p') + 2),
                                      '_0123456789',
                   NULL, 1,
                   0
                  ) = 0The substring looks for the -p string and then gets the rest of the characters after -p.
    The translate looks for non-numerics in those characters.
    Hope this helps
    Sandeep Gandhi
    Independent Techno-functional Consultant

  • I set up my iPhone through iCloud but assigned the wrong cell number to it so I am getting messages that don't belong to me but rather to my husband as I entered his cell number in there - how do I change that number to stop this from happening??

    I set up my iPhone through iCloud but assigned the wrong cell number to it so I am getting messages that don't belong to me but rather to my husband as I entered his cell number in there - how do I change that number to stop this from happening??

    Also, if you are sharing an Apple ID, you will get his iMessages.

  • How to get messages from IBM MQ in Oracle.

    Hi ,
    Can you please help me how to get messages from one IBM MQ to another IBM MQ in Oracle.
    My requirement is Our upstream is putting messages from their IBM MQ to our IBM MQ
    then we have to extract data from the message and load into Oracle database tables
    how to implement this  in oracle.
    Is there any other way to implement this without writing any ORACLE PL/SQL programming.
    Please help me.
    Thanks.

    You might want to use Oracle AQ: Integrating Oracle database applications with WebSphere MQ applications You will need to write some PL/SQL to Dequeue from Oracle AQ and convert the queue payload into insert statements.
    If you need help wityh AQ, there is a separate forum: Advanced Queueing

  • HT2188 Received error message, suggested uninstall and re-install but get message I don't have priveges to install i-tunes.

    Received error message, suggested uninstall and re-install but get message I don't have priveges to install i-tunes.

    Hello murray103
    Check out he article below to troubleshoot your install issues with iTunes. You may need to right click on the install file and click Run as Administrator.
    Issues installing iTunes or QuickTime for Windows
    http://support.apple.com/kb/ht1926
    Regards,
    -Norm G.

  • How to get services which are running currently

    How to get services which are running currently in the system by a java program. And also how to write a service so that i can start/stop the service from the control panel -> services.

    triple post
    http://forum.java.sun.com/thread.jsp?forum=31&thread=364090&start=0&range=15#1532232
    http://forum.java.sun.com/thread.jsp?forum=31&thread=364088&tstart=0&trange=15

  • How to get message in realtime sent by another user using FM TH_POPUP?

    I want to program a chat function between two SAP users by using ABAP.
    1.User A send a message to user B by using TH_POPUP,
      At the same time, the message is showed in screen as 
      'Send message'
    2.User B get the message
    ->My problem is how to get the message in realtime which I want to show it in screen as 'Received message'.
    Can anybody tell me how to get the message sent by using FM TH_POPUP in realtime?
    Edited by: Jing Yu Huang on Feb 6, 2008 2:11 AM

    Hi there
    This really isn't a "conversation" type program
    1) What does the original user do after sending the message -- I'm not sure if there's a WAIT_FOR_REPLY and even if there were I'm not sure  you'd want the original user to have a suspended session waiting for a reply.
    2) What does the 2nd user do after receiving the message --if it's just thrown up on his screen  then there isn't any mechanism to return a reply from USER A'S SESSION.
    You need somehow to have a continually running process which will send a message for example to user B and create an event or do somethimg so that User B is bound to the same session that sends the original message.
    2 different users running the same abap don't actually have any common link between them even on remote function calls.
    You need to have a central process here that shares a message space between the users (i.e a kernel type module).
    Classical Abap won't do (nor is it designed for) these types of processes.
    You might be able to find something in some of the  'C' coded kernel calls but as I previously posted before you are far better off using Windows for this type of stuff. (Windows Messenger for example).
    ABAP unfortunately is not designed as a multi user  "re-entrant"  programming language - nor was it intended to be.
    Another possible get around is to use the workflow system. User A sends a message which raises an event. This then starts a workflow which transmits say message to user B and notifies him of a message waiting for him. User B can reply which again raises an event and triggers workflow routing the message / reply back to user A.
    The response time won't be very good but at least it will work without tying up 2 user dialog sessions - but seriously guys I'd give up on this and just use Windows Messenger or equivalent system.
    These type of programs depend on a central server for the message handling - you'd have to replicate this in ABAP -- and Im 120% sure it can't be done.
    Cheers
    Cheers

  • How to get message/rfc822 attachment name by using JavaMail

    Hi,
    I am fetching incoming mail which has message/rfc822 attachment. i.e: ".msg" (mime message) is attached to this incoming mail. When I try to get name of this message/rfc822 attachment, I am getting null. Body part for this message attachment doesn't contain attachment name? Is this known issue? Is there any solution for this? How to get attached message name?
    I am using javax.mail.part.getFileName() for getting bodypart's filename.
    Thanks,
    Shilpa

    This is not unusual. An attached message need not have a filename,
    especially if it wasn't stored in a file but rather was just attached to the
    new message from within the mailer that composed the new message.
    Some mailers will set a filename anyway, but there's no requirement
    that they do that.

  • How to get Messages to work with a proxy server?

    at work we use a proxy server.
    some icloud programs work, but Messages does not.
    any idea how to get this to work through a proxy server?
    thanks.

    Hi,
    Now I feel really silly.
    I remember the pane looking like this though:-
    As there used to be two iChat forums here at Apple Support Communities  and the older iChat 2.1 one has disappeared I am not sure how many threads might be available for scrutiny on this matter.
    AS I said I don't ever recall someone reporting that they got it  to work.
    During early version of iChat it was found that the AIM server would accept a login on almost any port.
    It became popular to suggest port 443  as this was a well known port known to be open on most routers "out-of-the-box" and likely to be open in campus situations where students may not have any control over what ports were open.
    An AIM Login can also do "Direct IMs" for which is switches to port 5190 on the UDP Protocol.
    At this point the chat is peer to peer.
    It does this if you send a pic in the Chat or send a file.
    It uses port 5190 for this no matter what is used for the Login.
    7:27 PM      Thursday; May 9, 2013
      iMac 2.5Ghz 5i 2011 (Mountain Lion 10.8.3)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro 2Gb (Snow Leopard 10.6.8)
     Mac OS X (10.6.8),
     Couple of iPhones and an iPad
    "Limit the Logs to the Bits above Binary Images."  No, Seriously

  • Multi Mapping : How to get Message count after splitting

    Hi all,
    I am following below blog.
    /people/narendra.jain/blog/2005/12/30/various-multi-mappings-and-optimizing-their-implementation-in-integration-processes-bpm-in-xi
    Can any body please tell me how to get the count of messages generated after splitting in the message mapping.. I have created the message data type but not aware what is needed to be done.
    Thanks and best regards,
    Kulwant Singh

    Multi mappings r done in order to split the messages to the number of messages required by the user. So for 1:N mapping, the details about "N" is based on ur requirement. So its not like - when u split, any number of message could get created. The count would be dependent on u.
    Regards,
    Prateek

  • How to get message statistics in a day

    Hi, all.
    Our env is like the following.
    XI 3.0 + SP11 on Windows 2003 + SQL Server.
    My question is that how can we get message statistics of XI?
    i mean, like the following
    Number of messages processed in an hour or a day or month so and so...
    If there were no such transaction, what tables should we look into in
    order to get this kind of info?
    Best Regards.

    Hi Sejoon,
    sure you can:)
    go to RWB (runtime workbench)
    and check <b>performance monitoring</b>
    you cna get all sorts of message statictics over there
    (for a day/hour, size min max, for one interface, a group of interfaces etc.)
    Regards,
    michal
    Message was edited by: Michal Krawczyk

  • How to get current connection from ejb container

    We have to execute sql statement directly to the database and will use for this issue to connection establish between the ejb container and the database.
    How to get the corresponding object ?

    thanks

  • How to get object which is created previously?

    Hi ,
    My question is that how to get reference of the object which is created previously using reflection API.
    that means,
    suppose i created one instance of class : ABC
    Class classAbc = Class.forname("ABC"); //load the class ABC.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?
    expecting a favourable reply,
    Thanks & regards ,
    Swapnil

    My question is that how to get reference of the object which is created previously using reflection API.
    Object abcClassObject =classAbc.newInstance(); // create an instance of classABC.
    now how do i retrieve that object which is referred by ref. variable abcClassObject?abcClassObject is already a reference to it. Just use it. Nothing further required.

  • Can't update to newest version. Keep getting message update failed. When I try to install the downloaded version get message I don't have permissions. What's up with that?

    Can't install latest version of Firefox. Continue to get message "update failed". When I try to install a downloaded version get message that I don't have the proper permissions. What' up with that?

    If you have problems with updating or with the permissions then easiest is to download the full version and trash the currently installed version to do a clean install of the new version.
    Download a new copy of the Firefox program and save the DMG file to the desktop
    * Firefox 5.0.x: http://www.mozilla.com/en-US/firefox/all.html
    * Trash the current Firefox application to do a clean (re-)install
    * Install the new version that you have downloaded
    Your profile data is stored elsewhere in the [http://kb.mozillazine.org/Profile_folder_-_Firefox Firefox Profile Folder], so you won't lose your bookmarks and other personal data.

  • How to overwrite message which is in AdfDhtmlLookAndFeel._TRANSLATIONS

    Hi,
    I have observed that few messages are displaying on UI which are matching with messages defined in the file AdfTranslations-11.1.1.5.0-1095en.js
    Is it possible to overwrite any specific message which is defined in this file?

    Try the javascript below:
    <af:document id="d1">
        <af:resource type="javascript">
            function myload(evt)
                AdfDhtmlLookAndFeel._TRANSLATIONS['af_document.POST_SESSION_TIMEOUT_MSG']='Time is over...';
        </af:resource>
        <af:clientListener method="myload" type="load"/>
    </af:document>Regards,

Maybe you are looking for