log.info("Registering phone plugin as a component");
Log.info("Registering phone plugin as a component");
    public void init() {        log.info("Initializing Asterisk-IM Plugin");        try {            log.info("Initializing Hibernate for Asterisk-IM");            HibernateUtil.init();            // Attempts to setup the database if it hasn't been done already            log.info("Checking to see if Asterisk-IM database schema is present");            List<Exception> exceptions = null;            if(!HibernateUtil.tablesExist()) {                log.info("Installing Asterisk-IM database schema");                exceptions = HibernateUtil.initDB();            }            else {                // Try updating the database                log.info("Ensuring Asterisk-IM schema is up to date");                exceptions = HibernateUtil.updateDB();            }            if(exceptions != null && exceptions.size() > 0 ) {                log.warning("Asterisk-IM table contains errors exited with error, database may not behave properly");                for (Exception e : exceptions) {                    Log.warn("Asterisk-IM table creation --> "+e.getMessage(), e);                }            }            log.info("Initializing Asterisk-IM thread Pool");            ThreadPool.init(); //initialize the thread pols            initAsteriskManager();        } catch (RuntimeException e) {            // Make sure we catch all exceptions show we can log anything that might be            // going on            log.log(Level.SEVERE, e.getMessage(), e);            throw e;        }        // only register the component if we are enabled        if(JiveGlobals.getBooleanProperty(Properties.ENABLED, false)) {            try {                log.info("Registering phone plugin as a component");                ComponentManagerFactory.getComponentManager().addComponent(NAME, this);            }            catch (ComponentException e) {                log.log(Level.SEVERE, e.getMessage(), e);                // Do nothing. Should never happen.                ComponentManagerFactory.getComponentManager().getLog().error(e);            }        }    }