public ContainerMethodExecutor deploy(Context context, final Archive<?> archive) throws DeploymentException
{
try
{
// Export the bundle bytes
ZipExporter exporter = archive.as(ZipExporter.class);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter.exportZip(baos);
ByteArrayInputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
BundleContext sysContext = framework.getBundleContext();
Bundle bundle = sysContext.installBundle(archive.getName(), inputStream);