> WinDiff ships with Microsoft's Developer Studio, and provides nice
> visual diff output.  I've not tried to use it in conjunction with UNIX
> diff.  Next time, you want to generate diffs using the equivalent of
> UNIX `diff -u`.  You can generate them using CVS by making changes to
> your local copy turbine/build/build-turbine.xml and running `cvs diff -u
> build-turbine.xml` from the turbine/build directory.  I've updated the
> build file to include the missing classes.  Thanks Martin!

there are some more files missing ... here is the diff .. i created it using jCVS
II from www.gjt.org .. i hope it works ...


Index: ./build/build-turbine.xml
===================================================================
RCS file: /products/cvs/turbine/turbine/build/build-turbine.xml,v
retrieving revision 1.24
diff -r1.24 build-turbine.xml
182d181
<                       org/apache/turbine/services/Initable.class
183a183
>                       org/apache/turbine/services/BaseInitableBroker.class
185c185,187
<                       org/apache/turbine/services/TurbineBaseService.class
---
>                       org/apache/turbine/services/BaseServiceBroker.class
>                       org/apache/turbine/services/Initable.class
>                       org/apache/turbine/services/InitableBroker.class
187a190
>                       org/apache/turbine/services/ServiceBroker.class
215a219
>
org/apache/turbine/util/db/pool/ConnectionWaitTimeoutException.class
237a242,243
>                       org/apache/turbine/services/InitializationException.class
>                       org/apache/turbine/services/InstantiationException.class
242,243c248
<                       org/apache/java/util/Configurations.class
<                       org/apache/java/util/ConfigurationsRepository.class"/>
---
>                       org/apache/java/util/*.class"/>

The command completed successfully.

now i can run the following test:

public class PoolTest {
    import org.apache.turbine.services.db.PoolBrokerService;
    import org.apache.turbine.util.db.pool.*;
    import java.sql.ResultSet;
    import java.sql.Statement;

    public static void main(String[] args) {
        try {

TurbineResourceService.setPropertiesFileName("p:\\\\develop\\java_lib\\turbine\\TurbineResources.properties");

        } catch (Exception ex) {
            ex.printStackTrace();
        }
        fetch("1");
   }

    public void fetch(String new_id) {
        DBConnection db = null;
        Statement stmt = null;
        ResultSet rs = null;
        try {
            db = PoolBrokerService.getInstance().getConnection();
            stmt = db.getConnection().createStatement();
            rs = stmt.executeQuery("SELECT a, b, c "
                    + "FROM test WHERE test_id = " + new_id);
            if (rs.next()) {
                System.out.println(rs.getString(1) + ", " +  rs.getString(2) + ",
" + rs.getString(3));
            }
        } catch (Exception ex) {
            ex.printStackTrace();
        } finally {
            try { rs.close(); } catch (Exception ex) {}
            try { stmt.close(); } catch (Exception ex) {}
            try { PoolBrokerService.getInstance().releaseConnection(db); } catch
(Exception ex) {}
        }
    }
}

maybe this code would be usefull for newbies (it would have been usefull for me
;-)

martin



------------------------------------------------------------
To subscribe:        [EMAIL PROTECTED]
To unsubscribe:      [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?:           [EMAIL PROTECTED]

Reply via email to