first of all.
If you a re using ejb3 then by fdefault jboss4.0.1 is not EJB3 compatible.
You need to install EJB3 on jboss4.0.1
jboss5.0.x is J2EE5 server (meaning EJB3 compatible) that's why you could see it there by default.
In order to install eJB3 on jboss4.0.1 you should download it from
http://sourceforge.net/project/showfiles.php?group_id=22866&package_id=132063and follow instructions on
http://www.jboss.org/jbossejb3