*/
protected void logConfiguration()
{
if (JPOXLogger.DATASTORE.isDebugEnabled())
{
PersistenceConfiguration conf = getOMFContext().getPersistenceConfiguration();
String classNames = conf.getStringProperty("org.jpox.autoStartClassNames");
JPOXLogger.DATASTORE.debug("======================= Datastore =========================");
JPOXLogger.DATASTORE.debug("StoreManager : \"" + storeManagerKey + "\" (" + getClass().getName() + ")");
JPOXLogger.DATASTORE.debug("AutoStart : mechanism=" + autoStartMechanism +
", mode=" + conf.getStringProperty("org.jpox.autoStartMechanismMode") +
((classNames != null) ? (", classes=" + classNames) : ""));
JPOXLogger.DATASTORE.debug("Connection Pooling : " + conf.getStringProperty("org.jpox.connectionPoolingType"));
if (identifierFactory != null)
{
JPOXLogger.DATASTORE.debug("Datastore Identifiers :" +
" factory=\"" + conf.getStringProperty("org.jpox.identifierFactory") + "\"" +
" case=" + identifierFactory.getNameOfIdentifierCase() +
(conf.hasProperty("org.jpox.mapping.Catalog") ? (" catalog=" + conf.getStringProperty("org.jpox.mapping.Catalog")) : "") +
(conf.hasProperty("org.jpox.mapping.Schema") ? (" schema=" + conf.getStringProperty("org.jpox.mapping.Schema")) : ""));
}
JPOXLogger.DATASTORE.debug("Datastore : " + (readOnlyDatastore ? "read-only" : "read-write") +
(fixedDatastore ? ", fixed" : "") +
(conf.getBooleanProperty("org.jpox.rdbms.useUpdateLock") ? ", useUpdateLock" : "") +
(conf.getBooleanProperty("org.jpox.rdbms.CheckExistTablesOrViews") ? ", checkTableViewExistence" : "") +
", rdbmsConstraintCreateMode=" + conf.getStringProperty("org.jpox.rdbms.constraintCreateMode") +
", initialiseColumnInfo=" + conf.getStringProperty("org.jpox.rdbms.initializeColumnInfo"));
// Auto-Create
StringBuffer autoCreateOptions = null;
if (autoCreateTables || autoCreateColumns || autoCreateConstraints)
{
autoCreateOptions = new StringBuffer();
boolean first = true;
if (autoCreateTables)
{
if (!first)
{
autoCreateOptions.append(",");
}
autoCreateOptions.append("Tables");
first = false;
}
if (autoCreateColumns)
{
if (!first)
{
autoCreateOptions.append(",");
}
autoCreateOptions.append("Columns");
first = false;
}
if (autoCreateConstraints)
{
if (!first)
{
autoCreateOptions.append(",");
}
autoCreateOptions.append("Constraints");
first = false;
}
}
// Validate
StringBuffer validateOptions = null;
if (validateTables || validateColumns || validateConstraints)
{
validateOptions = new StringBuffer();
boolean first = true;
if (validateTables)
{
validateOptions.append("Tables");
first = false;
}
if (validateColumns)
{
if (!first)
{
validateOptions.append(",");
}
validateOptions.append("Columns");
first = false;
}
if (validateConstraints)
{
if (!first)
{
validateOptions.append(",");
}
validateOptions.append("Constraints");
first = false;
}
}
JPOXLogger.DATASTORE.debug("Schema Control : " +
"AutoCreate(" + (autoCreateOptions != null ? autoCreateOptions.toString() : "None") + ")" +
", Validate(" + (validateOptions != null ? validateOptions.toString() : "None") + ")");
int batchLimit = conf.getIntProperty("org.jpox.rdbms.statementBatchLimit");
JPOXLogger.DATASTORE.debug("Statement Batching : max-batch-size=" +
(batchLimit == -1 ? "UNLIMITED" : "" + batchLimit));
String[] queryLanguages = getOMFContext().getPluginManager().getAttributeValuesForExtension("org.jpox.store_query_query",
"datastore", storeManagerKey, "name");
JPOXLogger.DATASTORE.debug("Query Languages : " + StringUtils.objectArrayToString(queryLanguages));
JPOXLogger.DATASTORE.debug("Queries : Timeout=" + conf.getIntProperty("org.jpox.query.timeout"));
JPOXLogger.DATASTORE.debug("Queries : Results " +
"direction=" + conf.getStringProperty("org.jpox.rdbms.query.fetchDirection") +
", type=" + conf.getStringProperty("org.jpox.rdbms.query.resultSetType") +
", concurrency=" + conf.getStringProperty("org.jpox.rdbms.query.resultSetConcurrency"));
// Log the datastore adapter configuration
if (dba != null)
{
((RDBMSAdapter)dba).logConfiguration();