[jboss-user] [JBoss AOP] - calling aspect from netty thread inside jboss 5.1

Gabriel Bermudez do-not-reply at jboss.com
Thu Jul 1 13:06:59 EDT 2010


Gabriel Bermudez [http://community.jboss.org/people/elgabo] replied to the discussion

"calling aspect from netty thread inside jboss 5.1"

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

--------------------------------------------------------------
Hi Kabir,
> Kabir Khan escribió:
> 
> Is the Thread.currentThread().getContextClassLoader() in MyNetworkListener what you would expect for your application?
> 

Thanks for your response.  First of all I don't know what context to expect. When the MDB calls the aspectized methods the thread context toString() method returns BaseClassLoader at 1c6e768{vfszip:/home/gabriel/devel/tools/jboss-5.1.0.GA/server/default/deploy/base.jar/} it makes sense.  The thread context is BaseClassLoader at d2b042{vfszip:/home/gabriel/devel/tools/jboss-5.1.0.GA/server/default/deploy/network.jar/} when the message is received.

> JBoss AOP doesn't really do anything fancy with classloaders unless your application uses isolated classloading, which I don't think is the case in your application.
> If you're using loadtime weaving, the -aop.xml stuff must be available before accessing the classes. For your basic.jar the deployers are smart enough to deploy the aop xml before the bean classes are loaded. Can you try getting rid of both jars, and then starting the server with basic.jar only. Once started deploy network.jar. If that helps, I'll dig out some resources on deployment ordering

I'm running my application inside JBoss 5.1, I'm not sure if it uses loadtime weaving by default.  Actually I'm running the server using Eclipse 3.5 so if it helps here are the VM's arguments:

-Dprogram.name=run.bat -Xms128m -Xmx512m  -XX:MaxPermSize=256m

I started the server with basic.jar and the deployed network.jar, it didn't help.

Thanks for your answer.

--------------------------------------------------------------

Reply to this message by going to Community
[http://community.jboss.org/message/550649#550649]

Start a new discussion in JBoss AOP at Community
[http://community.jboss.org/choose-container!input.jspa?contentType=1&containerType=14&container=2027]

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


More information about the jboss-user mailing list