@Override public void init(final Properties props) throws Exception { if (props == null) return; final String format = props.getProperty(WS_ADDRESS_FORMAT); if (format != null) { this.wsAddressTemplate = new StringTemplate(format); } realmName = props.getProperty("realmName"); transportGuarantee = props.getProperty("transportGuarantee"); authMethod = props.getProperty("authMethod"); virtualHost = props.getProperty("virtualHost", "localhost"); }
public void init(Properties props) throws Exception { if (props == null) return; String format = props.getProperty(WS_ADDRESS_FORMAT); if (format != null) { this.wsAddressTemplate = new StringTemplate(format); } realmName = props.getProperty("realmName"); transportGuarantee = props.getProperty("transportGuarantee"); authMethod = props.getProperty("authMethod"); virtualHost = props.getProperty("virtualHost"); }
@Override public void init(final Properties props) throws Exception { if (props == null) return; final String format = props.getProperty(WS_ADDRESS_FORMAT); if (format != null) { this.wsAddressTemplate = new StringTemplate(format); } realmName = props.getProperty("realmName"); transportGuarantee = props.getProperty("transportGuarantee"); authMethod = props.getProperty("authMethod"); virtualHost = props.getProperty("virtualHost", "localhost"); }
public WsService() { String format = SystemInstance.get().getProperty(WS_ADDRESS_FORMAT, "/{ejbDeploymentId}"); this.wsAddressTemplate = new StringTemplate(format); }
public InitEjbDeployments() { String format = SystemInstance.get().getOptions().get(DEPLOYMENT_ID_FORMAT, "{ejbName}"); this.deploymentIdTemplate = new StringTemplate(format); }
public void begin(DeploymentInfo deploymentInfo) { this.deploymentInfo = deploymentInfo; EnterpriseBeanInfo beanInfo = beanInfos.get(deploymentInfo.getDeploymentID()); templates = new HashMap<String, StringTemplate>(); templates.put("", template); for (JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) intrface = ""; templates.put(intrface, new StringTemplate(nameInfo.name)); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); beanContext = new HashMap<String, String>(appContext); putAll(beanContext, deploymentInfo.getProperties()); beanContext.put("moduleId", deploymentInfo.getModuleID()); beanContext.put("ejbType", deploymentInfo.getComponentType().name()); beanContext.put("ejbClass", deploymentInfo.getBeanClass().getName()); beanContext.put("ejbClass.simpleName", deploymentInfo.getBeanClass().getSimpleName()); beanContext.put("ejbClass.packageName", packageName(deploymentInfo.getBeanClass())); beanContext.put("ejbName", deploymentInfo.getEjbName()); beanContext.put("deploymentId", deploymentInfo.getDeploymentID().toString()); }
public InitEjbDeployments() { final String format = SystemInstance.get().getOptions().get(DEPLOYMENT_ID_FORMAT, "{ejbName}"); this.deploymentIdTemplate = new StringTemplate(format); }
public InitEjbDeployments() { final String format = SystemInstance.get().getOptions().get(DEPLOYMENT_ID_FORMAT, "{ejbName}"); this.deploymentIdTemplate = new StringTemplate(format); }
public WsService() { final String format = SystemInstance.get().getOptions().get(WS_ADDRESS_FORMAT, "/{ejbDeploymentId}"); this.wsAddressTemplate = new StringTemplate(format); }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }
public WsService() { final String format = SystemInstance.get().getOptions().get(WS_ADDRESS_FORMAT, "/{ejbDeploymentId}"); this.wsAddressTemplate = new StringTemplate(format); }
public void begin(final BeanContext bean) { this.bean = bean; final EnterpriseBeanInfo beanInfo = beanInfos.get(bean.getDeploymentID()); templates = new HashMap<String, Map<String, StringTemplate>>(); templates.put("", addTemplate(null, DEFAULT_NAME_KEY, template)); for (final JndiNameInfo nameInfo : beanInfo.jndiNamess) { String intrface = nameInfo.intrface; if (intrface == null) { intrface = ""; } templates.put(intrface, addTemplate(templates.get(intrface), getType(nameInfo.name), new StringTemplate(nameInfo.name))); } beanInfo.jndiNames.clear(); beanInfo.jndiNamess.clear(); this.beanContext = new HashMap<String, String>(appContext); putAll(this.beanContext, bean.getProperties()); this.beanContext.put("ejbType", bean.getComponentType().name()); this.beanContext.put("ejbClass", bean.getBeanClass().getName()); this.beanContext.put("ejbClass.simpleName", bean.getBeanClass().getSimpleName()); this.beanContext.put("ejbClass.packageName", packageName(bean.getBeanClass())); this.beanContext.put("ejbName", bean.getEjbName()); this.beanContext.put("deploymentId", bean.getDeploymentID().toString()); }
public TemplatedStrategy(EjbJarInfo ejbJarInfo, Map<String, DeploymentInfo> deployments) { Options options = new Options(ejbJarInfo.properties, SystemInstance.get().getOptions()); format = options.get(JNDINAME_FORMAT, "{deploymentId}{interfaceType.annotationName}"); { // illegal format check int index = format.indexOf(":"); if (index > -1) { logger.error("Illegal " + JNDINAME_FORMAT + " contains a colon ':'. Everything before the colon will be removed, '" + format + "' "); format = format.substring(index + 1); } } this.template = new StringTemplate(format); beanInfos = new HashMap<String, EnterpriseBeanInfo>(); for (EnterpriseBeanInfo beanInfo : ejbJarInfo.enterpriseBeans) { beanInfos.put(beanInfo.ejbDeploymentId, beanInfo); } appContext = new HashMap<String, String>(); putAll(appContext, SystemInstance.get().getProperties()); putAll(appContext, ejbJarInfo.properties); }
public void init(Properties props) throws Exception { String formatString = props.getProperty("discovery"); if (formatString != null){ discoveryUriFormat = new StringTemplate(formatString); } ip = props.getProperty("bind"); address = getAddress(ip); Options options = new Options(props); port = options.get("port", 0); int threads = options.get("threads", 100); backlog = options.get("backlog", threads); secure = options.get("secure", false); timeout = 1000; next.init(props); }
String format = ejbJar.properties.getProperty(WS_ADDRESS_FORMAT); logger.info("Using "+ WS_ADDRESS_FORMAT +" '"+format+"'"); deploymentIdTemplate = new StringTemplate(format);
@Override public void init(final Properties props) throws Exception { this.props = props; final String formatString = props.getProperty("discovery"); if (formatString != null) { this.discoveryUriFormat = new StringTemplate(formatString); } this.ip = PropertyPlaceHolderHelper.simpleValue(props.getProperty("bind")); this.inetAddress = getAddress(this.ip); final Options options = new Options(props); this.port = Integer.parseInt(PropertyPlaceHolderHelper.simpleValue(options.get("port", "0"))); final int threads = options.get("threads", 100); this.backlog = options.get("backlog", threads); this.secure = options.get("secure", false); this.timeout = options.get("timeout", this.timeout); this.enabledCipherSuites = options.get("enabledCipherSuites", "SSL_DH_anon_WITH_RC4_128_MD5").split(","); this.next.init(props); }
public TemplatedStrategy(final EjbJarInfo ejbJarInfo, final Map<String, BeanContext> deployments) { final Options options = new Options(ejbJarInfo.properties, SystemInstance.get().getOptions()); format = options.get(JNDINAME_FORMAT, "{deploymentId}{interfaceType.annotationName}"); { // illegal format check final int index = format.indexOf(":"); if (index > -1) { logger.error("Illegal " + JNDINAME_FORMAT + " contains a colon ':'. Everything before the colon will be removed, '" + format + "' "); format = format.substring(index + 1); } } this.template = new StringTemplate(format); beanInfos = new HashMap<String, EnterpriseBeanInfo>(); for (final EnterpriseBeanInfo beanInfo : ejbJarInfo.enterpriseBeans) { beanInfos.put(beanInfo.ejbDeploymentId, beanInfo); } final Iterator<BeanContext> it = deployments.values().iterator(); if (!it.hasNext()) { return; } // TODO we should just pass in the ModuleContext final ModuleContext moduleContext = it.next().getModuleContext(); appContext = new HashMap<String, String>(); putAll(appContext, SystemInstance.get().getProperties()); putAll(appContext, moduleContext.getAppContext().getProperties()); putAll(appContext, moduleContext.getProperties()); appContext.put("appName", moduleContext.getAppContext().getId()); appContext.put("appId", moduleContext.getAppContext().getId()); appContext.put("moduleName", moduleContext.getId()); appContext.put("moduleId", moduleContext.getId()); }
public TemplatedStrategy(final EjbJarInfo ejbJarInfo, final Map<String, BeanContext> deployments) { final Options options = new Options(ejbJarInfo.properties, SystemInstance.get().getOptions()); format = options.get(JNDINAME_FORMAT, "{deploymentId}{interfaceType.annotationName}"); { // illegal format check final int index = format.indexOf(":"); if (index > -1) { logger.error("Illegal " + JNDINAME_FORMAT + " contains a colon ':'. Everything before the colon will be removed, '" + format + "' "); format = format.substring(index + 1); } } this.template = new StringTemplate(format); beanInfos = new HashMap<String, EnterpriseBeanInfo>(); for (final EnterpriseBeanInfo beanInfo : ejbJarInfo.enterpriseBeans) { beanInfos.put(beanInfo.ejbDeploymentId, beanInfo); } final Iterator<BeanContext> it = deployments.values().iterator(); if (!it.hasNext()) { return; } // TODO we should just pass in the ModuleContext final ModuleContext moduleContext = it.next().getModuleContext(); appContext = new HashMap<String, String>(); putAll(appContext, SystemInstance.get().getProperties()); putAll(appContext, moduleContext.getAppContext().getProperties()); putAll(appContext, moduleContext.getProperties()); appContext.put("appName", moduleContext.getAppContext().getId()); appContext.put("appId", moduleContext.getAppContext().getId()); appContext.put("moduleName", moduleContext.getId()); appContext.put("moduleId", moduleContext.getId()); }
final String format = openejbJar.getProperties().getProperty(DEPLOYMENT_ID_FORMAT); logger.info("Using " + DEPLOYMENT_ID_FORMAT + " '" + format + "'"); deploymentIdTemplate = new StringTemplate(format); template = new StringTemplate(annotation.id()); ejbDeployment.setDeploymentId(formatDeploymentId(bean, contextData, template)); } else { } else if (ejbDeployment.getDeploymentId() == null) { if (annotation != null && isDefined(annotation.id())) { template = new StringTemplate(annotation.id()); ejbDeployment.setDeploymentId(formatDeploymentId(bean, contextData, template)); } else {
String format = openejbJar.getProperties().getProperty(DEPLOYMENT_ID_FORMAT); logger.info("Using " + DEPLOYMENT_ID_FORMAT + " '" + format + "'"); deploymentIdTemplate = new StringTemplate(format); template = new StringTemplate(annotation.id()); ejbDeployment.setDeploymentId(formatDeploymentId(bean, contextData, template)); } else { } else if (ejbDeployment.getDeploymentId() == null) { if (annotation != null && isDefined(annotation.id())) { template = new StringTemplate(annotation.id()); ejbDeployment.setDeploymentId(formatDeploymentId(bean, contextData, template)); } else {