To deploy EJBs you have to put them into a JAR file where the deployment descriptors are in the META-INF
directory. The JAR file can then be bundled with WAR files into an EAR file (Enterprise ARchive).
Then the JAR/EAR file must be copied into the DEPLOY directory where it is deployed at runtime. By default the DEPLOY directory is in "/jboss/deploy".
To build your application with ANT you have to write your own ANT build.xml file.
Please check the JBoss online documentation about further informations.
Have fun - Andy