You can subscribe to this list here.
| 2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(44) |
Aug
(98) |
Sep
(97) |
Oct
(130) |
Nov
(118) |
Dec
(102) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2003 |
Jan
(139) |
Feb
(74) |
Mar
(128) |
Apr
(104) |
May
(121) |
Jun
(32) |
Jul
(29) |
Aug
(9) |
Sep
(16) |
Oct
|
Nov
(11) |
Dec
(29) |
| 2004 |
Jan
(15) |
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
(2) |
Aug
(9) |
Sep
(2) |
Oct
(9) |
Nov
(3) |
Dec
(2) |
| 2005 |
Jan
(1) |
Feb
(3) |
Mar
(3) |
Apr
|
May
(1) |
Jun
(5) |
Jul
|
Aug
(12) |
Sep
|
Oct
(2) |
Nov
|
Dec
|
| 2006 |
Jan
(3) |
Feb
(1) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(3) |
Sep
(1) |
Oct
(5) |
Nov
(5) |
Dec
|
| 2007 |
Jan
(2) |
Feb
(5) |
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
|
From: Gait B. <gai...@us...> - 2004-11-26 06:55:09
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4175 Modified Files: Request.java Log Message: fix typo in error reporting for ack_requested: was reporting problem on sync_reply_mode instead. Index: Request.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Request.java,v retrieving revision 1.79 retrieving revision 1.80 diff -C2 -d -r1.79 -r1.80 *** Request.java 8 Apr 2004 04:37:45 -0000 1.79 --- Request.java 26 Nov 2004 06:54:54 -0000 1.80 *************** *** 1078,1082 **** this.ackRequested = s; } catch (Exception e) { ! throw new RequestException(SYNC_REPLY_MODE + " = " + buffer + " is not valid: " + e.getMessage()); } --- 1078,1082 ---- this.ackRequested = s; } catch (Exception e) { ! throw new RequestException(ACK_REQUESTED + " = " + buffer + " is not valid: " + e.getMessage()); } |
|
From: Bob K. <bob...@us...> - 2004-11-22 03:30:31
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv23834/src/hk/hku/cecid/phoenix/message/handler Modified Files: MessageServiceHandlerConnection.java Log Message: Add the transaction commit statement before sending, as it will be needed to store the message before sending out for ultra-slow database. Index: MessageServiceHandlerConnection.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandlerConnection.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** MessageServiceHandlerConnection.java 19 Aug 2004 06:26:12 -0000 1.29 --- MessageServiceHandlerConnection.java 22 Nov 2004 03:28:12 -0000 1.30 *************** *** 297,300 **** --- 297,309 ---- throw e; } + /* + * the commit statement is added due to + * the situation when we face some ultra-slow + * database, which will not able to store the + * message through MessageServer.store() before + * the sending the ack, which will query for + * message. + */ + tx.commit(); MessageProcessor messageProcessor; if (persistenceName != null) { |
|
From: Patrick Y. <kc...@us...> - 2004-11-11 06:41:25
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18287/src/hk/hku/cecid/phoenix/message/handler Modified Files: MessageProcessor.java Log Message: changed to use a more formal way to generate error message Index: MessageProcessor.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageProcessor.java,v retrieving revision 1.57 retrieving revision 1.58 diff -C2 -d -r1.57 -r1.58 *** MessageProcessor.java 19 Aug 2004 06:25:11 -0000 1.57 --- MessageProcessor.java 11 Nov 2004 06:41:16 -0000 1.58 *************** *** 800,803 **** --- 800,804 ---- try { // generate new EbxmlMessage containing the ErrorList + /* EbxmlMessage errorMessage = new EbxmlMessage(); *************** *** 832,836 **** errorMessage.addErrorList(errorCode, severity, description); errorMessage.saveChanges(); ! if (augmented) { final ByteArrayOutputStream out = new ByteArrayOutputStream(); --- 833,840 ---- errorMessage.addErrorList(errorCode, severity, description); errorMessage.saveChanges(); ! */ ! EbxmlMessage errorMessage = SignalMessageGenerator.generateErrorMessage( ! ebxmlMessage, errorCode, severity, description, ""); ! if (augmented) { final ByteArrayOutputStream out = new ByteArrayOutputStream(); |
|
From: Bob K. <bob...@us...> - 2004-10-26 09:04:56
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17849/src/hk/hku/cecid/phoenix/message/handler Modified Files: MessageServiceHandler.java Log Message: check duplicate elimination before message order to avoid bug. Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.193 retrieving revision 1.194 diff -C2 -d -r1.193 -r1.194 *** MessageServiceHandler.java 21 Oct 2004 10:37:18 -0000 1.193 --- MessageServiceHandler.java 26 Oct 2004 09:04:46 -0000 1.194 *************** *** 4867,4871 **** } ! if (messageOrder != null) { int seqNo = messageOrder.getSequenceNumber(); int orderStatus = messageOrder.getStatus(); --- 4867,4873 ---- } ! tx.lock(messageId); ! if (!messageServer.hasReceived(ebxmlMessage, appContext, tx) ! && messageOrder != null) { int seqNo = messageOrder.getSequenceNumber(); int orderStatus = messageOrder.getStatus(); |
|
From: Bob K. <bob...@us...> - 2004-10-26 04:18:50
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26658/src/hk/hku/cecid/phoenix/message/packaging Modified Files: EbxmlMessage.java Log Message: add the log message "Message sent failed" for failing to send message on Http add checking on code when set Duplicate Elimination to avoid error on duplicate set the duplicate elimination. Index: EbxmlMessage.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/EbxmlMessage.java,v retrieving revision 1.51 retrieving revision 1.52 diff -C2 -d -r1.51 -r1.52 *** EbxmlMessage.java 6 Jul 2004 06:06:32 -0000 1.51 --- EbxmlMessage.java 26 Oct 2004 04:18:41 -0000 1.52 *************** *** 768,772 **** if (messageOrder != null) { headerContainer.addExtensionElement(messageOrder); ! headerContainer.getMessageHeader().setDuplicateElimination(); } saveChanges(); --- 768,774 ---- if (messageOrder != null) { headerContainer.addExtensionElement(messageOrder); ! if (!headerContainer.getMessageHeader().getDuplicateElimination()) { ! headerContainer.getMessageHeader().setDuplicateElimination(); ! } } saveChanges(); *************** *** 1101,1105 **** if (headerContainer.getAckRequested() != null) { headerContainer.addExtensionElement(messageOrder); ! headerContainer.getMessageHeader().setDuplicateElimination(); saveChanges(); } --- 1103,1110 ---- if (headerContainer.getAckRequested() != null) { headerContainer.addExtensionElement(messageOrder); ! MessageHeader header = headerContainer.getMessageHeader(); ! if (!header.getDuplicateElimination()) { ! header.setDuplicateElimination(); ! } saveChanges(); } |
|
From: Bob K. <bob...@us...> - 2004-10-26 04:18:50
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26658/src/hk/hku/cecid/phoenix/message/transport Modified Files: Http.java Log Message: add the log message "Message sent failed" for failing to send message on Http add checking on code when set Duplicate Elimination to avoid error on duplicate set the duplicate elimination. Index: Http.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Http.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** Http.java 20 Jul 2004 08:13:28 -0000 1.13 --- Http.java 26 Oct 2004 04:18:41 -0000 1.14 *************** *** 513,516 **** --- 513,517 ---- } catch (TransportException e) { + logger.error("Message send failed"); throw e; } *************** *** 523,526 **** --- 524,528 ---- (ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e)); logger.error(err); + logger.error("Message send failed"); throw new TransportException(err); } |
|
From: Bob K. <bob...@us...> - 2004-10-25 02:58:56
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13731/src/hk/hku/cecid/phoenix/message/packaging Modified Files: PKISignatureImpl.java Log Message: Fix the bug on NullPointerException when invalid keystore is set during signing. Replace with throwing the message starts with "Cannot get private key" Index: PKISignatureImpl.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/packaging/PKISignatureImpl.java,v retrieving revision 1.17 retrieving revision 1.18 diff -C2 -d -r1.17 -r1.18 *** PKISignatureImpl.java 21 Apr 2004 06:25:51 -0000 1.17 --- PKISignatureImpl.java 25 Oct 2004 02:58:47 -0000 1.18 *************** *** 114,117 **** --- 114,119 ---- private final EbxmlMessage ebxmlMessage; + private static final String CANNOT_GET_PRIVATE_KEY + = "Cannot get private key"; PKISignatureImpl(EbxmlMessage ebxmlMessage) throws SOAPException { *************** *** 188,196 **** } catch (Exception e) { ! String err = "Cannot get private key: " + alias + " - " + e.getMessage(); logger.warn(err); throw new SignException(err); } if (algo != null) { --- 190,203 ---- } catch (Exception e) { ! String err = CANNOT_GET_PRIVATE_KEY + " : " + alias + " - " + e.getMessage(); logger.warn(err); throw new SignException(err); } + if (pk == null) { + String err = CANNOT_GET_PRIVATE_KEY + " : " + alias; + logger.warn(err); + throw new SignException(err); + } if (algo != null) { |
|
From: Bob K. <bob...@us...> - 2004-10-21 10:37:35
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17371/src/hk/hku/cecid/phoenix/message/handler Modified Files: Utility.java MSHServletContextListener.java MessageServiceHandler.java Log Message: Fix the problem that the msh log file will not make new file when file size exist. The problem is due to log config on both "hk.hku.cecid.phoenix.message" and "hk.hku.cecid.phoenix.pki" umbrella. It is fixed by config only "hk.hku.cecid.phoenix" umbrella. Index: Utility.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Utility.java,v retrieving revision 1.23 retrieving revision 1.24 diff -C2 -d -r1.23 -r1.24 *** Utility.java 11 Dec 2003 06:41:29 -0000 1.23 --- Utility.java 21 Oct 2004 10:37:18 -0000 1.24 *************** *** 79,84 **** --- 79,87 ---- import java.util.Date; import java.util.Iterator; + import java.util.List; import java.util.Properties; import java.util.TimeZone; + import java.util.Vector; + import javax.xml.parsers.DocumentBuilder; import javax.xml.parsers.DocumentBuilderFactory; *************** *** 127,130 **** --- 130,135 ---- private static boolean loggingConfigured = false; + private static List umbrellas = new Vector(); + // Set up message counter private static void init() { *************** *** 536,539 **** --- 541,549 ---- } + if (umbrellas.contains(umbrella)) { + return; + } + umbrellas.add(umbrella); + // Assure the logpath directory exists File logPathDirectory = new File (logPath); *************** *** 576,580 **** maxFileSize = -1; } - Properties property = new Properties(); property.setProperty("log4j.logger." + umbrella, --- 586,589 ---- *************** *** 600,603 **** --- 609,613 ---- property.setProperty("log4j.appender." + umbrella + ".layout.ConversionPattern", "%d %-5p [%t]: %m%n"); + property.setProperty("log4j.additivity." + umbrella, "false"); PropertyConfigurator.configure(property); } Index: MSHServletContextListener.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MSHServletContextListener.java,v retrieving revision 1.21 retrieving revision 1.22 diff -C2 -d -r1.21 -r1.22 *** MSHServletContextListener.java 9 Apr 2003 07:47:48 -0000 1.21 --- MSHServletContextListener.java 21 Oct 2004 10:37:18 -0000 1.22 *************** *** 103,108 **** if (isConfigured) return; ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); release = MessageServiceHandler.getMetaData().getRelease(); isConfigured = true; --- 103,109 ---- if (isConfigured) return; ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix"); release = MessageServiceHandler.getMetaData().getRelease(); isConfigured = true; Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.192 retrieving revision 1.193 diff -C2 -d -r1.192 -r1.193 *** MessageServiceHandler.java 21 Oct 2004 03:08:27 -0000 1.192 --- MessageServiceHandler.java 21 Oct 2004 10:37:18 -0000 1.193 *************** *** 953,958 **** // Load logger settings ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); // Load proxy settings --- 953,959 ---- // Load logger settings ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); ! //Utility.configureLogger(prop, "hk.hku.cecid.phoenix.pki"); ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix"); // Load proxy settings |
|
From: Bob K. <bob...@us...> - 2004-10-21 10:37:35
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv17371/src/hk/hku/cecid/phoenix/message/transport Modified Files: Mail.java Log Message: Fix the problem that the msh log file will not make new file when file size exist. The problem is due to log config on both "hk.hku.cecid.phoenix.message" and "hk.hku.cecid.phoenix.pki" umbrella. It is fixed by config only "hk.hku.cecid.phoenix" umbrella. Index: Mail.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Mail.java,v retrieving revision 1.49 retrieving revision 1.50 diff -C2 -d -r1.49 -r1.50 *** Mail.java 1 Apr 2004 08:10:09 -0000 1.49 --- Mail.java 21 Oct 2004 10:37:20 -0000 1.50 *************** *** 351,355 **** if (isConfigured) return; ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix.message"); try { --- 351,355 ---- if (isConfigured) return; ! Utility.configureLogger(prop, "hk.hku.cecid.phoenix"); try { *************** *** 627,631 **** try { String type = messages[i].getContentType(); - System.out.println(type); int index = type.toUpperCase().indexOf(WRONG_TYPE); final String[] soapAction = --- 627,630 ---- |
|
From: Bob K. <bob...@us...> - 2004-10-21 07:15:34
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8359/src/hk/hku/cecid/phoenix/message/handler Modified Files: MessageServer.java Log Message: Fix the problem on backup/restore, which fail to restore on backup because the same ZipInputStream is used in message repository and object store. Solve the problem by using the different ZipInputStream for message repository and object store. Index: MessageServer.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v retrieving revision 1.152 retrieving revision 1.153 diff -C2 -d -r1.152 -r1.153 *** MessageServer.java 12 Jul 2004 09:24:43 -0000 1.152 --- MessageServer.java 21 Oct 2004 07:15:23 -0000 1.153 *************** *** 924,928 **** final Connection connection = dbConnectionPool.getConnection(); ! final ZipInputStream zis; try { zis = new ZipInputStream(new FileInputStream(backupFile)); --- 924,928 ---- final Connection connection = dbConnectionPool.getConnection(); ! ZipInputStream zis; try { zis = new ZipInputStream(new FileInputStream(backupFile)); *************** *** 970,973 **** --- 970,984 ---- = (BackupablePersistenceHandler) objectStoreHandler; backupObjectStoreHandler.setBackupDirectory(SEPARATOR_OBJECT_STORE); + zis.close(); + try { + zis = new ZipInputStream(new FileInputStream(backupFile)); + } catch (FileNotFoundException fnfe) { + dbConnectionPool.freeConnection(connection, true); + String err = ErrorMessages.getMessage( + ErrorMessages.ERR_HERMES_FILE_IO_ERROR, fnfe, + backupFile); + logger.error(err); + throw new MessageServerException(err); + } backupObjectStoreHandler.restore(zis); } catch (IOException ioe) { *************** *** 976,983 **** exception = ioe; } finally { ! try { ! zis.close(); ! } catch (IOException ioe) {} ! if (exception != null) { throw new MessageServerException(exception.getMessage()); --- 987,995 ---- exception = ioe; } finally { ! if (zis != null) { ! try { ! zis.close(); ! } catch (IOException ioe) {} ! } if (exception != null) { throw new MessageServerException(exception.getMessage()); |
|
From: Bob K. <bob...@us...> - 2004-10-21 03:08:40
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv27780/src/hk/hku/cecid/phoenix/message/handler Modified Files: MessageServiceHandler.java Log Message: Fix the problem receiving a ack request message with ultra-slow database. The problem is that the message is not stored on db before trying to check the DB for sending out ack. Problem is fixed by commit the store db before send the ack. Fix the problem on checkPersistence function which still work on file, changed so that it works on persistence layer. Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.191 retrieving revision 1.192 diff -C2 -d -r1.191 -r1.192 *** MessageServiceHandler.java 1 Sep 2004 04:16:52 -0000 1.191 --- MessageServiceHandler.java 21 Oct 2004 03:08:27 -0000 1.192 *************** *** 3156,3161 **** logger.debug("=> MessageServiceHandler.checkPersistence"); ! try { // Do checking on its permissions File dir = new File(messageRepository); --- 3156,3167 ---- logger.debug("=> MessageServiceHandler.checkPersistence"); ! PersistenceHandler handler ! = PersistenceManager.getRepositoryPersistenceHandler(); ! DataSource source = null; ! OutputStream ostream = null; ! String err = null; try { + source = handler.createNewObject(); + /* // Do checking on its permissions File dir = new File(messageRepository); *************** *** 3201,3205 **** } } - // Randomly read TEST_PERSISTENCE_FILE_NUMBER number of files int numFile; --- 3207,3210 ---- *************** *** 3221,3224 **** --- 3226,3230 ---- ; } + */ // Write a file of length TEST_PERSISTENCE_FILE_LENGTH to *************** *** 3228,3232 **** b[i] = (byte) 0xAA; } ! File tmpFile = File.createTempFile("msh", null, dir); FileOutputStream fos = new FileOutputStream(tmpFile); --- 3234,3247 ---- b[i] = (byte) 0xAA; } ! ostream = source.getOutputStream(); ! for (long i = TEST_PERSISTENCE_FILE_LENGTH; i >= 0; ! i -= BLOCK_SIZE) { ! if (i >= BLOCK_SIZE) { ! ostream.write(b); ! } else { ! ostream.write(b, 0, (int) i); ! } ! } ! /* File tmpFile = File.createTempFile("msh", null, dir); FileOutputStream fos = new FileOutputStream(tmpFile); *************** *** 3246,3264 **** tmpFile.deleteOnExit(); } } catch (IOException e) { ! String err = ErrorMessages.getMessage( ErrorMessages.ERR_HERMES_FILE_IO_ERROR, e); logger.error(err); ! logger.debug("<= MessageServiceHandler.checkPersistence"); ! return err; ! } catch (Exception e) { ! String err = ErrorMessages.getMessage( ! ErrorMessages.ERR_HERMES_UNKNOWN_ERROR, e); logger.error(err); ! return err; } logger.debug("<= MessageServiceHandler.checkPersistence"); ! return null; } --- 3261,3300 ---- tmpFile.deleteOnExit(); } + */ } catch (IOException e) { ! err = ErrorMessages.getMessage( ErrorMessages.ERR_HERMES_FILE_IO_ERROR, e); logger.error(err); ! } catch (PersistenceException e) { ! err = ErrorMessages.getMessage( ! ErrorMessages.ERR_HERMES_FILE_IO_ERROR, e); logger.error(err); ! } finally { ! String finalError = null; ! if (ostream != null) { ! try { ! ostream.close(); ! } catch (IOException e) { ! finalError = "Error on closing output stream " ! + "for check persistence : " + e.toString(); ! logger.error(finalError); ! } ! } ! if (source != null) { ! try { ! handler.removeObject(source.getName()); ! } catch (PersistenceException e) { ! finalError = "Error on removing datasource from persistence" ! + " for check persistence : " + e.toString(); ! logger.error(finalError); ! } ! } ! if (err == null) { ! err = finalError; ! } } logger.debug("<= MessageServiceHandler.checkPersistence"); ! return err; } *************** *** 5030,5034 **** final EbxmlMessage ackMessage = generateAcknowledgment( ebxmlMessage, messageId); ! if (suppressedAck) { logger.debug("Ack sending suppressed"); --- 5066,5078 ---- final EbxmlMessage ackMessage = generateAcknowledgment( ebxmlMessage, messageId); ! /* ! * the commit statement is added due to ! * the situation when we face some ultra-slow ! * database, which will not able to store the ! * message through MessageServer.store() before ! * the sending the ack, which will query for ! * message. ! */ ! tx.commit(); if (suppressedAck) { logger.debug("Ack sending suppressed"); |
|
From: Bob K. <bob...@us...> - 2004-10-20 09:46:15
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv5234/src/hk/hku/cecid/phoenix/message/handler Modified Files: Export.java Log Message: Fix bug on calling archive, which the checking for whether the messag resource existence is incorrect Index: Export.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Export.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** Export.java 16 Jan 2004 04:26:34 -0000 1.27 --- Export.java 20 Oct 2004 09:46:05 -0000 1.28 *************** *** 1462,1466 **** reasonMap.put(msgId, "The message is not in final state"); ! } else if (dataSource != null) { Set set = (Set) rejectedMap.get(appContext); if (set == null) { --- 1462,1466 ---- reasonMap.put(msgId, "The message is not in final state"); ! } else if (dataSource == null) { Set set = (Set) rejectedMap.get(appContext); if (set == null) { |
|
From: Patrick Y. <kc...@us...> - 2004-09-02 12:32:12
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25677/src/hk/hku/cecid/phoenix/message/handler Modified Files: SignalMessageGenerator.java Log Message: swaping all From/To party IDs when generating response message (esp. ack message).. previously only the first From/To party ID is swapped. Index: SignalMessageGenerator.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/SignalMessageGenerator.java,v retrieving revision 1.3 retrieving revision 1.4 diff -C2 -d -r1.3 -r1.4 *** SignalMessageGenerator.java 11 Dec 2003 06:41:29 -0000 1.3 --- SignalMessageGenerator.java 2 Sep 2004 12:31:55 -0000 1.4 *************** *** 125,128 **** --- 125,148 ---- requestMessage.getConversationId(), Constants.SERVICE, action, messageId, timeStamp); + + MessageHeader header = responseMessage.getMessageHeader(); + Iterator it; + + // add all ToPartyID of req message to FromPartyID of resp message + it = requestMessage.getToPartyIds(); + it.next(); // skip the first element as it's already added + while (it.hasNext()) { + MessageHeader.PartyId pId = (MessageHeader.PartyId) it.next(); + header.addFromPartyId(pId.getId(), pId.getType()); + } + + // add all FromPartyID of req message to ToPartyID of resp message + it = requestMessage.getFromPartyIds(); + it.next(); // skip the first element as it's already added + while (it.hasNext()) { + MessageHeader.PartyId pId = (MessageHeader.PartyId) it.next(); + header.addToPartyId(pId.getId(), pId.getType()); + } + return responseMessage; } |
|
From: Donahue S. <dc...@us...> - 2004-09-01 04:17:02
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22576 Modified Files: MessageServiceHandler.java Log Message: DeliveryHandler supports Restore from shutdown Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.190 retrieving revision 1.191 diff -C2 -d -r1.190 -r1.191 *** MessageServiceHandler.java 19 Aug 2004 06:30:45 -0000 1.190 --- MessageServiceHandler.java 1 Sep 2004 04:16:52 -0000 1.191 *************** *** 114,117 **** --- 114,119 ---- import java.util.Stack; import java.util.StringTokenizer; + import java.util.Vector; + import javax.activation.DataSource; import javax.servlet.ServletConfig; *************** *** 148,159 **** [...7341 lines suppressed...] * context. If the specify MessageServiceHandlerConfig is not registered, * null will be returned. ! * ! * @param appContext ! * the application context. * @return The registered MessageServiceHandlerConfig for the specify ! * application context. */ MessageServiceHandlerConfig getMessageServiceHandlerConfig( ! ApplicationContext appContext) { ApplicationContext targetAppContext = getApplicationContext(appContext ! .getCpaId(), appContext.getConversationId(), appContext ! .getService(), appContext.getAction()); if (targetAppContext == null) { return null; } else { MessageServiceHandlerConnection connection = (MessageServiceHandlerConnection) mshConnectionTable ! .get(targetAppContext); return connection.getMessageServiceHandlerConfig(); } |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:33:33
|
Update of /cvsroot/ebxmlms/ebxmlms/conf In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv1068 Modified Files: msh.properties.xml Log Message: Hermes Customized Delivery is added. Index: msh.properties.xml =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/conf/msh.properties.xml,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** msh.properties.xml 16 Jan 2004 06:52:42 -0000 1.29 --- msh.properties.xml 19 Aug 2004 06:33:25 -0000 1.30 *************** *** 57,60 **** --- 57,64 ---- in payload while sending in HTTP --> <ContentTransferEncoding>binary</ContentTransferEncoding> + + <!-- Optional property defining the delivery interval + <DeliveryInterval>5000</DeliveryInterval> + --> </Config> *************** *** 232,235 **** --- 236,246 ---- --> </MessageListener> + <!-- Optional Property to allow the user to use customized delivery mechanism + <Delivery> + <DeliveryHandler>class.name</DeliveryHandler> + <RetryInterval>1000</RetryInterval> + <MaximumRetry>3</MaximumRetry> + </Delivery> + --> </MSH> </Property> |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:31:18
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv820 Modified Files: DbConnectionPool.java Log Message: no message Index: DbConnectionPool.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DbConnectionPool.java,v retrieving revision 1.27 retrieving revision 1.28 diff -C2 -d -r1.27 -r1.28 *** DbConnectionPool.java 11 Dec 2003 06:41:29 -0000 1.27 --- DbConnectionPool.java 19 Aug 2004 06:31:08 -0000 1.28 *************** *** 183,187 **** try { if (connection != null) { ! connection.close(); } } --- 183,187 ---- try { if (connection != null) { ! connection.close(); } } |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:31:00
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv727 Modified Files: MessageServiceHandler.java Log Message: Hermes Customized Delivery is added. The aim of the design is to modify Hermes in order to make it customizable its delivery mechanism. Delivery class is replace by DeliveryMonitor class. DispatchMessage method will not create a new instance of Delivery class. Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.189 retrieving revision 1.190 diff -C2 -d -r1.189 -r1.190 *** MessageServiceHandler.java 12 Jul 2004 09:24:40 -0000 1.189 --- MessageServiceHandler.java 19 Aug 2004 06:30:45 -0000 1.190 *************** *** 69,72 **** --- 69,73 ---- package hk.hku.cecid.phoenix.message.handler; + import hk.hku.cecid.phoenix.message.handler.MessageServiceHandler; import hk.hku.cecid.phoenix.common.util.AuthenticationManager; import hk.hku.cecid.phoenix.common.util.Property; *************** *** 154,158 **** */ public class MessageServiceHandler extends HttpServlet [...7905 lines suppressed...] return connection.getMessageServiceHandlerConfig(); } } ! } --- 5564,5577 ---- MessageServiceHandlerConfig getMessageServiceHandlerConfig( ApplicationContext appContext) { ! ApplicationContext targetAppContext = getApplicationContext(appContext ! .getCpaId(), appContext.getConversationId(), appContext ! .getService(), appContext.getAction()); if (targetAppContext == null) { return null; } else { ! MessageServiceHandlerConnection connection = (MessageServiceHandlerConnection) mshConnectionTable ! .get(targetAppContext); return connection.getMessageServiceHandlerConfig(); } } ! } \ No newline at end of file |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:26:21
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32552 Modified Files: MessageServiceHandlerConnection.java Log Message: the Delivery class is replaced by singleton DeliveryMonitor class. threadlist is unused. Index: MessageServiceHandlerConnection.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandlerConnection.java,v retrieving revision 1.28 retrieving revision 1.29 diff -C2 -d -r1.28 -r1.29 *** MessageServiceHandlerConnection.java 8 Jun 2004 09:57:30 -0000 1.28 --- MessageServiceHandlerConnection.java 19 Aug 2004 06:26:12 -0000 1.29 *************** *** 313,318 **** */ msh.addSendThread(ebxmlMessage.getMessageId(), messageProcessor); ! //messageProcessor.start(); ! tx.addThread(messageProcessor); } catch (MessageServiceHandlerException e) { --- 313,318 ---- */ msh.addSendThread(ebxmlMessage.getMessageId(), messageProcessor); ! messageProcessor.start(); ! //tx.addThread(messageProcessor); } catch (MessageServiceHandlerException e) { |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:25:21
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv32391 Modified Files: MessageProcessor.java Log Message: the Delivery class is replaced by singleton DeliveryMonitor class. MessageProcessor need not create a new instance of Delivery class. Index: MessageProcessor.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageProcessor.java,v retrieving revision 1.56 retrieving revision 1.57 diff -C2 -d -r1.56 -r1.57 *** MessageProcessor.java 2 Apr 2004 06:02:41 -0000 1.56 --- MessageProcessor.java 19 Aug 2004 06:25:11 -0000 1.57 *************** *** 70,74 **** import hk.hku.cecid.phoenix.common.util.Property; ! import hk.hku.cecid.phoenix.message.handler.MessageServiceHandler.Delivery; import hk.hku.cecid.phoenix.message.packaging.AckRequested; import hk.hku.cecid.phoenix.message.packaging.AttachmentDataSource; --- 70,74 ---- import hk.hku.cecid.phoenix.common.util.Property; ! //import hk.hku.cecid.phoenix.message.handler.MessageServiceHandler.Delivery; import hk.hku.cecid.phoenix.message.packaging.AckRequested; [...1128 lines suppressed...] logger.error(err); throw new Exception(err); } ! } catch (Exception e) { logger.debug("cannot generate error message"); } *************** *** 886,891 **** * @param mshConfig */ ! void setUnregisterMessageServiceHandlerConfig( ! MessageServiceHandlerConfig mshConfig) { unregisterMshConfig = mshConfig; } --- 966,970 ---- * @param mshConfig */ ! void setUnregisterMessageServiceHandlerConfig(MessageServiceHandlerConfig mshConfig) { unregisterMshConfig = mshConfig; } |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:20:11
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31548 Modified Files: Transaction.java Log Message: the Delivery class is replaced by singleton DeliveryMonitor class. threadList is unused. Index: Transaction.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Transaction.java,v retrieving revision 1.18 retrieving revision 1.19 diff -C2 -d -r1.18 -r1.19 *** Transaction.java 5 Jan 2004 11:24:09 -0000 1.18 --- Transaction.java 19 Aug 2004 06:19:57 -0000 1.19 *************** *** 174,178 **** private final ArrayList persistenceList; private final ArrayList lockList; ! private final ArrayList threadList; private final ArrayList deliveryRecordList; private final int txID; --- 174,178 ---- private final ArrayList persistenceList; private final ArrayList lockList; ! //private final ArrayList threadList; private final ArrayList deliveryRecordList; private final int txID; *************** *** 187,191 **** this.filenameList = new ArrayList(); this.lockList = new ArrayList(); ! this.threadList = new ArrayList(); this.deliveryRecordList = new ArrayList(); this.persistenceList = new ArrayList(); --- 187,191 ---- this.filenameList = new ArrayList(); this.lockList = new ArrayList(); ! //this.threadList = new ArrayList(); this.deliveryRecordList = new ArrayList(); this.persistenceList = new ArrayList(); *************** *** 398,404 **** } ! public void addThread(Thread t) { threadList.add(t); ! } public void addDeliveryRecord(DeliveryRecord record, int seqNo) { --- 398,404 ---- } ! /*public void addThread(Thread t) { threadList.add(t); ! }*/ public void addDeliveryRecord(DeliveryRecord record, int seqNo) { *************** *** 446,450 **** } ! if (!threadList.isEmpty()) { Iterator it = threadList.iterator(); while (it.hasNext()) { --- 446,450 ---- } ! /*if (!threadList.isEmpty()) { Iterator it = threadList.iterator(); while (it.hasNext()) { *************** *** 452,456 **** } threadList.clear(); ! } if (!lockList.isEmpty()) { --- 452,456 ---- } threadList.clear(); ! }*/ if (!lockList.isEmpty()) { *************** *** 518,522 **** } ! threadList.clear(); for (Iterator i=lockList.iterator() ; i.hasNext() ; ) { --- 518,522 ---- } ! //threadList.clear(); for (Iterator i=lockList.iterator() ; i.hasNext() ; ) { |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:16:50
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31085 Modified Files: Constants.java Log Message: Add the settings for customized delivery of MSH Index: Constants.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/Constants.java,v retrieving revision 1.36 retrieving revision 1.37 diff -C2 -d -r1.36 -r1.37 *** Constants.java 16 Jan 2004 06:52:42 -0000 1.36 --- Constants.java 19 Aug 2004 06:16:40 -0000 1.37 *************** *** 90,95 **** */ ! public static final String MSH_SERVER_PROPERTY_FILE = ! "msh.properties.xml"; public static final String MSH_CLIENT_PROPERTY_FILE = --- 90,94 ---- */ ! public static final String MSH_SERVER_PROPERTY_FILE = "msh.properties.xml"; public static final String MSH_CLIENT_PROPERTY_FILE = *************** *** 118,127 **** public static final String PROPERTY_HTTP_PROXY_PORT = "http.proxyPort"; - /* * Constants for Server Side Properties */ - // Settings for MSH --- 117,124 ---- *************** *** 162,168 **** * invoked by MSH upon initialization to do local configuration. */ ! public static final String PROPERTY_CONFIG_LOCAL = ! "MSH/Config/Local"; ! // Settings for proxy --- 159,163 ---- * invoked by MSH upon initialization to do local configuration. */ ! public static final String PROPERTY_CONFIG_LOCAL = "MSH/Config/Local"; // Settings for proxy *************** *** 180,184 **** public static final String PROPERTY_PROXY_PORT = "MSH/Proxy/Port"; - // Settings for keystore on Digital Signature --- 175,178 ---- *************** *** 231,235 **** "MSH/DigitalSignature/AckSign/KeyStore/Password"; - // Settings for logger --- 225,228 ---- *************** *** 243,260 **** * Path to access the log path in configuration file. */ ! public static final String PROPERTY_LOG_PATH = ! "MSH/Log/LogPath"; /** * Path to access the log file in configuration file. */ ! public static final String PROPERTY_LOG_FILE = ! "MSH/Log/LogFile"; /** * Path to access the log level in configuration file. */ ! public static final String PROPERTY_LOG_LEVEL = ! "MSH/Log/LogLevel"; /** --- 236,250 ---- * Path to access the log path in configuration file. */ ! public static final String PROPERTY_LOG_PATH = "MSH/Log/LogPath"; /** * Path to access the log file in configuration file. */ ! public static final String PROPERTY_LOG_FILE = "MSH/Log/LogFile"; /** * Path to access the log level in configuration file. */ ! public static final String PROPERTY_LOG_LEVEL = "MSH/Log/LogLevel"; /** *************** *** 263,267 **** public static final String PROPERTY_MAX_LOG_SIZE = "MSH/Log/MaxFileSize"; - // Settings for Database --- 253,256 ---- *************** *** 294,299 **** * Specification [ebMSS 3.1.4]. */ ! public static final String SERVICE = ! "urn:oasis:names:tc:ebxml-msg:service"; /** --- 283,287 ---- * Specification [ebMSS 3.1.4]. */ ! public static final String SERVICE = "urn:oasis:names:tc:ebxml-msg:service"; /** *************** *** 327,331 **** */ public static final String ACTION_STATUS_RESPONSE = "StatusResponse"; ! // Settings for SSL /** --- 315,319 ---- */ public static final String ACTION_STATUS_RESPONSE = "StatusResponse"; ! // Settings for SSL /** *************** *** 385,390 **** Path to access the Keystore password inside ssl client authentication info. */ ! public static final String PROPERTY_KEY_STORE_PASSWORD ! = "KeyStore/Password"; // Settings for Repositories --- 373,378 ---- Path to access the Keystore password inside ssl client authentication info. */ ! public static final String PROPERTY_KEY_STORE_PASSWORD = ! "KeyStore/Password"; // Settings for Repositories *************** *** 400,409 **** public static final String PROPERTY_MESSAGE_REPOSITORY = "MSH/Persistent/MessageRepository"; ! /** * The PersistenceHandler to store the message in message repository */ ! public static final String PROPERTY_MESSAGE_REPOSITORY_PERSIST_HANDLER ! = "MSH/Persistent/MessageRepositoryPersistHandler"; /** Maximum number of files allowed in a directory for saving ebXML --- 388,397 ---- public static final String PROPERTY_MESSAGE_REPOSITORY = "MSH/Persistent/MessageRepository"; ! /** * The PersistenceHandler to store the message in message repository */ ! public static final String PROPERTY_MESSAGE_REPOSITORY_PERSIST_HANDLER = ! "MSH/Persistent/MessageRepositoryPersistHandler"; /** Maximum number of files allowed in a directory for saving ebXML *************** *** 430,434 **** public static final String TEMP_FILE_SUFFIX = ".message"; - // Settings for mail --- 418,421 ---- *************** *** 452,457 **** * Path to get mail folder in configuration file */ ! public static final String PROPERTY_MAIL_FOLDER = ! "MSH/Mail/Poll/Folder"; /** --- 439,443 ---- * Path to get mail folder in configuration file */ ! public static final String PROPERTY_MAIL_FOLDER = "MSH/Mail/Poll/Folder"; /** *************** *** 473,477 **** "MSH/Mail/Poll/MonitorInterval"; - // Settings for special behaviours of MSH --- 459,462 ---- *************** *** 485,488 **** --- 470,489 ---- "MSH/Config/ContentTransferEncoding"; + // Settings for customized delivery of MSH + + public static final String PROPERTY_DELIVERYHANDLER = + "MSH/Delivery/DeliveryHandler"; + + public static final String PROPERTY_RETRYINTERVAL = + "MSH/Delivery/RetryInterval"; + + public static final String PROPERTY_MAXIMUMRETRY = + "MSH/Delivery/MaximumRetry"; + + // Settings for Delivery Monitor of MSH + + public static final String PROPERTY_DELIVERY_MONITOR_INTERVAL = + "MSH/Config/DeliveryInterval"; + /* * Constants for Client-Side Properties *************** *** 492,499 **** "Request/Log/ExternalProperties"; ! public static final String PROPERTY_REQUEST_LOG_PATH = "Request/Log/LogPath"; ! public static final String PROPERTY_REQUEST_LOG_FILE = "Request/Log/LogFile"; --- 493,500 ---- "Request/Log/ExternalProperties"; ! public static final String PROPERTY_REQUEST_LOG_PATH = "Request/Log/LogPath"; ! public static final String PROPERTY_REQUEST_LOG_FILE = "Request/Log/LogFile"; *************** *** 512,518 **** * The Persistence Handler class to handler the persistence of objectStore */ ! public static final String ! PROPERTY_MESSAGE_LISTENER_OBJECT_STORE_PERSIST_HANDLER ! = "MSH/MessageListener/ObjectStorePersistHandler"; /** --- 513,518 ---- * The Persistence Handler class to handler the persistence of objectStore */ ! public static final String PROPERTY_MESSAGE_LISTENER_OBJECT_STORE_PERSIST_HANDLER = ! "MSH/MessageListener/ObjectStorePersistHandler"; /** *************** *** 562,566 **** "Request/Config/MonitorInterval"; - /* * Constants for Diagnosis tool --- 562,565 ---- *************** *** 650,654 **** public static final String DIRECTORY_LOG = "logs"; - /* * Transport protocols --- 649,652 ---- *************** *** 680,686 **** * Different levels of ackRequested */ ! public static final int ACK_REQUESTED_PERMESSAGE = 0; ! public static final int ACK_REQUESTED_ALWAYS = 1; ! public static final int ACK_REQUESTED_NEVER = 2; /* --- 678,684 ---- * Different levels of ackRequested */ ! public static final int ACK_REQUESTED_PERMESSAGE = 0; ! public static final int ACK_REQUESTED_ALWAYS = 1; ! public static final int ACK_REQUESTED_NEVER = 2; /* *************** *** 741,746 **** */ public static final String MULTIPART_RELATED_TYPE = ! MULTIPART_RELATED + "; type=\"" + TEXT_XML_TYPE + "\"; " + ! MIME_BOUNDARY + "="; /** --- 739,748 ---- */ public static final String MULTIPART_RELATED_TYPE = ! MULTIPART_RELATED ! + "; type=\"" ! + TEXT_XML_TYPE ! + "\"; " ! + MIME_BOUNDARY ! + "="; /** *************** *** 749,753 **** public static final String CHARACTER_SET = "charset"; - /** * Default XML character encoding. --- 751,754 ---- *************** *** 778,782 **** public static final String ATTRIBUTE_NAME = "name"; - /* * XML tags for MSH Responses to Client Requests --- 779,782 ---- *************** *** 811,816 **** * Application Context. */ ! public static final String ELEMENT_APPLICATION_CONTEXT ! = "ApplicationContext"; /** --- 811,816 ---- * Application Context. */ ! public static final String ELEMENT_APPLICATION_CONTEXT = ! "ApplicationContext"; /** *************** *** 908,912 **** public static final String ATTRIBUTE_MESSAGE_ID = "id"; - /** * Reference time zone. --- 908,911 ---- *************** *** 914,918 **** public static final String TIME_ZONE = "GMT"; - /* * Default values for Directory Manager --- 913,916 ---- *************** *** 920,925 **** /** Default parent path to save ebXML messages */ ! public static final String DEF_MESSAGE_REPOSITORY = ! "/tmp/ebxmlms"; /** Default path to save sending thread context */ --- 918,922 ---- /** Default parent path to save ebXML messages */ ! public static final String DEF_MESSAGE_REPOSITORY = "/tmp/ebxmlms"; /** Default path to save sending thread context */ *************** *** 931,935 **** public static final int DEF_MAX_NUM_IN_SUBDIR = 1000; - /* * Default values for Export --- 928,931 ---- *************** *** 942,946 **** public static final String SUFFIX_ALL_REPORT = ".xml"; - /* * Default values for Mail Poller --- 938,941 ---- *************** *** 957,960 **** --- 952,963 ---- public static final long MAIL_MIN_WAIT_INTERVAL = 5000; + /* + * Default values for Delivery Monitor + */ + + /** + * Smallest time interval allowed to delivery messages + */ + public static final long DELIVERY_MONITOR_MIN_WAIT_INTERVAL = 5000; /* *************** *** 1007,1012 **** "Received and Acknowledgment Sent"; ! public static final String MESSAGE_STATUS_RECEIVED = ! "Received"; public static final String MESSAGE_STATUS_DELETED = "Deleted"; --- 1010,1014 ---- "Received and Acknowledgment Sent"; ! public static final String MESSAGE_STATUS_RECEIVED = "Received"; public static final String MESSAGE_STATUS_DELETED = "Deleted"; *************** *** 1014,1018 **** public static final String MESSAGE_STATUS_UNKNOWN = "Unknown"; - // Message statuses in ebxml Status Response --- 1016,1019 ---- *************** *** 1027,1031 **** public static final String STATUS_FORWARDED = "Forwarded"; - // Message deletion statuses --- 1028,1031 ---- *************** *** 1036,1041 **** "Message deleted successfully"; ! public static final String DELETE_FAILED = ! "Message cannot be deleted"; // Package-level shared constants --- 1036,1040 ---- "Message deleted successfully"; ! public static final String DELETE_FAILED = "Message cannot be deleted"; // Package-level shared constants *************** *** 1063,1068 **** * object in <code>MessageServiceHandler</code>. */ ! public static final String SERIALIZABLE_OBJECT = ! "application/octet-stream"; /** --- 1062,1066 ---- * object in <code>MessageServiceHandler</code>. */ ! public static final String SERIALIZABLE_OBJECT = "application/octet-stream"; /** |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:11:41
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv30423 Added Files: DeliveryManager.java Log Message: DeliveryManager is a singleton within Hermes for which plays with DeliveryHandler --- NEW FILE: DeliveryManager.java --- /* * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The * University of Hong Kong (HKU). All Rights Reserved. * * This software is licensed under the Academic Free License Version 1.0 * * Academic Free License * Version 1.0 * * This Academic Free License applies to any software and associated * documentation (the "Software") whose owner (the "Licensor") has placed the * statement "Licensed under the Academic Free License Version 1.0" immediately * after the copyright notice that applies to the Software. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of the Software (1) to use, copy, modify, merge, publish, perform, * distribute, sublicense, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, and (2) under patent * claims owned or controlled by the Licensor that are embodied in the Software * as furnished by the Licensor, to make, use, sell and offer for sale the * Software and derivative works thereof, subject to the following conditions: * * - Redistributions of the Software in source code form must retain all * copyright notices in the Software as furnished by the Licensor, this list * of conditions, and the following disclaimers. * - Redistributions of the Software in executable form must reproduce all * copyright notices in the Software as furnished by the Licensor, this list * of conditions, and the following disclaimers in the documentation and/or * other materials provided with the distribution. * - Neither the names of Licensor, nor the names of any contributors to the * Software, nor any of their trademarks or service marks, may be used to * endorse or promote products derived from this Software without express * prior written permission of the Licensor. * * DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS * OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER * A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY * PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS * AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE * LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. * * This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. * Permission is hereby granted to copy and distribute this license without * modification. This license may not be modified without the express written * permission of its copyright owner. */ /* ===== * * $Header: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DeliveryManager.java,v 1.1 2004/08/19 06:11:31 dcmsze Exp $ * * Code authored by: * * dcmsze Jun 28, 2004 * * Code reviewed by: * * username [YYYY-MM-DD] * * Remarks: * * ===== */ package hk.hku.cecid.phoenix.message.handler; import java.lang.reflect.Constructor; import java.lang.reflect.InvocationTargetException; import hk.hku.cecid.phoenix.common.util.Property; import org.apache.log4j.Logger; /** * DeliveryManager * * @author dcmsze * @version $Revision: 1.1 $ */ public final class DeliveryManager { /** * logger for DeliveryManager class. */ private static Logger logger = Logger.getLogger(DeliveryManager.class); /** * The Delivery Handler for the Application. */ private static DeliveryHandler applicationDeliveryHandler; /** * The Retry Interval of Delivery Handler for the Application. */ private static String applicationDeliveryHandlerRetryInterval; /** * The Maximum Retry of Delivery Handler for the Application. */ private static String applicationDeliveryHandlerMaximumRetry; /** * Flag indicating if the class has been configured. */ private static boolean isConfigured = false; /** * Configure the class if and only if it has not been configred. * * @param prop <code>Property</code> object. * @thros InitializationExcpetion thrown when there is error on * configurating the DevlieryManager */ static synchronized void configure(final Property prop) throws InitializationException { if (isConfigured) { return; } String applicationDeliveryHandlerClassName = prop.get(Constants.PROPERTY_DELIVERYHANDLER); applicationDeliveryHandlerRetryInterval = prop.get(Constants.PROPERTY_RETRYINTERVAL); applicationDeliveryHandlerMaximumRetry = prop.get(Constants.PROPERTY_MAXIMUMRETRY); if (applicationDeliveryHandlerClassName != null && applicationDeliveryHandlerRetryInterval != null && applicationDeliveryHandlerMaximumRetry != null) { logger.info( "Use customize application delivery handler : " + applicationDeliveryHandlerClassName); try { applicationDeliveryHandler = createDeliveryHandlerInstance( applicationDeliveryHandlerClassName, applicationDeliveryHandlerRetryInterval, applicationDeliveryHandlerMaximumRetry, prop); logger.debug("Successful to create Delivery Handler Instance"); } catch (Exception e) { logger.error(e.toString()); String err = ErrorMessages.getMessage( ErrorMessages.ERR_HERMES_INIT_ERROR, e, "Cannot load application delivery handler"); logger.error(err); throw new InitializationException(err); } } isConfigured = true; } /** * private constructor to prevent constructor of the class */ public DeliveryManager() { super(); } /** * create the Delivery Handler based on the inputted className. * If the className is null, it will create the Delivery Handler using * the defaultHandlerClass. * @param defaultHandlerClass the default Handler class to load if the * className is null * @param className the class name of the Delivery Handler to load * @return The Delivery Handler instance * @throws Exception thrown when there is error occur on creating the * instance. */ private static DeliveryHandler createDeliveryHandlerInstance( final String className, final String retryInterval, final String maximumRetry, final Property property) throws ClassNotFoundException, IllegalArgumentException, InstantiationException, IllegalAccessException, InvocationTargetException { Class handlerClass = Class.forName(className); Constructor[] constructors = handlerClass.getConstructors(); Object result = null; result = handlerClass.newInstance(); if (result instanceof DeliveryHandler) { return (DeliveryHandler) result; } else { throw new IllegalArgumentException("Specify class is not an instance of DeliveryHandler"); } } /** * get the Application Delivery Handler. * @return the Application Delivery Handler */ public static DeliveryHandler getApplicationDeliveryHandler() { return applicationDeliveryHandler; } /** * get the Application Delivery Handler Retry Interval. * @return the Application Delivery Handler Retry Interval */ public static String getApplicationDeliveryHandlerRetryInterval() { return applicationDeliveryHandlerRetryInterval; } /** * get the Application Delivery Handler Maximum Retry. * @return the Application Delivery Handler Maximum Retry */ public static String getApplicationDeliveryHandlerMaxmiumRetry() { return applicationDeliveryHandlerMaximumRetry; } } |
|
From: Donahue S. <dc...@us...> - 2004-08-19 06:01:24
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv28950 Added Files: DeliveryHandler.java Log Message: DeliveryHandler is an interface class for the user to implement their own delivery hook --- NEW FILE: DeliveryHandler.java --- /* * Copyright(c) 2002 Center for E-Commerce Infrastructure Development, The * University of Hong Kong (HKU). All Rights Reserved. * * This software is licensed under the Academic Free License Version 1.0 * * Academic Free License * Version 1.0 * * This Academic Free License applies to any software and associated * documentation (the "Software") whose owner (the "Licensor") has placed the * statement "Licensed under the Academic Free License Version 1.0" immediately * after the copyright notice that applies to the Software. * * Permission is hereby granted, free of charge, to any person obtaining a copy * of the Software (1) to use, copy, modify, merge, publish, perform, * distribute, sublicense, and/or sell copies of the Software, and to permit * persons to whom the Software is furnished to do so, and (2) under patent * claims owned or controlled by the Licensor that are embodied in the Software * as furnished by the Licensor, to make, use, sell and offer for sale the * Software and derivative works thereof, subject to the following conditions: * * - Redistributions of the Software in source code form must retain all * copyright notices in the Software as furnished by the Licensor, this list * of conditions, and the following disclaimers. * - Redistributions of the Software in executable form must reproduce all * copyright notices in the Software as furnished by the Licensor, this list * of conditions, and the following disclaimers in the documentation and/or * other materials provided with the distribution. * - Neither the names of Licensor, nor the names of any contributors to the * Software, nor any of their trademarks or service marks, may be used to * endorse or promote products derived from this Software without express * prior written permission of the Licensor. * * DISCLAIMERS: LICENSOR WARRANTS THAT THE COPYRIGHT IN AND TO THE SOFTWARE IS * OWNED BY THE LICENSOR OR THAT THE SOFTWARE IS DISTRIBUTED BY LICENSOR UNDER * A VALID CURRENT LICENSE. EXCEPT AS EXPRESSLY STATED IN THE IMMEDIATELY * PRECEDING SENTENCE, THE SOFTWARE IS PROVIDED BY THE LICENSOR, CONTRIBUTORS * AND COPYRIGHT OWNERS "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE * LICENSOR, CONTRIBUTORS OR COPYRIGHT OWNERS BE LIABLE FOR ANY CLAIM, DAMAGES * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE. * * This license is Copyright (C) 2002 Lawrence E. Rosen. All rights reserved. * Permission is hereby granted to copy and distribute this license without * modification. This license may not be modified without the express written * permission of its copyright owner. */ /* ===== * * $Header: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/DeliveryHandler.java,v 1.1 2004/08/19 06:01:13 dcmsze Exp $ * * Code authored by: * * dcmsze Jun 28, 2004 * * Code reviewed by: * * username [YYYY-MM-DD] * * Remarks: * * ===== */ package hk.hku.cecid.phoenix.message.handler; import hk.hku.cecid.phoenix.message.packaging.EbxmlMessage; /** * DeliveryHandler * * @author dcmsze * @version $Revision: 1.1 $ */ public interface DeliveryHandler { /** * Event handler to be invoked when message arrives. * * @param ebxmlMessage An {@link EbxmlMessage} received by the message * handler. */ boolean deliveryMessage(EbxmlMessage msg); } |
|
From: Bob K. <bob...@us...> - 2004-07-20 08:13:38
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv20727 Modified Files: Http.java Log Message: Fix the bug on SSL based on suggestions by Mattias J Index: Http.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/transport/Http.java,v retrieving revision 1.12 retrieving revision 1.13 diff -C2 -d -r1.12 -r1.13 *** Http.java 15 Dec 2003 09:51:35 -0000 1.12 --- Http.java 20 Jul 2004 08:13:28 -0000 1.13 *************** *** 137,140 **** --- 137,146 ---- //private static SSLSocketFactory sslSocketFactory; public static void configure(Property prop) throws InitializationException { + String pkgs = System.getProperty(PROTOCOL_HANDLER_PKGS); + if (pkgs == null || pkgs.indexOf(SSL_WWW_PROTOCOL) < 0 ) { + pkgs = (pkgs == null ? SSL_WWW_PROTOCOL : + SSL_WWW_PROTOCOL + "|" + pkgs); + System.setProperty(PROTOCOL_HANDLER_PKGS, pkgs); + } String s = prop.get(Constants.PROPERTY_CONTENT_TRANSFER_ENCODING); if (s != null && !s.equals("")) { *************** *** 183,188 **** --- 189,196 ---- File realTrustStoreFile = new File(trustedStorePath + File.separator + trustedStoreFile); + /* TrustManager[] trustManagers = null; KeyManager[] keyManagers = null; + */ if (realTrustStoreFile.exists() && realTrustStoreFile.isFile()) { logger.debug("Use SSL trusted keystore : " + realTrustStoreFile); *************** *** 367,370 **** --- 375,379 ---- try { URL url = new URL(toUrl); + /* if (url.getProtocol().equalsIgnoreCase (Constants.TRANSPORT_TYPE_HTTPS)) { *************** *** 376,379 **** --- 385,389 ---- } } + */ HttpURLConnection connection = (HttpURLConnection) url.openConnection(); |
|
From: Gait B. <gai...@us...> - 2004-07-12 09:25:06
|
Update of /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv10552 Modified Files: MessageServiceHandler.java MessageServer.java Log Message: Allow correct processing of business messages with signals. Errors and Acknowledgements can also be sent along with a normal business response. Until now, those messages would have been lost as processing ended after handling the signal. Coding has changed such that for combined signals and data, both are processed correctly. Index: MessageServer.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServer.java,v retrieving revision 1.151 retrieving revision 1.152 diff -C2 -d -r1.151 -r1.152 *** MessageServer.java 8 Apr 2004 04:37:44 -0000 1.151 --- MessageServer.java 12 Jul 2004 09:24:43 -0000 1.152 *************** *** 1097,1102 **** exception = null; try { ! store(ebxmlMessage, appContext, STATE_RECEIVED, ! FIRST_MESSAGE_DELIVERED, tx); update = DbTableManager.DBTABLE_MESSAGE_STORE.getUpdateQuery (tx.getConnection(), --- 1097,1106 ---- exception = null; try { ! /* Only store the message if it's really just an ack */ ! if( ebxmlMessage.getService().equals(Constants.SERVICE) && ebxmlMessage.getAction().equals(Constants.ACTION_ACKNOWLEDGMENT)) { ! store(ebxmlMessage, appContext, STATE_RECEIVED, ! FIRST_MESSAGE_DELIVERED, tx); ! } ! update = DbTableManager.DBTABLE_MESSAGE_STORE.getUpdateQuery (tx.getConnection(), Index: MessageServiceHandler.java =================================================================== RCS file: /cvsroot/ebxmlms/ebxmlms/src/hk/hku/cecid/phoenix/message/handler/MessageServiceHandler.java,v retrieving revision 1.188 retrieving revision 1.189 diff -C2 -d -r1.188 -r1.189 *** MessageServiceHandler.java 21 Apr 2004 12:41:07 -0000 1.188 --- MessageServiceHandler.java 12 Jul 2004 09:24:40 -0000 1.189 *************** *** 4675,4684 **** final boolean isPong = service.equals(Constants.SERVICE) && action.equals(Constants.ACTION_PONG); ! final boolean isError = (ebxmlMessage.getErrorList() != null); ApplicationContext appContext; MessageServiceHandlerConnection mshConnection = null; if (statusRequest == null && statusResponse == null && ! acknowledgment == null && !isPing && !isPong && !isError) { appContext = getApplicationContext(ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(), service, action); --- 4675,4689 ---- final boolean isPong = service.equals(Constants.SERVICE) && action.equals(Constants.ACTION_PONG); ! final boolean isError = service.equals(Constants.SERVICE) && ! action.equals(Constants.ACTION_MESSAGE_ERROR); ! final boolean isAcknowledgment = service.equals(Constants.SERVICE) && ! action.equals(Constants.ACTION_ACKNOWLEDGMENT); ! ! final boolean reportsErrors = (ebxmlMessage.getErrorList() != null); ApplicationContext appContext; MessageServiceHandlerConnection mshConnection = null; if (statusRequest == null && statusResponse == null && ! !isAcknowledgment && !isPing && !isPong && !isError) { appContext = getApplicationContext(ebxmlMessage.getCpaId(), ebxmlMessage.getConversationId(), service, action); *************** *** 4718,4722 **** String status = "Received"; // Check if it is an incoming error message ! if (isError) { logger.debug("Error message received"); final String refToMessageId = ebxmlMessage.getMessageHeader(). --- 4723,4727 ---- String status = "Received"; // Check if it is an incoming error message ! if (reportsErrors) { logger.debug("Error message received"); final String refToMessageId = ebxmlMessage.getMessageHeader(). *************** *** 4756,4760 **** } } ! else { // Message is validated only if it is not an error message in // order to avoid infinite loop --- 4761,4766 ---- } } ! ! if(!isError) { // Message is validated only if it is not an error message in // order to avoid infinite loop *************** *** 4834,4838 **** // the registration or not if (statusRequest == null && statusResponse == null && ! acknowledgment == null && !isPing && !isPong && !isError) { if (mshConnection != null) { int ackRequestedInReg = mshConnection --- 4840,4844 ---- // the registration or not if (statusRequest == null && statusResponse == null && ! !isAcknowledgment && !isPing && !isPong && !isError) { if (mshConnection != null) { int ackRequestedInReg = mshConnection *************** *** 4969,5177 **** } } ! else if (ackRequested != null) { ! logger.debug("message has an AckReq"); ! tx.lock(messageId); ! if (messageServer.hasReceived(ebxmlMessage, appContext, tx)) { ! logger.debug("message has been received previously"); ! status = "Received before - "; ! if (!ebxmlMessage.getDuplicateElimination()) { ! messageServer.setDeliveryStatus ! (ebxmlMessage.getMessageId(), false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! status = status + "Deliver to Application - "; ! } ! if (suppressedAck) { ! logger.debug("Ack sending suppressed"); ! status = status + "Acknowledgment suppressed"; ! } ! else { ! EbxmlMessage refToMessage = messageServer. ! getRefToMessage(messageId, tx); ! boolean shouldSend = true; ! int syncReplyMode = mshConnection. ! getMessageServiceHandlerConfig().getSyncReply(); ! if (refToMessage == null) { ! logger.debug("old Ack not found"); ! refToMessage = generateAcknowledgment(ebxmlMessage, ! messageId); ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! messageServer.store(refToMessage, appContext, ! MessageServer.STATE_SENT_STARTED, true, tx); ! } ! else { ! messageServer.store(refToMessage, appContext, ! MessageServer.STATE_SENT, true, tx); ! } ! logger.debug("old Acknowledgment missing"); ! status = status + "Old Acknowledgment missing"; ! } ! else { ! String oldAckMsgId = refToMessage.getMessageId(); ! if (sendThreadMap.get(oldAckMsgId) == null) { ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! messageServer.resend(oldAckMsgId, tx); ! logger.debug("old Acknowledgment resent"); ! status += "Old Acknowledgment resent"; ! } ! else { ! logger.debug("Old Acknowledgment replied " ! + "synchronously"); ! status += "Old Acknowledgment replied " ! + "synchronously"; ! } ! } ! else { ! logger.debug("Old Acknowledgment is being " ! + "resent; skipping."); ! status = status + "Old Acknowledgement is " ! + "being resent; skipping."; ! shouldSend = false; ! } ! } ! if (shouldSend) { ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! final MessageProcessor messageProcessor = new ! MessageProcessor(refToMessage, ! mshConnection. ! getMessageServiceHandlerConfig(), this); ! addSendThread(refToMessage.getMessageId(), ! messageProcessor); ! messageProcessor.start(); ! } ! else { ! response = refToMessage; ! } ! } ! } ! } ! else { ! logger.debug("message has not been received previously"); ! status = "Received firstly - "; ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! final EbxmlMessage ackMessage = ! generateAcknowledgment(ebxmlMessage, messageId); ! if (suppressedAck) { ! logger.debug("Ack sending suppressed"); ! status = status + "Acknowledgment suppressed"; ! } ! else if (mshConnection.getMessageServiceHandlerConfig(). ! getSyncReply() == Constants.SYNC_REPLY_MODE_NONE) { ! mshConnection.send(ackMessage, tx); ! logger.debug("Ack sent"); ! status = status + "Acknowledgment sent"; ! } ! else { ! messageServer.store(ackMessage, appContext, ! MessageServer.STATE_SENT, true, tx); ! logger.debug("Ack replied synchronously"); ! status += "Acknowledgment replied synchronously"; ! response = ackMessage; ! } ! } ! } ! else if (statusRequest != null) { ! logger.debug("Status Request message is received"); ! final String refToMessageId = statusRequest.getRefToMessageId(); ! final String [] result = messageServer. ! getMessageStatus(refToMessageId, tx); ! final String messageStatus = result[0]; ! final String timestamp = result[1]; ! if (!messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED) && ! !messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED)) { ! appContext = new ApplicationContext ! (result[2], result[3], result[4], result[5]); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, true, tx); ! } ! response = generateStatusResponseMessage(ebxmlMessage, ! messageStatus, timestamp); ! if (!messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED) && ! !messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED)) { ! messageServer.store(response, appContext, ! MessageServer.STATE_SENT, true, tx); ! } ! logger.debug("Status Response message is sent back"); ! } ! else if (statusResponse != null) { ! String statusRequestMessageId = ebxmlMessage. ! getMessageHeader().getRefToMessageId(); ! appContext = messageServer. ! getApplicationContext(statusRequestMessageId, tx); ! mshConnection = (MessageServiceHandlerConnection) ! mshConnectionTable.get(appContext); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! logger.debug("Status Response message is received"); ! } ! else if (isPing) { ! logger.debug("Ping message is received"); ! response = generatePongMessage(ebxmlMessage); ! messageServer.store(response, appContext, ! MessageServer.STATE_SENT, true, tx); ! logger.debug("Pong message is sent back"); ! } ! else if (isPong) { ! String pingMessageId = ebxmlMessage.getMessageHeader(). ! getRefToMessageId(); ! appContext = messageServer.getApplicationContext ! (pingMessageId, tx); ! mshConnection = (MessageServiceHandlerConnection) ! mshConnectionTable.get(appContext); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! logger.info("Pong message is received"); ! } ! else { ! tx.lock(messageId); ! final boolean hasReceived = messageServer. ! hasReceived(ebxmlMessage, appContext, tx); ! if (!ebxmlMessage.getDuplicateElimination() || !hasReceived) { ! logger.debug("message doesn't have AckReq"); ! if (!hasReceived) { ! logger.debug( ! "message has not been received previously"); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! status = "Received firstly - Deliver to Application"; ! } ! else { ! status = "Received before - Deliver to Application"; ! messageServer.setDeliveryStatus ! (ebxmlMessage.getMessageId(), false, tx); ! } ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! } ! else { ! logger.debug("will not process message"); ! status = "Received before - Not deliver to Application"; ! } ! } try { --- 4975,5186 ---- } } ! ! if( !isAcknowledgment ) { ! if (ackRequested != null) { ! logger.debug("message has an AckReq"); ! tx.lock(messageId); ! if (messageServer.hasReceived(ebxmlMessage, appContext, tx)) { ! logger.debug("message has been received previously"); ! status = "Received before - "; ! if (!ebxmlMessage.getDuplicateElimination()) { ! messageServer.setDeliveryStatus ! (ebxmlMessage.getMessageId(), false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! status = status + "Deliver to Application - "; ! } ! if (suppressedAck) { ! logger.debug("Ack sending suppressed"); ! status = status + "Acknowledgment suppressed"; ! } ! else { ! EbxmlMessage refToMessage = messageServer. ! getRefToMessage(messageId, tx); ! boolean shouldSend = true; ! int syncReplyMode = mshConnection. ! getMessageServiceHandlerConfig().getSyncReply(); ! if (refToMessage == null) { ! logger.debug("old Ack not found"); ! refToMessage = generateAcknowledgment(ebxmlMessage, ! messageId); ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! messageServer.store(refToMessage, appContext, ! MessageServer.STATE_SENT_STARTED, true, tx); ! } ! else { ! messageServer.store(refToMessage, appContext, ! MessageServer.STATE_SENT, true, tx); ! } ! logger.debug("old Acknowledgment missing"); ! status = status + "Old Acknowledgment missing"; ! } ! else { ! String oldAckMsgId = refToMessage.getMessageId(); ! if (sendThreadMap.get(oldAckMsgId) == null) { ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! messageServer.resend(oldAckMsgId, tx); ! logger.debug("old Acknowledgment resent"); ! status += "Old Acknowledgment resent"; ! } ! else { ! logger.debug("Old Acknowledgment replied " ! + "synchronously"); ! status += "Old Acknowledgment replied " ! + "synchronously"; ! } ! } ! else { ! logger.debug("Old Acknowledgment is being " ! + "resent; skipping."); ! status = status + "Old Acknowledgement is " ! + "being resent; skipping."; ! shouldSend = false; ! } ! } ! if (shouldSend) { ! if (syncReplyMode == Constants. ! SYNC_REPLY_MODE_NONE) { ! final MessageProcessor messageProcessor = new ! MessageProcessor(refToMessage, ! mshConnection. ! getMessageServiceHandlerConfig(), this); ! addSendThread(refToMessage.getMessageId(), ! messageProcessor); ! messageProcessor.start(); ! } ! else { ! response = refToMessage; ! } ! } ! } ! } ! else { ! logger.debug("message has not been received previously"); ! status = "Received firstly - "; ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! final EbxmlMessage ackMessage = ! generateAcknowledgment(ebxmlMessage, messageId); ! if (suppressedAck) { ! logger.debug("Ack sending suppressed"); ! status = status + "Acknowledgment suppressed"; ! } ! else if (mshConnection.getMessageServiceHandlerConfig(). ! getSyncReply() == Constants.SYNC_REPLY_MODE_NONE) { ! mshConnection.send(ackMessage, tx); ! logger.debug("Ack sent"); ! status = status + "Acknowledgment sent"; ! } ! else { ! messageServer.store(ackMessage, appContext, ! MessageServer.STATE_SENT, true, tx); ! logger.debug("Ack replied synchronously"); ! status += "Acknowledgment replied synchronously"; ! response = ackMessage; ! } ! } ! } ! else if (statusRequest != null) { ! logger.debug("Status Request message is received"); ! final String refToMessageId = statusRequest.getRefToMessageId(); ! final String [] result = messageServer. ! getMessageStatus(refToMessageId, tx); ! final String messageStatus = result[0]; ! final String timestamp = result[1]; ! if (!messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED) && ! !messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED)) { ! appContext = new ApplicationContext ! (result[2], result[3], result[4], result[5]); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, true, tx); ! } ! response = generateStatusResponseMessage(ebxmlMessage, ! messageStatus, timestamp); ! if (!messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED) && ! !messageStatus.equals(Constants.STATUS_NOT_RECOGNIZED)) { ! messageServer.store(response, appContext, ! MessageServer.STATE_SENT, true, tx); ! } ! logger.debug("Status Response message is sent back"); ! } ! else if (statusResponse != null) { ! String statusRequestMessageId = ebxmlMessage. ! getMessageHeader().getRefToMessageId(); ! appContext = messageServer. ! getApplicationContext(statusRequestMessageId, tx); ! mshConnection = (MessageServiceHandlerConnection) ! mshConnectionTable.get(appContext); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! logger.debug("Status Response message is received"); ! } ! else if (isPing) { ! logger.debug("Ping message is received"); ! response = generatePongMessage(ebxmlMessage); ! messageServer.store(response, appContext, ! MessageServer.STATE_SENT, true, tx); ! logger.debug("Pong message is sent back"); ! } ! else if (isPong) { ! String pingMessageId = ebxmlMessage.getMessageHeader(). ! getRefToMessageId(); ! appContext = messageServer.getApplicationContext ! (pingMessageId, tx); ! mshConnection = (MessageServiceHandlerConnection) ! mshConnectionTable.get(appContext); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! logger.info("Pong message is received"); ! } ! else { ! tx.lock(messageId); ! final boolean hasReceived = messageServer. ! hasReceived(ebxmlMessage, appContext, tx); ! if (!ebxmlMessage.getDuplicateElimination() || !hasReceived) { ! logger.debug("message doesn't have AckReq"); ! if (!hasReceived) { ! logger.debug( ! "message has not been received previously"); ! messageServer.store(ebxmlMessage, appContext, ! MessageServer.STATE_RECEIVED, false, tx); ! status = "Received firstly - Deliver to Application"; ! } ! else { ! status = "Received before - Deliver to Application"; ! messageServer.setDeliveryStatus ! (ebxmlMessage.getMessageId(), false, tx); ! } ! Delivery delivery = new Delivery(this, appContext, ! mshConnection.getMessageServiceHandlerConfig(). ! getMessageListener(), ebxmlMessage); ! tx.addThread(delivery); ! } ! else { ! logger.debug("will not process message"); ! status = "Received before - Not deliver to Application"; ! } ! } ! } try { |