User: fleury
Date: 00/08/17 20:20:55
Modified: src/main/org/jboss/ejb Container.java EntityContainer.java
EntityEnterpriseContext.java MethodInvocation.java
StatefulSessionContainer.java
StatelessSessionContainer.java
Log:
Logger messages and clean up for binary
Revision Changes Path
1.23 +3 -3 jboss/src/main/org/jboss/ejb/Container.java
Index: Container.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/Container.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- Container.java 2000/08/12 00:40:44 1.22
+++ Container.java 2000/08/18 03:20:53 1.23
@@ -67,7 +67,7 @@
* @see ContainerFactory
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
- * @version $Revision: 1.22 $
+ * @version $Revision: 1.23 $
*/
public abstract class Container
{
@@ -396,7 +396,7 @@
{
EjbRefMetaData ref = (EjbRefMetaData)enum.next();
- System.out.println("Binding an EJBReference "+ref.getName());
+ Logger.log("Binding an EJBReference "+ref.getName());
if (ref.getLink() != null)
{
@@ -486,7 +486,7 @@
}
} catch (NamingException e)
{
- e.printStackTrace();
+ Logger.exception(e);;
e.getRootCause().printStackTrace();
throw new DeploymentException("Could not set up environment", e);
}
1.23 +5 -17 jboss/src/main/org/jboss/ejb/EntityContainer.java
Index: EntityContainer.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/EntityContainer.java,v
retrieving revision 1.22
retrieving revision 1.23
diff -u -r1.22 -r1.23
--- EntityContainer.java 2000/08/17 20:11:13 1.22
+++ EntityContainer.java 2000/08/18 03:20:53 1.23
@@ -36,7 +36,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
-* @version $Revision: 1.22 $
+* @version $Revision: 1.23 $
*/
public class EntityContainer
extends Container
@@ -394,28 +394,14 @@
} else
{
- System.out.println("Single FINDER");
// Single entity finder
Object id = getPersistenceManager().findEntity(mi.getMethod(),
mi.getArguments(),
(EntityEnterpriseContext)mi.getEnterpriseContext());
- System.out.println("I Found it "+id.toString());
-
-
- EJBObject ejbObject = null;
- try {
- ejbObject = (EJBObject)containerInvoker.getEntityEJBObject(new
FastKey(id));
- if (ejbObject != null) System.out.println("OBJECT IS OK ABOUT TO
RETURN");
- return ejbObject;
- }
- catch (Exception e) {
- e.printStackTrace();
- return null;
- }
//create the EJBObject
- //return (EJBObject)containerInvoker.getEntityEJBObject(new
FastKey(id));
+ return (EJBObject)containerInvoker.getEntityEJBObject(new FastKey(id));
}
}
@@ -521,8 +507,10 @@
throw new DeploymentException("Couldn't find getEJBObject
method on container");
}
}
+ }
+ catch (Exception e) {
+ // DEBUG Logger.exception(e);
}
- catch (Exception e) { e.printStackTrace();}
// We are done keep the home map
homeMapping = map;
1.7 +3 -10 jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java
Index: EntityEnterpriseContext.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/EntityEnterpriseContext.java,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- EntityEnterpriseContext.java 2000/08/17 20:11:13 1.6
+++ EntityEnterpriseContext.java 2000/08/18 03:20:53 1.7
@@ -22,7 +22,7 @@
* @see EnterpriseContext
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.6 $
+* @version $Revision: 1.7 $
*/
public class EntityEnterpriseContext
extends EnterpriseContext
@@ -101,11 +101,7 @@
public void setInvoked(boolean invoked)
{
- /*
- System.out.println("&&&&&&&&&&& in setInvoked("+invoked+")");
- Exception e = new Exception();
- e.printStackTrace();
- */
+
this.invoked = invoked;
}
@@ -116,10 +112,7 @@
public void setValid(boolean valid)
{
- /*System.out.println("&&&&&&&&&&& in setSynchronized("+synched+")");
- Exception e = new Exception();
- e.printStackTrace();
- */
+
this.valid = valid;
}
1.4 +2 -2 jboss/src/main/org/jboss/ejb/MethodInvocation.java
Index: MethodInvocation.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/MethodInvocation.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- MethodInvocation.java 2000/08/06 21:35:59 1.3
+++ MethodInvocation.java 2000/08/18 03:20:54 1.4
@@ -26,7 +26,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>.
- * @version $Revision: 1.3 $
+ * @version $Revision: 1.4 $
*/
public class MethodInvocation
{
@@ -72,7 +72,7 @@
public void setTransaction(Transaction tx)
{
- //System.out.println("Setting a transaction on Method
invocation"+hashCode()+" "+m.getName()+" with "+tx);
+ //Logger.log("Setting a transaction on Method invocation"+hashCode()+"
"+m.getName()+" with "+tx);
this.tx = tx;
}
1.15 +11 -21 jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java
Index: StatefulSessionContainer.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/StatefulSessionContainer.java,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -r1.14 -r1.15
--- StatefulSessionContainer.java 2000/08/14 14:55:15 1.14
+++ StatefulSessionContainer.java 2000/08/18 03:20:54 1.15
@@ -31,7 +31,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.14 $
+ * @version $Revision: 1.15 $
*/
public class StatefulSessionContainer
extends Container
@@ -375,18 +375,11 @@
*/
public EJBObject getEJBObject(MethodInvocation mi)
throws java.rmi.RemoteException {
-
- try {
-
+
// All we need is an EJBObject for this Id, the first argument is the Id
return containerInvoker.getStatefulSessionEJBObject(mi.getArguments()[0]);
- }
- catch (Exception e) {
- e.printStackTrace();
- return null;
- }
- }
+ }
// EJBHome implementation ----------------------------------------
@@ -428,7 +421,7 @@
map.put(m[i], getClass().getMethod(m[i].getName()+"Home", new
Class[] { MethodInvocation.class }));
} catch (NoSuchMethodException e)
{
- System.out.println(m[i].getName() + " in bean has not been mapped");
+ Logger.log(m[i].getName() + " in bean has not been mapped");
}
}
@@ -445,9 +438,9 @@
}
catch (NoSuchMethodException e) {
- System.out.println("Couldn't find getEJBObject method on container");
+ Logger.log("Couldn't find getEJBObject method on container");
}
- catch (Exception e) { e.printStackTrace();}
+ catch (Exception e) { Logger.exception(e);}
homeMapping = map;
}
@@ -475,7 +468,7 @@
}
} catch (NoSuchMethodException e)
{
- System.out.println(m[i].getName() + " in bean has not been mapped");
+ Logger.log(m[i].getName() + " in bean has not been mapped");
}
}
@@ -509,16 +502,13 @@
Method m = (Method)homeMapping.get(mi.getMethod());
// Invoke and handle exceptions
- System.out.println("SSC:invokeHome:mi is "+mi.getMethod().getName()+" map
is "+m.getName());
+ Logger.log("SSC:invokeHome:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
try
- {
- //Exception e = new Exception();
- //e.printStackTrace();
-
+ {
return m.invoke(StatefulSessionContainer.this, new Object[] { mi });
} catch (InvocationTargetException e)
{
- e.printStackTrace();
+ Logger.log(e.getMessage());
Throwable ex = e.getTargetException();
if (ex instanceof Exception)
throw (Exception)ex;
@@ -533,7 +523,7 @@
// Get method
Method m = (Method)beanMapping.get(mi.getMethod());
- System.out.println("SSC:invoke:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
+ Logger.log("SSC:invoke:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
// Select instance to invoke (container or bean)
if (m.getDeclaringClass().equals(StatefulSessionContainer.this.getClass()))
{
1.10 +8 -6 jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java
Index: StatelessSessionContainer.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/StatelessSessionContainer.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- StatelessSessionContainer.java 2000/06/21 11:51:30 1.9
+++ StatelessSessionContainer.java 2000/08/18 03:20:54 1.10
@@ -19,14 +19,16 @@
import javax.ejb.EJBMetaData;
import javax.ejb.CreateException;
import javax.ejb.RemoveException;
+import org.jboss.logging.Logger;
+
/**
* StatelessSessionContainer
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.9 $
+* @version $Revision: 1.10 $
*/
public class StatelessSessionContainer
extends Container
@@ -339,7 +341,7 @@
for (int i = 0; i < m.length; i++)
{
// Implemented by container
-// System.out.println("Mapping "+m[i].getName());
+// Logger.log("Mapping "+m[i].getName());
map.put(m[i], getClass().getMethod(m[i].getName()+"Home",
m[i].getParameterTypes()));
}
@@ -357,21 +359,21 @@
{
// Implemented by bean
map.put(m[i], beanClass.getMethod(m[i].getName(),
m[i].getParameterTypes()));
- //System.out.println("Mapped "+m[i].getName()+"
"+m[i].hashCode()+"to "+map.get(m[i]));
+ //Logger.log("Mapped "+m[i].getName()+" "+m[i].hashCode()+"to
"+map.get(m[i]));
}
else
{
try
{
// Implemented by container
- //System.out.println("Mapped Container method "+m[i].getName()
+" HASH "+m[i].hashCode());
+ //Logger.log("Mapped Container method "+m[i].getName() +" HASH
"+m[i].hashCode());
map.put(m[i], getClass().getMethod(m[i].getName(), new Class[]
{ MethodInvocation.class }));
} catch (NoSuchMethodException e)
{
- e.printStackTrace();
- System.out.println(m[i].getName() + " in bean has not been
mapped");
+ // DEBUG Logger.exception(e);
+ Logger.log(m[i].getName() + " in bean has not been mapped");
}
}