JDBC-based class loader, 'java' column type?
От | Bear Giles |
---|---|
Тема | JDBC-based class loader, 'java' column type? |
Дата | |
Msg-id | 3DC5C6A0.8090407@coyotesong.com обсуждение исходный текст |
Список | 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
В списке pgsql-jdbc по дате отправления: