[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] ajc for spring

Yes, it modifies the bytecode - class definitions and references.  The
one I know of is Jar Jar Links: http://code.google.com/p/jarjar/

Andy

On 9 May 2010 12:31, Jeffrey Blattman <jeffrey.blattman@xxxxxxxxx> wrote:
> thanks much for your response andy. yes, the immediate error is a "class not
> found" at runtime because of the package renaming. it's good to know that in
> general there is compatibility between different versions of ajc + the
> runtime components.
> i assume by package renaming tool, you mean something that modifies the byte
> code. i have no experience with that, but i'll take a look around and see
> what i can find.
>
> On Wed, May 5, 2010 at 8:48 AM, Andy Clement <andrew.clement@xxxxxxxxx>
> wrote:
>>
>> Hi,
>>
>> The runtime changes vary rarely and we are careful about maintaining
>> compatibility.  I would say you could use any version of ajc (which is
>> in aspectjtools.jar) and it will produce code compatible with whatever
>> aspectjrt.jar you have.  *except* you mention the modification of
>> package prefix - is that just for aspectjweaver.jar or is it also for
>> aspectjrt.jar?  I've never heard of anyone changing the package prefix
>> for aspectjrt.jar before.  There won't be a compiler that can create a
>> runtime dependency on a modified aspectjrt.jar.  I imagine the best
>> you could do is compile the app then run whatever package renamer type
>> tool was used on the compiled app and change the dependencies in the
>> compiled app from org.aspectj to com.bea.org.aspectj. (or write your
>> own tool to do this, it would be a very small program if you used
>> Asm).
>>
>> All the versions of aspectjtools.jar (containing the compiler) should
>> be in maven central if you want it from there rather than the AspectJ
>> download site.  The batch file (ajc.bat) in the downloaded full
>> version can show you how to invoke aspectjtools.jar to build your
>> code.
>>
>> Andy
>>
>> On 4 May 2010 18:07, Jeffrey Blattman <jeffrey.blattman@xxxxxxxxx> wrote:
>> > we are trying to use aspectj on weblogic server 10.3.
>> > WLS 10.3 bundles spring, which includes some version of *rt.jar and
>> > *weaver.jar. however, our project does not use spring. i therefore need
>> > to
>> > do compile-time weaving via ajc. however, obviously, ajc is not included
>> > via
>> > the spring JARs.
>> > you might ask why we don't just bundle the non-spring aspectj dist. the
>> > answer is that the powers that be are generally opposed to us adding
>> > additionally runtime components because of the size increase, and also
>> > because they will probably see this as a duplication since WLS already
>> > bundles aspectj (albeit in another form).
>> > so the question ... is there a way to find a version of ajc that will
>> > produce woven class files that can make use of the spring *rt.jar at
>> > runtime?
>> > an added complication is that the aspjectj classes bundled by WLS are
>> > re-packaged under the com.bea java package space.
>> > yes i realize this is an odd, almost impossible request, but thanks for
>> > reading.
>> > _______________________________________________
>> > aspectj-users mailing list
>> > aspectj-users@xxxxxxxxxxx
>> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
>> >
>> >
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@xxxxxxxxxxx
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>