[arquillian-issues] [JBoss JIRA] Resolved: (ARQ-192) Install OSGi bundles in memory
Thomas Diesler (JIRA)
jira-events at lists.jboss.org
Wed Sep 1 17:06:11 EDT 2010
[ https://jira.jboss.org/browse/ARQ-192?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Thomas Diesler resolved ARQ-192.
--------------------------------
Fix Version/s: 1.0.0.Alpha4
Resolution: Done
Done
// Export the bundle bytes
ZipExporter exporter = archive.as(ZipExporter.class);
ByteArrayOutputStream baos = new ByteArrayOutputStream();
exporter.exportZip(baos);
BundleContext sysContext = framework.getBundleContext();
InputStream inputStream = new ByteArrayInputStream(baos.toByteArray());
Bundle bundle = sysContext.installBundle(archive.getName(), inputStream);
> Install OSGi bundles in memory
> ------------------------------
>
> Key: ARQ-192
> URL: https://jira.jboss.org/browse/ARQ-192
> Project: Arquillian
> Issue Type: Task
> Components: OSGi Containers
> Reporter: Thomas Diesler
> Assignee: Thomas Diesler
> Fix For: 1.0.0.Alpha4
>
>
> Currently the OSGiDeploymentPackager transforms a JavaArchive into a VF
> private VirtualFile toVirtualFile(Archive<?> archive) throws IOException, MalformedURLException
> {
> // [TODO] Can this be done in memory?
> ZipExporter exporter = archive.as(ZipExporter.class);
> String archiveName = archive.getName();
> int dotIndex = archiveName.lastIndexOf(".");
> if (dotIndex > 0)
> archiveName = archiveName.substring(0, dotIndex);
> File target = File.createTempFile(archiveName + "-", ".jar");
> exporter.exportZip(target, true);
> target.deleteOnExit();
> return AbstractVFS.getRoot(target.toURI().toURL());
> }
> We should be able to install the Archive directly and in-memory
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the arquillian-issues
mailing list