Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

post load time weaving in java

Posted on 2014-03-25
5
Medium Priority
?
751 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
  • 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 2000 total points
ID: 39977468
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

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

By the end of 1980s, object oriented programming using languages like C++, Simula69 and ObjectPascal gained momentum. It looked like programmers finally found the perfect language. C++ successfully combined the object oriented principles of Simula w…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Viewers learn how to read error messages and identify possible mistakes that could cause hours of frustration. Coding is as much about debugging your code as it is about writing it. Define Error Message: Line Numbers: Type of Error: Break Down…
Viewers will learn about arithmetic and Boolean expressions in Java and the logical operators used to create Boolean expressions. We will cover the symbols used for arithmetic expressions and define each logical operator and how to use them in Boole…
Suggested Courses

927 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