本文整理匯總了Java中org.jboss.shrinkwrap.api.spec.WebArchive.addAsManifestResource方法的典型用法代碼示例。如果您正苦於以下問題:Java WebArchive.addAsManifestResource方法的具體用法?Java WebArchive.addAsManifestResource怎麽用?Java WebArchive.addAsManifestResource使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類org.jboss.shrinkwrap.api.spec.WebArchive
的用法示例。
在下文中一共展示了WebArchive.addAsManifestResource方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Java代碼示例。
示例1: createDeployment
import org.jboss.shrinkwrap.api.spec.WebArchive; //導入方法依賴的package包/類
private static Archive<?> createDeployment() {
WebArchive war = create(WebArchive.class, "singleton.war");
war.addPackage(HAService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("getClassLoader"), // See
// org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new ServerPermission("useServiceRegistry"), // See
// org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
war.addAsServiceProvider(ServiceActivator.class, HAServiceActivator.class);
return war;
}
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:13,代碼來源:SingletonServiceTestCase.java
示例2: createDeployment
import org.jboss.shrinkwrap.api.spec.WebArchive; //導入方法依賴的package包/類
private static Archive<?> createDeployment() {
WebArchive war = create(WebArchive.class, "singleton.war");
war.addPackage(HAService.class.getPackage());
war.setManifest(new StringAsset("Manifest-Version: 1.0\nDependencies: org.jboss.as.server\n"));
war.addAsServiceProvider(ServiceActivator.class, HAServicePolicyActivator.class);
war.addAsManifestResource(createPermissionsXmlAsset(new RuntimePermission("getClassLoader"), // See
// org.jboss.as.server.deployment.service.ServiceActivatorProcessor#deploy()
new ServerPermission("useServiceRegistry"), // See
// org.jboss.as.server.deployment.service.SecuredServiceRegistry
new ServerPermission("getCurrentServiceContainer")), "permissions.xml");
return war;
}
開發者ID:PacktPublishing,項目名稱:Mastering-Java-EE-Development-with-WildFly,代碼行數:13,代碼來源:SingletonPolicyServiceTestCase.java