From: | Bear Giles <bgiles(at)coyotesong(dot)com> |
---|---|
To: | pgsql-jdbc(at)postgresql(dot)org |
Subject: | JDBC-based class loader, 'java' column type? |
Date: | 2002-11-04 01:00:16 |
Message-ID: | 3DC5C6A0.8090407@coyotesong.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-jdbc |
Two general questions, hopefully quick to answer since they're already
supported in recent versions. :-)
First, how does the idea of a JdbcClassLoader class strike other people?
Obviously, this is a class loader that reads the bytecodes from a
PostgreSQL (or any supported) table instead of a file or network
connection (d'oh!). The main use would be for, oh, JSP pages where you
would put the interface classes on the app server but get the
implementation classes from the database that has the actual data, or as
part of the effort to natively support java stored procedures at some
point in the future. (BTW, this is trivial to implement.)
Second, should there be (or is there already?) a column type for java
bytecode? You could always use bytea, of course, but this column type
might support additional features like running the code through a
decompiler and returning the original source code... just kidding. Not.
A full decompiler (or compiler!) would be overkill, but it could
certainly include enough of a bytecode parser to support stored
procedures to get the class name, public classes, etc., from the stored
bytecode. You could then do queries like listing all classes that
contain a "int getVersion()" method.
With this column type, you could even support a (wildly inefficient)
invocation of the java interpreter. (*duck*)
Bear
From | Date | Subject | |
---|---|---|---|
Next Message | Timothy Reaves | 2002-11-04 02:04:06 | Re: [Solved] A result was returned by the statement, when none was expected. |
Previous Message | Timothy Reaves | 2002-11-03 22:20:18 | A result was returned by the statement, when none was expected. |