User: fleury
Date: 00/09/29 17:59:42
Modified: src/main/org/jboss/ejb/plugins AbstractInstancePool.java
BMPPersistenceManager.java
CMPFilePersistenceManager.java
EntitySynchronizationInterceptor.java
LogInterceptor.java
NoPassivationEntityInstanceCache.java
NoPassivationStatefulSessionInstanceCache.java
StatelessSessionInstanceInterceptor.java
TxInterceptorBMT.java TxInterceptorCMT.java
Log:
Commented out debug messages
Revision Changes Path
1.5 +3 -3 jboss/src/main/org/jboss/ejb/plugins/AbstractInstancePool.java
Index: AbstractInstancePool.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/AbstractInstancePool.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- AbstractInstancePool.java 2000/09/28 01:17:00 1.4
+++ AbstractInstancePool.java 2000/09/30 00:59:40 1.5
@@ -31,7 +31,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public abstract class AbstractInstancePool
implements InstancePool, XmlLoadable
@@ -94,7 +94,7 @@
public synchronized EnterpriseContext get()
throws RemoteException
{
- Logger.debug("Get instance "+this);
+//DEBUG Logger.debug("Get instance "+this);
if (!pool.empty())
{
@@ -126,7 +126,7 @@
public synchronized void free(EnterpriseContext ctx)
{
// Pool it
- Logger.debug("Free instance:"+ctx.getId()+"#"+ctx.getTransaction());
+//DEBUG Logger.debug("Free instance:"+ctx.getId()+"#"+ctx.getTransaction());
if (pool.size() < maxSize)
{
1.14 +2 -2 jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java
Index: BMPPersistenceManager.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/BMPPersistenceManager.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- BMPPersistenceManager.java 2000/09/29 21:25:17 1.13
+++ BMPPersistenceManager.java 2000/09/30 00:59:40 1.14
@@ -36,7 +36,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.13 $
+* @version $Revision: 1.14 $
*/
public class BMPPersistenceManager
implements EntityPersistenceManager
@@ -299,7 +299,7 @@
public void storeEntity(EntityEnterpriseContext ctx)
throws RemoteException
{
- Logger.debug("Store entity");
+//DEBUG Logger.debug("Store entity");
try
{
ejbStore.invoke(ctx.getInstance(), new Object[0]);
1.6 +3 -3
jboss/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java
Index: CMPFilePersistenceManager.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/CMPFilePersistenceManager.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- CMPFilePersistenceManager.java 2000/09/28 01:17:00 1.5
+++ CMPFilePersistenceManager.java 2000/09/30 00:59:40 1.6
@@ -42,7 +42,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 CMPFilePersistenceManager
implements EntityPersistenceStore
@@ -142,14 +142,14 @@
{
if (finderMethod.getName().equals("findAll"))
{
- // Logger.debug("Find all entities");
+//DEBUG Logger.debug("Find all entities");
String[] files = dir.list();
ArrayList result = new ArrayList();
for (int i = 0; i < files.length; i++)
if (files[i].endsWith(".ser"))
{
-// Logger.debug("Found entity");
+//DEBUG Logger.debug("Found entity");
result.add(files[i].substring(0,files[i].length()-4));
}
1.19 +7 -17
jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java
Index: EntitySynchronizationInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/EntitySynchronizationInterceptor.java,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -r1.18 -r1.19
--- EntitySynchronizationInterceptor.java 2000/09/28 01:17:01 1.18
+++ EntitySynchronizationInterceptor.java 2000/09/30 00:59:40 1.19
@@ -48,7 +48,7 @@
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
-* @version $Revision: 1.18 $
+* @version $Revision: 1.19 $
*/
public class EntitySynchronizationInterceptor
extends AbstractInterceptor
@@ -207,7 +207,7 @@
}
// So we can go on with the invocation
- Logger.debug("Tx is "+ ((tx == null)? "null" : tx.toString()));
+//DEBUG Logger.debug("Tx is "+ ((tx == null)? "null" : tx.toString()));
// Invocation with a running Transaction
@@ -318,7 +318,7 @@
//DEBUG
Logger.debug("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
-
Logger.debug("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
+//DEBUG
Logger.debug("EntitySynchronization sync calling store on ctx "+ctx.hashCode());
container.getPersistenceManager().storeEntity(ctx);
}
@@ -378,24 +378,14 @@
switch (commitOption) {
// Keep instance cached after tx commit
case A:
- try {
- // The state is still
valid (only point of access is us)
- ctx.setValid(true);
-
- } catch (Exception e) {
- Logger.debug(e);
- }
+ // The state is still valid
(only point of access is us)
+ ctx.setValid(true);
break;
// Keep instance active, but
invalidate state
case B:
- try {
- // Invalidate state
(there might be other points of entry)
- ctx.setValid(false);
-
- } catch (Exception e) {
- Logger.debug(e);
- }
+ // Invalidate state (there
might be other points of entry)
+ ctx.setValid(false);
break;
// Invalidate everything AND Passivate
instance
1.10 +3 -6 jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java
Index: LogInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/LogInterceptor.java,v
retrieving revision 1.9
retrieving revision 1.10
diff -u -r1.9 -r1.10
--- LogInterceptor.java 2000/09/29 21:25:18 1.9
+++ LogInterceptor.java 2000/09/30 00:59:40 1.10
@@ -36,7 +36,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.9 $
+ * @version $Revision: 1.10 $
*/
public class LogInterceptor
extends AbstractInterceptor
@@ -73,11 +73,8 @@
String name = getContainer().getBeanMetaData().getEjbName();
- // Should we log all calls?
- callLogging =
getContainer().getBeanMetaData().getContainerConfiguration().getCallLogging();
-
- // DEBUG
- callLogging = true;
+ // Should we log all calls?
+ callLogging =
getContainer().getBeanMetaData().getContainerConfiguration().getCallLogging();
log = new Log(name);
}
1.14 +2 -2
jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java
Index: NoPassivationEntityInstanceCache.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationEntityInstanceCache.java,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -r1.13 -r1.14
--- NoPassivationEntityInstanceCache.java 2000/09/28 01:17:01 1.13
+++ NoPassivationEntityInstanceCache.java 2000/09/30 00:59:40 1.14
@@ -38,7 +38,7 @@
* @author Rickard �berg ([EMAIL PROTECTED])
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Andy Schaefer</a>
-* @version $Revision: 1.13 $
+* @version $Revision: 1.14 $
*/
public class NoPassivationEntityInstanceCache
implements EntityInstanceCache
@@ -103,7 +103,7 @@
// Use the CacheKey for the rest of the method
CacheKey cacheKey = (CacheKey) id;
- Logger.debug("Get "+cacheKey+" from cache");
+//DEBUG Logger.debug("Get "+cacheKey+" from cache");
EntityEnterpriseContext ctx;
1.12 +2 -4
jboss/src/main/org/jboss/ejb/plugins/NoPassivationStatefulSessionInstanceCache.java
Index: NoPassivationStatefulSessionInstanceCache.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/NoPassivationStatefulSessionInstanceCache.java,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- NoPassivationStatefulSessionInstanceCache.java 2000/09/28 01:17:01 1.11
+++ NoPassivationStatefulSessionInstanceCache.java 2000/09/30 00:59:41 1.12
@@ -32,7 +32,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 NoPassivationStatefulSessionInstanceCache
implements InstanceCache
@@ -82,9 +82,7 @@
public synchronized EnterpriseContext get(Object id)
throws RemoteException
{
-
- //DEBUG Logger.debug("Stateful cache looking for ID "+id);
- Logger.debug("Stateful cache looking for ID "+id);
+//DEBUG Logger.debug("Stateful cache looking for ID "+id);
// Do we have the context in cache?
StatefulSessionEnterpriseContext ctx =
1.5 +7 -6
jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java
Index: StatelessSessionInstanceInterceptor.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/StatelessSessionInstanceInterceptor.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- StatelessSessionInstanceInterceptor.java 2000/09/29 21:25:18 1.4
+++ StatelessSessionInstanceInterceptor.java 2000/09/30 00:59:41 1.5
@@ -39,7 +39,7 @@
*
* @see <related>
* @author Rickard �berg ([EMAIL PROTECTED])
- * @version $Revision: 1.4 $
+ * @version $Revision: 1.5 $
*/
public class StatelessSessionInstanceInterceptor
extends AbstractInterceptor
@@ -87,20 +87,21 @@
return getNext().invoke(mi);
} catch (RuntimeException e) // Instance will be GC'ed at MI return
{
+ mi.setEnterpriseContext(null);
throw e;
} catch (RemoteException e) // Instance will be GC'ed at MI return
{
+ mi.setEnterpriseContext(null);
throw e;
} catch (Error e) // Instance will be GC'ed at MI return
{
+ mi.setEnterpriseContext(null);
throw e;
- } catch (Exception e)
+ } finally
{
- // Application exception
// Return context
- container.getInstancePool().free(mi.getEnterpriseContext());
-
- throw e;
+ if (mi.getEnterpriseContext() != null)
+ container.getInstancePool().free(mi.getEnterpriseContext());
}
}
1.6 +6 -8 jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java
Index: TxInterceptorBMT.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorBMT.java,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- TxInterceptorBMT.java 2000/09/29 21:25:18 1.5
+++ TxInterceptorBMT.java 2000/09/30 00:59:41 1.6
@@ -49,7 +49,7 @@
* @see <related>
* @author <a href="mailto:[EMAIL PROTECTED]">Marc Fleury</a>
* @author <a href="mailto:[EMAIL PROTECTED]">Sebastien Alborini</a>
-* @version $Revision: 1.5 $
+* @version $Revision: 1.6 $
*/
public class TxInterceptorBMT
extends AbstractInterceptor
@@ -208,14 +208,12 @@
// this is necessary for optimized (inVM) calls: threads come
associated with the client transaction
Transaction t1 = tm.disassociateThread();
- // DEBUG Logger.debug("TxInterceptorBMT disassociate" + ((t1==null) ?
"null": Integer.toString(t1.hashCode())));
- Logger.debug("TxInterceptorBMT disassociate" + ((t1==null) ? "null":
Integer.toString(t1.hashCode())));
+//DEBUG Logger.debug("TxInterceptorBMT disassociate" + ((t1==null) ?
"null": Integer.toString(t1.hashCode())));
// t2 refers to the instance transaction (spec ejb1.1, 11.6.1, p174)
Transaction t2 = mi.getEnterpriseContext().getTransaction();
- // DEBUG Logger.debug("TxInterceptorBMT t2 in context" + ((t2==null) ?
"null": Integer.toString(t2.hashCode())));
- Logger.debug("TxInterceptorBMT t2 in context" + ((t2==null) ? "null":
Integer.toString(t2.hashCode())));
+//DEBUG Logger.debug("TxInterceptorBMT t2 in context" + ((t2==null) ? "null":
Integer.toString(t2.hashCode())));
try {
@@ -257,7 +255,7 @@
if (t1 != null) {
// DEBUG Logger.debug("TxInterceptorBMT reassociating
client tx " + t1.hashCode());
- Logger.debug("TxInterceptorBMT reassociating client tx
" + t1.hashCode());
+//DEBUG Logger.debug("TxInterceptorBMT reassociating
client tx " + t1.hashCode());
// reassociate the previous transaction before
returning
tm.associateThread(t1);
@@ -269,7 +267,7 @@
// t3 is the transaction associated with the context
at the end of the call
Transaction t3 =
mi.getEnterpriseContext().getTransaction();
- Logger.debug("in TxIntBMT " + t3);
+//DEBUG Logger.debug("in TxIntBMT " + t3);
// for a stateless sessionbean the transaction should
be completed at the end of the call
if (t3 != null) switch (t3.getStatus()) {
@@ -284,7 +282,7 @@
case Status.STATUS_PREPARED:
// cf ejb1.1 11.6.1
- Logger.debug("Application error: BMT
stateless bean " + container.getBeanMetaData().getEjbName() + " should complete
transactions before returning (ejb1.1 spec, 11.6.1)");
+ Logger.error("Application error: BMT
stateless bean " + container.getBeanMetaData().getEjbName() + " should complete
transactions before returning (ejb1.1 spec, 11.6.1)");
// the instance interceptor will
discard the instance
throw new RemoteException("Application
error: BMT stateless bean " + container.getBeanMetaData().getEjbName() + " should
complete transactions before returning (ejb1.1 spec, 11.6.1)");
1.5 +11 -11 jboss/src/main/org/jboss/ejb/plugins/TxInterceptorCMT.java
Index: TxInterceptorCMT.java
===================================================================
RCS file:
/products/cvs/ejboss/jboss/src/main/org/jboss/ejb/plugins/TxInterceptorCMT.java,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- TxInterceptorCMT.java 2000/09/29 21:25:18 1.4
+++ TxInterceptorCMT.java 2000/09/30 00:59:41 1.5
@@ -40,7 +40,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.4 $
+* @version $Revision: 1.5 $
*/
public class TxInterceptorCMT
extends AbstractInterceptor
@@ -123,7 +123,7 @@
default:
name = "TX_UNKNOWN";
}
- Logger.debug(name+" for "+m.getName());
+//DEBUG Logger.debug(name+" for "+m.getName());
}
private Object invokeNext(boolean remoteInvocation, MethodInvocation mi) throws
Exception {
@@ -137,9 +137,9 @@
} catch (RuntimeException e)
{
// EJB 2.0 17.3, table 15
- if (mi.getEnterpriseContext().getTransaction() != null)
+ if (mi.getTransaction() != null)
{
-
mi.getEnterpriseContext().getTransaction().setRollbackOnly();
+ mi.getTransaction().setRollbackOnly();
RemoteException tre = new
TransactionRolledbackException(e.getMessage());
tre.detail = e;
throw tre;
@@ -151,9 +151,9 @@
} catch (RemoteException e)
{
// EJB 2.0 17.3, table 15
- if (mi.getEnterpriseContext().getTransaction() != null)
+ if (mi.getTransaction() != null)
{
-
mi.getEnterpriseContext().getTransaction().setRollbackOnly();
+ mi.getTransaction().setRollbackOnly();
RemoteException tre = new
TransactionRolledbackException(e.getMessage());
tre.detail = e;
throw tre;
@@ -165,9 +165,9 @@
} catch (Error e)
{
// EJB 2.0 17.3, table 15
- if (mi.getEnterpriseContext().getTransaction() != null)
+ if (mi.getTransaction() != null)
{
-
mi.getEnterpriseContext().getTransaction().setRollbackOnly();
+ mi.getTransaction().setRollbackOnly();
RemoteException tre = new
TransactionRolledbackException(e.getMessage());
tre.detail = e;
throw tre;
@@ -286,7 +286,7 @@
finally {
//DEBUG Logger.debug("TxInterceptorCMT: in finally");
- Logger.debug("TxInterceptorCMT: In finally");
+//DEBUG Logger.debug("TxInterceptorCMT: In finally");
// Only do something if we started the transaction
if (newTransaction != null) {
@@ -305,9 +305,9 @@
// This will happen if
// a) everything goes well
// b) app. exception was thrown
- Logger.debug("TxInterceptorCMT:before commit");
+//DEBUG Logger.debug("TxInterceptorCMT:before
commit");
newTransaction.commit();
- Logger.debug("TxInterceptorCMT:after commit");
+//DEBUG Logger.debug("TxInterceptorCMT:after
commit");
}