use of org.apache.openejb.ClusteredRPCContainer in project tomee by apache.
the class BasicClusterableRequestHandler method updateServer.
@Override
public void updateServer(final BeanContext beanContext, final ClusterableRequest req, final ClusterableResponse res) {
final Container container = beanContext.getContainer();
if (container instanceof ClusteredRPCContainer) {
final ClusteredRPCContainer clusteredContainer = (ClusteredRPCContainer) container;
final URI[] locations = clusteredContainer.getLocations(beanContext);
if (null != locations) {
final ServerMetaData server = new ServerMetaData(locations);
if (req.getServerHash() != server.buildHash()) {
res.setServer(server);
}
}
}
}
Aggregations