Описание тега java-stored-procedures
Some relational database management systems support Java stored procedures in addition to stored procedures written in a procedural language.
This way stored procedures can be ported better between different databases, because the procedural languages vary between the database implementations. Java offers object-oriented programming features, and developers do not need to learn another programming language, if they already use Java for their application.
On the other hand, procedural languages might be faster, because they are fully integrated in the database whereas a Java stored procedure possibly requires a context switch from the database process to the process which runs the Java virtual machine.
The term Java stored procedure is somehow misleading, as its normally not restricted to the Java language only. Technically speaking Java virtual machine stored procedures would be better, because other languages/compilers which generate compatible byte code for the Java virtual machine will run as well.