Hot deploy Java ear to minimize or eliminate application downtime on the server?

I heard that this is what javarebel does, but is there any other good way to deploy the new version of ear while allowing users to remain active on the previous version? We use JBoss for application servers

Solution

This is not what javarebel does Javarebel (as described) hot replaces classes in memory In the case of an existing connection to the system, this is not acceptable because the updated class may break the logic of the client

Once the company I work for has a similar problem, it solves it like this:

>The smart router is used as a load balancer > the new version has been deployed to 50% of the (New) cluster nodes > the new connections are strictly passed to these updated nodes, and the old nodes are balanced among the old nodes > the old nodes are offline (one by one to keep the number of clients per node within the limit) > at the same time, the new version is deployed to the offline "old" nodes, And start them as new nodes > due to the EJB cluster, sessions and beans are selected by other old nodes > finally (within a few hours), there is only one old node, only one instance of the old version, and all clients using the old version are connected to it > when the last old client is disconnected, the node is too low

Now, I'm not an Internet person, and I can't give you many details (such as what is router hardware, etc.) My understanding can be very simple, but if I remember correctly, we must set up an additional Weblogic domain to deploy the new version of the application (otherwise it will conflict with the old version on the JNDI name)

I hope it will help

PS: ichorus provided a comment that the application is deployed on the client's server Therefore, router skills may not be feasible Now, I only see a feasible solution (it's 21:52, I may have overlooked something:) –

>Develop a new version using the "versioned" JNDI name; For example, if the customer bean is under EJB / customer in version 1, in version 2, it will have a business appearance with a stable basic interface (factory style) in the application under EJB / customer2. When it is required to use the customer bean, it will try to find the highest JNDI name in the Version (of course, it can not be cached for an hour or so every call) This facade can (and should) be deployed as a separate application – and never or rarely updated > now every new client can access the latest deployed application without application conflicts

This approach requires careful planning and testing, but it should work with all due respect

I recently modified some applications in a similar way so that they coexist in the same domain (before they use the same JNDI name for different data sources)

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>