Bug 450399 - How to get weaved bytecode in runtime [integration with hotswap apps like spring-loaded]
Summary: How to get weaved bytecode in runtime [integration with hotswap apps like spr...
Status: NEW
Alias: None
Product: AspectJ
Classification: Tools
Component: LTWeaving (show other bugs)
Version: 1.8.3   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2014-11-06 16:07 EST by alex serdiuk CLA
Modified: 2014-11-06 16:07 EST (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description alex serdiuk CLA 2014-11-06 16:07:13 EST
Hello,

I want to integrate spring-loaded with aspectj.
E.g. 
1. I modify class and it's loaded (here we have original compiled class without any spring-loaded or aspectj modifications) 
2. Then I need to get somehow weaved bytecode from aspectj.
3. Then I need to pass this bytecode further for spring-loaded.

How I can get this weaved bytecode? (I'm using LTW).

I have found plugin mechanism in spring-loaded which resolves issue when server  stating.
It provides ability to call Aj.preProcess during startup, so we get weaved class and it's ok. (So, I didn't enable aspectjweaver agent. I just use code like aj.preProcess (aj is a static var) for classes which are intercepted by spring-loaded)

The issue is: when I reload class via spring-loaded asjectj logs print error about not existing interface ( which is added by spring-loaded I guess ).
E.g. [ChildClassLoader@16d9e492] error can't determine implemented interfaces of missing type <originalClassName>__I.

Is there any method which takes bytecode and returns modified bytecode? (taking into account everything which is in aop.xml)

P.S. It's not a bug apparently. I wonder is there any other place where I can ask similar questions, or it's ok to create a bug in such cases?