[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Generated AjcClosure classes
|
I would like to point out that in a production environment detecting
complex changes across runs is not necessarily a big requirement once
one can invalidate the cache easily during deployment (not
hot-deployment because that is not a managed production environment in
anyone book). The purpose of the cache should be to improve the start-up
time - this is paramount. One can easily relax some checks as the
assumption is that nothing has changed outside a change request (& work
order) which would have lead to the cache been invalidated (deleted from
the file system) by operations. That said one does need to still handle
the case of a class being loaded across different classloaders so a key
on the class name or bytecode along is insufficient. JXInsight actually
matches a class loaded by different classloaders if the class image is
the same and the digest generated for a classloader hierarchy (based
static contexts) is also the same.
Andy is doing some great work lately on speeding things up so maybe the
benefits of a cache will diminish over time to some degree.
One thing which I do like about our approach is that we can front the
weaver with a configuration-based class filter which allows us to deploy
generic (pointcuts) aspects libraries and then refine the visibility
externally without needing to package/edit an aop.xml file or change a
aspect class.
Kind regards,
William
On 12/2/09 7:43 PM, William Louth (JINSPIRED.COM) wrote:
Hi Andy,
You are correct a key based just on the class bytecode is whole-fully
insufficient at least in the enterprise space because of classloaders
each of which can have different aspect
dependencies/libraries/configurations. JXInsight's enhanced AspectJ
weaver uses cache based on composite-key digests generated for
classloaders & classes that factors in such additional context
information. We also enhanced the load-time weaver with other
capabilities including class filtering, class differencing,
diagnostics, profiling,.... We have had this capability for more than
1 1/2 years.
Kind regards,
William