This approach is ideal for this situation (when the remote endpoint is not always available) and is known as store-and-forward messaging. In fact, many application servers support this out of the box, such as WebLogic and its Store and Forward :
SAF WebLogic Server , WebLogic Server. , SAF , WebLogic Server, , . - , - , .
Open MQ ( JMS GlassFish), , (. 2007 ). , ( , , ). , GlassFish v3 Open MQ 4.4 Open MQ 4.4 JMS ( ), . . , ( Open MQ 4.4!). dev.
, , , , . , "" MDB JMS- ( ). , , JMS, MDB, , .