use of org.jboss.ejb.client.EJBClientConfiguration in project eap-additional-testsuite by jboss-set.
the class EJBClientContextSelector method setup.
public static ContextSelector<EJBClientContext> setup(String file, Properties propertiesToReplace) throws IOException {
// setUp the selector
final InputStream inputStream = EJBClientContextSelector.class.getClassLoader().getResourceAsStream(file);
if (inputStream == null) {
throw new IllegalStateException("Could not find " + file + " in classpath");
}
final Properties properties = new Properties();
properties.load(inputStream);
// add or replace properties passed from file
if (propertiesToReplace != null) {
for (Object key : propertiesToReplace.keySet()) {
properties.put(key, propertiesToReplace.get(key));
}
}
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(properties);
final ConfigBasedEJBClientContextSelector selector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
return EJBClientContext.setSelector(selector);
}
use of org.jboss.ejb.client.EJBClientConfiguration in project eap-additional-testsuite by jboss-set.
the class EJBClientContextSelector method setup.
public static ContextSelector<EJBClientContext> setup(String file, Properties propertiesToReplace) throws IOException {
// setUp the selector
final InputStream inputStream = EJBClientContextSelector.class.getClassLoader().getResourceAsStream(file);
if (inputStream == null) {
throw new IllegalStateException("Could not find " + file + " in classpath");
}
final Properties properties = new Properties();
properties.load(inputStream);
// add or replace properties passed from file
if (propertiesToReplace != null) {
for (Object key : propertiesToReplace.keySet()) {
properties.put(key, propertiesToReplace.get(key));
}
}
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(properties);
final ConfigBasedEJBClientContextSelector selector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
return EJBClientContext.setSelector(selector);
}
use of org.jboss.ejb.client.EJBClientConfiguration in project eap-additional-testsuite by jboss-set.
the class EJBClientContextSelector method setup.
public static ContextSelector<EJBClientContext> setup(String file, Properties propertiesToReplace) throws IOException {
// setUp the selector
final InputStream inputStream = EJBClientContextSelector.class.getClassLoader().getResourceAsStream(file);
if (inputStream == null) {
throw new IllegalStateException("Could not find " + file + " in classpath");
}
final Properties properties = new Properties();
properties.load(inputStream);
// add or replace properties passed from file
if (propertiesToReplace != null) {
for (Object key : propertiesToReplace.keySet()) {
properties.put(key, propertiesToReplace.get(key));
}
}
final EJBClientConfiguration ejbClientConfiguration = new PropertiesBasedEJBClientConfiguration(properties);
final ConfigBasedEJBClientContextSelector selector = new ConfigBasedEJBClientContextSelector(ejbClientConfiguration);
return EJBClientContext.setSelector(selector);
}
Aggregations