Xcode isn't as good of a development environment for Java as the commercial IDEs, and is only available on OS X 10.3. But, Xcode comes with great support for JBoss and can be the fastest solution for getting a J2EE application up and started.
Xcode can be installed from the 10.3 developer CD. To make use of the of the J2EE components (JBoss, Ant, and XDoclet), you will need to do a custom install and select the J2EE application server components.
To create a J2EE project in Xcode, launch Xcode and select "New Project..." from the "File" menu. You should see three J2EE project types: EJB Module, Web Module and Enterprise Module. These are for creating an EJB jar, WAR file and EAR file project, respectively. For a typical web frontend with EJB backend, use Enterprise Module.
To build and deploy your web appliction, use the "Build and Run" button. This deploys your application to the JBoss application /Library/JBoss/3.2/server/default/deploy, but it will not run JBoss automatically.
To start JBoss run /Library/JBoss/3.2/bin/run.sh from the Terminal window.