Commit a3bfc771 authored by Tigran Mkrtchyan's avatar Tigran Mkrtchyan
Browse files

rpc: switch to 3.0.2 version of spring

moved from BeanFactory to ApplicationContext
parent 2e941e22
......@@ -204,8 +204,8 @@
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring</artifactId>
<version>2.5.6</version>
<artifactId>spring-context</artifactId>
<version>3.0.2.RELEASE</version>
</dependency>
<dependency>
<groupId>junit</groupId>
......
......@@ -19,9 +19,8 @@ package org.dcache.xdr;
import java.io.FileNotFoundException;
import java.io.IOException;
import org.springframework.beans.factory.BeanFactory;
import org.springframework.beans.factory.xml.XmlBeanFactory;
import org.springframework.core.io.FileSystemResource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.FileSystemXmlApplicationContext;
public class SpringRunner {
......@@ -34,8 +33,9 @@ public class SpringRunner {
System.err.println("Usage: SpringRunner <config>");
System.exit(1);
}
BeanFactory factory = new XmlBeanFactory(new FileSystemResource(args[0]));
OncRpcSvc service = (OncRpcSvc)factory.getBean("oncrpcsvc");
ApplicationContext context = new FileSystemXmlApplicationContext(args[0]);
OncRpcSvc service = (OncRpcSvc)context.getBean("oncrpcsvc");
service.start();
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment