In reply to Vperrin:
Hi Victor,
first, never use resource_db. Instead use config_db. config_db is a layer put around the resource_db adding more flexibility.
second, passing virtual interfaces to the config_db has nothing to do with classes.
third, you can pass the handles of the virtual Interfaces to the config_db like this in the toplevel module of your UVM testbench:
apb_if apb_ifrx();
apb_if apb_iftx();
initial
begin
uvm_config_db #(virtual apb_if)::set(null, "uvm_test_top", "apb_if_tx", apb_iftx);
uvm_config_db #(virtual apb_if)::set(null, "uvm_test_top", "apb_if_rx", apb_ifrx)
....
end