[jboss-user] [JBoss AOP] - frozen class creating JMS Session

Mark Gargan do-not-reply at jboss.com
Tue May 11 11:56:44 EDT 2010

Mark Gargan [http://community.jboss.org/people/MarkGargan] replied to the discussion

"frozen class creating JMS Session"

To view the discussion, visit: http://community.jboss.org/message/542368#542368

Hey Kabir,

           We encountered the same problem this morning, basically it's what you mentioned below, the mechanism

org.jboss.aop.advice + <FullClassName>_ + <methodName>_ + <methodHash>

perhaps has been changed to this. but in the version of 
PerVmAdvice that we were using, jboss-aop-client-5.0.0.GA.jar that comes with the jboss
downloadable from the redhat site it's

ClassLoader cl = SecurityActions.getClassLoader(aspect.getClass());
String name = "org.jboss.aop.advice." + aspect.getClass().getName() + "_z_" + adviceName + "_" + System.identityHashCode(cl);

which doesn't cater for situations where the method is overloaded as the adviceName defaults to the methodName and the hashCode fo the classloader
will be the same. The above redeliver method appears in the ClientSessionDelegate class which implements the SessionDelegate interface within the jboss-messaging module.

The SessionDelegate interface has three method signatures overloaded redeliver, createTextMessage and createObjectMessage. 

I renamed the overloaded methods (they are all delegated to from the JBossSession class), refactored the ClientSessionDelegate class, rebuilt the jar
and placed in our app and the problem didn't re-occur. 

I've attached a copy of the jar with the amended classes, JBossSession, ClientSessionDelegate and SessionDelegate. 

I didn't go through the process of resigned the classes in the MANIFEST.MF just in case. 



Reply to this message by going to Community

Start a new discussion in JBoss AOP at Community

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.jboss.org/pipermail/jboss-user/attachments/20100511/baa93383/attachment-0001.html 

More information about the jboss-user mailing list