Abstract
This paper describes TRAP/J, a software tool that enables new adaptable behavior to be added to existing Java applications transparently (that is, without modifying the application source code and without extending the JVM). The generation process combines behavioral reflection and aspect-oriented programming to achieve this goal. Specifically, TRAP/J enables the developer to select, at compile time, a subset of classes in the existing program that are to be adaptable at run time. TRAP/J then generates specific aspects and reflective classes associated with the selected classes, producing an adapt-ready program. As the program executes, new behavior can be introduced via interfaces to the adaptable classes. A case study is presented in which TRAP/J is used to introduce adaptive behavior to an existing audio-streaming application, enabling it to operate effectively in a lossy wireless network by detecting and responding to changing network conditions.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Maes, P.: Concepts and experiments in computational reflection. In: Proceedings of the ACM Conference on Object-Oriented Languages (OOPSLA), pp. 147–155. ACM Press, New York (1987)
Kiczales, G., des Rivières, J., Bobrow, D.G.: The Art of Metaobject Protocols. MIT Press, Cambridge (1991)
Yang, Z., Cheng, B.H., Stirewalt, R.E.K., Sowell, J., Sadjadi, S.M., McKinley, P.K.: An aspect-oriented approach to dynamic adaptation. In: Proceedings of the ACM SIGSOFT Workshop On Self-healing Software, WOSS 2002 (2002)
Kiczales, G., Lamping, J., Mendhekar, A., Maeda, C., Videira Lopes, C., Loingtier, J.M., Irwin, J.: Aspect-oriented programming. In: Aksit, M., Matsuoka, S. (eds.) ECOOP 1997. LNCS, vol. 1241, pp. 220–242. Springer, Heidelberg (1997)
Sadjadi, S.M., McKinley, P.K., Stirewalt, R.E.K., Cheng, B.H.: Generation of self-optimizing wireless network applications. In: Proceedings of the International Conference on Autonomic Computing (ICAC 2004), New York, NY, pp. 310–311 (2004)
Kasten, E.P., McKinley, P.K., Sadjadi, S.M., Stirewalt, R.E.K.: Separating introspection and intercession in metamorphic distributed systems. In: Proceedings of the IEEE Workshop on Aspect-Oriented Programming for Distributed Computing (with ICDCS 2002), Vienna, Austria, pp. 465–472 (2002)
David, P.C., Ledoux, T., Bouraqadi-Saadani, N.M.N.: Two-step weaving with reflection using AspectJ. In: OOPSLA 2001 Workshop on Advanced Separation of Concerns in Object-Oriented Systems, Tampa (2001)
Redmond, B., Cahill, V.: Supporting unanticipated dynamic adaptation of application behaviour. In: Proceedings of the 16th European Conference on Object-Oriented Programming (2002)
Golm, M., Kleinoder, J.: metaXa and the future of reflection. In: Proceedings of Workshop on Reflective Programming in C++ and Java, pp. 1–5 (1998)
Wu, Z.: Reflective Java and a reflective component-based transaction architecture. In: Proceedings of Workshop on Reflective Programming in C++ and Java (1998)
Tatsubori, M., Chiba, S., Itano, K., Killijian, M.O.: OpenJava: A class-based macro system for Java. In: Proceedings of OORaSE, pp. 117–133 (1999)
de Oliveira Guimarães, J.: Reflection for statically typed languages. In: Jul, E. (ed.) ECOOP 1998. LNCS, vol. 1445, pp. 440–461. Springer, Heidelberg (1998)
Oliva, A., Buzato, L.E.: The implementation of Guaraná on Java. Technical Report IC-98-32, Universidade Estadual de Campinas (1998)
Welch, I., Stroud, R.J.: Kava - A Reflective Java Based on Bytecode Rewriting. In: Cazzola, W., Stroud, R.J., Tisato, F. (eds.) Reflection and Software Engineering. LNCS, vol. 1826, pp. 157–169. Springer, Heidelberg (2000)
Tanter, É., Noyè, J., Caromel, D., Cointe, P.: Partial behavioral reflection: Spatial and temporal selection of reification. In: Crocker, R., Steele Jr., G.L. (eds.) Proceedings of the 18th ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applications (OOPSLA 2003), Anaheim, California, pp. 27–46. ACM Press, New York (2003)
Baker, J., Hsieh, W.: Runtime aspect weaving through metaprogramming. In: Proceedings of the first International Conference on Aspect-Oriented Software Development, Enschede, The Netherlands (2002)
Kiczales, G., Hilsdale, E., Hugunin, J., Kersten, M., Palm, J., Griswold, W.G.: An overview of AspectJ. In: Knudsen, J.L. (ed.) ECOOP 2001. LNCS, vol. 2072, pp. 327–355. Springer, Heidelberg (2001)
Schmidt, D.C., Levine, D.L., Mungee, S.: The design of the TAO real-time object request broker. Computer Communications 21, 294–324 (1998)
Kon, F., Román, M., Liu, P., Mao, J., Yamane, T., Magalhães, L.C., Campbell, R.H.: Monitoring, security, and dynamic configuration with the dynamicTAO reflective ORB. In: Coulson, G., Sventek, J. (eds.) Middleware 2000. LNCS, vol. 1795, p. 121. Springer, Heidelberg (2000)
Klefstad, R., Schmidt, D.C., O’Ryan, C.: Towards highly configurable real-time object request brokers. In: Proceedings of the Fifth IEEE International Symposium on Object-Oriented Real-Time Distributed Computing (2002)
Blair, G.S., Coulson, G., Robin, P., Papathomas, M.: An architecture for next generation middleware. In: Proceedings of the IFIP International Conference on Distributed Systems Platforms and Open Distributed Processing (Middleware 1998), The Lake District, England (1998)
Zinky, J.A., Bakken, D.E., Schantz, R.E.: Architectural support for quality of service for CORBA objects. Theory and Practice of Object Systems 3 (1997)
IONA Technology: (Orbix), Available at http://www.iona.com/products/orbix.htm
IONA Technologies Inc.: ORBacus for C++ and Java version 4.1.0 (2001)
Koster, R., Black, A.P., Huang, J., Walpole, J., Pu, C.: Thread transparency in information flow middleware. In: Proceedings of the International Conference on Distributed Systems Platforms and Open Distributed Processing, Springer, Heidelberg (2001)
Baldoni, R., Marchetti, C., Termini, A.: Active software replication through a three-tier approach. In: Proceedings of the 22th IEEE International Symposium on Reliable Distributed Systems (SRDS 2002), Osaka, Japan, pp. 109–118 (2002)
Moser, L., Melliar-Smith, P., Narasimhan, P., Tewksbury, L., Kalogeraki, V.: The Eternal system: An architecture for enterprise applications. In: Proceedings of the Third International Enterprise Distributed Object Computing Conference, EDOC 1999 (1999)
Sadjadi, S.M., McKinley, P.K.: ACT: An adaptive CORBA template to support unanticipated adaptation. In: Proceedings of the 24th IEEE International Conference on Distributed Computing Systems (ICDCS 2004), Tokyo, Japan (2004)
Object Management Group Framingham, Massachusett: The Common Object Request Broker: Architecture and Specification Version 3.0. (2003), Available at http://doc.ece.uci.edu/CORBA/formal/02-06-33.pdf
Adve, V., Lam, V.V., Ensink, B.: Language and compiler support for adaptive distributed applications. In: Proceedings of the ACM SIGPLAN Workshop on Optimization of Middleware and Distributed Systems (OM 2001), Snowbird, Utah (2001)
Popovici, A., Gross, T., Alonso, G.: Dynamic homogenous AOP with PROSE. Technical report, Department of Computer Science, Federal Institute of Technology, Zurich (2001)
Mumtaz, S., Ahmad, N.: (Architecture of kaffe), Available at http://wiki.cs.uiuc.edu/cs427/Kaffe+Architecture+Project+Site
Czarnecki, K., Eisenecker, U.: Generative programming. Addison Wesley, Reading (2000)
Tarr, P., Ossher, H. (eds.): Workshop on Advanced Separation of Concerns in Software Engineering at ICSE 2001, W17 (2001)
Ossher, H., Tarr, P.: Using multidimensional separation of concerns to (re)shape evolving software. Communications of the ACM 44, 43–50 (2001)
Lieberherr, K., Orleans, D., Ovlinger, J.: Aspect-oriented programming with adaptive methods. Communications of the ACM 44, 39–41 (2001)
Pawlak, R., Seinturier, L., Duchien, L., Florin, G.: JAC: A flexible and efficient solution for aspect-oriented programming in Java. In: Yonezawa, A., Matsuoka, S. (eds.) Reflection 2001. LNCS, vol. 2192, pp. 1–24. Springer, Heidelberg (2001)
Bergmans, L., Aksit, M.: Composing crosscutting concerns using composition filters. Communications of ACM, 51–57 (2001)
Welch, I., Stroud, R.: Dalang — a reflective extension for java. Technical Report CS-TR-672, University of Newcastle upon Tyne, East Lansing, Michigan (1999)
Chiba, S.: Load-time structural reflection in Java. LNCS, vol. 1850 (2000)
Piveta, E.K., Zancanella, L.C.: Aspect weaving strategies. Journal of Universal Computer Science 9, 970–983 (2003)
Sadjadi, S.M., McKinley, P.K., Kasten, E.P.: Architecture and operation of an adaptable communication substrate. In: Proceedings of the Ninth IEEE International Workshop on Future Trends of Distributed Computing Systems (FTDCS, San Juan, Puerto Rico, pp. 46–55 (2003)
Rizzo, L., Vicisano, L.: RMDP: An FEC-based reliable multicast protocol for wireless environments. ACM Mobile Computer and Communication Review 2 (1998)
Colyer, A.: (Aspectj 1.2 released), Available at http://www.theserverside.com/news/thread.tss?thread_id=26144
Chiba, S., Masuda, T.: Designing an extensible distributed language with a metalevel architecture. In: Nierstrasz, O. (ed.) ECOOP 1993. LNCS, vol. 707, pp. 482–501. Springer, Heidelberg (1993)
Kephart, J.O., Chess, D.M.: The vision of autonomic computing. IEEE Computer 36, 41–50 (2003)
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights and permissions
Copyright information
© 2004 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Sadjadi, S.M., McKinley, P.K., Cheng, B.H.C., Stirewalt, R.E.K. (2004). TRAP/J: Transparent Generation of Adaptable Java Programs. In: Meersman, R., Tari, Z. (eds) On the Move to Meaningful Internet Systems 2004: CoopIS, DOA, and ODBASE. OTM 2004. Lecture Notes in Computer Science, vol 3291. Springer, Berlin, Heidelberg. https://doi.org/10.1007/978-3-540-30469-2_28
Download citation
DOI: https://doi.org/10.1007/978-3-540-30469-2_28
Publisher Name: Springer, Berlin, Heidelberg
Print ISBN: 978-3-540-23662-7
Online ISBN: 978-3-540-30469-2
eBook Packages: Springer Book Archive