String deploymentName = "ear_packaged.ear";
String subDeploymentName = "ear_packaged.rar";
String subDeploymentName2 = "ear_packaged2.rar";
ResourceAdapterArchive raa =
ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName);
raa.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml")
.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml");
ResourceAdapterArchive raa2 =
ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName2);
raa2.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ra2.xml", "ra.xml")
.addAsManifestResource(EarPackagedMultiRarDeploymentTestCase.class.getPackage(), "ironjacamar2.xml", "ironjacamar.xml");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).