ABSTRACT
Since annotations were added to the Java language, many enterprise frameworks have been transitioning to using annotated Plain Old Java Objects (POJOs) in their latest releases. Our automated refactoring tool, Trailblazer, alleviates the maintenance burden of such annotation refactoring tasks. The tool implements a novel approach that leverages a machine learning algorithm to infer semantics-preserving rules that are then used to automatically transform legacy Java classes.
Using Trailblazer involves two phases. First, given an XML-based framework application, a programmer creates an annotation-based version of the application by hand, with Trailblazer recording the programmer's actions. Trailblazer then uses inductive learning to infer generalized upgrade rules. In the second phase, other programmers can apply the inferred general transformation rules to upgrade any other application that uses the same framework. Thus, once one developer has trailblazed through the hurdles of manually upgrading for a given framework, other developers can automatically follow along the beaten path. In this demonstration, we will use transparent persistence as our example domain to show how Trailblazer can infer generalized rules and then automatically upgrade a legacy enterprise application that uses EJB 2.0 XML configuration files, to use EJB 3.0 annotations.
- R. Mohan, P. Norvig, S. Russell, and C. O'Reilly. Artificial Intelligence: A Modern Approach. http://aima.cs.berkeley.edu/.Google Scholar
- D. Panda, D. Clarke, and M. Schincariol. EJB 3.0 migration. Technical report, Oracle, October 2005.Google Scholar
- Sun Developer Network. Java Pet Store 2.0 reference application. http://java.sun.com/developer/releases/petstore/petstore1_3_1_02.html.Google Scholar
- Sun Microsystems Inc. Java 2 Platform, Enterprise Edition (J2EE), 2003.Google Scholar
- W. Tansey and E. Tilevich. Annotation refactoring: inferring upgrade transformations for legacy applications. In OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object oriented programming systems languages and applications, pages 295--312, 2008. Google ScholarDigital Library
Index Terms
- Trailblazer: a tool for automated annotation refactoring
Recommendations
Annotation refactoring: inferring upgrade transformations for legacy applications
Since annotations were added to the Java language, many frameworks have moved to using annotated Plain Old Java Objects (POJOs) in their newest releases. Legacy applications are thus forced to undergo extensive restructuring in order to migrate from old ...
Annotation refactoring: inferring upgrade transformations for legacy applications
OOPSLA '08: Proceedings of the 23rd ACM SIGPLAN conference on Object-oriented programming systems languages and applicationsSince annotations were added to the Java language, many frameworks have moved to using annotated Plain Old Java Objects (POJOs) in their newest releases. Legacy applications are thus forced to undergo extensive restructuring in order to migrate from old ...
Design patterns for annotation-based APIs
SugarLoafPLoP '16: Proceedings of the 11th Latin-American Conference on Pattern Languages of ProgrammingWith the introduction of code annotations in popular languages like Java and C#, several frameworks and platforms adopted a metadata-based API (Application Programming Interface). By using this approach, instead of extending classes, implementing ...
Comments