User: user57 Date: 01/08/14 13:26:27 Modified: src/main/org/jboss/ejb/plugins/jaws/jdbc JDBCFindByCommand.java JDBCQueryCommand.java Log: o Using log4j for logging Revision Changes Path 1.13 +13 -8 jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFindByCommand.java Index: JDBCFindByCommand.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCFindByCommand.java,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- JDBCFindByCommand.java 2001/08/03 17:15:48 1.12 +++ JDBCFindByCommand.java 2001/08/14 20:26:27 1.13 @@ -10,10 +10,9 @@ import java.lang.reflect.Method; import java.sql.PreparedStatement; - import java.util.Iterator; -import org.jboss.logging.Logger; +import org.apache.log4j.Category; import org.jboss.ejb.plugins.jaws.metadata.CMPFieldMetaData; import org.jboss.ejb.plugins.jaws.metadata.FinderMetaData; @@ -21,31 +20,37 @@ /** * JAWSPersistenceManager JDBCFindByCommand * - * @see <related> * @author <a href="mailto:[EMAIL PROTECTED]">Rickard Öberg</a> * @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a> * @author <a href="mailto:[EMAIL PROTECTED]">Joe Shevland</a> * @author <a href="mailto:[EMAIL PROTECTED]">Justin Forder</a> * @author <a href="mailto:[EMAIL PROTECTED]">Dan Christopherson</a> * @author <a href="mailto:[EMAIL PROTECTED]">Torben Jäger</a> - * @version $Revision: 1.12 $ + * @version $Revision: 1.13 $ */ -public class JDBCFindByCommand extends JDBCFinderCommand +public class JDBCFindByCommand + extends JDBCFinderCommand { // Attributes ---------------------------------------------------- // The meta-info for the field we are finding by private CMPFieldMetaData cmpField; - + private Category log = Category.getInstance(JDBCFindByCommand.class); + // Constructors -------------------------------------------------- - public JDBCFindByCommand(JDBCCommandFactory factory, Method finderMethod, FinderMetaData md) + public JDBCFindByCommand(JDBCCommandFactory factory, + Method finderMethod, + FinderMetaData md) throws IllegalArgumentException { super(factory, md); String cmpFieldName = finderMethod.getName().substring(6).toLowerCase(); - Logger.debug("Finder:"+cmpFieldName); + + if (log.isDebugEnabled()) { + log.debug("cmp field name: " + cmpFieldName); + } // Find the meta-info for the field we want to find by 1.7 +8 -4 jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCQueryCommand.java Index: JDBCQueryCommand.java =================================================================== RCS file: /cvsroot/jboss/jboss/src/main/org/jboss/ejb/plugins/jaws/jdbc/JDBCQueryCommand.java,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- JDBCQueryCommand.java 2001/08/03 17:15:48 1.6 +++ JDBCQueryCommand.java 2001/08/14 20:26:27 1.7 @@ -10,20 +10,24 @@ import java.sql.PreparedStatement; import java.sql.ResultSet; import java.sql.SQLException; -import org.jboss.logging.Logger; +import org.apache.log4j.Category; /** * Abstract superclass for all JAWS Commands that issue JDBC queries * directly. * Provides a Template Method implementation for * <code>executeStatementAndHandleResult</code>. + * * @author <a href="mailto:[EMAIL PROTECTED]">Justin Forder</a> - * @version $Revision: 1.6 $ + * @version $Revision: 1.7 $ */ -public abstract class JDBCQueryCommand extends JDBCCommand +public abstract class JDBCQueryCommand + extends JDBCCommand { // Constructors -------------------------------------------------- + + private Category log = Category.getInstance(JDBCFindByCommand.class); /** * Pass the arguments on to the superclass constructor. @@ -66,7 +70,7 @@ rs.close(); } catch (SQLException e) { - Logger.debug(e); + log.debug("failed to close resultset", e); } } } _______________________________________________ Jboss-development mailing list [EMAIL PROTECTED] http://lists.sourceforge.net/lists/listinfo/jboss-development