debug(">ejbCreate()"); dataSource = (String) lookup("java:comp/env/DataSource", java.lang.String.class); debug("DataSource=" + dataSource);  logentryhome = (LogEntryDataLocalHome) lookup("java:comp/env/ejb/LogEntryDataLocal", LogEntryDataLocalHome.class); logconfigurationhome = (LogConfigurationDataLocalHome) lookup("java:comp/env/ejb/LogConfigurationDataLocal", LogConfigurationDataLocalHome.class);
logentryhome = (LogEntryDataLocalHome) getLocator().getLocalHome(LogEntryDataLocalHome.COMP_NAME); logconfigurationhome = (LogConfigurationDataLocalHome) getLocator().getLocalHome(LogConfigurationDataLocalHome.COMP_NAME);
    public void ejbCreate() {        try {            debug(">ejbCreate()");            dataSource = (String) lookup("java:comp/env/DataSource", java.lang.String.class);            debug("DataSource=" + dataSource);            logentryhome = (LogEntryDataLocalHome) lookup("java:comp/env/ejb/LogEntryDataLocal", LogEntryDataLocalHome.class);            logconfigurationhome = (LogConfigurationDataLocalHome) lookup("java:comp/env/ejb/LogConfigurationDataLocal", LogConfigurationDataLocalHome.class);            // Setup Connection to signing devices.            logdevices = new ArrayList();            // Get configuration of log device classes from ejb-jar.xml            String factoryclassesstring = (String) lookup("java:comp/env/logDeviceFactories", java.lang.String.class);            String propertyfilesstring = (String) lookup("java:comp/env/logDevicePropertyFiles", java.lang.String.class);            String[] factoryclasses = factoryclassesstring.split(";");            String[] propertyfiles = propertyfilesstring.split(";");            Properties[] properties = new Properties[propertyfiles.length];            for (int i = 0; i < propertyfiles.length; i++) {                properties[i] = new Properties();                if (!(propertyfiles[i] == null || propertyfiles[i].trim().equals("")))                    properties[i].load(this.getClass().getResourceAsStream("/logdeviceproperties/" + propertyfiles[i].trim()));            }            for (int i = 0; i < factoryclasses.length; i++) {                Class implClass = Class.forName(factoryclasses[i].trim());                Object fact = implClass.newInstance();                Class[] paramTypes = new Class[1];                paramTypes[0] = properties[0].getClass();                Method method = implClass.getMethod("makeInstance", paramTypes);                Object[] params = new Object[1];                if (i < properties.length)                    params[0] = properties[i];                else                    params[0] = new Properties();                logdevices.add((ILogDevice) method.invoke(fact, params));            }            debug("<ejbCreate()");        } catch (Exception e) {            throw new EJBException(e);        }    }