1

Can I set the runtime name of a deployment by configuring a XML file inside .war file?

besides the file name of the .war, is there a way to configure the name and runtime name of a deployment using XML?

ethanxyz_0
  • 713
  • 12
  • 37
  • How do you deploy your application? – James R. Perkins Dec 21 '17 at 16:51
  • Hi @JamesR.Perkins By copying the .war file into deployments directory. The file name changes with app version. Ex: `my-app-1.0.0.war` and later `my-app-1.1.0.war`. I have `jboss-web.xml` and `ejb-jar.xml` to maintain the web context root and ejb jndi name. But the module name, which Wildfly uses for object serialization for example (Infinispan, JMS, etc), remain with module name (the file name == the runtime name). What I want is a xml file (or other thing) to define the runtime name whatever the .war filename is (like jboss-web.xml and ejb-jar.xml) – ethanxyz_0 Dec 22 '17 at 00:01
  • 1
    The only way to change the name and/or runtime name would be to deploy with CLI or the web console. A custom deployment tool could do it too, but there is no XML you can create to do this. – James R. Perkins Dec 23 '17 at 02:57
  • I filled a Feature Request for this: https://issues.jboss.org/browse/WFLY-9640 Hope they accept :) – ethanxyz_0 Dec 23 '17 at 22:53

1 Answers1

-1

You can do it in jboss-web.xml and place that in WEB-INF. Here is sample.

<?xml version="1.0"?> <jboss-web><context-root>Hello</context-root></jboss-web>

Read more here Changing Context Root

sudmong
  • 2,036
  • 13
  • 12
  • Nah.. Not change the web context root (jboss-web.xml) or the EJB module-name (ejb-jar.xml). My question is about the runtime name of the deployment. Wildfly use this property for various proposes, like object serialization inside Infinispan. – ethanxyz_0 Dec 20 '17 at 00:36