use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.
the class FlushOperationsTestCase method deployment.
@Deployment
public static JavaArchive deployment() {
final JavaArchive archive = ShrinkWrap.create(JavaArchive.class, "flush-operations.jar");
archive.addClass(FlushOperationsTestCase.class);
archive.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.controller-client, " + "org.jboss.as.controller, " + "org.jboss.dmr, " + "org.jboss.ironjacamar.jdbcadapters, " + "org.jboss.remoting\n"), "MANIFEST.MF");
archive.addAsManifestResource(createPermissionsXmlAsset(// ModelControllerClient needs the following
new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), // flushInvalidConnectionsInPool needs the following
new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
return archive;
}
use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.
the class AbstractDatasourceCapacityPoliciesTestCase method createDeployment.
@Deployment
public static Archive<?> createDeployment() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "jca-capacity-test.jar");
jar.addClasses(JcaMgmtBase.class, ManagementOperations.class, ContainerResourceMgmtTestBase.class, AbstractMgmtTestBase.class, JcaMgmtServerSetupTask.class, MgmtOperationException.class, AbstractDatasourceCapacityPoliciesTestCase.class, DatasourceCapacityPoliciesTestCase.class, JcaTestsUtil.class, TimeoutUtil.class);
jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector," + "org.jboss.as.controller,org.jboss.dmr,org.jboss.staxmapper," + "org.jboss.ironjacamar.impl, org.jboss.ironjacamar.jdbcadapters,org.jboss.remoting\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read"), new PropertyPermission("ts.timeout.factor", "read"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks")), "permissions.xml");
return jar;
}
use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.
the class LongRunningThreadsCheckTestCase method createDeployment.
/**
* Define the deployment
*
* @return The deployment archive
*/
@Deployment
public static EnterpriseArchive createDeployment() {
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "wm.jar");
ja.addPackage(MultipleConnectionFactory1.class.getPackage()).addClasses(LongRunningThreadsCheckTestCase.class, JcaMgmtServerSetupTask.class, JcaMgmtBase.class, JcaTestsUtil.class);
ja.addPackage(AbstractMgmtTestBase.class.getPackage());
ja.addAsManifestResource(new StringAsset("Dependencies: org.jboss.as.connector, org.jboss.ironjacamar.api, org.jboss.threads"), "MANIFEST.MF");
ResourceAdapterArchive ra1 = ShrinkWrap.create(ResourceAdapterArchive.class, "wm1.rar");
ra1.addAsManifestResource(LongRunningThreadsCheckTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(LongRunningThreadsCheckTestCase.class.getPackage(), "ironjacamar1.xml", "ironjacamar.xml");
ResourceAdapterArchive ra2 = ShrinkWrap.create(ResourceAdapterArchive.class, "wm2.rar");
ra2.addAsManifestResource(LongRunningThreadsCheckTestCase.class.getPackage(), "ra.xml", "ra.xml").addAsManifestResource(LongRunningThreadsCheckTestCase.class.getPackage(), "ironjacamar2.xml", "ironjacamar.xml");
EnterpriseArchive ea = ShrinkWrap.create(EnterpriseArchive.class, "wm.ear");
ea.addAsLibrary(ja).addAsModule(ra1).addAsModule(ra2);
ea.addAsManifestResource(PermissionUtils.createPermissionsXmlAsset(new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks")), "permissions.xml");
return ea;
}
use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.
the class ResourceAdapterPoolAttributesTestCase method createResourceAdapter.
@Deployment
public static Archive<?> createResourceAdapter() {
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, RA_NAME);
rar.addAsManifestResource(LazyResourceAdapter.class.getPackage(), "ra-notx.xml", "ra.xml");
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "pool-attributes-test.jar");
jar.addClass(LazyResourceAdapter.class).addClass(LazyManagedConnectionFactory.class).addClass(LazyManagedConnection.class).addClass(LazyConnection.class).addClass(LazyConnectionImpl.class).addClass(LazyXAResource.class).addClass(LazyLocalTransaction.class).addClass(LazyManagedConnectionMetaData.class).addClass(LazyConnectionFactory.class).addClass(LazyConnectionFactoryImpl.class);
jar.addClasses(ResourceAdapterPoolAttributesTestCase.class, AbstractMgmtServerSetupTask.class, JcaMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class);
rar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api,org.jboss.as.connector," + "org.jboss.as.controller,org.jboss.dmr,org.jboss.staxmapper," + // Needed for RemotingPermission class if security manager is enabled
(System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.ironjacamar.impl, org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
rar.addAsManifestResource(createPermissionsXmlAsset(new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
rar.addAsLibrary(jar);
return rar;
}
use of java.lang.reflect.ReflectPermission in project wildfly by wildfly.
the class DatasourceMaxPoolAttributeTestCase method createDeployment.
@Deployment
public static Archive<?> createDeployment() {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class, "deployment.jar");
jar.addClasses(DatasourceNonCcmTestCase.class, Datasource.class, WildFlyDataSource.class, WrapperDataSource.class, JcaMgmtServerSetupTask.class, DatasourceMaxPoolAttributeTestCase.class, AbstractMgmtServerSetupTask.class, AbstractMgmtTestBase.class, JcaMgmtBase.class, ContainerResourceMgmtTestBase.class, MgmtOperationException.class, ManagementOperations.class, JcaTestsUtil.class, ServerReload.class);
jar.addAsManifestResource(new StringAsset("Dependencies: javax.inject.api," + "org.jboss.as.connector," + "org.jboss.as.controller," + "org.jboss.dmr," + // Needed for RemotingPermission class if security manager is enabled
(System.getProperty("security.manager") == null ? "" : "org.jboss.remoting,") + "org.jboss.staxmapper," + "org.jboss.ironjacamar.api," + "org.jboss.ironjacamar.impl," + "org.jboss.ironjacamar.jdbcadapters\n"), "MANIFEST.MF");
jar.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("accessDeclaredMembers"), new ReflectPermission("suppressAccessChecks"), new RemotingPermission("createEndpoint"), new RemotingPermission("connect"), new FilePermission(System.getProperty("jboss.inst") + "/standalone/tmp/auth/*", "read")), "permissions.xml");
return jar;
}
Aggregations