You can also edit standalone.xml and provide "system properties" as shown in WildFly System Properties - NovaOrdis Knowledge Base and provide tokens through that. So, you use ENV functions in the procedure code and define the properties in the standalone.xml then hey will resolve to whatever proeprties set. You do not need java class for it.
If not show what u have so far then I can suggest a recommendation.