We use a JAVA-Class in a Stored Procedure like this:

-- declare the JAVA-Calss
declare @Calc_object tarif.Calc

-- create the class
select @Calc_object = new tarif.Calc()

-- call a method of that class
select @out_java = @Calc_object>>int_main (@parameter)

Problem 1:
When the connection to the database is lost while the JAVA-Class is running within the Stored Procedure, we cannot drop the Stored Procedure (Error: "Procedure is currently in use"). A look with sp_who shows no process.
Only thing that helps seems to be shut down and reboot the server.
Any better ideas?

Problem 2:
I couldn't find how to destroy a Java-Class created in the Stored procedure. GarbageCollection seems not to work.

Thanks for any help!