Store message object

Hi,
I have to solve a problem that when sending mails, the mail gets lost if the target smtp server is down.
Therefore I was thinking of storing the email(s) to a file and send them when the next mail is being sent. However it turns out that Message is not serializeable.
Do any of know a good solution to store / queue emails so that I can avoid mails to get lost?
Thanks,
Steven

You could put the pieces that make up the message (subject line, to-addresses, body, and so on) into your own class that you declare to be serializable, and save that somewhere if you like.
I use JMS with a similar setup, and if the mail server can't be reached then I throw the message data into a try-again-later queue.

Similar Messages

  • Weblogic server 9.2 How to clear up JMS file store messages

    Hi,
    We are facong one issue in our weblogic production environment. The JMS file store size has become 7.2 G and its eatimg up almost all the server space. I have cheked through the jms module queues/ topics to see that if any messages are pending anywhere but nothing signifficant I can find out. Now our requirement is to clear up the file store the freeup the server space.
    Could you please recommend how to do that in the backend.
    Thanks
    Rahul

    Hi Rahul,
    Store files grow to fit all current stored objects, but, as stored objects are deleted, the freed space is re-used for new persistent objects. It's possible your store grew to an unprecedented size because it was temporarily forced to store many objects - in which case you can shrink the file store using the store compression tool described by the other poster.
    On the other hand, in almost all cases, unexpectedly large backlogs are generated due to either (A) an accumulation of a backlog of unprocessed messages, or (B) a bug in an application that processes received messages but never acknowledges them, such as may happen when an application creates a durable subscription on a topic but fails to service the subscription.
    I recommend (again) checking your 'current' and 'pending' message statistics for each and every JMS Server, SAF Agent, and destination that the store hosts. You can also check your store statistics to see which 'connections' are developing a large accumulation of objects.
    Regards,
    Tom
    P.S. You can post JMS related questions to the WebLogic Server JMS newsgroup.

  • Fetch mails for offline usage vs. leight-weight filling of Message object

    Hello!
    I'm working on a simple mail class having just a send and a fetch method. But I ran into problems with the latter, because I can't return the messages I fetch. The JavaMail documentation says "Folder implementations are expected to provide light-weight Message objects, which get filled on demand.", so obviously my code won't work out.
    public static Message[] fetchMails()
       Message messages[] = folder.getMessages();
       folder.close(true);
       store.close();
       return messages;
    Messages msg[] = MailAccount.fetchMails();
    System.out.println(msg.getSubject()); // error: Folder is not open.So how can I return the messages as an object, which I can work on even if the connection to the server is already closed? Is there any high level solution for this or do I have to use message.writeTo() or create my own container class for email contents?
    Tnx in advance!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

    Could you please give an example for your first advice? folder.getMessages() returns an array of Message objects, but the MimeMessage constructor only takes MimeMessage objects and some InputStreams. Do I have to cast the Message objects somehow?
    I try to keep my code as simple as possible (it's just a litte demo appication), so I don't want to go for any third party products. But the MimeMessage thing sounds like a good idea, if it works.
    Thanks for your reply so far.

  • Unable to read payload from the message object in XI

    Hello Guys,
    Please help me about my problem in XI version 7.0.im quite new here.
    im trying to test my config but error message occured. "Unable to read payload from the message object"
    when i checked the comm channel this is the error message :
    Error during database connection to the database URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor' using the JDBC driver 'com.microsoft.sqlserver.jdbc.SQLServerDriver': 'com.sap.aii.adapter.jdbc.sql.DriverManagerException: Cannot establish connection to URL 'jdbc:sqlserver://172.16.40.20:1433;databasename=TRAVEL:SelectMethod=cursor': com.microsoft.sqlserver.jdbc.SQLServerException: Cannot open database "TRAVEL:SelectMethod=cursor" requested by the login. The login failed.'
    when i tried my login in sql it works...but in this message the login is failed..what shall i  do..
    Please advice.
    Thanks in advance
    aVaDuDz

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • Which table stores messages used for monitoring in XI?

    Hi Experts,
              What tables are used by XI to store message monitoring data? I mean, when we go to SXMB_MONI and go to processed messages, we get a table of messages. In which table these messages are stored?
    Please help!
    Thanks
    Gopal

    Hi ,
    This thread will help you.....
    In Which Database Table the Messages are Stored in XI
    Sekhar

  • Sync/Async JMS without BPM - No receiver specified in message object

    Hi All,
    My scenario is Proxy - JMS - Proxy.  I have chosen to do this without BPM and had followed closely to the instructions given in various help documents/blog/forum threads.  During testing, the proxy returns a system fault 'No receiver specified in message object'.  In RWB it indicates that the correlation is correct and the JMS Receiver adapter is getting the response, below is part of the audit log:
    2009-08-03 18:12:32 Information WRB: retrieving the message for de80831d-97f5-08f1-bdaf-00145e6883af ...
    2009-08-03 18:12:33 Information WRB: retrieved the message: ApplicationResponse
    2009-08-03 18:12:33 Information WRB: leaving WaitResponseBean
    2009-08-03 18:12:33 Information MP: leaving
    2009-08-03 18:12:33 Information The message was successfully delivered to the application using connection JMS_http://sap.com/xi/XI/System.
    2009-08-03 18:12:33 Information The message status was set to DLVD.
    When I check SXMB_MONI in XI-ABAP, I see 2 messages with status 'System Error - Restart not possible' and 1 with status 'Log Version'.  The message with status 'Log Version' is the respond.  The other 2 messages has the following error:
      <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Request Message Mapping
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="1">
      <SAP:Category>XIServer</SAP:Category>
      <SAP:Code area="MAPPING">NO_RECEIVER</SAP:Code>
      <SAP:P1 />
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:Stack>No receiver specified in message object</SAP:Stack>
      <SAP:Retry>N</SAP:Retry>
      </SAP:Error>
    It seem to me that the system does not know where to go/what to do next after returning to the JMS Receiver adapter.  I am at a lost what could have gone wrong.  Here is how I've done my configuration.
    Repository
    - Sync Sender Interface for R/3 Backend
    - Sync Receiver Interface for MQ
    - Async Sender Interface for the reply
    Directory
    - 1 CC for JMS Recevier
    - 1 CC for JMS Sender (for the respond)
    - 1 CC for Proxy Sender
    - 1 Interface Determination
    - 1 Receiver Determination
    - 1 Receiver Agreement for JMS Receiver
    - 1 Sender Agreement for the reply
    Any help is appreciated.  Thanks.

    Hi Prateek,
    This is what was tried in my first case. I did exactly what was given in that link.But since the Message id being 32 bytes and length of correlation id is 24 bytes id is getting truncated.
    So its not working fine.
    @ke i am having a look at the note will update you on this
    Thanks for your response
    Rgds
    Aditya

  • Unable to read payload from the message object

    Hi
    I have a scenario where i am send request to http receiver and getting the response. When I am testing through WFETCH it is working fine. But when i am testing through XI I am getting the follwoing error
    Unable to read payload from the message object
    I have tested the XI payload in mapping. I have done all kinds of testing but it is still giving the same error.
    One more strange thing is
    I have done one BPM scenario where Data is coming from Source to BPM( which is asyn) and then from it will go from BPM to Target (which is sync) But when I am checking the SXMB_MONI... it showing the messages like this
    Source to BPM
    Target to BPM
    Target to BPM.
    But i think it should show message like
    Source to BPM
    BPM to Target
    Target to BPM
    why i am getting the flo

    Hi
    Check with the connection string & Authorization of user you have used.
    MSSQL string is
    jdbc:microsoft:sqlserver://dbhost:1433;databaseName=example;SelectMethod=Cursor
    While doing JDBC its good to refer Note 831162 lot of problems can be resolved.
    Thanks
    Gaurav

  • Modify Application: Error Message:: Object Variable or With Block variable

    Hi Experts,
    We just installed 5.1 on our server and once the application is installed.
    When I try to modify the aplication I get this error at the end
    This is step what the modify app does:
    Check environment information
    Drop Fact table index.
    Modify fact table.
    Update application information.
    Set Fact table index.
    Create stored procedures and comment table.
    Increase application version and make legal consolidation table.
    Make OLAP database and Journal/Audit reports. / Validate dimension formulas.
    Error Message:: Object Variable or With Block variable
    Any one has any any answer ? I will appreciate your help on this.
    Thanks

    Please check if Reporting Services is working properly.
    Just open IE and type http://nameofserver/reports
    If you receive any error then you have to fix that error verifying configuration of RS.
    If RS is working make sure you add the right information into Server Manager Server Option for RS and Report Server virtual directory.
    Also please check the tblappsetinfo to have all the fields completed (regarding servers).
    Regards
    Sorin Radulescu

  • Error during the retrieval of the logon data store Message was Not Created

    Dear  Gurus,
                         I got this error while creating support message.
    Error in Local Message System: Error during the retrieval of the logon data store Message was Not Created
    Message no. BCOS088
    Wether this support message will be send to SAP Support or internal sap support team in an organisation.
    I  am new to SAP BASIS. Kindly explain clearly

    Paste the entires from BCOS_CUST table
    Regards
    Nick Loy

  • How to store java object in oracle

    Hi all,
    is it possible to store jva object in oracle.
    I have defined myClass. It have only data fields ( no methods).
    I make myClass myObject = new myClass();
    How can I store this object in oracle DB.
    Many thanks in advance.

    1.Convert this object into stream of Bytes.
    2.create a new InputStream from these Byte array.
    2.Use the setBinaryStream to set the values inside the table's column.
    3.Store this object as a Blob in the table (column type must be Blob).
    Hope this helps.
    Sudha
    PS:- Somebody explained in this forum how to convert an Object into Byte array .

  • Ho to store java objects in oracle database

    HI
    for me the sceanario is,
    i neeed to create , dynamically a table at the time of specified action.
    i need to store the values retreieved from session and store it in a database..
    for example
    User usr=session.getAttribute("usr"); i need to store the user object.
    and hashtable and hashmap values without iterating.
    please suggest at the earliest
    can it be done?
    Regards,
    Ramesh

    my requirement is like that,bcos of two different weblogic servers need to acess the central database.which contains user information.
    The user object from first server will be stored in database.and the second server will retrieve the user information and it will set for its application.
    please suggest me how to store java objects in database.
    regards,
    Ramesh

  • App store, messages and notepad will not open

    When I try to open app store, messages or notepad I get an error message that states that they quit unexpectedly

    Launch the Console application in any of the following ways:
    ☞ Enter the first few letters of its name into a Spotlight search. Select it in the results (it should be at the top.)
    ☞ In the Finder, select Go ▹ Utilities from the menu bar, or press the key combination shift-command-U. The application is in the folder that opens.
    ☞ Open LaunchPad. Click Utilities, then Console in the icon grid.
    Step 1
    Make sure the title of the Console window is All Messages. If it isn't, select All Messages from the SYSTEM LOG QUERIES menu on the left. If you don't see that menu, select
    View ▹ Show Log List
    from the menu bar.
    Enter the name of the crashed application or process in the Filter text field. Select the messages from the time of the last crash, if any. Copy them to the Clipboard (command-C). Paste into a reply to this message (command-V).
    When posting a log extract, be selective. In most cases, a few dozen lines are more than enough.
    Please do not indiscriminately dump thousands of lines from the log into this discussion.
    Important: Some private information, such as your name, may appear in the log. Anonymize before posting.
    Step 2
    In the Console window, look under User Diagnostic Reports for crash reports related to the crashed process. The report name starts with the name of the process, and ends with ".crash". Select the most recent report and post the entire contents — again, the text, not a screenshot. In the interest of privacy, I suggest that, before posting, you edit out the “Anonymous UUID,” a long string of letters, numbers, and dashes in the header of the report, if it’s present (it may not be.) Please don’t post shutdownStall, spin, or hang logs — they're very long and not helpful.

  • Error Message : Object does not exist (status management)

    Hi Gurus,
    I am working on tcode IW52(Change Notifications). and using badi's for validations at different points.
    1. Order level,
    2. Notification,
    3. Task level validations.
    In the task level validations, I have an requirement that if certain condition is met, than user should not be able to delete the task. I have no problem doing that, I am able to restrict it.
    Now the issue is :
    Say you have 6 tasks, and condition is met for the 5th task and I try to delete it. then the error message "can not delete task" is getting triggered from the badi.
    and after this error message if you try to do any functionality on the 6th task, I am experiencing error message "Object does not exist (status management)".
    Is anyone aware of this error message, any suggestions are highly appreciated.
    Thanks in advance.
    Shrikant
    Edited by: Alvaro Tejada Galindo on Mar 17, 2008 1:56 PM

    Hi ,
    You have posted this question long back that is one and half year back nearly.
    You got an error message in IW52 stating Object does not exist ( status management ).
    Now iam also facing the same problem in iw22 transaction. Can you say me how you solved if you remember.

  • Message object returns SharedByteArrayInputStream instead of Multipart.

    Dear friends,
    I am using java Mail API v 1.3.1 to access POP3 server.
    I am getting problem while I try to read an RTF message from POP3 server.
    When I try to access the data through getContent() method on javax.mail.Message Object, it sometimes gives me correct result as a Multipart data, while sometimes, it returns an object of type com.sun.mail.util.SharedByteArrayInputStream.
    Although it returns SharedByteArrayInputStream object, when I invoke getContentType() on Message Object, it returns Multipart as correct.
    I think this is some problem with the JavaMail API.
    Going specifically, I use the POP server : ksc.th.com
    Waiting for reply,
    -> Maulik Soni.

    hi,
    I have the same Problem,too. But now, i have found the reason.
    the javamail jar delivers a file named 'mailcap' in the META-INF dir of the library jar with
    the following content:
    text/plain;;          x-java-content-handler=com.sun.mail.handlers.text_plain
    text/html;;          x-java-content-handler=com.sun.mail.handlers.text_html
    text/xml;;          x-java-content-handler=com.sun.mail.handlers.text_xml
    multipart/*;;          x-java-content-handler=com.sun.mail.handlers.multipart_mixed
    message/rfc822;;     x-java-content-handler=com.sun.mail.handlers.message_rfc822
    now while creating the default instance of MailcapCommandMap (activation framework),
    this class is searching the 'mailcap' file in the META-INF dir. if 'mailcap' is not found, the
    activation framework don't map these mimetyps.
    workaround:
    make sure, that the MailcapCommandMap can find the mailcap file in META-INF or in user.home dir
    or
    map manually (javax.activation.MailcapCommandMap):
    MailcapCommandMap map = (MailcapCommandMap)MailcapCommandMap.getDefaultCommandMap();
    map.addMailcap("text/plain;;x-java-content-handler=com.sun.mail.handlers.text_plain");
    map.addMailcap("text/html;;x-java-content-handler=com.sun.mail.handlers.text_html");
    map.addMailcap("text/xml;;x-java-content-handler=com.sun.mail.handlers.text_xml");
    map.addMailcap("multipart/*;;x-java-content-handler=com.sun.mail.handlers.multipart_mixed");
    map.addMailcap("message/rfc822;;x-java-content-handler=com.sun.mail.handlers.message_rfc822");
    simple,
    if you known it.
    thx, bye.
    franz bartlechner

  • Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Since I uploaded the new OS X Mavericks the App Store, Messages, Notes, Calendar, Maps and Preview will not launch/open. In Finder cannot find my files. Most crucially cannot upgrade OS X Mavericks software. I had two apple ID's, the old one not used

    Please read this whole message before doing anything.
    This procedure is a test, not a solution. Don’t be disappointed when you find that nothing has changed after you complete it.
    Step 1
    The purpose of this step is to determine whether the problem is localized to your user account.
    Enable guest logins* and log in as Guest. Don't use the Safari-only “Guest User” login created by “Find My Mac.”
    While logged in as Guest, you won’t have access to any of your documents or settings. Applications will behave as if you were running them for the first time. Don’t be alarmed by this behavior; it’s normal. If you need any passwords or other personal data in order to complete the test, memorize, print, or write them down before you begin.
    Test while logged in as Guest. Same problem?
    After testing, log out of the guest account and, in your own account, disable it if you wish. Any files you created in the guest account will be deleted automatically when you log out of it.
    *Note: If you’ve activated “Find My Mac” or FileVault, then you can’t enable the Guest account. The “Guest User” login created by “Find My Mac” is not the same. Create a new account in which to test, and delete it, including its home folder, after testing.
    Step 2
    The purpose of this step is to determine whether the problem is caused by third-party system modifications that load automatically at startup or login, by a peripheral device, by a font conflict, or by corruption of the file system or of certain system caches.
    Please take this step regardless of the results of Step 1.
    Disconnect all wired peripherals except those needed for the test, and remove all aftermarket expansion cards, if applicable. Start up in safe mode and log in to the account with the problem. You must hold down the shift key twice: once when you turn on the computer, and again when you log in.
    Note: If FileVault is enabled, or if a firmware password is set, or if the startup volume is a software RAID, you can’t do this. Ask for further instructions.
    Safe mode is much slower to start up and run than normal, with limited graphics performance, and some things won’t work at all, including sound output and Wi-Fi on certain models. The next normal startup may also be somewhat slow.
    The login screen appears even if you usually log in automatically. You must know your login password in order to log in. If you’ve forgotten the password, you will need to reset it before you begin.
    Test while in safe mode. Same problem?
    After testing, restart as usual (not in safe mode) and verify that you still have the problem. Post the results of Steps 1 and 2.

Maybe you are looking for