User: user57
Date: 02/02/16 03:26:58
Modified: src/main/org/jboss/test/cmp2/readonly
ReadonlyUnitTestCase.java
Log:
o System.err, System.out & printStackTrace() 99.9% gone.
Revision Changes Path
1.3 +10 -7
jbosstest/src/main/org/jboss/test/cmp2/readonly/ReadonlyUnitTestCase.java
Index: ReadonlyUnitTestCase.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/cmp2/readonly/ReadonlyUnitTestCase.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- ReadonlyUnitTestCase.java 29 Jan 2002 21:59:59 -0000 1.2
+++ ReadonlyUnitTestCase.java 16 Feb 2002 11:26:58 -0000 1.3
@@ -14,6 +14,9 @@
public class ReadonlyUnitTestCase extends EJBTestCase {
+ static org.apache.log4j.Category log =
+ org.apache.log4j.Category.getInstance(ReadonlyUnitTestCase.class);
+
public static Test suite() throws Exception {
return JBossTestCase.getDeploySetup(
ReadonlyUnitTestCase.class, "cmp2-readonly.jar");
@@ -29,7 +32,7 @@
return (PublisherHome)
jndiContext.lookup("cmp2/readonly/Publisher");
} catch(Exception e) {
- e.printStackTrace();
+ log.debug("failed", e);
fail("Exception in getPublisherHome: " + e.getMessage());
}
return null;
@@ -41,7 +44,7 @@
return (BookHome) jndiContext.lookup("cmp2/readonly/Book");
} catch(Exception e) {
- e.printStackTrace();
+ log.debug("failed", e);
fail("Exception in getBookHome: " + e.getMessage());
}
return null;
@@ -53,7 +56,7 @@
DataSource ds = (DataSource) jndiContext.lookup("java:/DefaultDS");
return ds.getConnection();
} catch(Exception e) {
- e.printStackTrace();
+ log.debug("failed", e);
fail("Exception in getConnection: " + e.getMessage());
}
return null;
@@ -212,14 +215,14 @@
try {
ps.close();
} catch(SQLException e) {
- e.printStackTrace();
+ log.debug("failed", e);
}
}
if(con != null) {
try {
con.close();
} catch(SQLException e) {
- e.printStackTrace();
+ log.debug("failed", e);
}
}
}
@@ -244,14 +247,14 @@
try {
statement.close();
} catch(SQLException e) {
- e.printStackTrace();
+ log.debug("failed", e);
}
}
if(con != null) {
try {
con.close();
} catch(SQLException e) {
- e.printStackTrace();
+ log.debug("failed", e);
}
}
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development