How to set version to your war in WildFly?

2019-07-12 02:06发布

问题:

In apache I use, projectname#1.9-Test##1.9-TEST to set version my war. What is the equivalent of that in WildFly?

回答1:

Wildfly doesn't have the parallel deployment feature that tomcat has. As far as I know this feature is pretty unique to Tomcat.

There is a feature request in the Wildfly Jira for this: https://issues.jboss.org/browse/WFLY-4701

but IMO it is going to be a long time before we see this. It is much harder to implement this feature in a full app server than it is in a servlet container. Since the app server is responsible for providing core services there is no easy way handle multiple deployments at once. For example, if you have a message in the JMS queue and there are two versions of the .war file listening on the queue, the object may be unable to serialize in one of the deployments and not the other.

The typical way of doing this is to handle session expiration at the load balancer. There is a discussion of this in the JBoss forums: https://developer.jboss.org/thread/236663