use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class OracleTransactionalStorage method configure.
public void configure() throws ConfigurationException {
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
String msg = "Class OracleTransactionalStorage is no longer maintained. Please replace with JdbcTransactionalStorage";
configWarnings.add(log, msg);
super.configure();
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class LdapChallengePipe method configure.
public void configure() throws ConfigurationException {
super.configure();
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
configWarnings.add(log, "LdapChallengePipe is deprecated, please use LdapSender with operation challenge and check for returned message <LdapResult>Success</LdapResult>");
if (StringUtils.isEmpty(ldapProviderURL) && getParameterList().findParameter("ldapProviderURL") == null) {
throw new ConfigurationException("ldapProviderURL must be specified, either as attribute or as parameter");
}
if (StringUtils.isNotEmpty(ldapProviderURL) && getParameterList().findParameter("ldapProviderURL") != null) {
throw new ConfigurationException("ldapProviderURL can only be specified once, either as attribute or as parameter");
}
if (getParameterList().findParameter("principal") == null) {
throw new ConfigurationException("Parameter 'principal' must be specified");
}
if (getParameterList().findParameter("credentials") == null) {
throw new ConfigurationException("Parameter 'credentials' must be specified");
}
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class JmsSender method setDeliveryMode.
public void setDeliveryMode(String deliveryMode) {
int newMode = stringToDeliveryMode(deliveryMode);
if (newMode == 0) {
ConfigurationWarnings cw = ConfigurationWarnings.getInstance();
cw.add(log, getLogPrefix() + "unknown delivery mode [" + deliveryMode + "], delivery mode not changed");
} else
this.deliveryMode = newMode;
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class JdbcFacade method getDatasourceInfo.
public String getDatasourceInfo() throws JdbcException {
String dsinfo = null;
Connection conn = null;
try {
conn = getConnection();
DatabaseMetaData md = conn.getMetaData();
String product = md.getDatabaseProductName();
String productVersion = md.getDatabaseProductVersion();
String driver = md.getDriverName();
String driverVersion = md.getDriverVersion();
String url = md.getURL();
String user = md.getUserName();
if (getDatabaseType() == DbmsSupportFactory.DBMS_DB2 && "WAS".equals(IbisContext.getApplicationServerType()) && md.getResultSetHoldability() != ResultSet.HOLD_CURSORS_OVER_COMMIT) {
// For (some?) combinations of WebShere and DB2 this seems to be
// the default and result in the following exception when (for
// example?) a ResultSetIteratingPipe is calling next() on the
// ResultSet after it's sender has called a pipeline which
// contains a GenericMessageSendingPipe using
// transactionAttribute="NotSupported":
// com.ibm.websphere.ce.cm.ObjectClosedException: DSRA9110E: ResultSet is closed.
ConfigurationWarnings configWarnings = ConfigurationWarnings.getInstance();
configWarnings.add(log, "The database's default holdability for ResultSet objects is " + md.getResultSetHoldability() + " instead of " + ResultSet.HOLD_CURSORS_OVER_COMMIT + " (ResultSet.HOLD_CURSORS_OVER_COMMIT)");
}
dsinfo = "user [" + user + "] url [" + url + "] product [" + product + "] version [" + productVersion + "] driver [" + driver + "] version [" + driverVersion + "]";
} catch (SQLException e) {
log.warn("Exception determining databaseinfo", e);
} finally {
if (conn != null) {
try {
conn.close();
} catch (SQLException e1) {
log.warn("exception closing connection for metadata", e1);
}
}
}
return dsinfo;
}
use of nl.nn.adapterframework.configuration.ConfigurationWarnings in project iaf by ibissource.
the class ShowConfigurationStatus method toConfigurationWarningsXml.
private XmlBuilder toConfigurationWarningsXml(List<Configuration> configurations, Configuration configurationSelected) {
ConfigurationWarnings globalConfigurationWarnings = ConfigurationWarnings.getInstance();
List<ErrorStoreCounter> errorStoreCounters = retrieveErrorStoreCounters(configurations, configurationSelected);
List<String[]> selectedConfigurationWarnings = new ArrayList<String[]>();
if (configurationSelected != null) {
BaseConfigurationWarnings configWarns = configurationSelected.getConfigurationWarnings();
for (int j = 0; j < configWarns.size(); j++) {
String[] item = new String[2];
item[0] = configurationSelected.getName();
item[1] = (String) configWarns.get(j);
selectedConfigurationWarnings.add(item);
}
} else {
for (Configuration configuration : configurations) {
BaseConfigurationWarnings configWarns = configuration.getConfigurationWarnings();
for (int j = 0; j < configWarns.size(); j++) {
String[] item = new String[2];
item[0] = configuration.getName();
item[1] = (String) configWarns.get(j);
selectedConfigurationWarnings.add(item);
}
}
}
if (!globalConfigurationWarnings.isEmpty() || !errorStoreCounters.isEmpty() || !SHOW_COUNT_ERRORSTORE || !selectedConfigurationWarnings.isEmpty()) {
XmlBuilder warningsXML = new XmlBuilder("warnings");
if (!SHOW_COUNT_ERRORSTORE) {
XmlBuilder warningXML = new XmlBuilder("warning");
warningXML.setValue("Errorlog might contain records. This is unknown because errorStore.count.show is not set to true");
warningXML.addAttribute("severe", true);
warningsXML.addSubElement(warningXML);
}
for (int j = 0; j < errorStoreCounters.size(); j++) {
ErrorStoreCounter esr = errorStoreCounters.get(j);
XmlBuilder warningXML = new XmlBuilder("warning");
warningXML.addAttribute("config", esr.config);
if (esr.counter == 1) {
warningXML.setValue("Errorlog contains 1 record. Service management should check whether this record has to be resent or deleted");
} else {
warningXML.setValue("Errorlog contains " + esr.counter + " records. Service Management should check whether these records have to be resent or deleted");
}
warningXML.addAttribute("severe", true);
warningsXML.addSubElement(warningXML);
}
for (int j = 0; j < globalConfigurationWarnings.size(); j++) {
XmlBuilder warningXML = new XmlBuilder("warning");
warningXML.setValue((String) globalConfigurationWarnings.get(j));
warningsXML.addSubElement(warningXML);
}
for (int j = 0; j < selectedConfigurationWarnings.size(); j++) {
XmlBuilder warningXML = new XmlBuilder("warning");
warningXML.addAttribute("config", selectedConfigurationWarnings.get(j)[0]);
warningXML.setValue((String) selectedConfigurationWarnings.get(j)[1]);
warningsXML.addSubElement(warningXML);
}
return warningsXML;
}
return null;
}
Aggregations