|
||||||||||||||||||||||
1. MaintainJ IntroductionMaintainJ generates UML sequence and class diagram for a use case. This happens in three steps.
1.1. Instrument CodeThis step changes class files at runtime to insert log statements before every method call. No changes are done to the source files nor any changes are persisted to file system. You can choose the packages to be instrumented. Instrumented applications are slow to service the first request but perform with little overhead later. Below is a list of configurations on which MaintainJ is supported. a) J2SE applications/Applets/JUnit - Instrumenting J2SE applications (Swing or non-GUI), Applets and JUnit is supported on all JREs of version 1.4 and above. b) J2EE applications - The following J2EE application server and JRE configurations are supported.
Glassfish and Jetty servers are also supported . Check MaintainJ blog for details. If your server is not supported, follow these steps to generate the trace files. We could also add support to your server on request.c) Eclipse Plug-ins - Instrumenting Eclipse Plug-ins is supported on all JREs of version 1.5 and above. 1.2. Generate Trace FilesNext, run the instrumented application and demarcate the start and end points of a use case. Call trace for the use case will be logged to the given trace file (.ser file). a) J2EE Applications - A JSP is provided to demarcate the start and end points. You need to click a 'Start Tracing' button before a use case starts and click 'Stop Tracing' at the end of the use case. The call trace will be logged to the given file when 'Stop Tracing' is clicked. b) J2SE/Applet/JUnit and Eclipse Applications - A Swing window in which you can start and stop tracing opens when your instrumented application starts. Click 'Start Tracing' button before a use case starts and 'Stop Tracing' at the end of the use case. The call trace will be logged to the given file when 'Stop Tracing' is clicked. 1.3. View the DiagramsJust copy the trace files to any project in Eclipse workspace to view the diagrams in MaintainJ UML Editor. | ||||||||||||||||||||||
|
||||||||||||||||||||||