*** ./Makefile.orig Mon Jan 25 19:48:56 1999 --- ./Makefile Mon Jan 25 20:19:53 1999 *************** *** 9,19 **** --- 9,21 ---- #------------------------------------------------------------------------- FIND = find + IDL2JAVA = idltojava -fno-cpp -fno-tie JAR = jar JAVA = java JAVAC = javac JAVADOC = javadoc RM = rm -f + TOUCH = touch # This defines how to compile a java class .java.class: *************** *** 44,49 **** --- 46,54 ---- @echo ------------------------------------------------------------ @echo To build the examples, type: @echo " make examples" + @echo + @echo "To build the CORBA example (requires Java2):" + @echo " make corba" @echo ------------------------------------------------------------ @echo *************** *** 142,148 **** $(FIND) . -name "*~" -exec $(RM) {} \; $(FIND) . -name "*.class" -exec $(RM) {} \; $(FIND) . -name "*.html" -exec $(RM) {} \; ! $(RM) postgresql.jar -$(RM) -rf Package-postgresql *output ####################################################################### --- 147,154 ---- $(FIND) . -name "*~" -exec $(RM) {} \; $(FIND) . -name "*.class" -exec $(RM) {} \; $(FIND) . -name "*.html" -exec $(RM) {} \; ! -$(RM) -rf stock example/corba/stock.built ! -$(RM) postgresql.jar -$(RM) -rf Package-postgresql *output ####################################################################### *************** *** 219,225 **** example/datestyle.class: example/datestyle.java example/psql.class: example/psql.java example/ImageViewer.class: example/ImageViewer.java - #example/Objects.class: example/Objects.java example/threadsafe.class: example/threadsafe.java example/metadata.class: example/metadata.java ####################################################################### --- 225,261 ---- example/datestyle.class: example/datestyle.java example/psql.class: example/psql.java example/ImageViewer.class: example/ImageViewer.java example/threadsafe.class: example/threadsafe.java example/metadata.class: example/metadata.java + + ####################################################################### + # + # CORBA This extensive example shows how to integrate PostgreSQL + # JDBC & CORBA. + + CORBASRC = $(wildcard example/corba/*.java) + CORBAOBJ = $(subst .java,.class,$(CORBASRC)) + + corba: jdbc2 example/corba/stock.built $(CORBAOBJ) + @echo ------------------------------------------------------- + @echo The corba example has been built. Before running, you + @echo will need to read the example/corba/readme file on how + @echo to run the example. + @echo + + # + # This compiles our idl file and the stubs + # + # Note: The idl file is in example/corba, but it builds a directory under + # the current one. For safety, we delete that directory before running + # idltojava + # + example/corba/stock.built: example/corba/stock.idl + -rm -rf stock + $(IDL2JAVA) $< + $(JAVAC) stock/*.java + $(TOUCH) $@ + + # tip: we cant use $(wildcard stock/*.java) in the above rule as a race + # condition occurs, where javac is passed no arguments ####################################################################### *** ./postgresql/jdbc1/ResultSetMetaData.java.orig Mon Jan 25 12:02:07 1999 --- ./postgresql/jdbc1/ResultSetMetaData.java Mon Jan 25 12:03:11 1999 *************** *** 6,14 **** // postgresql.jdbc2 package. import java.lang.*; - import java.sql.*; import java.util.*; import postgresql.*; /** * A ResultSetMetaData object can be used to find out about the types and --- 6,19 ---- // postgresql.jdbc2 package. import java.lang.*; import java.util.*; import postgresql.*; + + // We explicitly import classes here as the original line: + //import java.sql.*; + // causes javac to get confused. + import java.sql.SQLException; + import java.sql.Types; /** * A ResultSetMetaData object can be used to find out about the types and *** ./postgresql/jdbc2/ResultSet.java.orig Mon Jan 25 20:07:18 1999 --- ./postgresql/jdbc2/ResultSet.java Mon Jan 25 20:15:46 1999 *************** *** 789,797 **** // ** JDBC 2 Extensions ** ! public boolean absolute(int row) throws SQLException { ! throw postgresql.Driver.notImplemented(); } public void afterLast() throws SQLException --- 789,800 ---- // ** JDBC 2 Extensions ** ! public boolean absolute(int index) throws SQLException { ! if (index < 0 || index > rows.size()) ! return false; ! this_row = (byte [][])rows.elementAt(index); ! return true; } public void afterLast() throws SQLException *************** *** 816,822 **** public boolean first() throws SQLException { ! throw postgresql.Driver.notImplemented(); } public Array getArray(String colName) throws SQLException --- 819,829 ---- public boolean first() throws SQLException { ! if (rows.size() <= 0) ! return false; ! current_row = 0; ! this_row = (byte [][])rows.elementAt(current_row); ! return true; } public Array getArray(String colName) throws SQLException *************** *** 941,947 **** public int getRow() throws SQLException { ! throw postgresql.Driver.notImplemented(); } // This one needs some thought, as not all ResultSets come from a statement --- 948,954 ---- public int getRow() throws SQLException { ! return current_row; } // This one needs some thought, as not all ResultSets come from a statement *************** *** 982,988 **** public boolean last() throws SQLException { ! throw postgresql.Driver.notImplemented(); } public void moveToCurrentRow() throws SQLException --- 989,999 ---- public boolean last() throws SQLException { ! if (rows.size() <= 0) ! return false; ! current_row = rows.size() - 1; ! this_row = (byte [][])rows.elementAt(current_row); ! return true; } public void moveToCurrentRow() throws SQLException *************** *** 997,1003 **** public boolean previous() throws SQLException { ! throw postgresql.Driver.notImplemented(); } public void refreshRow() throws SQLException --- 1008,1017 ---- public boolean previous() throws SQLException { ! if (--current_row < 0) ! return false; ! this_row = (byte [][])rows.elementAt(current_row); ! return true; } public void refreshRow() throws SQLException