Simple Rmi Program Using Netbeans For Php

  
Simple Rmi Program Using Netbeans For Php

What is the difference between application server and web server? Download the free trial version below to get started. Double-click the downloaded file to install the software.

Tutorial Contents • • • • • • • • • • • • Testing and Profiling • • • • • Before delivering any application, it is important to ensure that it functions properly, and that it can perform acceptably for the demands expected of it. Web applications, especially e-commerce applications, by their very nature provide concurrent access to shared resources.

In other words, the servers on which they are hosted must be able to respond to multiple users requesting the same resources over the same period of time. Be mindful of this fact when during development your application appears to behave correctly as you click through web pages in your browser. How will the application perform when handling 100 users simultaneously? Are there memory leaks that will degrade the server's performance after the application has been running for long periods of time?

What steps can you take to ensure that your production server best handles traffic to your application? This tutorial unit is designed to introduce you to the IDE's support for testing and profiling. You begin by installing the JMeter Kit plugin, which enables you to create test plans and open them in from the IDE. You then create a basic test plan in JMeter, and proceed by exploring the tool's capacity for functional and performance testing. Finally, you explore the IDE's Profiler, and use it to examine GlassFish' memory consumption while you run the JMeter test plan against the AffableBean application over an extended period of time.

This unit concludes by presenting various tips that enable you to tune the GlassFish server for your application in a production environment. You can view a live demo of the application that you build in this tutorial:. Software or Resource Version Required Java bundle, 6.8 or 6.9 version 6 v3 or Open Source Edition 3.0.1 2.2 or more recent version 5.1 complete version Notes: • The NetBeans IDE requires the Java Development Kit (JDK) to run properly. If you do not have any of the resources listed above, the JDK should be the first item that you download and install.

• The NetBeans IDE Java Bundle includes Java Web and EE technologies, which are required for the application you build in this tutorial. • The NetBeans IDE Java Bundle also includes the GlassFish server, which you require for this tutorial. You could, but the version provided with the NetBeans download has the added benefit of being automatically registered with the IDE. • You can follow this tutorial unit without having completed previous units. To do so, see the, which describe how to prepare the database and establish connectivity between the IDE, GlassFish, and MySQL. • You do not need to download JMeter for its use in this tutorial.

Instead, you install the NetBeans JMeter Kit plugin, which includes the JMeter distribution. You will therefore require an Internet connection at the point when you install the plugin in the tutorial. JMeter can be downloaded independently from. • The JMeter Kit plugin for NetBeans 6.8 installs JMeter version 2.2 (released June 2006). The plugin for NetBeans 6.9 installs JMeter version 2.4 (released July 2010). There is a significant difference between these two versions. Testing with JMeter Begin by examining the AffableBean tutorial application.

Then install the JMeter Kit plugin using the IDE's Plugins Manager. Launch JMeter from the IDE, and proceed by creating a test plan based on the tutorial. Finally, explore some of JMeter's facilities for functional and load testing. About Memory Leaks In Java, memory leaks occur when objects continue to be referenced even after they are no longer needed.

This prevents Java's built-in garbage collection mechanism from destroying these objects, and consequently they remain in existence throughout the life of your application. When these objects are regularly created, the Java Virtual Machine (JVM) heap will continue to grow over time, ultimately resulting in an OutOfMemoryError when the heap is eventually exhausted. The JVM heap represents memory that is dynamically allocated by the Virtual Machine during runtime.

Because the GlassFish server runs on Java, it relies on the JVM heap for memory resources during execution. All applications that are deployed to the server can be perceived as extensions to this rule; in other words when your web application runs, it consumes resources from the JVM heap.

When building web applications, you need to be mindful of memory allocation. Aside from avoiding memory leaks in your code, you must ensure that the JVM heap is large enough to accommodate all user sessions at a given time, and that your system is able to support the maximum heap size set by your server. Monitoring your Application The following example aims to familiarize you with the Profiler's interface, and demonstrates how you can utilize its functionality to ensure that the AffableBean application will continue to perform efficiently after it has been serving client requests for some time. In this example, you download and add a new JMeter test plan,, to the project. The new test plan is an advanced version of the one you created earlier in this unit. It makes use of JMeter's conditional and random controllers to adapt a slightly more realistic simulation of the tutorial's use-case. Consider that only a small fraction of visits to an e-commerce site will result in a completed order.

If you recall from units 8 and 9, and, the application terminates the user session upon a successfully completed order. In other words, with each completed order, the server is able to free up any resources that were previously tied to the session. Now, consider the far more common scenario of a user not completing an order, but simply navigating away from the site. Based on the session time-out which you specified in the application's web deployment descriptor, the server will need to wait a period of time before it can free any resources tied to the session.

