Advertisement
Guest User

Untitled

a guest
Apr 4th, 2011
126
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.52 KB | None | 0 0
  1. public String myWSMethod() throws FileNotFoundException , IOException {
  2.         SqlSessionFactory sqlSessionFactory = null;
  3.             String resource = "ibatis-config.xml";
  4.             Reader reader = Resources.getResourceAsReader(resource);
  5.  
  6.             if (sqlSessionFactory == null) {
  7.                 sqlSessionFactory = new SqlSessionFactoryBuilder()
  8.                         .build(reader);
  9.             }
  10.            
  11.             SqlSession session = sqlSessionFactory.openSession();
  12.             OneMapper miQuery = session
  13.                     .getMapper(OneMapper.class);
  14.             miQuery.miMetodo("aaaB);
  15.        
  16.         return "OKEY";
  17.     }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement