I found the point of the problem although no idea why. The code freezes
right here (see*) when running in Glassfish.
In BcelWeaver (this is with aspectj 1.6.2)
public void setReweavableMode(boolean xNotReweavable) {
if (trace.isTraceEnabled())
trace.enter("setReweavableMode", this, xNotReweavable);
inReweavableMode = !xNotReweavable;
WeaverStateInfo.setReweavableModeDefaults(!xNotReweavable,
false, true);
*BcelClassWeaver.setReweavableMode(!xNotReweavable);
if (trace.isTraceEnabled())
trace.exit("setReweavableMode");
}
If i add these system properties then i don't have this problem which
makes me think it is related to logging. I am running jdk1.6.
<jvm-options>-javaagent:C:\JavaCAPS6\appserver\aspectjweaver.jar</jvm-options>
<jvm-options>-Daj.weaving.verbose=true</jvm-options>
//my new props seem to solve issue
<jvm-options>-Dorg.aspectj.tracing.debug=false</jvm-options>
<jvm-options>-Dorg.aspectj.tracing.factory=default</jvm-options>
<jvm-options>-Dorg.aspectj.tracing.enabled=false</jvm-options>
<jvm-options>-Dorg.aspectj.tracing.file=C:/temp/org_aspectj_tracing_file.txt</jvm-options>
<jvm-options>-Dorg.aspectj.dump.directory=C:/temp</jvm-options>
<jvm-options>-Dorg.aspectj.weaver.Dump.exception=true</jvm-options>
<jvm-options>-Dorg.aspectj.weaver.Dump.condition=fail</jvm-options>
ASIDE: Are there a list of all such properties??
Without these props nothing works. This is related to use of this
pointcut/advice combo
public pointcut DeliveryChannel_new() :
call(public javax.jbi.messaging.DeliveryChannel+.new(..));
Object around() throws Exception :
DeliveryChannel_new() {
System.out.println("3entering " + thisJoinPoint.toLongString());
Proceed proceed = new Proceed() {
public Object invoke(Object target, Object[] args) throws
Exception {
return proceed();
}
};
Object result = null;
try {
result = system.invoke(JBIConstants.KEY_DELIVERYCHANNEL_NEW,
thisJoinPoint, proceed);
} catch (Exception e) {
throw e;
}
return result;
}
Attached image, as you can see i was stepping then froze. Not even
really frozen just like dead. Has any such issue come up in the past.
This is a little alarming as basically the whole appserver is dead for
no known reason.

Jason Weinstein wrote:
Can someone
suggest why something like this might not work in an appserver
(specifically Glassfish) and will work in Mock/Test code run outside
the appserver.
Removal of this aspect from and the appserver is fine. In fact it is
the constructor aspects which are causing the problem.
public pointcut DeliveryChannel_new() :
call(public javax.jbi.messaging.DeliveryChannel+.new(..));
Object around() throws Exception :
DeliveryChannel_new() {
System.out.println("3entering " + thisJoinPoint.toLongString());
Proceed proceed = new Proceed() {
public Object invoke(Object target, Object[] args) throws
Exception {
return proceed();
}
};
Object result = null;
try {
result = system.invoke(JBIConstants.KEY_DELIVERYCHANNEL_NEW,
thisJoinPoint, proceed);
} catch (Exception e) {
throw e;
}
return result;
}
Can anyone suggest a way to debug this?? I am stuck.
Glassfish basically gets to here and FREEZES
Thu Dec 04 12:30:41 PST 2008 info AspectJ Weaver Version 1.6.1 built on
Thursday Jul 3, 2008 at 18:35:41 GMT
Thu Dec 04 12:30:41 PST 2008 info register classloader
java.net.URLClassLoader@123663b
Thu Dec 04 12:30:41 PST 2008 info using configuration
file:/C:/JavaCAPS6/appserver/domains/domain1/lib/aopjbi.jar!/META-INF/aop.xml
Thu Dec 04 12:30:41 PST 2008 info register aspect
com.sun.esb.console.jbi.aspects.example.JBIInterceptorAspect
Thu Dec 04 12:30:41 PST 2008 debug weaving
'com.sun.soabi.capsverifier.AppVerifierLifeCycleListener'
Where it should go on to print
Thu Dec 04 12:33:57 PST 2008 info AspectJ Weaver Version 1.6.1 built on
Thursday Jul 3, 2008 at 18:35:41 GMT
Thu Dec 04 12:33:57 PST 2008 info register classloader
java.net.URLClassLoader@1546c85
Thu Dec 04 12:33:57 PST 2008 info using configuration
file:/C:/JavaCAPS6/appserver/domains/domain1/lib/aopjbi.jar!/META-INF/aop.xml
Thu Dec 04 12:33:57 PST 2008 info register aspect
com.sun.esb.console.jbi.aspects.example.JBIInterceptorAspect
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.soabi.capsverifier.AppVerifierLifeCycleListener'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.soabi.logndc.NDCLifeCycleListener'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.caps.jms.JmqBrokerLifecycle'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.caps.jms.JmsLifecycleImpl'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.caps.jms.JmsLifecycle'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.stc.jmsmx.core.JmsServerAdmin'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.stc.jmsmx.core.JmsServerAdminBase'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.stc.jmsmx.sjsmq.SJSMQAdminMBean'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.stc.jmsmx.util.MessageManager'
Thu Dec 04 12:33:58 PST 2008 info AspectJ Weaver Version 1.6.1 built on
Thursday Jul 3, 2008 at 18:35:41 GMT
Thu Dec 04 12:33:58 PST 2008 info register classloader
java.net.URLClassLoader@18e6e25
Thu Dec 04 12:33:58 PST 2008 info using configuration
file:/C:/JavaCAPS6/appserver/domains/domain1/lib/aopjbi.jar!/META-INF/aop.xml
Thu Dec 04 12:33:58 PST 2008 info register aspect
com.sun.esb.console.jbi.aspects.example.JBIInterceptorAspect
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.jbi.framework.sun.SunASJBIBootstrap'
Thu Dec 04 12:33:58 PST 2008 info AspectJ Weaver Version 1.6.1 built on
Thursday Jul 3, 2008 at 18:35:41 GMT
Thu Dec 04 12:33:58 PST 2008 info register classloader
java.net.URLClassLoader@e03186
Thu Dec 04 12:33:58 PST 2008 info using configuration
file:/C:/JavaCAPS6/appserver/domains/domain1/lib/aopjbi.jar!/META-INF/aop.xml
Thu Dec 04 12:33:58 PST 2008 info register aspect
com.sun.esb.console.jbi.aspects.example.JBIInterceptorAspect
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.am.AMConfiguratorLifeCycleModule'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.caps.jms.StcmsLifecycleModule'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.soabi.logndc.NDCProvider'
Thu Dec 04 12:33:58 PST 2008 debug weaving
'com.sun.soabi.logndc.NDCProvider$ContextInserter'
...etc
I am using
<!-- various required jvm-options -->
<jvm-options>-javaagent:C:\JavaCAPS6\appserver\aspectjweaver.jar</jvm-options>
<jvm-options>-Daj.weaving.verbose=true</jvm-options>
aop.xml
<aspectj>
<aspects>
<aspect
name="com.sun.esb.console.jbi.aspects.example.JBIInterceptorAspect"
/>
</aspects>
<weaver
options="-XmessageHandlerClass:com.sun.esb.console.jbi.aspects.util.AspectJMessageHandler">
// This prints above file
...etc
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
https://dev.eclipse.org/mailman/listinfo/aspectj-users
|