/** * 获取自动启动的bundle标识集合. * * @return bundle的标识名集合 */ public String[] getAutoStartBundleSymbolicNames() { String val = ""; try { val = StringUtil.trim(properties.get("repository.autostart.bundles")); } catch (IllegalAccessException e) { } if (val.equals("")) { return new String[] { "org.springframework.osgi.core", "org.springframework.osgi.extender", "org.springframework.osgi.io", "org.springframework.osgi.web", "org.springframework.core", "org.springframework.beans", "org.springframework.context", "org.springframework.aop", "org.springframework.aspects", "org.springframework.jdbc", "org.springframework.orm", "org.springframework.oxm", "org.springframework.transaction", "org.springframework.web.servlet", "com.lc.sofa.container.web", "com.lc.sofa.container.org.eclipse.equinox.http.servlet" }; } return val.split(","); }
/** * 当组件库中存在多个相同组件(组件标识和版本相同)时是否抛出异常。 * * @return true 抛出异常并放弃本组件的加载;取值为false时不抛出异常并取更新时间最新的组件加载。 */ public boolean isThrowExceptionByDupbundle() { String val = ""; try { val = StringUtil.trim(properties.get("repository.dupbundle.throwexception")); } catch (IllegalAccessException e) { } return val.equals("") || val.equals("false") ? false : true; }
/** * 当记录组件状态时排除掉不被记录的组件类型(如第三方组件) * * @return 组件库目录集 */ public String[] getNoRememberBundleStateType() { String val = ""; try { val = StringUtil.trim(properties.get("repository.remember.bundle.state.noinclude")); } catch (IllegalAccessException e) { } if (val.equals("")) { return new String[] {"3rd"}; } return val.split(","); }
/** * 组件库启动顺序 * * @return 按启动顺序排列的目录集合 */ public String getRepositoryByStartOrder() { String val = ""; try { val = StringUtil.trim(properties.get("repository.start.order")); } catch (IllegalAccessException e) { } if (val.equals("")) { val = "3rd,kernel/ext,sofa,acs,stage"; } return val; }
/** * 返回组件分类和组件库的映射配置串 * * @return 组件分类1:组件库1,组件分类2:组件库, 组件分类3:组件库 */ public String getRepositoryBundleCategoryMapperStr() { String val = ""; try { val = StringUtil.trim(properties.get("repository.bundle.category.mapper")); } catch (IllegalAccessException e) { } if (val.equals("")) { // 默认值 val = "sofa:sofa,acs:acs,others:3rd/upload"; } return val; }