[Novalug] java flowchart tool from code (OT)

Peter Larsen plarsen@famlarsen.homelinux.com
Tue Nov 17 18:18:49 EST 2009


On Tue, 2009-11-17 at 14:04 -0800, Brander Snaxe wrote: 

> I just inherited a java web application that runs in Tomcat. I am now the maintainer of the code and have to make a new feature. The documentation is lacking. I was wondering if anybody could recommend a tool that can reverse engineer java source code into visual flowcharts. FOSS solutions are preferred. Not sure if there is a free tool for Eclipse. Commercial solutions are acceptable if you can vouch for them.
> 

That'll make it a J2EE application. You'll need to understand the "flow"
of an J2EE app first - there's a ton of documentation out there.
Basically you'll find most J2EE follow a MVC approach.

Depending on the deployment type, there may NOT be any source code on
the server! Usually a tool like Eclipse is used to manage the deployment
- or ant scripts. If you can get to that level - simply open the
project, and you can generate UML on existing .java files to see the
model and depencencies between them. You can even get call-trees etc.
documented.

HOWEVER - a lot of the calls you'll find are from the framework. How the
code is executed, where etc. are all in the deployment descriptor files.
Each project manages it's own way of "attaching" to the web-server. You
have multi-level libraries and on advanced installations, custom
class-loaders aren't that uncommon because of the complexities.

A traditional deployment file for J2EE ends on .war - (Web Application
Resource). It's a special "jar" file (zip), and has a particular
structure that MUST be obeyed to deploy it. The developer places this
file in a special directory and when tomcat starts, it gets deployed -
tomcat extracts the file content, executes the deployment instructions
and creates the context and settings for the app as requested. In some
cases there's references to global jndi resources, and you may be lucky
it validates those. If there's a management console, the deployment can
be done from it, or via somekind of ip protocol to the management admin
interface. To my knowledge, the most common way with Tomcat is simply
placing the war file in a special directory and restarting tomcat.  

An application server has many dimensions. Multiple applications, system
settings, system resources, jvm controls, jdbc setup (jndi) and a lot
more. Setting up clusters of servers is a lot of fun when it comes to
coordinating those settings across hosts *cough*. 

Good luck though.

-- 

Best Regards
  Peter Larsen

Wise words of the day:
Where humor is concerned there are no standards -- no one can say what
is good or bad, although you can be sure that everyone will.
		-- John Kenneth Galbraith
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20091117/02bad16c/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
URL: <https://lists.firemountain.net/pipermail/novalug/attachments/20091117/02bad16c/attachment.asc>


More information about the Novalug mailing list