The new load script, useCaseTestRandom.jmx, is configured so that on average one in ten user threads completes an order. Our goal by running this load script is to determine whether the application's host environment (i.e., the GlassFish server running locally on your computer) has enough memory capacity to provide continuous, fast service for an extended period of time. Note: Recall that in, you set the AffableBean session time-out to 10 minutes. • Download and add it to the AffableBean project.

To add it to the project, copy it from your computer's file system (Ctrl-C; ⌘-C on Mac), then in the IDE, open the Files window (Ctrl-2; ⌘-2 on Mac), right-click the jmeter folder and choose Paste. NetBeans 6.8 note: The useCaseTestRandom.jmx script is not compatible with the JMeter Kit plugin for NetBeans 6.8. Because the script utilizes various logic controllers which unfortunately are not available in JMeter version 2.2, it will not run on the JMeter implementation in NetBeans 6.8. In order to become familiar with the Profiler, use useCaseTest.jmx in this exercise instead. If you use useCaseTest.jmx, you need to set the load script to run continuously. To do so, open the script in JMeter, select the AffableBeanUsers thread group, then in the main panel, select the 'Forever' checkbox for the Loop Count field. • If you are running the Profiler for the first time, you need to perform a calibration step on the JDK.

To do so, choose Profile >Advanced Commands >Run Profiler Calibration. For more information, refer to the NetBeans User FAQ wiki:.

• Click the Profile Project ( ) button. When a project is profiled for the first time, its build script must be modified to enable profiling. The IDE warns you that it will modify the project's build script. Note: You can undo this action at a later point by choosing Profile >Advanced Commands >Unintegrate Profiler from the main menu. Alternatively, you can switch to the Files window, delete your project's build.xml file, then rename the build-before-profiler.xml file to build.xml.

The project's build file is modified, and the Profiler window opens for the project. The window enables you to select from one of three profiling tasks: • Monitor Application: Provides obtain high-level information about properties of the target JVM, including thread activity and memory allocations. • Analyze Performance: Provides detailed data on application performance, including the time to execute methods and the number of times the method is invoked. • Analyze Memory: Provides detailed data on object allocation and garbage collection. • Click the Monitor button in the left column.

Select the 'LoadGenerator Script' option, then choose useTestCaseRandom.jmx from the drop-down list. The IDE takes the following actions: • Starts the GlassFish server in profile mode. (If the server is already running, it is first stopped.) • Deploys the web application to GlassFish.

• Starts a profiling session, attaches the profiler to the server, and opens the Profiler Control Panel in the IDE. Jeremy Robinson Books In Order on this page. • Runs the associated load script ( useTestCaseRandom.jmx). Note: If the profiler does not run the load script after starting the application in profile mode, you can invoke it yourself.

From the Projects window, right-click the script and choose External Edit. Then, in JMeter, press Ctrl-R (⌘-R on Mac) to run the script. If the left-hand graph displayed by the VM Telemetry Overview depicts the purple area as remaining horizontal (shown below), you can be fairly certain that the load script is not running. • In the Profiler Control Panel, click the Threads ( ) button. The Threads window opens to display all threads maintained by the server while the application is running. You can select Live Threads Only, or Finished Threads Only in drop-down at the top of the window in order to filter the display according to live or finished threads. You can select the Enable Threads Monitoring option in the Profiler window (displayed ).

This will trigger the Threads window to open by default when running the Profiler. • In the Profiler Control Panel, click the VM Telemetry ( ) button. Similar to the VM Telemetry Overview, the VM Telemetry window provides views on the JVM heap, garbage collection (GC), as well as threads and loaded classes. • Ensure that the Memory (Heap) tab is selected at the bottom of the window, then allow the Profiler to monitor the heap while the load script runs against the application. You can hover your cursor over the graph to view real-time measurements of the heap size versus the used heap. Click the Scale to Fit ( ) button above the graph to maintain a continuous view of the entire monitoring session.

The image below shows the state of the heap after monitoring the server for approximately three hours while running the useTestCaseRandom.jmx script continuously with 150 simultaneous users. The AffableBean application running on the GlassFish server uses under 175 MB of the JVM heap. Evaluating Heap Contents with the HeapWalker The HeapWalker is a tool that is built into the NetBeans Profiler, which allows you to examine JVM heap contents.

You can use it to browse classes and instances of classes on the heap, fields of each instance or class, and references to each instance. The HeapWalker is particularly useful when locating the cause of memory leaks in your code. You can set the Profiler to automatically take a heap dump if an OutOfMemoryError occurs when you are profiling an application. You can then use the HeapWalker to inspect the heap dump and determine which objects were consuming the most memory. This functionality is enabled by default, but you can view and modify Profiler settings from the IDE's Options window (Tools >Options; NetBeans >Preferences on Mac). From the Options window, select Miscellaneous, then select the Profiler tab.

