I am using Container Managed EJBs, so there should not be any problem with closing resultsets or statements.
And by global variables, i mean oracle global variables that are acccessible across different procedures in the same oracle session.
Those variables are reset only when you manually reset them or open a new oracle connection.