I've just had a quick look at your code, and I don't have much experience of coding Java within Notes. However, you may find you get more joy if you explicitly pass the reference to your Database to the "SendToAll" method, rather than trying to re-instantiate the AgentContext and what have you.
--
http://www.benpoole.com