Provided herein are vaccine compositions containing at least one retrievable biocompatible macrocapsule containing immuno-isolated allogeneic cells that secrete an immunomodulator such as GM-CSF (granulocyte-macrophage colony stimulating factor) and an antigenic component such as autologous tumor cells or infectious agents. Also provided are kits and pharmaceutical compositions containing the vaccine compositions as well as said products for use in methods for therapeutic or preventive vaccination against tumors or infectious agents.