In the On OutOfMemoryError field, note that 'Save heap dump to profiled project' option is selected. For example, if the GlassFish server utilizes 512 MB of memory, and the JVM attempts to allocate more than 512 MB of memory to the JVM heap (represented by the pink area in the heap size graph of the VM Telemetry monitor, ), an OutOfMemoryError will occur, and the IDE will ask you if you would like to view the heap in the HeapWalker. To take a heap dump while your application is being profiled, choose Profile >Take Heap Dump from the main menu. The following example depicts a heap dump from running the useCaseTestRandom.jmx script at 500 users, ramp-up period at 100 seconds, and with a loop count of 5. The HeapWalker's Summary provides an Inspect panel which enables you to locate the largest objects in the heap. Specify the number of objects you want to search for, then click Find. In the above image, you can see that for the AffableBean application, the largest object in the heap dump is an instance of the org.apache.catalina.session.StandardManager class, with a retained size of nearly 79 MB.

Clicking the object name enables you to open the Instances view on the object. When you do so, you can see the instances of the class that exist on the heap (left column), the fields contained in the class, and their values (right column, top), and other objects on the heap referring to the instance (right column, bottom). In the above image, it appears that 706 StandardSession objects were active on the heap, a result of the load script simulating multiple user sessions. The server must have sufficient memory resources to maintain session objects during periods of high traffic.

You can save (Ctrl-S; ⌘-S on Mac) heap dumps. When you do so, they become listed in the Profiler Control Panel under Saved Snapshots. Tuning the GlassFish Server In order to gain optimum performance for your application when it is deployed to GlassFish, you should become acquainted with various tuning parameters which can be adjusted from the Administration Console. The following tips are taken directly from the white paper,. Although the paper focuses on GlassFish v2, the tuning tips can be directly applied to GlassFish v3 or Open Source Edition 3.0.1.

There are various mapping changes that occurred between GlassFish v2 and v3. Tables listing changes are provided on the GlassFish wiki:. The GlassFish Administration Console can be accessed from the IDE's Services window: • Open the Services window (Ctrl-5; ⌘-5 on Mac) and expand the Servers node so that the GlassFish server node is visible. • Ensure that the GlassFish server is running. If the server is running, a small green arrow is displayed next to the GlassFish icon ( ). If you need to start it, right-click the server node and choose Start. • Right-click the GlassFish server node and choose View Admin Console.

The login form for the GlassFish Administration Console opens in a browser. • Log into the Administration Console by typing admin / adminadmin for the username / password. From the GlassFish Administration Console, you can view and make adjustments to the following parameters. Tip 3: Java Heap Size From: The size of the heap is determined by the Java options -Xmx (maximum) and -Xms (minimum). While a larger heap can contain more objects and reduce the frequency of garbage collection, it may result in longer garbage collection times especially for a full GC cycle. The recommendation is to tune the heap based on the size of total available memory in your system, process data model (32-bit or 64-bit) and operating system. • In the Tree which displays in the left column of the Administration Console, expand the Configuration node, then click JVM Settings.

• In the main panel, select the JVM Options tab. • Scroll the list of options and note the -Xmx option: -Xmx512m The GlassFish server (v3 and Open Source Edition 3.0.1) sets the heap to 512 MB by default. If you wanted to increase the heap size to 1 GB, you would enter ' -Xmx1024m', click the Save button in the upper right corner, and then restart the server. Tip 6: HTTP Request Processing Threads From the: The [Max Thread Pool Size] parameter specifies the maximum number of simultaneous requests the server can handle.

The default value is 5. When the server has reached the limit or request threads, it defers processing new requests until the number of active requests drops below the maximum amount. Increasing this value will reduce HTTP response latency times. In practice, clients frequently connect to the server and then do not complete their requests. In these cases, the server waits a length of time specified by the Idle Thread Timeout parameter. [900 seconds, i.e., 15 minutes, is the default entry for GlassFish v3 and Open Source Edition 3.0.1.] Also, some sites do heavyweight transactions that take minutes to complete. Both of these factors add to the maximum simultaneous requests that are required.

If your site is processing many requests that take many seconds, you might need to increase the number of maximum simultaneous requests. Adjust the thread count value based on your load and the length of time for an average request. In general, increase this number if you have idle CPU time and requests that are pending; decrease it if the CPU becomes overloaded. If you have many HTTP 1.0 clients (or HTTP 1.1 clients that disconnect frequently), adjust the timeout value to reduce the time a connection is kept open.

