Do you need to do this in startup? Perhaps you can follow the same workaround approach that is used as in creating timers and such by creating a class that implements the ServletContextListener and put your specific logic in the contextInitialized method?
[Message sent by forum member 'samdoyle' (samdoyle)]
http://forums.java.net/jive/thread.jspa?messageID=264125