1. A computer-implemented method for updating a software program, the method comprising: receiving an update request to update a method included in a middleware application, wherein the method is currently loaded in a middleware environment, and wherein the update request identifies a new version of the method and a class file that includes one or more methods including the method being updated; registering the new version of the method, the registering including writing the new version of the method to a heap that is managed by the middleware environment; scheduling an update of the class file for a future time; prior to the scheduled future time, receiving a plurality of requests for the method, wherein each of the requests is received from a corresponding requestor; identifying a routing policy; for each of the received requests: identifying a current connection between the method and the requestor that corresponds to the received request; and determining whether to route the received request to the method or to the new version of the method, wherein the determination of whether to route the received request to the method or to the new version of the method is based on the routing policy and the current connection; in response to the determining, routing one or more of the received requests for the method to the method; in further response to the determining, re-routing the requests not routed to the method to the new version of the method; executing the received requests in response to the routing and the re-routing; and updating the class file at the scheduled future time, wherein the updating further comprises: allocating a request queue; queuing requests received after the updating has commenced to the request queue; replacing the method with the new version of the method; and after the replacing, routing the queued requests to the new version of the method included in the class file.