ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Ross Gibb" <r...@nakinasystems.com>
Subject RE: Starteam connect/disconnect
Date Fri, 24 Oct 2003 14:42:46 GMT
Hi,

The Starteam server exists on a Windows 2000 box using  Microsoft Access as the database,
1 Gig of memory, 2GHz processor.  Before you role your eyes and tell me to start using a real
database understand that at the time it was all I could afford.  Furthermore, I have asked
Borland specifically whether my server configuration and the number of users I support would
put load on the server slowing it down, they responded that everything should work with good
performance.  Also, when I have been experiencing slow performance I have gone to my server
to see if the processor is maxed out or it is short of memory, each time the server has been
fine.  As far as running the ANT scripts, I have been using both Windows and Solaris with
various graphical front ends (Antelope, and through Eclipse).  When I started having these
problems I have switched to ANT command line in hopes it was a problem with one of the GUI
tools.  Even ANT command line produces this problem.

The exact actions that cause this problem are as follows.  Assume I have just rebooted the
server and there are no connections to it.  I start my build script from Solaris using ANT
command line.  The build script uses approx 30 Starteam ANT task calls (stcheckout stlabel
only).  As the build script executes, all the Starteam tasks are fast, the 30th call is as
fast as the first.  The build script finishes.  After the build finishes if I try and use
the Starteam GUI to check out code it is extremely slow.  If I were to run another build script
all the Starteam ANT tasks (stcheckout, stlabel) are extremely slow.  I wait some amount of
time (I do not know the exact time but it is around 15 minutes) and everyhing is back to normal,
Starteam GUI is fast again, if I run another build it will be fast again.  When I first started
my build script it was small, around 5 calls to Starteam ANT tasks, I never had these problems
when there was a small amount of Starteam targets in the script.  If I run a script that has
5 Starteam targets the server does NOT slow down after.  I have run netstat on the Starteam
server when the build is running and there seems to be a new connection to the build client
for every Starteam target called.  These connections are visible through netstat until the
build ends, when the build is over the connections are no longer visible using netstat.  Finally,
if I restart the Starteam server when it is in a slow state when it comes back up everything
is fine.

Thanks for the help.

Ross

-----Original Message-----
From: Steve Cohen [mailto:SCohen@sportvision.com]
Sent: Friday, October 24, 2003 9:54 AM
To: Ant Developers List
Subject: RE: Starteam connect/disconnect


Hmm, I have never noticed this.  While what you say certainly sounds
logical (clean up after yourself, basically, as you must do with
database connections, etc.) I have never experienced it myself.  I can
certainly take a look at putting connection-closing logic into these
tasks, especially as the connection is not reused between task
invocations.

What client and server environments are you doing this in?

Steve Cohen
Sr. Software Engineer
Sportvision, Inc. 
scohenATSportvisionDOTcom

-----Original Message-----
From: Ross Gibb [mailto:ross@nakinasystems.com] 
Sent: Friday, October 24, 2003 7:54 AM
To: dev@ant.apache.org
Subject: Starteam connect/disconnect


Hi,

I am using ANT with Starteam and having some troubles.  Right now my
build script makes around 30 separate calls to Starteam targets
(stcheckout, stlabel exclusively).  When the build is finished Starteam
seems to get into a weird state where everything is extremely slow (i.e.
using the Starteam gui to checkin or checkout code is really slow).  The
slowness eventually goes away, some sort of timeout I am guessing.  I
tried to help myself and started poking around the ANT source code to
see how the Starteam API is used.  I think I found the call to the
Starteam API that connects to the server, it is:

In class org.apache.tools.ant.taskdefs.optional.starteam.StarTeamTask

The function is:

 /**
     * All subclasses will call on this method to open the view needed
for
     * processing.  This method also saves a reference to the
     * <code>Server</code> that may be accessed for information at
various
     * points in the process.
     *
     * @return the <code>View</code> that will be used for processing.
     * @see #createSnapshotView(View)
     * @see #getServer()
     */
    protected View openView() throws BuildException {

        logStarteamVersion();
        View view = null;
        try {
            view = StarTeamFinder.openView(getViewURL());
        } catch (Exception e) {
            throw new BuildException(
                "Failed to connect to " + getURL(), e);
        }

        if (null == view) {
            throw new BuildException("Cannot find view" + getURL() +
                    " in repository()");
        }

        View snapshot = createSnapshotView(view);
        this.server = snapshot.getServer();
        return snapshot;
    }


You can see from the comments that this code returns a Starteam view
(and keeps a connection to the server) to the caller.  My question is,
does this connection have to be closed after you are finished using
it????  I have found no code in the ANT source that actually disconnects
( if there is some please point me to it).  I have been in contact with
the Borland support who claim there is disconnect method that can be
called to disconnect from the server (I am not sure it applies in this
case).  I have requested the Starteam API docs from Borland but they
seem to be ignoring me.  Hoping someone here would know.

Ross


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message