On 18-5-2018 14:53, Adriano dos Santos Fernandes wrote:
On 18/05/2018 09:45, Mark Rotteveel wrote:
On 18-5-2018 14:32, Adriano dos Santos Fernandes wrote:
On 18/05/2018 08:57, Mark Rotteveel wrote:

We also tried to push our own JARs into the DB, but ended up getting
tons of "PK violation" errors.

This one is because Java has no problem if you have class x.y.Class in
many jars, but the plugin AFAIR rejects it, as Oracle does.

Well, "no problems" is not entirely correct, it sort of works, you
just get potentially different behavior or errors depending on the
order of class loading,

I mean, playing with classloader is a valid situation to have the same
class in multiple places.

The jar-in-database is a analogy to a war file. A collection of jars for
a database (web app).

WARs accept them and have the problem you said.

Yes, and every now and then problems with changes in class loading order and/or new dependencies including same classes rears its ugly head.

On the other hand, the current unique constraint, probably - I haven't checked - also prevents duplicates in resources like SPI definitions (eg /META-INF/services/ files like /META-INF/services/java.sql.Driver), and that could be problematic.

so disallowing duplicates classes is a good thing.

Not sure, really.

Java 9 and higher disallows sharing the same package across jars when using modules (instead of the old-style class path), that is even a more stricter form than disallowing duplicate classes.

Mark
--
Mark Rotteveel

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
Firebird-Devel mailing list, web interface at 
https://lists.sourceforge.net/lists/listinfo/firebird-devel

Reply via email to