Suitable Request Thread Count values range from 100 to 500, depending on the load. If your system has extra CPU cycles, keep incrementally increasing thread count and monitor performance after each incremental increase. When performance saturates (stops improving), then stop increasing thread count. • In the Administration Console Tree, expand the Configuration node, then click Thread Pools.

The GlassFish server provides two thread pools by default. The http-thread-pool thread pool is configured for use by network listeners, while thread-pool-1 is configured for use by the ORB (object request broker) for RMI/IIOP requests. (A stand-alone web application deployed over a non-distributed environment, such as the AffableBean application, relies on the http-thread-pool by default.) • Under the Thread Pool ID column, click http-thread-pool. • In the Max Thread Pool Size field, adjust the maximum number of threads available to the thread pool. • Click the Save button in the upper right corner, and then restart the server.

Tip 10: JDBC Tuning From: If your application uses Java DataBase Connectivity (JDBC) software for database access, it may be beneficial to tune your database connection pool. A general rule of thumb is to tune the value for max-pool-size and steady-pool-size to the same number of HTTP request processing threads. If your JDBC driver supports this feature, it is advisable to use JDBC drivers that use statement caching to re-use prepared statements. • In the Administration Console Tree, expand the Resources >JDBC >Connection Pools node, then click the AffableBeanPool node.

• In the General tab under Pool Settings, specify values for the following fields: • Initial and Minimum Pool Size: ( steady-pool-size) Minimum and initial number of connections maintained in the pool. • Maximum Pool Size: ( max-pool-size) Maximum number of connections that can be created to satisfy client requests. • Pool Resize Quantity: ( pool-resize-quantity) Number of connections to be removed when pool idle timeout expires. • Idle Timeout: ( idle-timeout-in-seconds) Maximum time that connection can remain idle in the pool.

• Max Wait Time: ( max-wait-time-in-millis) Amount of time caller waits before connection timeout is sent. • Click the Save button in the upper right corner, and then restart the server. Connection pool settings can also be specified in the sun-resources.xml descriptor:. NetBeans Resources • [product page] • • • • • • • • • • [pdf] • [screencast] • [screencast] • [screencast] • JMeter • [product homepage] • • [pdf] • • [screencast] • [book] GlassFish Performance • • [pdf] • [pdf] • [pdf] References • Actually, in JMeter version 2.4, using the HTTP Proxy Server to record HTTPS requests should be possible. See the JMeter User's Manual, for more details.

Dosch 3D Roads V2 Download. • The acceptable response time for retail web page response times is debatable, but general concensus seems to waver between 4 and 8 seconds. For example, see: • • • •.

Java Virtual Machines and Tools: JVM/JDK: Java Virtual Machines (JVM) and Software Development Kits (SDK) • - Java Linux SDK (32 and 64 bit). • - Oracle's ubiquitous JVM (for Linux).

Included with JDK. • - Open Source Project • • - J2SE 1.4.0 JVM for Linux and Windows on Intel-32.

Ahead of time compilation and caching JIT. Clean-room implementation.

LGPL • • • Embedded: • - Their virtual machine is for PALM and wireless portable devices but their development environment is on Linux (1st Q 2002) • - JVM for embedded Linux applications. Support for JBuilder. • - Embedded mobile phone JVM. • performance virtual machine • Language Extensions: • - seamless aspect-oriented programming (AOP) extension to the Java Java Build Tools: • - Java-based build tool (like Make) See • - Project build system based on ANT • - manage a project's build, reporting and documentation. Based on POM (Project Object Model) Java Tools: • - Profiler, Debugger, Threadalyzer. Supports Blackdown, Oracle, IBM JDK's • - Java components (Tables, charts, graphics, database front-ends, text fields) Supports Borland, IBM Visual Age, SUN IDE's and Netscape/Explorer browsers • - Distributed application, memory, performance, code coverage and thread deadlock detection and analysis. Also supports Oracle PL/SQL and Java stored procedure applications.

• - A make Java and C++ work together product. • - J2EE based, XML driven process execution and Workflow Automation framework which can be deployed on a multitude of J2EE servers. Java Installers: • - cross platform installers based on Java. • - framework for building cross platform installers.

• - generate an installer for any platform (MS/Windows, Linux, Unix, Mac.). RPM integration.

Supports Java applications as well as support for many other languages. • - multi-platform Java installer.

• - Multi-platform Java software installation tool for software distribution. Includes JVM installation if necessary. Java Source Code Review Tools: • finds errors not found by compiler syntax checking () See the YoLinux • - Java, C++, Ruby. • - adheres to a coding standards • - automatic and precise thread safety checker for Java classes Java Test Tools: • - Software development unit testing tool.

