Hi Paul, hi all i have to store messages before mediaton for two purposes
1) Resend pending messages if system crashes or endpoint is down for long time 2) Message archive First problem to solve is write and read message context. With AXIS1.2 we can serialize it and save (as i did in previous mail) but i have something left to do to restore messagecontext. Second problem is file caching. If i have large attachments AXIS2 cache it on filesystem (as configured in axis.xml) then i want store in my DB.. One store in enough so would to skip axis2 caching without loading messages in memory.. i didn't study axis2 caching so i still don't know how it works exactly and how to customize it. This problem of multiple copy of message will return when i'll have to work with RM.. Speaking of caching i have this doubt: i receive a msg with large attachment. I read in this article (http://www.wso2.org/library/1148) that cached attachment are loaded in memory only when user need it. what's up if i just need attachments ids? if i make a mc.getAttachmentMap().getAllContentIDs() i have the whole message in memory? Again, when the message go through the send mediator, cached attachments are direcly pumped out or are first loaded in memory? Thx for any suggestion, Lorenzo On mer, 2007-05-23 at 11:49 +0100, Paul Fremantle wrote: > Can you explain the scenario a little bit better? Seems like this > might be something really cool we could build into Synapse. > > Paul > > On 5/23/07, Lorenzo <[EMAIL PROTECTED]> wrote: > > Hi all, > > > > i'm trying to store messages with synapse, but i have some problems: > > > > 1) Save message: > > FileOutputStream fos = new FileOutputStream("MC.msg"); > > ObjectOutputStream obj_out = new ObjectOutputStream (fos); > > obj_out.writeObject(mc); > > obj_out.close(); > > fos.close(); > > 2) Load message > > FileInputStream file_mc = new > > FileInputStream("MC.msg"); > > ObjectInputStream is_mc = new ObjectInputStream(file_mc); > > newmc = (MessageContext) is_mc.readObject(); > > 3) Activate it > > mc.activate(confctx); > > > > Now when i try to mediate it i get: > > Synapse received a new message for message mediation... > > Received To: /SincronoAttachment/SincronoAttachment > > SOAPAction: null > > WSA-Action: null > > Attachment : 0.urn:uuid:[EMAIL PROTECTED] > > > > And i loose attachments (SOAP envelope is saved and correctly > > restored).. > > Moreover when it receive the response i get this error: > > ERROR HttpCoreNIOSender - No valid destination EPR or OutputStream to > > send message > > ERROR Axis2Sender - Unexpected error during Sending message back > > org.apache.axis2.AxisFault: No valid destination EPR or OutputStream to > > send message > > > > > > What i have to do to complete the message save/restore? > > > > Thx! > > > > > > > > > > > > --------------------------------------------------------------------- > > To unsubscribe, e-mail: [EMAIL PROTECTED] > > For additional commands, e-mail: [EMAIL PROTECTED] > > > > > > --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
