EJB Simulator Which Simulate the Other EJB and the Developer Can Move Ahead with the Unit Test of His Component and Thus Time Will Be Saved

Total Page:16

File Type:pdf, Size:1020Kb

EJB Simulator Which Simulate the Other EJB and the Developer Can Move Ahead with the Unit Test of His Component and Thus Time Will Be Saved Guru Nanak Dev University Regional Campus, Gurdaspur A Project Report On “Enterprise Java Beans Stub Simulator” For the partial fulfilment for the award of the degree of B.Tech SUBMITTED BY Swajot Singh 74219 Reg. No.: 2006.RG/A.156 UNDER THE GUIDANCE OF Ms. Taqdeer Professor (Dept of CSE) Department Of Computer Science & Engineering 2009-2010 Declaration I hereby declare that the present report has been prepared after the completion of my six months industrial training at Accenture Services Pvt. Ltd., Bangalore and is submitted only at G.N.D.U RCG and not at any other institution for the attainment of any other degree. Swajot Singh 2 | P a g e Acknowledgement Apart from the efforts of me, the success of any project depends largely on the encouragement and guidelines of many others. I take this opportunity to express my gratitude to the people who have been instrumental in the successful completion of this project. I would like to show my greatest appreciation to Mr. Srinivas Kondamudi (Manager). I can’t say thank you enough for his tremendous support and help. I feel motivated and encouraged every time I attend his meeting. Without his encouragement and guidance this project would not have materialized. I would like to thank my Team Leader, Mr. Chandrashekar for the valuable guidance and advice. He inspired me greatly to work in this project. His willingness to motivate me contributed tremendously to this project. I also would like to thank him for showing me some example that related to the topic of the project. The guidance and support received from Mr. Madhu Shanmugam (Senior Programmer) was vital for the success of the project. I am grateful for his constant support and help. I cannot let go this opportunity to thank the most to the project guide assigned to me by the university, Ms. Taqdeer for her belief in this project and for her faith in me and for investing her energies in this project. She has been sole inspiration to hard work and she has been most helpful guide and she has always been so concerned that it has helped me to improve the quality of the project. 3 | P a g e Besides, I would like to take this opportunity to thank the authority of Accenture Services Pvt. Ltd for providing me the opportunity to work in this project and providing with a good environment and facilities to complete this project. Finally, an honorable mention goes to my family and friends for their understanding and support. Without the help of the particular that mentioned above, I would have faced many difficulties while doing this project. 4 | P a g e My Role The project assigned to me was to develop a tool that would simulate the Enterprise Java Beans and this will have an enterprise vide implementation and the other resource working on this project was Mr. Madhu Shanmugam (senior programmer). The project was ably supervised by Mr. Chandrashekar. My working profile on the project comprised of developing a ‘Graphical User Interface’ for the Client which shall provide him the option to browse and upload jar files and provide checkboxes to select home and remote interfaces. Configure the binding of the JNDI names to the Home Interfaces. To find the methods in the Home and Remote interfaces and to pull the required domain jar from the selected Home and Remote Interfaces. Create the Home and Remote Classes by going through the Home Interface chosen by the User. At Last I needed to compile the Home and Remote Classes and then bind the Home to JNDI name. 5 | P a g e Abstract Imagine a scenario where the client (can be an external/internal) needs to access an EJB which has still not been developed yet. Without the EJB the client cannot continue his development/testing. This would result in a decrease in productivity. In such a situation we can deploy a simulator which will simulate the EJB which is not present and will give the output to the calling Client and this would mean that even in the absence of the actual EJB required the client can continue with the process of development and/or testing and this would result in saving in valuable time and has a very practical importance in the enterprise wide working because such issues are encountered very often that we need certain EJBs and they still are not been developed so this tool/project will solve such an issue and therefore client can not only save time but money as well. We need a tool that can simulate the EJB which will help in continuing the development and testing. The simulator would help in carrying out testing process in case of unavailability of an Enterprise JAVA Bean that is being called by another Enterprise JAVA Bean that is to be tested so the stub would provide the test results and thus help in speeding up the testing process. It would automate the process of giving test outputs for the particular Enterprise JAVA Bean while we perform testing. There exists no previous version of this application so this application is being developed from scratch and the tool is aimed to be generic in nature. These are the few key features/functionalities that the aimed tool needs to serve: The project is aimed to be implemented in the areas involving the development of the applications where the different EJBs interact with each other to give an output. The project is aimed to stub an EJB where the client can interact with the EJB which has still not been implemented. It involves developing a tool that would help to simulate this process and component testing can take place. The tool being developed is a generic one so that it can be used/help simulates for various enterprise applications. It can be effectively be used to increase the speed of developing a new application where the client in need for looking up an EJB can use this tool to generate the stub of the actual EJB which has not yet been developed and continue their development and unit/component testing. Hence making the process of coding and testing to an extent parallel to each other. 6 | P a g e Table of Contents Acknowledgement ........................................................................................................................................ 3 My Role ......................................................................................................................................................... 5 Abstract ......................................................................................................................................................... 6 Introduction ................................................................................................................................................ 11 Issues/Risks ............................................................................................................................................. 14 Company Profile .......................................................................................................................................... 15 ACCENTURE SERVICES Pvt. Ltd. ............................................................................................................... 15 The Group ............................................................................................................................................... 15 IDEOLOGY ................................................................................................................................................ 15 Corporate Citizenship.............................................................................................................................. 18 Corporate Citizenship is a fundamental part of Accenture's character and the way we run our business. .............................................................................................................................................. 18 Clients...................................................................................................................................................... 18 Industry Expertise ....................................................................................................................................... 19 Revenues Detail .......................................................................................................................................... 20 Technologies being used in this Project ...................................................................................................... 23 JAVA ........................................................................................................................................................ 23 History ................................................................................................................................................. 24 Principles ............................................................................................................................................. 25 Java Platform ....................................................................................................................................... 25 Syntax .................................................................................................................................................. 28 Examples ............................................................................................................................................. 28 Special Classes ..................................................................................................................................... 30 Class Libraries .....................................................................................................................................
Recommended publications
  • Java (Programming Langua a (Programming Language)
    Java (programming language) From Wikipedia, the free encyclopedialopedia "Java language" redirects here. For the natural language from the Indonesian island of Java, see Javanese language. Not to be confused with JavaScript. Java multi-paradigm: object-oriented, structured, imperative, Paradigm(s) functional, generic, reflective, concurrent James Gosling and Designed by Sun Microsystems Developer Oracle Corporation Appeared in 1995[1] Java Standard Edition 8 Update Stable release 5 (1.8.0_5) / April 15, 2014; 2 months ago Static, strong, safe, nominative, Typing discipline manifest Major OpenJDK, many others implementations Dialects Generic Java, Pizza Ada 83, C++, C#,[2] Eiffel,[3] Generic Java, Mesa,[4] Modula- Influenced by 3,[5] Oberon,[6] Objective-C,[7] UCSD Pascal,[8][9] Smalltalk Ada 2005, BeanShell, C#, Clojure, D, ECMAScript, Influenced Groovy, J#, JavaScript, Kotlin, PHP, Python, Scala, Seed7, Vala Implementation C and C++ language OS Cross-platform (multi-platform) GNU General Public License, License Java CommuniCommunity Process Filename .java , .class, .jar extension(s) Website For Java Developers Java Programming at Wikibooks Java is a computer programming language that is concurrent, class-based, object-oriented, and specifically designed to have as few impimplementation dependencies as possible.ble. It is intended to let application developers "write once, run ananywhere" (WORA), meaning that code that runs on one platform does not need to be recompiled to rurun on another. Java applications ns are typically compiled to bytecode (class file) that can run on anany Java virtual machine (JVM)) regardless of computer architecture. Java is, as of 2014, one of tthe most popular programming ng languages in use, particularly for client-server web applications, witwith a reported 9 million developers.[10][11] Java was originallyy developed by James Gosling at Sun Microsystems (which has since merged into Oracle Corporation) and released in 1995 as a core component of Sun Microsystems'Micros Java platform.
    [Show full text]
  • Real-Time Java for Embedded Devices: the Javamen Project*
    REAL-TIME JAVA FOR EMBEDDED DEVICES: THE JAVAMEN PROJECT* A. Borg, N. Audsley, A. Wellings The University of York, UK ABSTRACT: Hardware Java-specific processors have been shown to provide the performance benefits over their software counterparts that make Java a feasible environment for executing even the most computationally expensive systems. In most cases, the core of these processors is a simple stack machine on which stack operations and logic and arithmetic operations are carried out. More complex bytecodes are implemented either in microcode through a sequence of stack and memory operations or in Java and therefore through a set of bytecodes. This paper investigates the Figure 1: Three alternatives for executing Java code (take from (6)) state-of-the-art in Java processors and identifies two areas of improvement for specialising these processors timeliness as a key issue. The language therefore fails to for real-time applications. This is achieved through a allow more advanced temporal requirements of threads combination of the implementation of real-time Java to be expressed and virtual machine implementations components in hardware and by using application- may behave unpredictably in this context. For example, specific characteristics expressed at the Java level to whereas a basic thread priority can be specified, it is not drive a co-design strategy. An implementation of these required to be observed by a virtual machine and there propositions will provide a flexible Ravenscar- is no guarantee that the highest priority thread will compliant virtual machine that provides better preempt lower priority threads. In order to address this performance while still guaranteeing real-time shortcoming, two competing specifications have been requirements.
    [Show full text]
  • S32 Design Studio for S32 Platform 3.4 Installation Guide
    S32 Design Studio for S32 Platform 3.4 Installation Guide Document Number: S32DSIG Rev. 1.0, 12/2020 Contents System Requirements......................................................................................................................3 Installation prerequisites for Linux platforms.............................................................................5 Downloading S32DS 3.4................................................................................................................12 Downloading the S32DS 3.4 installer................................................................................................................12 Obtaining the activation code.............................................................................................................................12 Installing S32DS 3.4......................................................................................................................14 Debian 8 post-installation settings..................................................................................................................... 20 Installing product updates and packages................................................................................... 23 Installing Synopsys tools...............................................................................................................25 Installing VP Explorer........................................................................................................................................25 Post-installation settings....................................................................................................................................
    [Show full text]
  • Optimizing for Jazelle DBX and Java Hotspot™ Technology Case Study
    Optimizing Midlets for Size and Performance Simon Robinson Innaworks www.innaworks.com TS-5109 2007 JavaOneSM Conference | Session TS-5109 | Goal of This Talk Pushing the size and performance of Java™ Platform, Micro Edition (Java ME platform) applications on today’s handsets 2007 JavaOneSM Conference | Session TS-5109 | 2 Agenda Why size and performance matters Under the bonnet of a Java ME Platform MIDlet Optimization strategy Optimization techniques Optimizing for Jazelle DBX and Java HotSpot™ technology Case study 2007 JavaOneSM Conference | Session TS-5109 | 3 Agenda Why size and performance matters Under the bonnet of a Java ME Platform MIDlet Optimization strategy Optimization techniques Optimizing for Jazelle DBX and Java HotSpot™ technology Case study 2007 JavaOneSM Conference | Session TS-5109 | 4 Why Size and Performance Matters Adoption = Potential market size × How much fun ×Marketing 2007 JavaOneSM Conference | Session TS-5109 | 5 Why Size and Performance Matters Adoption = Potential market size × How much fun ×Marketing Handset coverage matters 2007 JavaOneSM Conference | Session TS-5109 | 6 Why Size and Performance Matters Adoption = Potential market size × How much fun ×Marketing How fun is your game? Perceived quality matters 2007 JavaOneSM Conference | Session TS-5109 | 7 Constraints of Consumer Handsets JAR size Heap memory Nokia S40 v1 (3300, etc.) 64 kB 370 kB Nokia S40 v2 (6230, etc.) 128 kB 512 kB Sharp GX22 100 kB 512 kB DoJa 2.5 (m420i) 30 B 1.5 MB 15% game sales for handsets < 64 kB Java Archive (JAR) file size
    [Show full text]
  • Java in Embedded Linux Systems
    Java in Embedded Linux Systems Java in Embedded Linux Systems Thomas Petazzoni / Michael Opdenacker Free Electrons http://free-electrons.com/ Created with OpenOffice.org 2.x Java in Embedded Linux Systems © Copyright 2004-2007, Free Electrons, Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 1 Rights to copy Attribution ± ShareAlike 2.5 © Copyright 2004-2008 You are free Free Electrons to copy, distribute, display, and perform the work [email protected] to make derivative works to make commercial use of the work Document sources, updates and translations: Under the following conditions http://free-electrons.com/articles/java Attribution. You must give the original author credit. Corrections, suggestions, contributions and Share Alike. If you alter, transform, or build upon this work, you may distribute the resulting work only under a license translations are welcome! identical to this one. For any reuse or distribution, you must make clear to others the license terms of this work. Any of these conditions can be waived if you get permission from the copyright holder. Your fair use and other rights are in no way affected by the above. License text: http://creativecommons.org/licenses/by-sa/2.5/legalcode Java in Embedded Linux Systems © Copyright 2004-2007, Free Electrons, Creative Commons Attribution-ShareAlike 2.5 license http://free-electrons.com Sep 15, 2009 2 Best viewed with... This document is best viewed with a recent PDF reader or with OpenOffice.org itself! Take advantage of internal
    [Show full text]
  • Paper Discusses the Advantages and Disadvantages of Each Approach As Well As Specific Experiences of Using Java in a Commercial Tape Drive Project
    Java and Real Time Storage Applications Gary Mueller 195 Garnet St Broomfield, CO 80020-2203 [email protected] Tel: +1-303-465-4279 Janet Borzuchowski Storage Technology Corporation 2270 South 88th Street M. S. 4272 Louisville CO 80028 [email protected] Tel: +1-303-673-8297 Abstract Storage systems have storage devices which run real time embedded software. Most storage devices use C and occasionally C++ to manage and control the storage device. Software for the storage device must meet the time and resource constraints of the storage device. The prevailing wisdom in the embedded world is that objects and in particular Java only work for simple problems and can not handle REAL problems, are too slow and can not handle time critical processing and are too big and can’t fit in memory constrained systems. Even though Java's roots are in the embedded application area, Java is more widely used in the desktop and enterprise environment. Use of Java in embedded real time environments where performance and size constraints rule is much less common. Java vendors offer a dizzying array of options, products and choices for real time storage applications. Four main themes emerge when using Java in a real time storage application; compiling Java, executing Java with a software Java Virtual Machine (JVM), executing Java with a hardware JVM and replacing a real time operating system (RTOS) with a JVM. The desktop and enterprise environment traditionally run Java using a software JVM that has been ported to a particular platform. The JVM runs as a task or process hosted by the platform operating system.
    [Show full text]
  • Dalvik Bytecode Acceleration Using Fetch/Decode Hardware Extension
    Journal of Information Processing Vol.23 No.2 118–130 (Mar. 2015) [DOI: 10.2197/ipsjjip.23.118] Regular Paper Dalvik Bytecode Acceleration Using Fetch/Decode Hardware Extension Surachai Thongkaew1,a) Tsuyoshi Isshiki1,b) Dongju Li1,c) Hiroaki Kunieda1,d) Received: May 6, 2014, Accepted: November 10, 2014 Abstract: The Dalvik virtual machine (Dalvik VM) is an essential piece of software that runs applications on the Android operating system. Android application programs are commonly written in the Java language and compiled to Java bytecode. The Java bytecode is converted to Dalvik bytecode (Dalvik Executable file) which is interpreted by the Dalvik VM on typical Android devices. The significant disadvantage of interpretation is a much slower speed of program execution compared to direct machine code execution on the host CPU. However, there are many tech- niques to improve the performance of Dalvik VM. A typical methodology is just-in-time compilation which converts frequently executed sequences of interpreted instruction to host machine code. Other methodologies include dedi- cated bytecode processors and architectural extension on existing processors. In this paper, we propose an alternative methodology, “Fetch & Decode Hardware Extension,” to improve the performance of Dalvik VM. The Fetch & De- code Hardware Extension is a specially designed hardware component to fetch and decode Dalvik bytecode directly, while the core computations within the virtual registers are done by the optimized Dalvik bytecode software handler. The experimental results show the speed improvements on Arithmetic instructions, loop & conditional instructions and method invocation & return instructions, can be achieved up to 2.4x, 2.7x and 1.8x, respectively.
    [Show full text]
  • Introduction À Java
    Introduction à Java Matthieu Herrb CNRS-LAAS http://homepages.laas.fr/matthieu/cours/java/ Février 2018 Plan 1 Concepts 2 Éléments du langage 3 Classes et objets 4 Packages 2/31 Histoire et motivations Langage développé par James Gosling chez Sun Microsystems (Oracle) à partir de 1990 Pour des environnements embarqués : appareils spécifiques ("Appliances") applications Web Contraintes : indépendant du matériel sécurité 3/31 La machine virtuelle Java Le langage Java utilise une machine virtuelle : le compilateur produit un bytecode ce code est indépendant de l’architecture matérielle sur laquelle il est exécuté la machine virtuelle interprète ce bytecode et le transforme en code machine natif à la volée (Just in time compilation) 4/31 Machines virtuelles Java HotSpot (Oracle JRE/JDK) OpenJDK, IcedTea Implémentations sous licence libre ART Android Runtime (Google) (Dalvik) Jazelle extension du jeu d’instruction de certains processeurs ARMv5 pour exécution directe de byte-code java. ThumbEE généralisation de Jazelle sur processeurs ARMv7. Pas spécifique de Java (supporte aussi C#, Perl, Python) 5/31 Cycle de développement Editeur de texte Compilation Exécution Hello, World Hello.java javac Hello.class java 6/31 Premier programme java /** ** Premier programme java **/ public class Hello { public static void main(String argv[]) { System.out.println("Hello, World!"); } } 7/31 Classes et objets Classe définit un type de données, et des fonctions (méthodes) qui le manipulent. Objet une instance de classe : une variable du type définit par la classe et ses méthodes. Héritage permet de créer des classes qui reprennent les données de la classe parente. Interface définition des prototypes des méthodes d’une classe sans préciser leur implémentation.
    [Show full text]
  • Traffic Congestion Problems Solving
    Using Sense Techniques to Develop a Traffic Control System for Solving Traffic Congestion Problem By Omima Kamal El Din Omer Mohamed B.Sc. Applied Physics and Mathematics Ahlia University, 1999 A Dissertation Submitted in Partial Fulfillment of the Requirements of the Degree of Master of Science In Computer Science and Information Department of Computer Engineering Faculty of Engineering and Technology University of Gezira Supervisor: Dr. Suliman Mustafa Mohamed Abbker Co- supervisor:Dr.Khalid Osman Daffallah Ahmed October 2011 Using Sense Techniques to Develop a Traffic Control System for Solving Traffic Congestion Problem By Omima Kamal El Din Omer Mohamed Examination Committee : Name Position Signature Dr. Suliman Mustafa Mohamed Abbker Supervisor …………. Dr. Mahmoud Ali Ahmed Mohamed External Examiner …………. Dr. Mohamed Abdalla Adam Almaleh Internal Examiner …………. Date of Examination: 22 / 10/2011 بسم اهلل الرحمن الرحيم قال تعالى: ِ ِ ِ َّ ِ ِ ِ ) اللّهُ ﻻَ إلَهَ إﻻَّ ُهَو الْ َح ُّي الَْقيُّومُ ﻻَ تَأْ ُخ ُذهُ سنَةٌ َوﻻَ نَ ْومٌ لهُ َما في ال َّسَماَوات َوَما في اﻷَْر ِض َمن ذَا َِّ ِ ِ ِِ ِِ ِ ِ ِ ِ ٍ ِ ِ ِ ِ ِ الذي يَ ْشَف ُع عْن َدهُ إﻻَّ بإ ْذنه يَ ْعلَ ُم َما بَ ْي َن أَيْديه ْم َوَم ا َخْلَفُه ْم َوﻻَ يُحيطُوَن ب َش ْيء ِّم ْن عْلمه إﻻَّ بَما ِ ِ ِ ِ ِ ِ َشاء َوس َع ُكْرسيُّهُ ال َّسَماَوات َواﻷَْر َض َوﻻَ يَ ُؤوُدهُ حْفظُُهَما َوُهَو الَْعل ُّي الَْعظيم( صدق اهلل العظيم سورة البقرة اﻵية )255( i Dedication To the soul of my Father, the first to teach me.
    [Show full text]
  • SUSE® and ARM ARM and 64-Bit ARM Update 2014
    SUSE® and ARM ARM and 64-bit ARM Update 2014 Andrew Wafaa Dirk Müller Principal Engineer openSUSE ARM Team ARM Ltd SUSE [email protected] [email protected] openSUSE® Runs on ... … your laptop … your desktop … your server 2 openSUSE® Runs on ... x86 … your laptop … your desktop x86 x86 … your server 3 Is There More? (open)SUSE® Runs on ... 155,656 x86_64 Cores with 300 TB of RAM 5 SUSE® Runs on ... 9728 ia64 Cores, 30 TB RAM 6 SUSE® Also Runs on ... 2880 Power7 (ppc64) cores 7 SUSE® Runs on Mainframe IBM zSeries 8 Nothing More? openSUSE® on This? 10 What About openSUSE® on This? CuBox-I Cortex A9 (IMX.6), 1GB RAM 11 openSUSE® on “Supercomputers” ;-) • 12 ARM and Servers? 13 Data Centers are Evolving Today Next 3 Years 5 Years + Data center workload characteristics are scaling out Total cost Throughput Workload of optimized ownership 14 ARM and Servers? • 15 What is ARM? What is ARM? • Most popular CPU architecture: ‒ More than 40,000,000,000 CPUs are ARM based ‒ 16,000,000 processors sold every day • “Low power leadership” • Optimized for “System on a Chip” 17 System on Chip 18 System On Chip 19 System On Chip 20 System On Chip 21 System On Chip 22 System On Chip SoC 23 ARM's “Cortex – A“ Series ARMv8 (A57/A53) ARMv7 (A15/A7) ARMv7 (A8/A9) 24 ARM v5/6/7/8 CRYPTO CRYPTO VFPv3/v4 Key feature NEON ARMv7-A Adv SIMD compatibility Thumb-2 A32+T32 ISAs A64 ISA TrustedZone Including: Including: • Scalar FP • Scalar FP SIMD (SD and DP) (SD and DP) • Adv SIMD • Adv SIMD VFPv2 (SP Float) (SP & DP Float) AArch32 AArch64 Jazelle ARMv5 ARMv6 ARMv7-A/R
    [Show full text]
  • JOP: a Java Optimized Processor for Embedded Real-Time Systems
    Downloaded from orbit.dtu.dk on: Oct 04, 2021 JOP: A Java Optimized Processor for Embedded Real-Time Systems Schoeberl, Martin Publication date: 2005 Document Version Publisher's PDF, also known as Version of record Link back to DTU Orbit Citation (APA): Schoeberl, M. (2005). JOP: A Java Optimized Processor for Embedded Real-Time Systems. Vienna University of Technology. http://www.jopdesign.com/ General rights Copyright and moral rights for the publications made accessible in the public portal are retained by the authors and/or other copyright owners and it is a condition of accessing publications that users recognise and abide by the legal requirements associated with these rights. Users may download and print one copy of any publication from the public portal for the purpose of private study or research. You may not further distribute the material or use it for any profit-making activity or commercial gain You may freely distribute the URL identifying the publication in the public portal If you believe that this document breaches copyright please contact us providing details, and we will remove access to the work immediately and investigate your claim. DISSERTATION JOP: A Java Optimized Processor for Embedded Real-Time Systems ausgef¨uhrt zum Zwecke der Erlangung des akademischen Grades eines Doktors der technischen Wissenschaften unter der Leitung von AO.UNIV.PROF. DIPL.-ING. DR.TECHN. ANDREAS STEININGER und AO.UNIV.PROF. DIPL.-ING. DR.TECHN. PETER PUSCHNER Inst.-Nr. E182 Institut f¨ur Technische Informatik eingereicht an der Technischen Universit¨at Wien Fakult¨at f¨ur Informatik von DIPL.-ING. MARTIN SCHOBERL¨ Matr.-Nr.
    [Show full text]
  • Instruction Folding in a Hardware-Translation Based Java Virtual Machine
    Instruction Folding in a Hardware-Translation Based Java Virtual Machine Hitoshi Oi The University of Aizu May 4, 2006 Computing Frontiers 2006 Computing Frontiers 2006 May 4, 2006 Outline • Introduction to the Java Virtual Machine and Hardware Translation • Instruction Folding of Java Bytecodes – Implementation in Sun’s Pico Java-II – Removal of Uncommon Cases • Performance Evaluation • Summary and Future Work Hitoshi Oi 2 Computing Frontiers 2006 May 4, 2006 Introduction to the Java Virtual Machine Features of Java°c • Object-Oriented • Network • Security • Platform Independent Java Virtual Machine • Abstract instruction set architecture • Placed between Java applications and underlying platform • Stack-based architecture Hitoshi Oi 3 Computing Frontiers 2006 May 4, 2006 Implementation: Interpretation switch(*bytecode){ case ILOAD: STACK[SP + 1] = STACK[LV + *(bytecode + 1)]; SP = SP + 1; .......... } • A software written in native instructions to the platform reads a Java application and interprets its bytecodes. • Flexible and relatively inexpensive, thus widely adopted (an interpreter is just another program on the platform). • Slow : Checking a flag takes << 1 clock cycle in hardware but several cycles in software. Hitoshi Oi 4 Computing Frontiers 2006 May 4, 2006 Just-In-Time Compilation • Frequently executed methods (functions) are compiled to native instructions. • Works well for server side applications but may not be feasible for client side applications (especially those running on portable devices) because: – Time and power consumption for compilation – Expansion of program size – Client side application may not be repeatedly executed and cannot absorb above compilation overhead. Hitoshi Oi 5 Computing Frontiers 2006 May 4, 2006 Hardware Translation From Instruction • A small translation module Memory between the fetch and decode stages in the pipeline converts simple Java Fetch bytecodes into native instruction sequences.
    [Show full text]