In JBoss 7.1.X you can get the EAR name using JNDI Lookup like this:
String earName = new InitialContext().lookup("java:app/AppName")
Reply to this message by going to Community
Start a new discussion in EJB3 at Community