ConfigurationContext configurationContext = null;
try {
DeploymentEngine deploymentEngine =
new DeploymentEngine(repositoryName);
AxisConfiguration configuration = deploymentEngine.load();
PhaseResolver phaseResolver = new PhaseResolver(configuration);
Parameter parameter = configuration.getParameter("seralizeLocation");
String serailzeLocaion = ".";
if (parameter !=null) {
serailzeLocaion = ((String)parameter.getValue()).trim();
}
File objFile = new File(serailzeLocaion,"Axis2.obj");
if(objFile.exists()){
try {
FileInputStream filein = new FileInputStream(objFile);
ObjectInputStream in = new ObjectInputStream(filein);
Object obj = in.readObject();
if(obj instanceof ConfigurationContext){
configurationContext = (ConfigurationContext)obj;
configurationContext.init(configuration);
}
} catch (IOException e) {
log.info(e.getMessage());
} catch (ClassNotFoundException e) {
log.info(e.getMessage());
}
}
if(configurationContext == null){
configurationContext = new ConfigurationContext(configuration);
}
// configurationContext = new ConfigurationContext(configuration);
phaseResolver.buildTranspotsChains();
initModules(configurationContext);
initTransports(configurationContext);
} catch (AxisFault axisFault) {
throw new DeploymentException(axisFault);
}