Solved

post load time weaving in java

Posted on 2014-03-25
5
720 Views
Last Modified: 2014-04-17
Post-compile: weaving is also sometimes called binary weaving, and is used to weave existing class files and JAR files. As with compile-time weaving, the aspects used for weaving may be in source or binary form, and may themselves be woven by aspects.
Load-time: weaving is simply binary weaving deferred until the point that a classloader loads a class file and defines the class to the JVM. To support this, one or more "weaving class loaders", either provided explicitly by the run-time
I was reading as above.
I have not understood clearly difference bewteen post compile,load time weaving what are advantages, disadvantages, practical uses.
please advise
Any links resources ideas highly appreciated. Thanks in advance
0
Comment
Question by:gudii9
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
5 Comments
 
LVL 35

Expert Comment

by:girionis
ID: 39958254
If you use load-time weaving the loading of your class will be a bit slower, that's the only difference with the post-compile weaving.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39973348
I never used this weaving. What is practical use of these weaving. Please advise
0
 
LVL 35

Expert Comment

by:girionis
ID: 39974291
Weaving is a technique that is used to enhance the functionality of a Java class. You do this by injecting bytecode* into a java class that manipulates a class file and adds more features to the class. For example you can weave JPA entities to add optimisation code that the programmer hasn't thought of.

Bytecode weaving can be done either post-compile (when your source files are compiled and have become a java class, then you weave the bytecode)  or during load time (when your class is loaded).

* There is also source code weaving.
0
 
LVL 7

Author Comment

by:gudii9
ID: 39976452
any practical examples, links on this to try out. please advise
0
 
LVL 35

Accepted Solution

by:
girionis earned 500 total points
ID: 39977468
0

Featured Post

PeopleSoft Has Never Been Easier

PeopleSoft Adoption Made Smooth & Simple!

On-The-Job Training Is made Intuitive & Easy With WalkMe's On-Screen Guidance Tool.  Claim Your Free WalkMe Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Viewers learn about the scanner class in this video and are introduced to receiving user input for their programs. Additionally, objects, conditional statements, and loops are used to help reinforce the concepts. Introduce Scanner class: Importing…
This tutorial explains how to use the VisualVM tool for the Java platform application. This video goes into detail on the Threads, Sampler, and Profiler tabs.
Suggested Courses

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question