Search in sources :

Example 16 with TargetsContainer

use of org.jboss.arquillian.container.test.api.TargetsContainer in project wildfly by wildfly.

the class DynamicJNDIContextEJBInvocationTestCase method createDeploymentForRemoteServer.

@Deployment(name = "remote-server-deployment", testable = false)
@TargetsContainer("multinode-server")
public static Archive<?> createDeploymentForRemoteServer() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, REMOTE_SERVER_DEPLOYMENT_NAME + ".jar");
    jar.addClasses(StatefulRemoteOnOtherServer.class, StatelessRemoteOnOtherServer.class, StatefulRemoteHomeForBeanOnOtherServer.class);
    jar.addClasses(StatefulBeanOnOtherServer.class, StatelessBeanOnOtherServer.class);
    return jar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 17 with TargetsContainer

use of org.jboss.arquillian.container.test.api.TargetsContainer in project wildfly by wildfly.

the class EJBClientClusterConfigurationTestCase method createContainer1Deployment.

@Deployment(name = DEFAULT_AS_DEPLOYMENT, managed = false, testable = false)
@TargetsContainer(DEFAULT_JBOSSAS)
public static Archive createContainer1Deployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, MODULE_NAME + ".jar");
    ejbJar.addClasses(ClusteredStatefulNodeNameEcho.class, NodeNameEcho.class);
    return ejbJar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 18 with TargetsContainer

use of org.jboss.arquillian.container.test.api.TargetsContainer in project wildfly by wildfly.

the class RemoteOutboundConnectionReconnectTestCase method createContainer2Deployment.

@Deployment(name = DEPLOYMENT_WITH_JBOSS_EJB_CLIENT_XML, managed = false, testable = false)
@TargetsContainer(JBOSSAS_WITH_REMOTE_OUTBOUND_CONNECTION_NON_CLUSTERED)
public static Archive<?> createContainer2Deployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, SERVER_ONE_MODULE_NAME + ".jar");
    ejbJar.addClasses(EchoOnServerOne.class, RemoteEcho.class, IndependentBean.class);
    ejbJar.addAsManifestResource(EchoOnServerOne.class.getPackage(), "jboss-ejb-client.xml", "jboss-ejb-client.xml");
    return ejbJar;
}
Also used : JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 19 with TargetsContainer

use of org.jboss.arquillian.container.test.api.TargetsContainer in project wildfly by wildfly.

the class SecuredDataSourceTestCase method getDeployment.

@Deployment(name = DEPLOYMENT, managed = false, testable = false)
@TargetsContainer(CONTAINER)
public static Archive<?> getDeployment() {
    WebArchive war = ShrinkWrap.create(WebArchive.class, TEST_NAME + ".war");
    war.addClass(DataSourceTestServlet.class);
    return war;
}
Also used : WebArchive(org.jboss.shrinkwrap.api.spec.WebArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Example 20 with TargetsContainer

use of org.jboss.arquillian.container.test.api.TargetsContainer in project wildfly by wildfly.

the class IIOPSecurityInvocationTestCase method clientDeployment.

@Deployment(name = "client", testable = true)
@TargetsContainer("iiop-client")
public static Archive<?> clientDeployment() {
    /*
         * The @EJB annotation doesn't allow to specify the address dynamically. So, istead of
         *       @EJB(lookup = "corbaname:iiop:localhost:3628#IIOPTransactionalStatelessBean")
         *       private IIOPTransactionalHome home;
         * we need to do this trick to get the ${node0} sys prop into ejb-jar.xml
         * and have it injected that way.
         */
    String ejbJar = FileUtils.readFile(IIOPSecurityInvocationTestCase.class, "ejb-jar.xml");
    final Properties properties = new Properties();
    properties.putAll(System.getProperties());
    if (properties.containsKey("node1")) {
        properties.put("node1", NetworkUtils.formatPossibleIpv6Address((String) properties.get("node1")));
    }
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "client.jar");
    jar.addClasses(ClientEjb.class, IIOPSecurityStatelessHome.class, IIOPSecurityStatelessRemote.class, IIOPSecurityInvocationTestCase.class, Util.class).addAsManifestResource(IIOPSecurityInvocationTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml").addAsManifestResource(new StringAsset(PropertiesValueResolver.replaceProperties(ejbJar, properties)), "ejb-jar.xml").addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new AuthPermission("modifyPrincipals")), "permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) AuthPermission(javax.security.auth.AuthPermission) Util(org.jboss.as.test.shared.integration.ejb.security.Util) Properties(java.util.Properties) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment) TargetsContainer(org.jboss.arquillian.container.test.api.TargetsContainer)

Aggregations

Deployment (org.jboss.arquillian.container.test.api.Deployment)27 TargetsContainer (org.jboss.arquillian.container.test.api.TargetsContainer)27 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)23 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)18 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)5 Properties (java.util.Properties)4 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)4 AuthPermission (javax.security.auth.AuthPermission)1 Util (org.jboss.as.test.shared.integration.ejb.security.Util)1