Search in sources :

Example 26 with ResourceAdapterArchive

use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.

the class BasicDeployment15TestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static ResourceAdapterArchive createDeployment() throws Exception {
    String deploymentName = "basic15.rar";
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(BasicDeployment15TestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment15TestCase.class.getPackage(), "ra15.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 27 with ResourceAdapterArchive

use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.

the class BasicDoubleDeployment16TestCase method createDeployment.

@Deployment
public static ResourceAdapterArchive createDeployment() {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeployment16TestCase.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment16TestCase.class.getPackage(), "ra16.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 28 with ResourceAdapterArchive

use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.

the class BasicDoubleDeploymentFail16_1TestCase method createDeployment.

@Deployment
public static ResourceAdapterArchive createDeployment() {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeploymentFail16_1TestCase.class, BasicDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDeployment16TestCase.class.getPackage(), "ra16.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 29 with ResourceAdapterArchive

use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project wildfly by wildfly.

the class BasicDoubleDeploymentFail16_2TestCase method createDeployment.

@Deployment
public static ResourceAdapterArchive createDeployment() {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, DEPLOYMENT_NAME);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, SUB_DEPLOYMENT_NAME);
    ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class, BasicDoubleDeploymentFail16_2TestCase.class, BasicDoubleDeploymentTestCaseSetup.class);
    ja.addPackage(AbstractMgmtTestBase.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(BasicDoubleDeploymentFail16_2TestCase.class.getPackage(), "ra16.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli\n"), "MANIFEST.MF");
    return raa;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) AbstractMgmtTestBase(org.jboss.as.test.integration.management.base.AbstractMgmtTestBase) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 30 with ResourceAdapterArchive

use of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive in project tomee by apache.

the class ConnectorWithApplicationResourcesInEarTest method createDeployment.

@Deployment
public static EnterpriseArchive createDeployment() {
    final JavaArchive apiJar = ShrinkWrap.create(JavaArchive.class, "connector-sample-api.jar");
    apiJar.addPackage("org.superbiz.connector.api");
    System.out.println("API JAR:\n" + apiJar.toString(true));
    final JavaArchive implJar = ShrinkWrap.create(JavaArchive.class, "connector-sample-impl.jar");
    implJar.addPackage("org.superbiz.connector.adapter");
    System.out.println("IMPL JAR:\n" + implJar.toString(true));
    final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "connector-sample-ra.rar");
    rar.addAsLibraries(implJar);
    rar.setResourceAdapterXML(ConnectorWithApplicationResourcesInEarTest.class.getResource("/connector/ra.xml"));
    System.out.println("RAR:\n" + rar.toString(true));
    final WebArchive webArchive = ShrinkWrap.create(WebArchive.class, "connector-sample-war.war");
    webArchive.addPackage("org.superbiz.application");
    final WebAppDescriptor webAppDescriptor = Descriptors.create(WebAppDescriptor.class);
    webAppDescriptor.version("3.0");
    webArchive.addAsWebInfResource(ConnectorWithApplicationResourcesInEarTest.class.getResource("/connector/resources.xml"), "resources.xml");
    webArchive.setWebXML(new StringAsset(webAppDescriptor.exportAsString()));
    System.out.println("Webapp:\n" + webArchive.toString(true));
    final EnterpriseArchive enterpriseArchive = ShrinkWrap.create(EnterpriseArchive.class, "connector-sample.ear");
    enterpriseArchive.addAsLibraries(apiJar);
    enterpriseArchive.addAsModule(rar);
    enterpriseArchive.addAsModule(webArchive);
    ApplicationDescriptor applicationXml = Descriptors.create(ApplicationDescriptor.class);
    applicationXml.displayName("connector-sample-ear");
    applicationXml.createModule().getOrCreateWeb().webUri("connector-sample-war.war").contextRoot("/sample").up().up().createModule().connector("connector-sample-ra.rar").up().libraryDirectory("lib");
    enterpriseArchive.setApplicationXML(new StringAsset(applicationXml.exportAsString()));
    System.out.println(enterpriseArchive.toString(true));
    return enterpriseArchive;
}
Also used : WebAppDescriptor(org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor) EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ApplicationDescriptor(org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

ResourceAdapterArchive (org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive)59 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)57 Deployment (org.jboss.arquillian.container.test.api.Deployment)48 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)38 AbstractMgmtTestBase (org.jboss.as.test.integration.management.base.AbstractMgmtTestBase)23 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)15 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)7 ValidConnectionFactory (org.jboss.as.test.integration.jca.beanvalidation.ra.ValidConnectionFactory)4 MultipleConnectionFactory1 (org.jboss.as.test.smoke.deployment.rar.MultipleConnectionFactory1)4 ApplicationDescriptor (org.jboss.shrinkwrap.descriptor.api.application6.ApplicationDescriptor)4 WebAppDescriptor (org.jboss.shrinkwrap.descriptor.api.webapp30.WebAppDescriptor)4 File (java.io.File)3 LazyConnectionFactory (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionFactory)3 LazyConnectionImpl (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyConnectionImpl)3 LazyLocalTransaction (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyLocalTransaction)3 LazyManagedConnection (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyManagedConnection)3 LazyResourceAdapter (org.jboss.as.test.integration.jca.lazyconnectionmanager.rar.LazyResourceAdapter)3 MultipleAdminObject1 (org.jboss.as.test.integration.jca.rar.MultipleAdminObject1)3 MultipleConnectionFactory1 (org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory1)3 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)2