Package org.jboss.shrinkwrap.api.spec

Examples of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive


    public static Archive<?> deploymentSingleton() {

        final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "single.jar").addClass(RaWithSecurityDomainTestCase.class)
                .addPackage(MultipleConnectionFactory1.class.getPackage());
        jar.addClasses(AbstractLoginModuleSecurityDomainTestCaseSetup.class, AbstractSecurityDomainSetup.class);
        final ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "test.rar").addAsLibrary(jar)
                .addAsResource(RaWithSecurityDomainTestCase.class.getPackage(), "users.properties", "users.properties")
                .addAsResource(RaWithSecurityDomainTestCase.class.getPackage(), "roles.properties", "roles.properties")
                .addAsManifestResource("jca/security/ra/ra.xml", "ra.xml")
                .addAsManifestResource("jca/security/ra/ironjacamar.xml", "ironjacamar.xml");
View Full Code Here


     * @return The deployment archive
     */
    @Deployment
    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()).addClasses(CustomBootstrapDeploymentTestCase.class,
                MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class,
                CustomBootstrapDeploymentTestCaseSetup.class);

        ja.addPackage(AbstractMgmtTestBase.class.getPackage());
        raa.addAsLibrary(ja);

        raa.addAsManifestResource("jca/deployment/" + deploymentName + "/META-INF/ra.xml", "ra.xml")
                .addAsManifestResource("jca/deployment/" + deploymentName + "/META-INF/ironjacamar.xml", "ironjacamar.xml")
                .addAsManifestResource(
                        new StringAsset(
                                "Dependencies: org.jboss.as.controller-client,org.jboss.dmr,org.jboss.as.cli,org.jboss.as.connector \n"),
                        "MANIFEST.MF");
View Full Code Here

     * @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("jca/beanvalidation/ra.xml", "ra.xml").addAsManifestResource(
                "jca/beanvalidation/ij/ironjacamar" + (ij != null ? "-" + ij : "") + ".xml", "ironjacamar.xml");

        return raa;
    }
View Full Code Here

     */
    @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(PositiveValidationTestCase.class);
        raa.addAsLibrary(ja);

        raa.addAsManifestResource("jca/beanvalidation/ra.xml", "ra.xml")
                .addAsManifestResource("jca/beanvalidation/ij/ironjacamar.xml", "ironjacamar.xml")
                .addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector\n"),"MANIFEST.MF");

        return raa;
    }
View Full Code Here

     */
    @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("jca/beanvalidation/ra-wrong-as-property.xml", "ra.xml")
                .addAsManifestResource("jca/beanvalidation/ij/ironjacamar.xml", "ironjacamar.xml")
                .addAsManifestResource(
                        new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector \n"),"MANIFEST.MF");

        return raa;
View Full Code Here

        return jar;
    }

    @Deployment(name="rar", order=2)
    public static Archive<?> rar() {
        ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "rardeployment.rar");
        JavaArchive jar1 = ShrinkWrap.create(JavaArchive.class, "main.jar");
        jar1.addPackage(ValidConnectionFactory.class.getPackage());
        rar.add(jar1, "/", ZipExporter.class);

        rar.addAsManifestResource(new StringAsset(
                "<jboss-deployment-structure>" +
                        "<deployment>" +
                        "<dependencies>" +
                        "<module name=\"deployment.transient.jar\" />" +
                        "</dependencies>" +
                        "</deployment>" +
                        "</jboss-deployment-structure>"),
                "jboss-deployment-structure.xml");
        rar.addAsManifestResource("jca/beanvalidation/ra.xml", "ra.xml");
        return rar;
    }
View Full Code Here

@RunWith(Arquillian.class)
public class RarClassLoadingTestCase {

    @Deployment
    public static Archive<?> deployment() {
        ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "rarClassLoadingTest.rar");
        JavaArchive jar1 = ShrinkWrap.create(JavaArchive.class, "main.jar");
        jar1.addClasses(RarClassLoadingTestCase.class, RarMainClass.class);
        jar1.addPackage(ValidConnectionFactory.class.getPackage());
        rar.add(jar1, "/", ZipExporter.class);
        JavaArchive jar2 = ShrinkWrap.create(JavaArchive.class, "support.jar");
        jar2.addClasses(RarSupportClass.class);
        rar.add(jar2, "some/random/directory", ZipExporter.class);
        rar.addAsManifestResource("jca/beanvalidation/ra.xml", "ra.xml");

        return rar;
    }
View Full Code Here

    public static EnterpriseArchive createTestArchive() {

        EnterpriseArchive enterpriseArchive = new EnterpriseArchiveBuilder().withTestClass(ResourceAdapterArchiveTest.class)
                .build();

        ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class);
        rar.addAsLibrary(ShrinkWrap
                .create(JavaArchive.class)
                .addClasses(Translator.class, TestResourceAdapter.class)
                .addAsManifestResource(new StringAsset(Descriptors.create(BeansDescriptor.class).exportAsString()), "beans.xml"));
        rar.addAsManifestResource(new StringAsset(Descriptors.create(BeansDescriptor.class).exportAsString()), "beans.xml");
        rar.addAsManifestResource(
                new StringAsset(Descriptors.create(ConnectorDescriptor.class).version("1.6").displayName("Test RA")
                        .vendorName("Red Hat Middleware LLC").eisType("Test RA").resourceadapterVersion("0.1")
                        .getOrCreateResourceadapter().resourceadapterClass(TestResourceAdapter.class.getName())
                        .getOrCreateOutboundResourceadapter().transactionSupport("NoTransaction")
                        .reauthenticationSupport(false).up().up().exportAsString()), "ra.xml");
View Full Code Here

    * @return The deployment archive
    */
   @Deployment
   public static ResourceAdapterArchive createDeployment()
   {
      ResourceAdapterArchive raa =
         ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + ".rar");
      JavaArchive ja = ShrinkWrap.create(JavaArchive.class,
         UUID.randomUUID().toString() + ".jar");
      ja.addClasses(HelloWorldResourceAdapter.class,
         HelloWorldManagedConnectionFactory.class,
         HelloWorldManagedConnection.class,
         HelloWorldManagedConnectionMetaData.class,
         HelloWorldConnectionFactory.class,
         HelloWorldConnectionFactoryImpl.class,
         HelloWorldConnection.class,
         HelloWorldConnectionImpl.class);
      raa.addAsLibrary(ja);

      return raa;
   }
View Full Code Here

     */
    @Deployment
    public static ResourceAdapterArchive createDeployment() throws Exception {
        String deploymentName = "archive_mult.rar";

        ResourceAdapterArchive raa =
                ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
        JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "multiple.jar");
        ja.addPackage(MultipleConnectionFactory1.class.getPackage()).
                addClasses(MultipleObjectActivationTestCase.class, MgmtOperationException.class, XMLElementReader.class, XMLElementWriter.class);

        ja.addPackage(AbstractMgmtTestBase.class.getPackage());
        raa.addAsLibrary(ja);

        raa.addAsManifestResource(MultipleObjectActivationTestCase.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");
        ;
        return raa;
    }
View Full Code Here

TOP

Related Classes of org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.