My application needs some initialization stuff to be executed right after deployment. Where should I place this code? It will be great if it's possible to place this code in some bean.
Which version of JBoss and which version of EJB? See if the JBoss specific @Service helps http://docs.jboss.org/ejb3/app-server/reference/build/reference/en/html/jboss_extensions.html