1

I have a Java EE 5 MDB-driven JMS system running on WebLogic 10.3.5, for delivering announcements via Email/IM/SMS. I have a requirement to specify a Date/Time window that announcements should be delivered within.

As far as I can make out there is no option to deliver/execute a JMS message at a certain Date/Time.

My list of announcements is in a DB table, so at present I have an EJB 3.0 Timer Bean that polls the table every 2 minutes and sends messages to a JMS queue for new announcements in that window.

It works, but I don't like that the DB table polling is the one key point in the system that won't scale in line with demand as does the JMS portion. I have partitioning on the table's status column, but even then doing a BETWEEN on two dates won't scale well as data grows.

Can people suggest a scalable solution that would allow me to forgo the table polling and just create JMS messages on Announcement creation that will defer their execution to a specified Date/Time? Critically the deferred execution should be persistent, surviving server restarts and automatically continuing to "wait" for execution on server restart.

retrodev
  • 2,323
  • 6
  • 24
  • 48
  • I had similar requirements, and ended up with a similar solution ;) The polling is however simple, so it can scale quite high with proper indexes, etc. You can even add a `flag` to indicate which row was already processed: update are cheaper than deletion, and using an index `(flag, date)` may speed the query up a bit. – ewernli Sep 07 '12 at 08:48
  • Thanks ewernli. A bitmap index on a Status flag and normal index on date is exactly what I'm using. I also plan to partition the table based on Status, so hopefully it will scale. I shall just put my faith in the Oracle CBO :) – retrodev Sep 07 '12 at 09:57

0 Answers0