use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class RarInsideEarReDeploymentTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment(name = deploymentName, managed = false)
public static EnterpriseArchive createDeployment() throws Exception {
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, subDeploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
ja.addPackage(MultipleAdminObject1.class.getPackage()).addClasses(RarInsideEarReDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(RarInsideEarReDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
ear.addAsModule(raa);
ear.addAsManifestResource(RarInsideEarReDeploymentTestCase.class.getPackage(), "application.xml", "application.xml");
return ear;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class IronJacamarDoubleDeploymentTestCase method createSubDeployment.
private static ResourceAdapterArchive createSubDeployment(final String configName) throws Exception {
String deploymentName = subDeploymentName;
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "ij.jar");
ja.addPackage(ValidResourceAdapter.class.getPackage()).addClasses(IronJacamarDoubleDeploymentTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
raa.addAsLibrary(ja);
raa.addAsManifestResource(IronJacamarDoubleDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(IronJacamarDoubleDeploymentTestCase.class.getPackage(), configName, "ironjacamar.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli,javax.inject.api,org.jboss.as.connector\n"), "MANIFEST.MF");
return raa;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class LazyAssociationAbstractTestCase method createResourceAdapter.
protected static Archive<ResourceAdapterArchive> createResourceAdapter(String raFileName, String configurationFileName, Class testClass) {
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, RAR_NAME);
rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), raFileName, "ra.xml");
rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), configurationFileName, "ironjacamar.xml");
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, LIB_JAR_NAME);
jar.addClass(LazyResourceAdapter.class).addClass(LazyManagedConnectionFactory.class).addClass(LazyManagedConnection.class).addClass(LazyConnection.class).addClass(LazyConnectionImpl.class).addClass(LazyXAResource.class).addClass(LazyLocalTransaction.class).addClass(LazyManagedConnectionMetaData.class).addClass(LazyConnectionFactory.class).addClass(LazyConnectionFactoryImpl.class);
jar.addClass(LazyAssociationAbstractTestCase.class);
jar.addClass(testClass);
rar.addAsLibrary(jar);
return rar;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class NegativeValidationASTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
String deploymentName = "valid.rar";
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "valid.jar");
ja.addPackage(ValidConnectionFactory.class.getPackage()).addClasses(NegativeValidationASTestCase.class);
raa.addAsLibrary(ja);
raa.addAsManifestResource(NegativeValidationASTestCase.class.getPackage(), "ra-wrong-as-property.xml", "ra.xml").addAsManifestResource(NegativeValidationASTestCase.class.getPackage(), "ironjacamar.xml", "ironjacamar.xml").addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector \n"), "MANIFEST.MF");
return raa;
}
use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.
the class NegativeValidationTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
public static ResourceAdapterArchive createDeployment(String ij) throws Exception {
String deploymentName = (ij != null ? ij : "valid");
ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + ".rar");
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, deploymentName + ".jar");
ja.addPackage(ValidConnectionFactory.class.getPackage()).addClasses(NegativeValidationTestCase.class);
raa.addAsLibrary(ja);
raa.addAsManifestResource(NegativeValidationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(NegativeValidationTestCase.class.getPackage(), "ironjacamar" + (ij != null ? "-" + ij : "") + ".xml", "ironjacamar.xml");
return raa;
}
Aggregations