@Before
  public void setUp() throws Exception {
    Locale.setDefault(Locale.US);
    TimeZone.setDefault(TimeZone.getTimeZone("UTC"));
    // enforce binary compatibility for the xml-files so that comparing them can be faster.

    ClassicEngineBoot.getInstance().start();
    if (NamingManager.hasInitialContextFactoryBuilder() == false) {
      NamingManager.setInitialContextFactoryBuilder(new DebugJndiContextFactoryBuilder());
    }

    localFontRegistry = new LocalFontRegistry();
    localFontRegistry.initialize();
  }
예제 #2
0
  protected void setUp() throws Exception {
    super.setUp();

    if (!NamingManager.hasInitialContextFactoryBuilder()) {
      NamingManager.setInitialContextFactoryBuilder(
          new InitialContextFactoryBuilder() {
            public InitialContextFactory createInitialContextFactory(Hashtable<?, ?> environment)
                throws NamingException {
              return new InitialContextFactory() {
                public Context getInitialContext(Hashtable<?, ?> environment)
                    throws NamingException {
                  return THREAD_INITIAL_CONTEXT.get();
                }
              };
            }
          });
    }
  }
 public void setUp() throws Exception {
   ClassicEngineBoot.getInstance().start();
   if (NamingManager.hasInitialContextFactoryBuilder() == false) {
     NamingManager.setInitialContextFactoryBuilder(new DebugJndiContextFactoryBuilder());
   }
 }