session.getSessionLog().setShouldLogExceptionStackTrace(false); session.getSessionLog().setShouldLogExceptionStackTrace(true); session.getSessionLog().setShouldLogExceptionStackTrace(true);
log.setShouldLogExceptionStackTrace(Boolean.parseBoolean(exString));
/** * Drop and recreate the default table schema for the TopLink project this session associated with. */ public void replaceDefaultTables() throws TopLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); getSession().getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(); tableCreator.replaceTables(session, this); } catch (DatabaseException exception) { // Ignore error } finally { getSession().getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } }
/** * Drop and recreate the default table schema for the TopLink project this session associated with. */ public void replaceDefaultTables(boolean keepSequenceTables) throws TopLinkException { boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); getSession().getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(); tableCreator.replaceTables(session, this, keepSequenceTables); } catch (DatabaseException exception) { // Ignore error } finally { getSession().getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } }
session.getSessionLog().setShouldLogExceptionStackTrace(false); session.getSessionLog().setShouldLogExceptionStackTrace(true);
/** * Create the default table schema for the TopLink project this session associated with. */ public void createDefaultTables() { //Create each table w/o throwing exception and/or exit if some of them are already existed in the db. //If a table is already existed, skip the creation. boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); getSession().getSessionLog().setShouldLogExceptionStackTrace(false); try { TableCreator tableCreator = getDefaultTableCreator(); tableCreator.createTables(session, this); } catch (DatabaseException ex) { // Ignore error } finally { getSession().getSessionLog().setShouldLogExceptionStackTrace(shouldLogExceptionStackTrace); } }
/** * Use the definition object to drop and recreate the schema entity on the database. * This is used for dropping tables, views, procedures ... etc ... * This handles and ignore any database error while droping incase the object did not previously exist. */ public void replaceObject(DatabaseObjectDefinition databaseDefinition) throws TopLinkException { // CR 3870467, do not log stack boolean shouldLogExceptionStackTrace = getSession().getSessionLog().shouldLogExceptionStackTrace(); if (shouldLogExceptionStackTrace) { getSession().getSessionLog().setShouldLogExceptionStackTrace(false); } try { dropObject(databaseDefinition); } catch (DatabaseException exception) { // Ignore error } finally { if (shouldLogExceptionStackTrace) { getSession().getSessionLog().setShouldLogExceptionStackTrace(true); } } createObject(databaseDefinition); }