/** * Creates a new UUID.<p> * * Please note that the static init() method has to be called first to initialize the * internet address of the machine.<p> */ public CmsUUID() { if (m_ethernetAddress == null) { // if no ethernet address is available, generate a dummy // this is required because otherwise we can't ever de-serialize a CmsUUID outside of OpenCms, // since the empty constructor is called when the de-serialization takes place init(CmsStringUtil.getEthernetAddress()); } m_uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(m_ethernetAddress); }
/** * Creates a new UUID.<p> * * Please note that the static init() method has to be called first to initialize the * internet address of the machine.<p> */ public CmsUUID() { if (m_ethernetAddress == null) { // if no ethernet address is available, generate a dummy // this is required because otherwise we can't ever de-serialize a CmsUUID outside of OpenCms, // since the empty constructor is called when the de-serialization takes place init(getDummyEthernetAddress()); } m_uuid = UUIDGenerator.getInstance().generateTimeBasedUUID(m_ethernetAddress); }
/** * Initializes the Update Manager object with the updateBean to get the database connection.<p> * * @param updateBean the update bean with the database connection * * @throws Exception if the setup bean is not initialized */ public void initialize(CmsUpdateBean updateBean) throws Exception { if (updateBean.isInitialized()) { CmsParameterConfiguration props = updateBean.getProperties(); // Initialize the CmsUUID generator. CmsUUID.init(props.get("server.ethernet.address")); m_dbName = props.get("db.name"); List<String> pools = CmsStringUtil.splitAsList(props.get("db.pools"), ','); for (String pool : pools) { Map<String, String> data = new HashMap<String, String>(); data.put("driver", props.get("db.pool." + pool + ".jdbcDriver")); data.put("url", props.get("db.pool." + pool + ".jdbcUrl")); data.put("params", props.get("db.pool." + pool + ".jdbcUrl.params")); data.put("user", props.get("db.pool." + pool + ".user")); data.put("pwd", props.get("db.pool." + pool + ".password")); data.put("keepHistory", String.valueOf(updateBean.isKeepHistory())); m_dbPools.put(pool, data); } } else { throw new Exception("setup bean not initialized"); } }
CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_ETHERNET_ADDRESS_1, ethernetAddress)); CmsUUID.init(ethernetAddress);
CmsLog.INIT.info(Messages.get().getBundle().key(Messages.INIT_ETHERNET_ADDRESS_1, ethernetAddress)); CmsUUID.init(ethernetAddress);