I don't believe there is any such mechanism because JBoss itself doesn't care whether you are running in production or not. It's up to you what you consider as production. So what would perhaps work better is if you have a system property your application looks for "-Dmy.application.is.live=true" for example. You set this on startup of the JVM and have your application check it. When you use this in test, set it to false.
Live and backup is naming convention for HornetQ. Are you referring to HornetQ cluster? If yes then there is a way to detect using CLI.