/** * Provide a warning message to the user about inability to connect to the * database. The message is created from the cmpResource's JNDI name and * the exception. * @param connName the JNDI name for obtaining a connection * @param ex Exception which is cause for inability to connect. */ private void cannotConnect(String connName, Throwable ex) { logI18NWarnMessage( "Java2DBProcessorHelper.cannotConnect", connName, null, ex); }
/** * Provide a warning message to the user about inability to read a DDL file. */ private void fileIOError(String regName, Throwable ex) { logI18NWarnMessage("Java2DBProcessorHelper.ioexception", regName, null, ex); }
/** * Read the ddl file from the disk location. * @param fileName the string name of the file. * @param deploy true if this event results in creating tables. * @return the jdbc ddl file. */ public File getDDLFile(String fileName, boolean deploy) { File file = null; try { file = new File(fileName); if (logger.isLoggable(Level.FINE)) { logger.fine(I18NHelper.getMessage(messages, ((deploy)? "Java2DBProcessorHelper.createfilename" //NOI18N : "Java2DBProcessorHelper.dropfilename"), //NOI18N file.getName())); } } catch (Exception e) { logI18NWarnMessage( "Exception caught in Java2DBProcessorHelper.getDDLFile()", //NOI18N appRegisteredName, null, e); } return file; }
executeDDLStatement(file, jndiName); } else { logI18NWarnMessage( (create)? "Java2DBProcessorHelper.cannotcreatetables" //NOI18N : "Java2DBProcessorHelper.cannotdroptables", //NOI18N