You can do it by slimming the jboss instance, not only removing the port configuration. When service using these ports removed, the ports configuration is removed accordingly. More detail about slimming please see http://community.jboss.org/wiki/JBossASTuningSliming