User: fleury
Date: 00/09/27 18:17:00
Modified: src/main/org/jboss/ejb CacheKey.java Container.java
ContainerFactory.java EnterpriseContext.java
EntityContainer.java MethodInvocation.java
StatefulSessionContainer.java
StatelessSessionContainer.java
Log:
Update logging
Revision Changes Path
1.6 +1 -2 jboss/src/main/org/jboss/ejb/CacheKey.java
Index: CacheKey.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/CacheKey.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CacheKey.java 2000/09/27 00:48:15 1.5
+++ CacheKey.java 2000/09/28 01:16:58 1.6
@@ -19,7 +19,7 @@
*
* @see org.jboss.ejb.plugins.NoPassivationInstanceCache.java
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.5 $
+* @version $Revision: 1.6 $
*/
public class CacheKey
implements java.io.Externalizable
@@ -48,7 +48,6 @@
try {
hashCode = (new java.rmi.MarshalledObject(id)).hashCode();
- System.out.println("CacheKeyHash:" +hashCode);
}
catch (Exception e) {e.printStackTrace();}
}
1.27 +4 -4 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.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- Container.java 2000/09/13 14:44:43 1.26
+++ Container.java 2000/09/28 01:16:58 1.27
@@ -67,7 +67,7 @@
* @see ContainerFactory
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
- * @version $Revision: 1.26 $
+ * @version $Revision: 1.27 $
*/
public abstract class Container
{
@@ -396,7 +396,7 @@
{
EjbRefMetaData ref = (EjbRefMetaData)enum.next();
- Logger.log("Binding an EJBReference "+ref.getName());
+ Logger.debug("Binding an EJBReference "+ref.getName());
if (ref.getLink() != null)
{
@@ -450,7 +450,7 @@
if (DataSource.class.isAssignableFrom(cl))
{
// Found it!!
- Logger.log("Using default
DataSource:"+pair.getName());
+ Logger.debug("Using default
DataSource:"+pair.getName());
finalName = pair.getName();
list.close();
break;
@@ -488,7 +488,7 @@
}
} else {
// Resource Manager bindings
- Logger.log("Binding resource manager "+finalName+ " with JDNI
ENC " +ref.getRefName());
+ Logger.debug("Binding resource manager "+finalName+ " with JDNI
ENC " +ref.getRefName());
bind(ctx, ref.getRefName(), new LinkRef(finalName));
}
}
1.43 +8 -8 jboss/src/main/org/jboss/ejb/ContainerFactory.java
Index: ContainerFactory.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/ContainerFactory.java,v
retrieving revision 1.42
retrieving revision 1.43
diff -u -r1.42 -r1.43
--- ContainerFactory.java 2000/09/27 17:02:58 1.42
+++ ContainerFactory.java 2000/09/28 01:16:58 1.43
@@ -76,7 +76,7 @@
* @author <a href="mailto:[EMAIL PROTECTED]">Juha Lindfors</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
*
-* @version $Revision: 1.42 $
+* @version $Revision: 1.43 $
*/
public class ContainerFactory
extends org.jboss.util.ServiceMBeanSupport
@@ -142,7 +142,7 @@
tmpDir = new File(new File(tmpFile.getFile()).getParent(),"deploy/");
tmpDir.mkdirs();
- log.log("Temporary directory set to:"+tmpDir);
+ log.debug("Temporary directory set to:"+tmpDir);
// Clear tmp directory of previously deployed files
// This is to clear up if jBoss previously crashed, hence not removing
files properly
@@ -154,11 +154,11 @@
if (files.length > 0)
{
- log.log("Previous deployments removed");
+ log.debug("Previous deployments removed");
}
} else
{
- log.log("Using the systems temporary directory");
+ log.debug("Using the systems temporary directory");
}
}
@@ -282,8 +282,7 @@
// copy the jar file to prevent locking - redeploy failure
if (url.getProtocol().startsWith("file") && !url.getFile().endsWith("/"))
{
- System.out.println(tmpDir);
-
+
File jarFile = new File(url.getFile());
File tmp;
if (tmpDir == null)
@@ -319,7 +318,8 @@
String classPathEntry = classPathTokens.nextToken();
try
{
- URL u;
+
+ URL u;
File dir;
// Extension to "Class-Path:" format: dir/*
@@ -391,7 +391,7 @@
{
public void beanChecked(VerificationEvent event)
{
- Logger.log(event.getName() + ": " + event.getMessage());
+ Logger.debug(event.getName() + ": " +
event.getMessage());
}
public void specViolation(VerificationEvent event)
1.13 +7 -6 jboss/src/main/org/jboss/ejb/EnterpriseContext.java
Index: EnterpriseContext.java
===================================================================
RCS file: /products/cvs/ejboss/jboss/src/main/org/jboss/ejb/EnterpriseContext.java,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- EnterpriseContext.java 2000/09/27 00:33:26 1.12
+++ EnterpriseContext.java 2000/09/28 01:16:58 1.13
@@ -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.12 $
+ * @version $Revision: 1.13 $
*/
public abstract class EnterpriseContext
{
@@ -92,7 +92,7 @@
public void setTransaction(Transaction transaction) {
- Logger.log("EnterpriseContext.setTransaction "+((transaction == null) ?
"null" : Integer.toString(transaction.hashCode())));
+ Logger.debug("EnterpriseContext.setTransaction "+((transaction == null) ?
"null" : Integer.toString(transaction.hashCode())));
this.transaction = transaction;
}
@@ -111,7 +111,7 @@
//new Exception().printStackTrace();
- Logger.log("EnterpriseContext.lock() "+hashCode()+" "+locked);
+ Logger.debug("EnterpriseContext.lock() "+hashCode()+" "+locked);
}
public void unlock() {
@@ -119,15 +119,16 @@
// release a lock
locked --;
+ //new Exception().printStackTrace();
if (locked <0) new Exception().printStackTrace();
- Logger.log("EnterpriseContext.unlock() "+hashCode()+" "+locked);
+ Logger.debug("EnterpriseContext.unlock() "+hashCode()+" "+locked);
}
public boolean isLocked() {
- //DEBUG Logger.log("EnterpriseContext.isLocked() at "+locked);
- Logger.log("EnterpriseContext.isLocked() "+hashCode()+" at "+locked);
+ //DEBUG Logger.debug("EnterpriseContext.isLocked() at "+locked);
+ Logger.debug("EnterpriseContext.isLocked() "+hashCode()+" at "+locked);
return locked != 0;
}
1.27 +2 -2 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.26
retrieving revision 1.27
diff -u -r1.26 -r1.27
--- EntityContainer.java 2000/09/26 20:18:49 1.26
+++ EntityContainer.java 2000/09/28 01:16:59 1.27
@@ -35,7 +35,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.26 $
+* @version $Revision: 1.27 $
*/
public class EntityContainer
extends Container
@@ -306,7 +306,7 @@
throws Exception
{
- Logger.log("invokeHome");
+ Logger.debug("invokeHome");
try { return getInterceptor().invokeHome(mi); }
catch (Exception e) {e.printStackTrace(); throw e;}
1.6 +5 -3 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.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- MethodInvocation.java 2000/09/26 18:34:09 1.5
+++ MethodInvocation.java 2000/09/28 01:16:59 1.6
@@ -15,9 +15,10 @@
import java.util.Map;
import java.security.Principal;
-
import javax.transaction.Transaction;
+import org.jboss.logging.Logger;
+
/**
* MethodInvocation
*
@@ -26,7 +27,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>.
- * @version $Revision: 1.5 $
+ * @version $Revision: 1.6 $
*/
public class MethodInvocation
{
@@ -80,8 +81,9 @@
*/
public void setTransaction(Transaction tx)
{
+
+ Logger.debug("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.17 +6 -6 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.16
retrieving revision 1.17
diff -u -r1.16 -r1.17
--- StatefulSessionContainer.java 2000/09/26 18:35:47 1.16
+++ StatefulSessionContainer.java 2000/09/28 01:16:59 1.17
@@ -31,7 +31,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.16 $
+ * @version $Revision: 1.17 $
*/
public class StatefulSessionContainer
extends Container
@@ -438,7 +438,7 @@
}
catch (NoSuchMethodException e) {
- Logger.log("Couldn't find getEJBObject method on container");
+ Logger.debug("Couldn't find getEJBObject method on container");
}
catch (Exception e) { Logger.exception(e);}
@@ -468,7 +468,7 @@
}
} catch (NoSuchMethodException e)
{
- Logger.log(m[i].getName() + " in bean has not been mapped");
+ Logger.error(m[i].getName() + " in bean has not been mapped");
}
}
@@ -502,13 +502,13 @@
Method m = (Method)homeMapping.get(mi.getMethod());
// Invoke and handle exceptions
- Logger.log("SSC:invokeHome:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
+ Logger.debug("SSC:invokeHome:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
try
{
return m.invoke(StatefulSessionContainer.this, new Object[] { mi });
} catch (InvocationTargetException e)
{
- Logger.log(e.getMessage());
+ Logger.debug(e.getMessage());
Throwable ex = e.getTargetException();
if (ex instanceof Exception)
throw (Exception)ex;
@@ -523,7 +523,7 @@
// Get method
Method m = (Method)beanMapping.get(mi.getMethod());
- Logger.log("SSC:invoke:mi is "+mi.getMethod().getName()+" map is
"+m.getName());
+ Logger.debug("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.12 +5 -5 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.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- StatelessSessionContainer.java 2000/09/26 18:36:10 1.11
+++ StatelessSessionContainer.java 2000/09/28 01:16:59 1.12
@@ -28,7 +28,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.11 $
+* @version $Revision: 1.12 $
*/
public class StatelessSessionContainer
extends Container
@@ -341,7 +341,7 @@
for (int i = 0; i < m.length; i++)
{
// Implemented by container
-// Logger.log("Mapping "+m[i].getName());
+ Logger.debug("Mapping "+m[i].getName());
map.put(m[i], getClass().getMethod(m[i].getName()+"Home",
m[i].getParameterTypes()));
}
@@ -359,21 +359,21 @@
{
// Implemented by bean
map.put(m[i], beanClass.getMethod(m[i].getName(),
m[i].getParameterTypes()));
- //Logger.log("Mapped "+m[i].getName()+" "+m[i].hashCode()+"to
"+map.get(m[i]));
+ Logger.debug("Mapped "+m[i].getName()+" "+m[i].hashCode()+"to
"+map.get(m[i]));
}
else
{
try
{
// Implemented by container
- //Logger.log("Mapped Container method "+m[i].getName() +" HASH
"+m[i].hashCode());
+ Logger.debug("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)
{
// DEBUG Logger.exception(e);
- Logger.log(m[i].getName() + " in bean has not been mapped");
+ Logger.error(m[i].getName() + " in bean has not been mapped");
}
}