I would say that if you really need the name of the EAR file, then you do something wrong, either the way you package your application, or how you refer to modules. When running JBoss 7.x there should really be no reason for needing the EAR name since you can use CDI to inject resources, you hardly need to know about JNDI at all. With earlier version of JBoss there is a different story but my point is that if you find yourself needing the name of the EAR file, then you should rethink your solution.
I have remote communication betwen client (on tomcat) to jboss and jboss to jboss, so I don't see easy way to resolve this.
In previous Jboss versions with RemoteBinding it was very easy, also in weblogic there is simple way with mappedName in Stateless annotation.
Mayby request https://issues.jboss.org/browse/EJBTHREE-648 will be realized ?
In JBoss 7.1.X you can get the EAR name using JNDI Lookup like this:
String earName = new InitialContext().lookup("java:app/AppName")
or if only global Context is available:
new InitialContext().list("java:global/").next().getName()