This is the mail archive of the java-discuss@sourceware.cygnus.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Newbie: jdbc + gcj 4 win32



Ferenc Csizmadia <fcsiz@chemaxon.com> writes:

> - Is it possible to compile a JDBC application using gcj?

Sure, but you'll have to borrow the java.sql.* classes from somewhere
else, they are primarily interfaces I believe so it shouldn't be to
big a deal.  Also java.sql.DriverManager uses Class.forName to load
the database driver (which will have to be type 4 unless you are
really ambitious ... see comments below) so you'll need to link it as
a shared library or use the -Wl,-u,XXX flag where XXX is the mangled
symbol for the database driver class name.

> - What is the easiest way to install gcj for win32?

I'm not sure there is one, at this stage of the project you'll need to
be prepared to wrestle with gcj to get it to do what you want,
especially if you (like me) aren't super savvy with the gcc compiler
technology.

If you do make some progress I'd also be interested to see how well a
CNI database bridge performs.  Type IV drivers are primarily popular
because of the difficulty of implementing a stable JNI based driver
(I'm not convinced its even possible).  I'm not sure the exact reason
but I work at a web shop and we tell all our customers that if they
don't use type IV drivers they are asking for trouble.  For those that
don't know type IV drivers are pure java because they do all
communication with the database through a socket.

With CNI the socket I/O could be eliminated and you wouldn't have to
do the connection pooling.  You would have to know how to use the
databases C/C++ interfaces so it wouldn't be a walk in the park. 

--
Tom Reilly
Allaire Corp.
http://www.allaire.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]