In My last project, Class files are stored in database, and also one custom classloader is written to take those class files from the database and load them. I am not very good the designing the application.
Could anyone help me in figuring out what is the need of storing class files(bytecode) in the database?
Why would it design like that?
OK, well, here’s a wild guess, where doing this might make sense:
Imagine there are a large number of classes available in alternate implementations; i.e., there are ten different versions of some class named Foo, and twenty different versions of Bar. By storing them in the database, along with the conditions under which each is appropriate, it would be easy to fetch the correct version, load it, and use it. There are other ways to architect this sort of thing, but under some circumstances I can imagine this being relatively elegant.
But honestly, my best guess is that it was an over-engineered system designed by somebody who liked to use databases for everything.