Some time ago I annonced that I wrote a J2EE resource-adapter for XMPP using smack. This allows you to use XMPP connections efficiently from within a J2EE server.
I have now produced a so called deployer for the JBoss application server which makes it very easy to write and run agents which communicate using XMPP on a JBoss server. I am using this at Stockholm university as a basis for an ESB - Enterprise Service Bus - which uses XMPP as the messaging framework. We are using this system to solve a variety of problems ranging from simple CTI to meta-directory applications and command and control for key IT infrastructure.
Website is here: http://devel.it.su.se/pub/jsp/polopoly.jsp?d=1227