public class Run implements Runnable {
public void run() {
try {
for (int i = 0; i < 4; ++i) {
Address address = new Address();
Phone phone = new Phone();
address.setStreetNum(var++);
address.setStreetName("2");
address.setCity("3");
address.setState(StateType.TX);
address.setZip(var++);
phone.setAreaCode(11);
phone.setExchange("22");
phone.setNumber("33");
address.setPhoneNumber(phone);
binding.addEntry("hi", address);
Address addressRet = binding.getAddressFromName("hi");
}
} catch (Throwable t) {
// There are bound to be connection refused exceptions when the
// server socket is busy) in a multithreaded environment. I
// don't want to deal with those. Only grab exceptions that are