b02b066d5c602cd4edeabce99b538d68a0ab06fc
[cdmlib.git] / cdmlib-persistence / src / test / java / eu / etaxonomy / cdm / test / function / TestSessionFactory.java
1 package eu.etaxonomy.cdm.test.function;
2
3
4 import org.apache.log4j.Logger;
5 import org.springframework.context.support.ClassPathXmlApplicationContext;
6 import org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean;
7
8
9
10
11 public class TestSessionFactory {
12 private static final Logger logger = Logger.getLogger(TestSessionFactory.class);
13
14
15
16
17 private boolean testFromApplication(){
18 String appContextString = "applicationContext-test.xml";
19 ClassPathXmlApplicationContext appContext = new ClassPathXmlApplicationContext(appContextString);
20 appContext.close();
21 return true;
22 }
23
24
25
26 private void test(){
27 System.out.println("Start Datasource");
28 testFromApplication();
29 System.out.println("\nEnd Datasource");
30 }
31
32 /**
33 * @param args
34 */
35 public static void main(String[] args) {
36 TestSessionFactory cc = new TestSessionFactory();
37 cc.test();
38 }
39
40 }