Questions tagged [load-time-weaving]

Binary weaving of aspects when a class is loaded.

Load-Time Weaving (LTW) is instrumentation (binary weaving of aspects) at class loading time in a VM.

For example, in Java, it is implemented by AspectJ.

Alternatively, in the .NET world, it is also called "Runtime Weaving" (see the PostSharp documentation).

162 questions
0
votes
1 answer

Use Aspectj load time weaving for logging my source (include test) without logging external libraries

I am using AspectJ for logging when tests execution only, so I use load time weaving. I pack Interceptor to a jar file to use with another Maven project. But with below config, aspectjweaver will weave methods of external libraries. I want it only…
0
votes
1 answer

Pure AspectJ load time weawing does not work

I am trying to run an example of AspectJ load time weawing. First I tried to do something myself, and nothing worked. Normal weawing works fine but when I try to pointcut some library using load time weawing - nothing happens. Here is the example…
0
votes
1 answer

How to create an @Aspect in one jar and intercept methods from another jar using Load Time Weaving?

I've gone through many Aspect related posts, but none of them seem to help me. I see a lot of the posts are really old, and all the example GitHub repositories only feature a single .jar when I'm working with multiple. I know my common jar is being…
wheeleruniverse
  • 1,511
  • 2
  • 20
  • 37
0
votes
0 answers

Transaction support in spring-boot running Tomcat, with AspectJ load-time weaving (LTW)

I am having a hard time configuring transactional support in spring-boot 2.0.3 with AspectJ LTW (load-time weaving). My spring-boot is running embedded Tomcat servlet container. In my persistence layer, I am not using JPA, but Spring JDBC Template…
Ihor M.
  • 2,728
  • 3
  • 44
  • 70
0
votes
1 answer

Understanding of Load-time weaving with AspectJ in the Spring Framework for application deployed on Tomcat

I am using Load-time weaving on Tomcat server for transaction management in spring with aspcetj mode and I am finding hard to understand it conceptually. My transaction manager configuration is as follows
Pawan Patil
  • 1,067
  • 5
  • 20
  • 46
0
votes
2 answers

Inconsistent build results when using AspectJ Load Time Weaving in a spring boot application

Currently I am using AspectJ Load Time Weaving to intercept the constructor of a base entity for auditing purposes. However when running the application I am getting incredibly inconsistent results revolving around the aspectOf() method that aspectJ…
Pensai
  • 9
  • 7
0
votes
1 answer

How to set up Load time weaving configuration without IDE?

I want to change from AspectJ compile time weaving to Load time weaving. I cannot find detail setup instructions anywhere without IDE usage. Please help?
kkd
  • 1
  • 1
0
votes
1 answer

Spring-Boot 2 AspectJ Load Time Weaving

I am experimenting with Spring Boot 2 and AspectJ Load Time Weaving. I am able to run both tests and application from Eclipse (add two agents: aspectjweaver and spring-instrument to the VM), surefire from Maven also runs fine, however I am unable to…
0
votes
1 answer

AspectJ LoadTimeWeaving on OSGI

I'm trying to use aspectJ Load Time Weaving (no Spring) on OSGI with help of equinox jars (org.aspectj.runtime, org.aspectj.weaver, org.eclipse.equinox.weaving.aspectj on bundles folder and org.eclipse.equinox.weaving.hook located at the same folder…
0
votes
1 answer

Load Time Weaving controlling configuration

I'm using AspectJ (based on Load Weaving Time) in order to trace the flow by logs in my project. I want to give the user the ability to switch it on and off based on his needs. Is there any way to control these configurations (LTW jars and plugins)…
Shico Ren
  • 17
  • 6
0
votes
0 answers

Using Loadtime weaver with third party jar class method interceptor

I am trying to intercept a class in third party jar from my spring boot application. I am trying to do it as
codeomnitrix
  • 4,179
  • 19
  • 66
  • 102
0
votes
1 answer

EnableLoadTimeWeaving Spring Boot Embedded Tomcat

Caching Aspects are not having any effects at runtime with Spring Boot and Embedded tomcat with LoadTimeWeaving enabled,but we are seeing the weaving is happening fine in the logs. Below is the configuration, the LoadTimeWeaving is enabled along…
Raju
  • 9
  • 1
  • 5
0
votes
1 answer

NullPointerException when autowiring into non-spring managed class (POJO) - Spring Boot

I'm relatively new to Spring Boot and dependency injection overall, so please forgive any noob things going on here. I'm building an API and am having trouble when injecting dependencies into a POJO resource (DTO). When I call the method in the…
0
votes
0 answers

Pass an class/object to aspectj

I have created a framework that uses LoadTimeWeaving. In some cases the classes that my framework are trying to weave have already been loaded. Thus these classes wont be handled by aspectj's LoadTimeWeaving. My initial thought was to try and…
Nosfert
  • 382
  • 1
  • 3
  • 11
0
votes
2 answers

Eclipse RCP: How can I add an inner class when weaving

In my RCP app, I'm using the WeavingHook service to modify a third party class at load time. I'm not able to make any changes to the third party code, so my weaving implementation has to work with it as-is. I have it working except for one issue.…
MidnightJava
  • 1,927
  • 2
  • 18
  • 38