[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question about CHA





On Tue, 19 Jun 2001, Sandrine Sage wrote:

> 
> Hello,
> 
> I am presently trying to get the CHA graph of a server. All the classes
> are located in the ~/classes/ directory and the source code is in
> ~/temp/server/src/.
> 
> The server's main is "Main.java". "Main.java" contains a constructor,
> "Main", and a main method, "main". When the server is invoked, "main"
> calls the constructor "Main". The purpose of "main" is mostly to set
> default parameters, and the purpose of "Main" is to start the server.
> The code structure of "Main.java" is bellow.
> 
> The problem I encounter is that the CHA static analysis always misses the
> constructor of the server. The methods invoked in "Main" are not computed !
> 
> Soot is invoked with the command line:
> java $HOTSPOT $JAXP -classpath $JBOSS_CLASSPATH -mx1024m soot.Main
> --dynamic-path . --app org.jboss.Main $@ -W
> in the ~/tmp/server/dist/bin directory and $JBOSS_CLASSPATH contains the
> path to both the server and my ~/classes/ directories.
> 
> I am confident in my classpath, as I have no problem running the server
> using this classpath. I have looked in Soot's MethodCallGraph.java and it
> seems to me that my class entry point should not cause any problem...
> 
> ?!?!?!?!?!?!?!?!?!?!
> 
> I would gladly take an advice !!
> 
> Thank you a gazillion times in advance for your kind help !
> =-)
> 
> Sandrine Sage
> B.Eng. student, Ecole Polytechnique, Montreal
> 
> "The man who feels smug in an orderly world has never looked down a volcano"
> 
> 
> *********************************************************
> 
> public class Main {
>    // Constants -----------------------------------------------------
> 
> 	...
> 
>    // Attributes ----------------------------------------------------
> 
> 	...
> 
>    // _______________________________________________________________
>    // Static --------------------------------------------------------
>    public static void main(final String[] args)
>    throws Exception
>    {
> 	...
> 
>       // Start server - Main does not have the proper permissions
>       AccessController.doPrivileged(new PrivilegedAction()
>       {
>          public Object run()
>          {
>             new Main(confName, patchDirName);
>             return null;
>          }
>       });
>    }
>    // _____________________________________________________________________________
>    // Constructors --------------------------------------------------
>    public Main(String confName, String patchDir)
>    {
>           Date startTime = new Date();
>       try
>       {
> 	...
> 
>          // Give feedback about from where jndi.properties is read
>          // Create MBeanServer
>          // Load configuration
> 
>       }
>       }
>       catch (Exception e)
>       {
> 	...
>       }
> 	...
> 
>       Date stopTime = new Date();
>       Date lapsedTime = new Date(stopTime.getTime()-startTime.getTime());
>    }
> }
> 
> 
>