Search in sources :

Example 6 with ResourceAdapterArchive

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

the class AfterResourceCreationDeploymentTestCase method createDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment(name = "basic-after.rar")
public static ResourceAdapterArchive createDeployment() throws Exception {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
    ja.addPackage(MultipleConnectionFactory1.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(AfterResourceCreationDeploymentTestCase.class.getPackage(), "ra.xml", "ra.xml");
    return raa;
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) MultipleConnectionFactory1(org.jboss.as.test.smoke.deployment.rar.MultipleConnectionFactory1) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 7 with ResourceAdapterArchive

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

the class AbstractModuleDeploymentTestCaseSetup method fillModuleWithFlatClasses.

/**
     * Creates module structure for uncompressed RA archive. RA classes are in
     * flat form too
     *
     * @throws Exception
     */
protected void fillModuleWithFlatClasses(String raFile) throws Exception {
    ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class);
    JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "ra16out.jar");
    jar.addPackage(MultipleConnectionFactory1.class.getPackage()).addClass(javax.jms.MessageListener.class);
    rar.addAsManifestResource(this.getClass().getPackage(), raFile, "ra.xml");
    rar.as(ExplodedExporter.class).exportExploded(testModuleRoot, getSlot());
    jar.as(ExplodedExporter.class).exportExploded(testModuleRoot, getSlot());
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) ExplodedExporter(org.jboss.shrinkwrap.api.exporter.ExplodedExporter) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

Example 8 with ResourceAdapterArchive

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

the class InflowFlatTestCase method createRarDeployment.

/**
     * Define the deployment
     *
     * @return The deployment archive
     */
@Deployment
public static Archive<?> createRarDeployment() throws Exception {
    JavaArchive ja = createDeployment(false);
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "inflow.rar");
    ja.addPackage(ValidConnectionFactory.class.getPackage());
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(NegativeValidationTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector,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) ValidConnectionFactory(org.jboss.as.test.integration.jca.beanvalidation.ra.ValidConnectionFactory) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 9 with ResourceAdapterArchive

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

the class RaWithElytronAuthContextTestCase method deploymentSingleton.

@Deployment
public static Archive<?> deploymentSingleton() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClass(RaWithElytronAuthContextTestCase.class).addPackage(MultipleConnectionFactory1.class.getPackage());
    jar.addClasses(AbstractElytronSetupTask.class, ServerSetupTask.class);
    final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "test.rar").addAsLibrary(jar).addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(RaWithElytronAuthContextTestCase.class.getPackage(), "ironjacamar-elytron.xml", "ironjacamar.xml");
    return rar;
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) MultipleConnectionFactory1(org.jboss.as.test.integration.jca.rar.MultipleConnectionFactory1) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 10 with ResourceAdapterArchive

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

the class IronJacamarDeploymentStatisticsTestCase method createDeployment.

public static ResourceAdapterArchive createDeployment(String deploymentName) throws Exception {
    ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "archive" + deploymentName + ".rar");
    JavaArchive ja = ShrinkWrap.create(JavaArchive.class, deploymentName + ".jar");
    ja.addPackage(pack);
    raa.addAsLibrary(ja);
    raa.addAsManifestResource(IronJacamarDeploymentStatisticsTestCase.class.getPackage(), "ra.xml", "ra.xml");
    raa.addAsManifestResource(IronJacamarDeploymentStatisticsTestCase.class.getPackage(), "ironjacamar" + deploymentName + ".xml", "ironjacamar.xml");
    return raa;
}
Also used : ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive)

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