Hi Wendel,
So sorry I'm slow to reply here.
> I see the classes get woven at startup, but then at runtime the aspect isn't executing.
So the showweaveinfo and 'after' dumped bytecode is showing the weaving is happening but the aspects aren't running? I've not seen that before as usually if the weaving happens, the aspects run. If they don't I'd be expecting some kind of classnotfoundexception as the woven code cannot access the aspect class. Are you using something like my notes in http://andrewclement.blogspot.ca/2009/02/load-time-weaving-basics.html to debug the load time weaving? Do you by any chance have JMX turned on for the linux case? I'm aware of a bug in 1.7.3 related to turning on JMX that can adversely affect weaving. (Fixed in 1.7.4 snapshots)
> LTW adds over 2 minutes to startup
Can be many reasons for this. If you have a proliferation of classloaders, each will get a weaver. There are techniques for avoiding certain classloaders (e.g. jsp loaders) that you *know* are loading classes that should never be woven. We can also tweak the pointcuts sometimes to speed up matching (and reduce load time weaving time) - on that blog I referenced before is an article about using the built in timers to assess whether your pointcuts are taking a long time to match. If, with verbose on, you are seeing lots of jsp loaders getting weavers, we can address that.
> org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'vendorKeyController.AjcClosure9' defined in URL [jar:file:/export/home/infusionsoft/crm-29-sandbox2/
This gets into an area I don't know so well. I don't know why Spring would be trying to treat a generated closure as a bean. This forum should be a good place for that question:
-
How can I get my LTW to work, even if it is slow (presumably I can use the caching feature to only pay that price once?)
There is nothing special in AspectJ that should cause it to behave differently on different OSs. Are you using the same JDK (and fixpack level of that JDK) on each OS?
- How can I get compile-time parity with bytecode generated by LTW?
- Is there another way to dodge the issue in bold above having ajc-ed?
I would ask on the forum I referenced about that closure being treated as a bean.
cheers,
Andy