User: user57
Date: 02/02/14 22:15:51
Modified: src/main/org/jboss/test/bmp/beans BMPHelperSessionBean.java
SimpleBMPBean.java
Log:
o replaced most System.out usage with Log4j. should really introduce
some base classes to make this mess more maintainable...
Revision Changes Path
1.4 +2 -0
jbosstest/src/main/org/jboss/test/bmp/beans/BMPHelperSessionBean.java
Index: BMPHelperSessionBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/bmp/beans/BMPHelperSessionBean.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- BMPHelperSessionBean.java 30 Jan 2002 23:06:44 -0000 1.3
+++ BMPHelperSessionBean.java 15 Feb 2002 06:15:51 -0000 1.4
@@ -16,6 +16,8 @@
public class BMPHelperSessionBean
implements SessionBean
{
+ org.apache.log4j.Category log =
org.apache.log4j.Category.getInstance(getClass());
+
SessionContext ctx = null;
private DataSource ds = null;
1.3 +12 -12 jbosstest/src/main/org/jboss/test/bmp/beans/SimpleBMPBean.java
Index: SimpleBMPBean.java
===================================================================
RCS file:
/cvsroot/jboss/jbosstest/src/main/org/jboss/test/bmp/beans/SimpleBMPBean.java,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- SimpleBMPBean.java 20 Jan 2001 16:00:17 -0000 1.2
+++ SimpleBMPBean.java 15 Feb 2002 06:15:51 -0000 1.3
@@ -14,7 +14,7 @@
public class SimpleBMPBean
implements EntityBean
{
-
+ org.apache.log4j.Category log =
org.apache.log4j.Category.getInstance(getClass());
EntityContext ctx = null;
DataSource ds = null;
@@ -25,7 +25,7 @@
public Integer ejbCreate (int _id, String _name)
throws CreateException, RemoteException
{
- System.out.println ("ejbCreate (int, String) called");
+ log.debug ("ejbCreate (int, String) called");
id = new Integer (_id);
@@ -77,12 +77,12 @@
public void ejbPostCreate (int _id, String _name)
throws CreateException, RemoteException
{
- System.out.println ("ejbPostCreate (int, String) called");
+ log.debug ("ejbPostCreate (int, String) called");
}
public void ejbLoad ()
{
- System.out.println ("ejbLoad () called");
+ log.debug ("ejbLoad () called");
Connection con = null;
@@ -119,7 +119,7 @@
public void ejbStore ()
{
- System.out.println ("ejbStore () called");
+ log.debug ("ejbStore () called");
Connection con = null;
try
@@ -150,7 +150,7 @@
public void ejbRemove ()
{
- System.out.println ("ejbRemove () called");
+ log.debug ("ejbRemove () called");
Connection con = null;
try
@@ -181,7 +181,7 @@
public Integer ejbFindByPrimaryKey (Integer _key) throws FinderException
{
- System.out.println ("ejbFindByPrimaryKey (Integer) called");
+ log.debug ("ejbFindByPrimaryKey (Integer) called");
Connection con = null;
boolean found = false;
@@ -219,7 +219,7 @@
public Collection ejbFindAll () throws FinderException
{
- System.out.println ("ejbFindAll () called");
+ log.debug ("ejbFindAll () called");
Connection con = null;
Vector result = new Vector ();
@@ -259,17 +259,17 @@
public void ejbActivate ()
{
- System.out.println ("ejbActivate () called");
+ log.debug ("ejbActivate () called");
}
public void ejbPassivate ()
{
- System.out.println ("ejbPassivate () called");
+ log.debug ("ejbPassivate () called");
}
public void setEntityContext (EntityContext _ctx)
{
- System.out.println ("setEntityContext (\""+_ctx.getPrimaryKey ()+"\")
called");
+ log.debug ("setEntityContext (\""+_ctx.getPrimaryKey ()+"\") called");
ctx = _ctx;
// lookup the datasource
@@ -285,7 +285,7 @@
public void unsetEntityContext ()
{
- System.out.println ("unsetEntityContext () called");
+ log.debug ("unsetEntityContext () called");
ctx = null;
}
_______________________________________________
Jboss-development mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/jboss-development