[jboss-cvs] JBossAS SVN: r69488 - projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/instrument.
jboss-cvs-commits at lists.jboss.org
jboss-cvs-commits at lists.jboss.org
Wed Jan 30 08:53:32 EST 2008
Author: kabir.khan at jboss.com
Date: 2008-01-30 08:53:31 -0500 (Wed, 30 Jan 2008)
New Revision: 69488
Modified:
projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/instrument/GeneratedAdvisorInstrumentor.java
Log:
Modified: projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/instrument/GeneratedAdvisorInstrumentor.java
===================================================================
--- projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/instrument/GeneratedAdvisorInstrumentor.java 2008-01-30 13:51:15 UTC (rev 69487)
+++ projects/aop/branches/deadlocks/aop/src/main/org/jboss/aop/instrument/GeneratedAdvisorInstrumentor.java 2008-01-30 13:53:31 UTC (rev 69488)
@@ -723,8 +723,8 @@
{
String code = infoName + " = super.copyInfoFromClassAdvisor(((" + genadvisor.getName() + ")" + clazz.getName() + "." + GET_CLASS_ADVISOR + "())." + infoName + ");";
initialiseInfosForInstanceCode.append(code);
- lockWriteChainsCode.append(infoName).append(".getInterceptorChainReadWriteLock().writeLock().lock();");
- unlockWriteChainsCode.append(infoName).append(".getInterceptorChainReadWriteLock().writeLock().unlock();");
+ lockWriteChainsCode.append(infoName).append(".getInterceptorChainReadWriteLock().lockWrite();");
+ unlockWriteChainsCode.append(infoName).append(".getInterceptorChainReadWriteLock().unlockWrite();");
}
if (infoClassName.equals(FieldInfo.class.getName()))
{
@@ -793,7 +793,7 @@
CHECK_VERSION + "();" +
"if (" + updatedAdvicesFieldName + ")" +
"{ " +
- " " + names.getInfoFieldName() + ".getInterceptorChainReadWriteLock().writeLock().lock();" +
+ " " + names.getInfoFieldName() + ".getInterceptorChainReadWriteLock().lockWrite();" +
" try" +
" {" +
" " + names.getInfoFieldName() + ".setInterceptors( " + INSTANCE_ADVISOR_MIXIN + ".getWrappers(" + PARENT + "." + names.getInfoFieldName() + ".getInterceptors()) );" +
@@ -801,7 +801,7 @@
" " + updatedAdvicesFieldName + " = false;" +
" super.rebindJoinPointWithInstanceInformation(" + names.getInfoFieldName() + ");" +
" } finally {" +
- " " + names.getInfoFieldName() + ".getInterceptorChainReadWriteLock().writeLock().unlock();}" +
+ " " + names.getInfoFieldName() + ".getInterceptorChainReadWriteLock().unlockWrite();}" +
"}";
instanceAdvisorMethod.insertBefore(code);
genInstanceAdvisor.addMethod(instanceAdvisorMethod);
@@ -885,12 +885,12 @@
// TODO remove this code and put it somewhere common to all ga transformers.
static String generateInterceptorChainLockCode(String infoName)
{
- return infoName + ".getInterceptorChainReadWriteLock().readLock().lock();";
+ return infoName + ".getInterceptorChainReadWriteLock().lockWrite();";
}
static String generateInterceptorChainUnlockCode(String infoName)
{
- return infoName + ".getInterceptorChainReadWriteLock().readLock().unlock();";
+ return infoName + ".getInterceptorChainReadWriteLock().unlockWrite();";
}
private void addCodeToInitialiseMethod(CtClass clazz, String code, String methodName) throws NotFoundException
More information about the jboss-cvs-commits
mailing list