Search in sources :

Example 86 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class MDBCdiIntegrationTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb-cdi-integration-test.jar");
    ejbJar.addClasses(CdiIntegrationMDB.class, RequestScopedCDIBean.class, JMSMessagingUtil.class, MDBCdiIntegrationTestCase.class, JmsQueueSetup.class, TimeoutUtil.class).addPackage(JMSOperations.class.getPackage());
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr \n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission(TimeoutUtil.FACTOR_SYS_PROP, "read")), "permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) TimeoutUtil(org.jboss.as.test.shared.TimeoutUtil) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) JMSMessagingUtil(org.jboss.as.test.integration.ejb.mdb.JMSMessagingUtil) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 87 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class MDBRAScopeCdiIntegrationTestCase method createEAR.

@Deployment(name = deploymentName, order = 1)
public static EnterpriseArchive createEAR() throws Exception {
    ResourceAdapterArchive raa = createRAR();
    JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "xxx-ejbs.jar");
    ejbJar.addClasses(/* MDBRAScopeCdiIntegrationTestCase.class, */
    CdiIntegrationMDB.class, RequestScopedCDIBean.class, MDBProxy.class, MDBProxyBean.class, JMSMessagingUtil.class, JmsQueueSetup.class, TimeoutUtil.class).addPackage(JMSOperations.class.getPackage());
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.as.controller, org.jboss.dmr \n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
    final EnterpriseArchive ear = ShrinkWrap.create(EnterpriseArchive.class, deploymentName);
    ear.addAsModule(raa);
    ear.addAsModule(ejbJar);
    ear.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission(TimeoutUtil.FACTOR_SYS_PROP, "read")), "permissions.xml");
    return ear;
}
Also used : EnterpriseArchive(org.jboss.shrinkwrap.api.spec.EnterpriseArchive) StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) TimeoutUtil(org.jboss.as.test.shared.TimeoutUtil) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) ResourceAdapterArchive(org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JMSMessagingUtil(org.jboss.as.test.integration.ejb.mdb.JMSMessagingUtil) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 88 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class MDB20MessageSelectorTestCase method getDeployment.

@Deployment
public static Archive getDeployment() {
    final JavaArchive ejbJar = ShrinkWrap.create(JavaArchive.class, "mdb.jar");
    ejbJar.addClasses(EJB2xMDB.class, AbstractMDB2xTestCase.class);
    ejbJar.addPackage(JMSOperations.class.getPackage());
    ejbJar.addClasses(JmsQueueSetup.class, TimeoutUtil.class);
    ejbJar.addAsManifestResource(MDB20MessageSelectorTestCase.class.getPackage(), "ejb-jar-20-message-selector.xml", "ejb-jar.xml");
    ejbJar.addAsManifestResource(MDB20MessageSelectorTestCase.class.getPackage(), "jboss-ejb3.xml", "jboss-ejb3.xml");
    ejbJar.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, org.jboss.dmr,  org.apache.activemq.artemis\n"), "MANIFEST.MF");
    ejbJar.addAsManifestResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "jboss-permissions.xml");
    return ejbJar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) JMSOperations(org.jboss.as.test.integration.common.jms.JMSOperations) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 89 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class SendMessagesTestCase method deploymentMbean.

@Deployment(name = "singleton", order = 1, testable = false, managed = true)
public static Archive<?> deploymentMbean() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, SINGLETON + ".jar").addClasses(HelperSingleton.class, HelperSingletonImpl.class);
    // grant necessary permissions
    jar.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "META-INF/jboss-permissions.xml");
    return jar;
}
Also used : PropertyPermission(java.util.PropertyPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Example 90 with PropertyPermission

use of java.util.PropertyPermission in project wildfly by wildfly.

the class SendMessagesTestCase method deploymentMdb.

@Deployment(name = "mdb", order = 2, testable = false, managed = false)
public static Archive<?> deploymentMdb() {
    final JavaArchive jar = ShrinkWrap.create(JavaArchive.class, MESSAGE_DRIVEN_BEAN + ".jar").addClasses(ReplyingMDB.class, TimeoutUtil.class);
    jar.addAsManifestResource(new StringAsset("Dependencies: deployment." + SINGLETON + ".jar\n"), "MANIFEST.MF");
    // grant necessary permissions
    jar.addAsResource(createPermissionsXmlAsset(new PropertyPermission("ts.timeout.factor", "read")), "META-INF/jboss-permissions.xml");
    return jar;
}
Also used : StringAsset(org.jboss.shrinkwrap.api.asset.StringAsset) PropertyPermission(java.util.PropertyPermission) JavaArchive(org.jboss.shrinkwrap.api.spec.JavaArchive) OperateOnDeployment(org.jboss.arquillian.container.test.api.OperateOnDeployment) Deployment(org.jboss.arquillian.container.test.api.Deployment)

Aggregations

PropertyPermission (java.util.PropertyPermission)99 Deployment (org.jboss.arquillian.container.test.api.Deployment)49 JavaArchive (org.jboss.shrinkwrap.api.spec.JavaArchive)46 StringAsset (org.jboss.shrinkwrap.api.asset.StringAsset)35 FilePermission (java.io.FilePermission)23 WebArchive (org.jboss.shrinkwrap.api.spec.WebArchive)18 SocketPermission (java.net.SocketPermission)13 JMSOperations (org.jboss.as.test.integration.common.jms.JMSOperations)13 Permission (java.security.Permission)10 AccessControlException (java.security.AccessControlException)8 RemotingPermission (org.jboss.remoting3.security.RemotingPermission)8 PermissionCollection (java.security.PermissionCollection)7 OperateOnDeployment (org.jboss.arquillian.container.test.api.OperateOnDeployment)7 ReflectPermission (java.lang.reflect.ReflectPermission)6 EnterpriseArchive (org.jboss.shrinkwrap.api.spec.EnterpriseArchive)6 Permissions (java.security.Permissions)5 SecurityPermission (java.security.SecurityPermission)5 AccessControlContext (java.security.AccessControlContext)4 TimeoutUtil (org.jboss.as.test.shared.TimeoutUtil)4 Method (java.lang.reflect.Method)3