
ALR
By: a guest on
Apr 14th, 2011 | syntax:
Java | size: 0.72 KB | views:
54 | expires: Never
@Test
public void testExecutor() throws InterruptedException, IOException {
ConfigurationBuilder builder = new ConfigurationBuilder()
.executorService(Executors.newFixedThreadPool(1));
ArchiveFactory factory = ShrinkWrap.createDomain(builder).getArchiveFactory();
// blow the pipe
factory.create(JavaArchive.class, "test.jar")
.add(MegaByteAsset.newInstance(), "dummy")
.as(ZipExporter.class)
.exportAsInputStream();
InputStream in2 = factory.create(JavaArchive.class, "test2.jar")
.add(MegaByteAsset.newInstance(), "dummy")
.as(ZipExporter.class)
.exportAsInputStream();
in2.read();
}