I am new to DB2 environment.. i urgently need your help on the following issues related to the implementation of the Java in DB2

I have queries related to the implementation of SQLJ and SQL/PL of DB2:

In Oracle, PL/SQL (Stored Procedures) code resides in the Database but it seems, in DB2 the code is converted to *.c file and implemented by using *.dll,
1. In DB2, the stored procedure resides inside Database or as dlls?
2. What is the exact usage?

I am confused going through the terms Java Stored Procedures, Java UDF, Java procedures using SQLJ and JDBC, i believe a Java Stored Procedure is same as a procedure written using the embedded SQL (i.e., SQLJ)....
what is the difference exactly...?

Thanks in advance...