See the YoLinux • - Continuous build and integration tool for Java. Interfaces with CVS or Subversion. Supports Ant and Maven. Will show which check-in breaks the build. • - Java JUnit extension to support GUI test framework.

Uses an AWT robot class to test code. (Review: Java Developer Journal Apr. 2003) • - Utility for automating Java GUI tests • Test Coverage Tools: Test coverage tools report on which parts of the code were 'covered' or executed during software test suite execution.

Typical reports detail routines executed and a percentage of the code executed. Helps assess test reliability (how effective was the test in testing all of the code) and helps find dead code. • JAva COde COverage tool. Works at runtime.

No need to instrument code or compile your code differently. Forked from Emma with a new architecture to support these new features. I use JoCoCo with Jenkins with reporting supported by the Jenkins JoCoCo plugin.

Has Sonar, Jenkins and Eclipse plug-ins. See the YoLinux • - Coverage at line, block, method, class and package level. • Has Sonar, Jenkins and Eclipse plug-ins. • Has Eclipse plug-in. • - Provides Code Coverage information off of a JUnit Unit Test. Statement and Branch coverage.

Operates on Java Byte code.(Commercial) • - commercial code coverage tool. Has Sonar, Jenkins and Eclipse plug-ins. Installing Borland JBuilder 9 Enterprise on Linux: UML design, edit, test Java IDE tool • Load JBuilder9 Enterprise CD 1 Note the /etc/fstab cdrom statement used below. This may have been altered when using CrossOver PC software installer as it may add ' user,unhide,' to the list of options and prohibit a JBuilder installation.: /dev/cdrom /mnt/cdrom iso9660 noauto,owner,kudzu,ro 0 0 [Potential Pitfall]: If the install script does not execute, it could be because of the way the CD was mounted. • CD should automount. If not mount.

• cd /mnt/cdrom • Execute the install script on the CD:./install_linux • Select 'Borland JBuilder 9 Enterprise' and select all components • Agree to license • Select 'Full Install' • Set install path to /opt/JBuilder9 (no spaces allowed) • Select 'Install' button. • Select 'Done' button. • Terminate installer program. Select 'X' in window corner. • If using a FlexLM License, place license file in the following directory: /opt/JBuilder9/defaults/license.dat • Four desktop icons created: • JBuilder: Start JBuilder 9 • Licensing Information: Obtain a trial license or register your single user license. • JDataStore Explorer • JDataStoreServer Note: To un-install run: /opt/JBuilder9/UninstallEnterprise/UninstallEnterprise Desktop icon launcher: • Name: JBuilder9 • Command: /opt/JBuilder9/bin/jbuilder • Icon: /opt/JBuilder9/bin/jbuilder_icon.xpm Complete IDE for building applications, JSP/Servlets, JavaBeans[tm], Enterprise JavaBeans and distributed J2EE applications.

Comes with AppServer and Visi-Broker (Visigenics CORBA broker). Supports UML, SOAP, UDDI, WSDL. (Linux, Solaris, Mac OS X and MS/Windows) Oracle also sells a version of JBuilder under the Oracle brand name. Borland OptimizeitSuite Installation: Optimizeit Suite, Profiler, Thread Debugger and Code Coverage • Load JBuilder9 Enterprise CD 2 • CD should automount. If not mount.

• cd /opt • tar -xvzf /mnt/cdrom/linux/suite.tgz This creates /opt/OptimizeitSuite55/. • Add FlexLM License: /opt/OptimizeitSuite55/lib/license.dat Tools: • /opt/OptimizeitSuite55/CCoverage • /opt/OptimizeitSuite55/OptimizeIt • /opt/OptimizeitSuite55/ProgressTracker • /opt/OptimizeitSuite55/ThreadD. Java Profiling Tools: Profiling code is the process of running instrumented code so that one can report on the behavior of the executing software with the intent of improving the performance of execution.

Profiling tools will reveal what methods are being executed, how much time is spent executing the methods, what and how many objects have been invoked, how much memory they are using and other details of the execution behavior of the code. Tools which come with the JDK: • java: The JVM has a built-in profiler which is activated with the command line argument 'java -prof'. This will generate a 'java.prof' file in the runtime directory. Other tools can then be used to make sense of the data. • jmap: Show memory use. First list processes with jps to find the PID of the process you want to query. Show object count for running process: jmap -histo:live 4172 Show heap: jmap -heap 4172 Help: jmap -h • jconsole: • For Java 6: Start app, find the pid with the command: jps and then issue the command: jconsole process-id • For Java 5 it requires use of JMX and thus it must be compiled in: java –Dcom.sun.management.jmxremote myprogram Run JConsole: jconsole process-id • jvisualvm: GUI and self explanatory.

