@BeforeClass
    public static void setupForClass() {
        Properties openejbProp = new Properties();

        InputStream in = OpenEjbTestFixture.class.getClassLoader().getResourceAsStream("openejb.properties");
        if (in != null) {
            try {
                openejbProp.load(in);
                System.out.println("Got extra open ejb properties: " + openejbProp);
                in.close();
            } catch (Exception e) {
                e.printStackTrace();
            }
        }

        System.setProperty(Context.INITIAL_CONTEXT_FACTORY,
                "org.apache.openejb.client.LocalInitialContextFactory");
        Properties p = new Properties();
        //This can make sure the persistence.xml from other dependent module will not be put into ear file.
        //This can make sure for each persistence unit, there is only one matcher.
        p.put("openejb.deployments.classpath.ear", "false");
        p.put("openejb.nobanner", "false");
        p.put("openejb.embedded.initialcontext.close", "DESTROY");
        p.putAll(openejbProp);
        String target = System.getProperties().getProperty("openejbtargetdb");
        String optionalUrl = System.getProperties().getProperty("wong.test.jdbc.url");
        if (target != null) {
            if (target.equalsIgnoreCase("mysql")) {
                targetDb = DatabaseType.MYSQL;
            } else if (target.equalsIgnoreCase("hsqldb")) {
                targetDb = DatabaseType.HSQLDB;
            } else {
                throw new UnsupportedOperationException("not support now");
            }
        }

        p.putAll(preparePersistenceProperties(targetDb, optionalUrl));
        // enable logs for open ejb and hibernate
        p.putAll(disableOpenejbAndHibernateLog());
        try {
            context = new InitialContext(p);
            String deploymentId = p.getProperty("openejb.deploymentId.format");
            if (deploymentId != null && "{moduleId}/{ejbName}".equals(deploymentId)) {
                helpBean = (TransactionHelp) context.lookup("classes/" + TransactionHelpSlsb.class.getSimpleName()
                        + JNDI_POSTFIX);

            } else {
                helpBean = (TransactionHelp) context.lookup(TransactionHelpSlsb.class.getSimpleName() + JNDI_POSTFIX);
            }
        } catch (NamingException e) {
            e.printStackTrace();
            fail();
        }

    }