I do not think your custom module "com.app.configuration" related classes should be dependent on the "org.jboss.naming.ExternalContext" class as that is not provided by JBoss AS7.
The class "org.jboss.naming.ExternalContext" used to be provided by older version of JBoss like in JBoss 4/5 it was there inside the $JBOSS_HOME/jboss-as/common/lib/jboss.jar
Yes, I am migrating from JBoss AS 4.2.2 GA. So what is the solution to do it in JBoss 7?
Migration from 4.2.2 to JBossAS7 is a big migration.
Your custom codes may require some major changes. I would suggest you to go through JBossAS7 documentation to know how you can create your own custom modules in JBossAS7 and change your code accordingly.