public void recover(InputStream in) throws Exception {
ObjectInputStream oistream = new ObjectInputStream(in);
if(!logDirName.equals(oistream.readUTF()))
throw new IOException("log from wrong implementation");
DefaultServiceBeanContext serviceBeanContext = (DefaultServiceBeanContext)oistream.readObject();
ServiceElement sElem = serviceBeanContext.getServiceElement();
ServiceBeanConfig sAttr = sElem.getServiceBeanConfig();
try {
String[] groups = (String[])oistream.readObject();
LookupLocator[] locators = (LookupLocator[])oistream.readObject();
sAttr.setGroups(groups);
sAttr.setLocators(locators);
} catch(Throwable t) {
logger.error("Couldnt get groups or locators", t);
}
sElem.setServiceBeanConfig(sAttr);
serviceBeanContext.setServiceElement(sElem);
restoredContext = serviceBeanContext;
}