Allows you to select the running java process to monitor. Various tabs are available for related output. Many of these tools require the use of jps to identify the system process id of the Java process. List Java processes: jps -vl List command options: jps -h Open Source Profiling Tools: •: Compiled into your class files with the BTrace compiler: btracec to instrument your code.

Text output only. •: Accepts and visualizes btrace output via a broker (EurekaJ proxy) which then sends results via JSON to the EurekaJ Manager. Commercial Profiling Tools: •: GUI. JEE, database and thread profiling.

Java Servlet, Application Servers and JSP Servers: Simply put, Java servlets are like CGI in Java for the dynamic generation of web content. JSP is embedding Java in a web page which is processed by the servlet engine before being served. • - Java solutions for the Apache web server.

Servlet processing module which integrates with the Apache web server. • - Java Servlet and Java Server Pages • • - Java Application Server (JSP, Servlets, EJB, Transaction and Messaging) • - Java servlet and JSP engine with load balancing. (commercial) • - web server written in Java which provides servlet processing. • - httpd server written in Java. Support for servlets and event routing. Web framework for push to browser technology. Java App Server, SOA, Middleware and Three Tier Systems (J2EE or CORBA services): • - Open Source Enterprise JavaJ2EE application server.

Bundles Tomcat app engine, HornetQ message queue, Hibernate (Db interface), Business Rules Management System (BRMS), SOAP SOA services, HSQL database, SEAM (AJAX, JSF, JPA, EJB, BPM. •: Red Hat owns JBOSS and this is their home page. •: (Java Business Process Management) workflow/orchestration using BPEL (Business Process Execution Language) •: (JBoss Enterprise Middleware System) for SOA (Service Oriented Architecture) • - business rules engine • - fully certified J2EE 1.4 application server. • • - Enterprise Java Beans (EJB) and Java 2 Enterprise Edition (J2EE) • - For building enterprise-class server-side applications with Java. (EJB,JSF,SOA,JSP,JMS,CORBA,JDBC,XML,JNDI and servlets. • - Supports SOAP, J2EE, etc. • - open source Java EE 5 application server.

• - Java Application J2EE/XML Server. Development sponsored by • • - J2EE e-commerce platform. • - J2EE: EJB, Servlets, JSP, JTA, JNDI, JDBC, JMS, XML/XSLT. (Used by Oracle in their J2EE server) • - Open Source EJB • • - All Java and XML based. EAI (Enterprise Application Integration) software. Extensible with built in components for JMS, Oracle, Sybase and TIBCO as well as data exchange formats such as XML. This is used by major powerhouses such as the investment banking arm of Dresdner Bank (its original developer and sponsor) • - Mobile Application Server.

Built for J2EE end-to-end Java mobile application development. Supports Palm, WAP Phones, RIM pagers, Windows CE mobile devices. Supports WAP/WML, PQA HDML, Clipped HTML and Compact HTML. Integrates with LDAP, PKI, EJB, XML, JDBC, JMS, CORBA. Requires Apache/Tomcat. • - J2EE, SSL, EJB, JRMP, Servlets, JSP. (Commercial licensing available) •.

Java Frameworks, API: • Apache: • - Model-View-Controller (MVC) design • - Servlets framework • - A model-view-controller (MVC) framework for constructing web applications with either Velocity or Java Server Pages (JSP). • - J2EE application framework • • • • - Clustered objects. Alternate JVM boot class path which loads code to synchronize specified Java objects between applications on distributed JVMs.

Open source, commercially supported. • Multiple Agent frameworks: (distributed agents) •: (BBN Technologies) Architecture to support distributed agent-based applications. •: (AOS Group) intelligent agent development environment scalable from PDAs to large systems •: (Recursion software) multi-platform location engine from Recursion • - GIS (,, ) •. • - relational database implemented in Java. • - Fast SQL relational database engine written in Java.

• DB and ORM API: • - Data mapping framework. Map DB records or results to/from a Java data access objects (DAO). • - EJB object/relational persistence and query service. Interfaces Java objects with database. YoLinux • - database connection pool.

• • (ORM) • (like Hibernate) • Terms: • ORM: Object Relational Mapping (mapping of Java objects to database storage schema) • JPA: Java Persistence Architecture () API for ORM. Java API for Data Formats and Data Exchange: Data Exchange Formats: • XML: •: Program to generate Java source code classes to parse and encapsulate XML based on an XSD schema file and populate a data class. Also generates code to generate XML from a Java data object. Released by BEA to opensource community. () •: Generates Java source code to parse and encapsulate XML. Similar to XmlBeans except that it maps XML to a specific JAXB object which reflects the schema of the XML.

XmlBeans allows you to parse and then store or use the data however you would like. Also see the •: XML parser. Included in Java SE 1.6 •: High speed XML parser implementing SAX and JAXP interfaces. •: XML parser • Binary: •: terse, tight and light binary alternative format developed by Sun for data exchange when XML is too heavy. A more compact and efficient serialization than text-based XML format. • Fast Infoset (~10X faster than Java marshaling XML through Xerces) • • • • Non XML Formats: •: JavaScript Object Notation • - uses reflection to automatically marshal a Java onject to/from JSON • - API to code translation to/from JSON •: serialized, human readable text data •: Old/historical data exchange format. Java GUI Components: The compiled code is not cross platform but use of cross platform GUI frameworks should make the source portable if coded well.

• - Sherrill - Lubinski SL-GMS - [] Dynamic graphic GUI components and controls for real time interfaces and displays. Common '.m1' file graphic framework for C++ and Java. Graphic sources include Visio, bitmaps and DXF. Supports pan, zoom, drill-down and hyperlink capability. Supports input as well as displays.

Low weight applets for good performance • Delivered as separate class components to be integrated within ones program. Many are Bean components which can be dragged and dropped within a GUI IDE. Many configurable widgets. • - Dynamic, data driven visual components. Must use GLG monolithic super class framework within your application.

Widgets are used within their class framework. Includes many widgets.

Strong support of widgets for process control displays. • - Diagramming and data graphing capabilities.

Requires use of their super class framework. Few predefined widgets. (just graphs and layout) Developer must develop most widgets.

• - Access control (ACL), db connection pools, GUI components (calendars, explorer trees, editing components), charting (scatter, bar) Not all components were beans and thus would not integrate with IDE. • - 2D and 3D data visualization. Java GUI frameworks: • - Sun GUI API (written using AWT) • - Java's primitive graphics layer.

• - Sun Java GUI description language/presentation layer. Java GUI's and interaction defined by an XML file. This allows for an infinitely flexible interface. • - extensive framework supporting AWT, Swing and Bean listeners. • - Extensible infrastructure and design. Shows promise for easily reconfigurable GUI layouts.

• - uses javax.swing. Tight code base. • - unified GUI toolkit to support web AJAX as well as Swing interfaces. • - web based UI development for J2EE or servlet containers. UI is AJAX HTML/Javascript or Flash for user interaction. • - web or stand-alone applications • - Java Swing apps, J2EE client apps • - web J2EE/servlet and AJAX. Java Connection Architectures and Web Services: Topologies: • client - server: e.g.: • WWW: Web browser (client) to web server (server) connection.

A click on a web page invokes processing by the server which feeds a response to the web browser. Software: Apache web server and CGI • Servlets: A JVM used to process Java to perform CGI functionality. Software: • - Also see the •: Adobe/Macromedia •: EJB3 container used with Tomcat • Any J2EE application server supports Servlets and so much more. • Web Services: • SOAP: client calls a remote process. The requested process and input arguments are encapsulated in XML and passed to the server. The server executes the requested function and passes the results back to the client encapsulated in XML.

• SOA: Service Oriented Architecture - key components of a SOA include services, dynamic discovery, and messages. May integrate the following to locate and invoke the web service: • UDDI: Universal Description, Discovery, and Integration - Find a web service, registry Software: • • WSDL: Web Services Description Language. - Locate the SOAP service and server • SOAP - The Web services server. Software: •: SOAP and WSDL support. The Axis SOAP/WSDL engine servlet runs under Tomcat which is coupled with the Apache web server.

•: (was XFire) Web services programming framework: SOAP, WSDL, JAX. • Also see lists above i.e. JBoss, BEA Weblogic, IBM Websphere, Sun, Oracle Application server. • CORBA: Compact binary transport over IIOP. May use a CORBA name server to locate services. Native Java support. • Java RMI: Remote Method Invocation.

Native Java support. • peer to peer: Two systems or processes passing information between the two.

• JMS: Java Messaging Service. Supports publish-subscribe communications framework. Subscription via callback methods provided by the subscriber. ActiveMQ is often used as a communications bus for ESB. JMS and other message queues: • •: Debugging tool to view and monitor JMS messages. • • Three tier architectures: J2EE (middleware) J2EE Software: • (Sun open source) • (Apache.org) • (Red Hat) • Also see the • • ESB: Enterprise Service Bus - a collection of specialized processes (may be distributed) integrated by a common infrastructure which handles communication, interactions, interfaces, authentication, discovery and any other needs of the service bus. • BPEL: Business Process Execution Language - Workflow defined in an XML schema, used to invoke web services in the proper order and deliver the results.

BPEL Software:. (Note project is retired.) ESB Software: • - includes an amazing NetBeans plugin • • - Full functionality. Based on JBI spec. Uses Apache Camel internally. • - Embeddable.

Supports routing and mediation rules. () • - Lightweight • (commercial). Real Time Java: The Java Real-Time System (RTS) runs on the Linux Real-Time kernel. The 'Red Hat Enterprise MRG' (Messaging Real-time Grid) is a set of over 50 RPMs which add or replace components of the 'Enterprise Linux' release.

It includes a real-time kernel, configuration and tuning utilities, performance monitoring tools and documentation. The Red Hat MRG Linux includes software based on the University of Wisconsin's for high throughput computing.

The Red Hat MRG release includes QPID, the Apache group's implementation of the AMQP message queues which greatly improves messaging throughput vs traditional SOA technology. • - Real-Time System - Features the ability to schedule real-time threads, AOT (Ahead of Time Compile as opposed to JIT) to load classes before they are required so this action does not introduce an unexpected latency, and it includes the ability to perform deterministic garbage collection. RTS runs on: • • () • Implementations: • - Note: examples are installed to /usr/share/qpidc/examples/pub-sub/ and /usr/share/doc/rhm-0.2/cpp/pub-sub/ While Red Hat's PR states magnificent gains in speed (qpid 1.0), tests show that to be both faster and more reliable.

• • Java RTS tutorials: • IBM:,,,,, • Sun: • • • • • Java One presentations: • • •. JVM Languages (other than Java): • - optionally typed and dynamic language, with static-typing and static compilation capabilities, for the Java platform. • - Object oriented meets Functional programming. Construct elegant class hierarchies for maximum code reuse and extensibility, implement their behavior using higher-order functions. • - a statically-typed programming language that runs on the Java Virtual Machine, developed by JetBrains (IntelliJ). Approved by Google for Android development.

• - member of the Lisp family of languages. Supports multi-threaded programming, Functional Programming and Runtime Polymorphism. • - Python for the Java Platform • - The Ruby Programming Language on the JVM • - Javascript engine implemented in Java provided by the Mozilla Foundation. • - Perl on the JVM • on comercial app server - PHP 5 compiled for the JVM • - The R Language for statistical computing on the JVM • - self-contained implementation of a Tcl interpreter, written entirely in Java. Jacl is typically used to incorporate Tcl scripting functionality into an existing Java application. • - Scheme with a very simple interface to Java • - Compiles Visual Basic 6 source to Java byte code.

Links: • - The official Sun Java site • • - applets, applications and servlets. • • - Open source middleware and Java software.

• - Gary Meyer • - David H. Silber • - Robert S. Dubinski • • - peer to peer applications framework - Sun open source project.

• • • • - Java standards development and release News Groups: • - Glossary: • J2SE: Java 2 Standard Edition: Foundation for desktop, server, J2EE, web services, embedded and real-time applications • J2ME: Java 2 Micro Edition • J2EE: Java 2 Enterprise Edition: Server side and middleware. Built upon J2SE. Web services, SOA, component model, management and communications API. • JAXP: Java API for XML processing.

• JAXM: Java API for message processing. • JAXR: Java API for XML based registry integration. Registration and discovery of web services.

• JAX-RPC: Java API for a remote procedure call interface. • JAXB: Enables bindings between the XML schema and the Java object.

• JINI: Framework for advertising services on the local network. Discovery mechanism for systems to obtain and lease these services. • JMX: Monitor distributed devices, applications and service driven networks. • JVM: Java Virtual Machine - compiles Java byte code to machine code, then executes.

• SOAP: Simple Object Access Protocol. • UDDI: Universal Description, Discovery and Integration.

SOAP services discovery. • WSDL: Web Services Description Language. Name service to locate SOAP service and its interface definition.

• XSLT: eXtensible Stylesheet Language Transformation. Translates XML into renderable XHTML for viewing in a browser or translate XML to a format required for another application. [Potential Pitfall]: If your Sun or IBM JVM doesn't work with RH 7.1?

Books: 'Core Java 2, Volume 1: Fundamentals ' by Cay S. Horstmann, Gary Cornell ISBN #, Prentice Hall PTR 8th edition The industry standard. Need I say more? 'Core Java 2: Volume 2 Advanced Features ' by Cay S. Horstmann, Gary Cornell ISBN #, Prentice Hall PTR 8th edition The industry standard. Need I say more? 'Core Java Server Faces' by David Geary, Cay S.

Horstmann ISBN #, Prentice Hall PTR 2nd edition 'JSP, Servlets, and MySQL' by David Harms ISBN #, Hungry Minds, Inc.