ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Steve Cohen" <SCo...@sportvision.com>
Subject RE: Starteam connect/disconnect
Date Fri, 24 Oct 2003 13:53:30 GMT
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


Mime
View raw message