You will have to use SUN-ONE-EE to develop EJB applications (the timeout is more generous than stated, but it cost a bit the day you need to buy it).
On sun's home page for SUN-ONE-EE you will find references to add on modules, one of them are for integration with JBoss.
Check the netbeans website. I remember a plugin developed by a company called SipTech that integrated jboss and NB. This should run inside Sun ONE too.
Over the weekend I remember where I saw the article. It is in the free-for-all on-line HTML. Chapter 14:
Integrating NetBeans / Forte for Java Community Edition.
I printed it and I am in the process of making it work. It is very straight forward. Basically you create a project and then you bring the JBoss jars that you want to include (base+security+JMS-etc)into your file system. Then you add your own development.