예제 #1
0
 @Override
 public void setUp() throws Exception {
   super.setUp();
   defaultFactory = System.getProperty(Context.INITIAL_CONTEXT_FACTORY);
   System.setProperty(
       Context.INITIAL_CONTEXT_FACTORY, "org.crsh.shell.factory.JPAInitialContextFactory");
 }
예제 #2
0
 @Override
 protected void tearDown() throws Exception {
   super.tearDown();
   if (defaultFactory == null) {
     System.clearProperty(Context.INITIAL_CONTEXT_FACTORY);
   } else {
     System.setProperty(Context.INITIAL_CONTEXT_FACTORY, defaultFactory);
   }
 }