JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
ejbJar.addPackage(BEAN_PACKAGE);
ejbJar.setManifest(new Asset() {
@Override
public InputStream openStream() {
ManifestBuilder builder = ManifestBuilder.newInstance();
StringBuffer dependencies = new StringBuffer();
dependencies.append("org.hornetq.ra");
builder.addManifestHeader("Dependencies", dependencies.toString());
return builder.openStream();
}
});
EnterpriseArchive earArchive = ShrinkWrap.create(EnterpriseArchive.class, DEPLOYMENT_NAME);
earArchive.addAsModule(ejbJar);