当前位置: 首页>>代码示例>>Java>>正文


Java ResourceAdapterArchive.addAsManifestResource方法代码示例

本文整理汇总了Java中org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive.addAsManifestResource方法的典型用法代码示例。如果您正苦于以下问题:Java ResourceAdapterArchive.addAsManifestResource方法的具体用法?Java ResourceAdapterArchive.addAsManifestResource怎么用?Java ResourceAdapterArchive.addAsManifestResource使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive的用法示例。


在下文中一共展示了ResourceAdapterArchive.addAsManifestResource方法的13个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: createConnector

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Define the deployment
 *
 * @return The deployment archive
 */
@Deployment(name= "RAR", testable = false, order = 1)
public static ResourceAdapterArchive createConnector() {
	ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + "_RAR.rar");

	JavaArchive ja = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID().toString() + "_RARimpl.jar");
	// Just the code packages (not the testing ones)
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.Constants.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.cci.EisConnection.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.driver.EisConnectionWorker.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.spi.ResourceAdapterCustom.class.getPackage());
	raa.addAsLibrary(ja);

	JavaArchive jaEis = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID().toString() + "_EISimpl.jar");
	jaEis.addPackages(false, org.darrylmiles.example.eis.EisImpl.class.getPackage());
	raa.addAsLibraries(jaEis);

	raa.addAsManifestResource(new File("../ee7-jca-eis-rar/src/main/rar/META-INF/ironjacamar.xml"), "ironjacamar.xml");
	raa.addAsManifestResource(new File("../ee7-jca-eis-rar/src/main/rar/META-INF/jboss-deployment-structure.xml"), "jboss-deployment-structure.xml");
	//File file = new File("src/main/rar/META-INF/ironjacamar.xml");
	//assertTrue(file.isFile());
	//raa.addAsManifestResource(file, file.getName());		// "ironjacamar.xml"

	return raa;
}
 
开发者ID:dlmiles,项目名称:full-example-ee7-jca-eis,代码行数:30,代码来源:TestRarAlongsideEar.java

示例2: createConnector

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Define the deployment
 *
 * @return The deployment archive
 */
public static ResourceAdapterArchive createConnector() {
	ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName + "_RAR.rar");

	JavaArchive ja = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID().toString() + "_RARimpl.jar");
	// Just the code packages (not the testing ones)
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.Constants.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.cci.EisConnection.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.driver.EisConnectionWorker.class.getPackage());
	ja.addPackages(false, org.darrylmiles.example.ee7.jca.eis.rar.spi.ResourceAdapterCustom.class.getPackage());
	raa.addAsLibrary(ja);

	JavaArchive jaEis = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID().toString() + "_EISimpl.jar");
	jaEis.addPackages(false, org.darrylmiles.example.eis.EisImpl.class.getPackage());
	raa.addAsLibraries(jaEis);

	raa.addAsManifestResource(new File("../ee7-jca-eis-rar/src/main/rar/META-INF/ironjacamar.xml"), "ironjacamar.xml");
	raa.addAsManifestResource(new File("../ee7-jca-eis-rar/src/main/rar/META-INF/jboss-deployment-structure.xml"), "jboss-deployment-structure.xml");
	//File file = new File("src/main/rar/META-INF/ironjacamar.xml");
	//assertTrue(file.isFile());
	//raa.addAsManifestResource(file, file.getName());		// "ironjacamar.xml"

	return raa;
}
 
开发者ID:dlmiles,项目名称:full-example-ee7-jca-eis,代码行数:29,代码来源:TestEjbClientInsideEar.java

示例3: createPerfRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the perf.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createPerfRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor.class, "ra.xml").version("1.5");

   org.jboss.shrinkwrap.descriptor.api.connector15.ResourceadapterType rt = raXml.getOrCreateResourceadapter();
   org.jboss.shrinkwrap.descriptor.api.connector15.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("XATransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(PerfManagedConnectionFactory.class.getName())
         .connectionfactoryInterface(PerfConnectionFactory.class.getName())
         .connectionfactoryImplClass(PerfConnectionFactoryImpl.class.getName())
         .connectionInterface(PerfConnection.class.getName())
         .connectionImplClass(PerfConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "perf.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "perf.jar");
   ja.addPackages(true, PerfConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:31,代码来源:ResourceAdapterFactory.java

示例4: createTxLogRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the txlog.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createTxLogRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor.class, "ra.xml").version("1.5");

   org.jboss.shrinkwrap.descriptor.api.connector15.ResourceadapterType rt = raXml.getOrCreateResourceadapter();
   org.jboss.shrinkwrap.descriptor.api.connector15.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("XATransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(TxLogManagedConnectionFactory.class.getName())
         .connectionfactoryInterface(TxLogConnectionFactory.class.getName())
         .connectionfactoryImplClass(TxLogConnectionFactoryImpl.class.getName())
         .connectionInterface(TxLogConnection.class.getName())
         .connectionImplClass(TxLogConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "txlog.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "txlog.jar");
   ja.addPackages(true, TxLogConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:31,代码来源:ResourceAdapterFactory.java

示例5: createDeployment

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Define the deployment
 *
 * @return The deployment archive
 */
@Deployment(order = 1)
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);
   // Contains the default deployment information
   raa.addAsManifestResource("META-INF/ironjacamar.xml", "ironjacamar.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:27,代码来源:ConnectorTestCase.java

示例6: createDeployment

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Define the deployment
 *
 * @return The deployment archive
 */
@Deployment(name="ConnectorTestCase", order = 1)
public static ResourceAdapterArchive createDeployment() {
	ResourceAdapterArchive raa = ShrinkWrap.create(
			ResourceAdapterArchive.class, deploymentName + ".rar");
	JavaArchive ja = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID()
			.toString() + ".jar");
	ja.addPackages(true,
			Package.getPackage("org.wildfly.connector.rabbitmq"));
	raa.addAsLibrary(ja);

	raa.addAsManifestResource("ironjacamar-test.xml", "ironjacamar.xml");
	System.out.println(raa.toString(true));
	return raa;
}
 
开发者ID:leogsilva,项目名称:rabbitmq-resource-adapter,代码行数:20,代码来源:ConnectorTestCase.java

示例7: createDeployment

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
@Deployment
public static ResourceAdapterArchive createDeployment() {
  ResourceAdapterArchive raa = ShrinkWrap.create(
      ResourceAdapterArchive.class, DEPLOYMENT_NAME + ".rar");
  JavaArchive ja = ShrinkWrap.create(JavaArchive.class, UUID.randomUUID()
      .toString() + ".jar");
  ja.addClasses(VertxResourceAdapter.class,
      VertxManagedConnectionFactory.class, VertxManagedConnection.class,
      VertxConnectionFactory.class, VertxConnectionFactoryImpl.class,
      VertxConnection.class, VertxConnectionImpl.class);
  raa.addAsLibrary(ja);

  raa.addAsManifestResource("META-INF/ironjacamar.xml", "ironjacamar.xml");
  return raa;
}
 
开发者ID:vert-x3,项目名称:vertx-jca,代码行数:16,代码来源:ConnectorTestCase.java

示例8: createLazyRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the lazy.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createLazyRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector15.ConnectorDescriptor.class, "ra.xml").version("1.5");

   org.jboss.shrinkwrap.descriptor.api.connector15.ResourceadapterType rt = raXml.getOrCreateResourceadapter()
         .resourceadapterClass(LazyResourceAdapter.class.getName());

   rt.createConfigProperty().configPropertyName("Enable")
      .configPropertyType(Boolean.class.getName()).configPropertyValue(Boolean.TRUE.toString());

   rt.createConfigProperty().configPropertyName("LocalTransaction")
      .configPropertyType(Boolean.class.getName()).configPropertyValue(Boolean.FALSE.toString());

   rt.createConfigProperty().configPropertyName("XATransaction")
      .configPropertyType(Boolean.class.getName()).configPropertyValue(Boolean.FALSE.toString());

   org.jboss.shrinkwrap.descriptor.api.connector15.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("XATransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector15.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(LazyManagedConnectionFactory.class.getName())
         .connectionfactoryInterface(LazyConnectionFactory.class.getName())
         .connectionfactoryImplClass(LazyConnectionFactoryImpl.class.getName())
         .connectionInterface(LazyConnection.class.getName())
         .connectionImplClass(LazyConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "lazy.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "lazy.jar");
   ja.addPackages(true, LazyConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:42,代码来源:ResourceAdapterFactory.java

示例9: createWorkRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the work.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createWorkRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor.class, "ra.xml").version("1.6");

   org.jboss.shrinkwrap.descriptor.api.connector16.ResourceadapterType rt = raXml.getOrCreateResourceadapter()
         .resourceadapterClass(WorkResourceAdapter.class.getName());
   org.jboss.shrinkwrap.descriptor.api.connector16.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("NoTransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(WorkManagedConnectionFactory.class.getName())
         .connectionfactoryInterface(WorkConnectionFactory.class.getName())
         .connectionfactoryImplClass(WorkConnectionFactoryImpl.class.getName())
         .connectionInterface(WorkConnection.class.getName())
         .connectionImplClass(WorkConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "work.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "work.jar");
   ja.addPackages(true, WorkConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:32,代码来源:ResourceAdapterFactory.java

示例10: createWorkRarMCFNoHashCode

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the work.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createWorkRarMCFNoHashCode()
{
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor.class, "ra.xml").version("1.6");

   org.jboss.shrinkwrap.descriptor.api.connector16.ResourceadapterType rt = raXml.getOrCreateResourceadapter()
         .resourceadapterClass(WorkResourceAdapter.class.getName());
   org.jboss.shrinkwrap.descriptor.api.connector16.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("NoTransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(WorkManagedConnectionFactoryNoHashCode.class.getName())
         .connectionfactoryInterface(WorkConnectionFactory.class.getName())
         .connectionfactoryImplClass(WorkConnectionFactoryImpl.class.getName())
         .connectionInterface(WorkConnection.class.getName())
         .connectionImplClass(WorkConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "work.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "work.jar");
   ja.addPackages(true, WorkConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:32,代码来源:ResourceAdapterFactory.java

示例11: createUnifiedSecurityRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the unified-security.rar
 *
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createUnifiedSecurityRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor.class, "ra.xml").version("1.6");

   org.jboss.shrinkwrap.descriptor.api.connector16.ResourceadapterType rt = raXml.getOrCreateResourceadapter()
         .resourceadapterClass(UnifiedSecurityResourceAdapter.class.getName());
   org.jboss.shrinkwrap.descriptor.api.connector16.OutboundResourceadapterType ort = rt
         .getOrCreateOutboundResourceadapter().transactionSupport("XATransaction").reauthenticationSupport(false);
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
         .managedconnectionfactoryClass(UnifiedSecurityManagedConnectionFactory.class.getName())
         .connectionfactoryInterface(UnifiedSecurityConnectionFactory.class.getName())
         .connectionfactoryImplClass(UnifiedSecurityConnectionFactoryImpl.class.getName())
         .connectionInterface(UnifiedSecurityConnection.class.getName())
         .connectionImplClass(UnifiedSecurityConnectionImpl.class.getName());

   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "unified-security.rar");


   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "unified-security.jar");
   ja.addPackages(true, UnifiedSecurityConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:34,代码来源:ResourceAdapterFactory.java

示例12: createDeployment

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Define the deployment
 *
 * @return The deployment archive
 */
@Deployment(order = 1)
public static ResourceAdapterArchive createDeployment()
{
   String deploymentName = "ConnectorTestCase.rar";

   ResourceAdapterArchive raa =
      ShrinkWrap.create(ResourceAdapterArchive.class, deploymentName);
   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);
   // Contains the deployment information
   raa.addAsManifestResource("META-INF/ironjacamar.xml", "ironjacamar.xml");

   String rootPath =
      System.getProperty("test.dir") + File.separator + ".." + File.separator;

   File root = new File(rootPath);
   for (File f : root.listFiles())
   {
      if (f.getName().contains("HelloWorld"))
         raa.addAsLibrary(f);
   }

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:39,代码来源:ConnectorTestCase.java

示例13: createTestRar

import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入方法依赖的package包/类
/**
 * Create the test.rar
 *
 * @return The resource adapter archive
 */
public static ResourceAdapterArchive createTestRar()
{
   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor raXml = Descriptors
         .create(org.jboss.shrinkwrap.descriptor.api.connector16.ConnectorDescriptor.class, "ra.xml").version("1.6");

   org.jboss.shrinkwrap.descriptor.api.connector16.ResourceadapterType rt = raXml.getOrCreateResourceadapter()
      .resourceadapterClass(TestResourceAdapter.class.getName());

   org.jboss.shrinkwrap.descriptor.api.connector16.OutboundResourceadapterType ort = rt
      .getOrCreateOutboundResourceadapter().transactionSupport("NoTransaction").reauthenticationSupport(false);

   org.jboss.shrinkwrap.descriptor.api.connector16.ConnectionDefinitionType cdt = ort.createConnectionDefinition()
      .managedconnectionfactoryClass(TestManagedConnectionFactory.class.getName())
      .connectionfactoryInterface(TestConnectionFactory.class.getName())
      .connectionfactoryImplClass(TestConnectionFactoryImpl.class.getName())
      .connectionInterface(TestConnection.class.getName())
      .connectionImplClass(TestConnectionImpl.class.getName());

   cdt.createConfigProperty().configPropertyName("CreateFailureCount")
      .configPropertyType(Integer.class.getName()).configPropertyValue("0");

   cdt.createConfigProperty().configPropertyName("InvalidConnectionFailureCount")
      .configPropertyType(Integer.class.getName()).configPropertyValue("0");

   rt.createAdminobject().adminobjectInterface(TestAdminObject.class.getName())
     .adminobjectClass(TestAdminObjectImpl.class.getName());

   rt.getOrCreateInboundResourceadapter().getOrCreateMessageadapter().getOrCreateMessagelistener()
      .messagelistenerType(TestMessageListener.class.getName())
      .getOrCreateActivationspec().activationspecClass(TestActivationSpec.class.getName())
      .getOrCreateRequiredConfigProperty().configPropertyName("Name");
   
   ResourceAdapterArchive raa = ShrinkWrap.create(ResourceAdapterArchive.class, "test.rar");

   JavaArchive ja = ShrinkWrap.create(JavaArchive.class, "test.jar");
   ja.addPackages(true, PerfConnection.class.getPackage());

   raa.addAsLibrary(ja);
   raa.addAsManifestResource(new StringAsset(raXml.exportAsString()), "ra.xml");

   return raa;
}
 
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:48,代码来源:ResourceAdapterFactory.java


注:本文中的org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive.addAsManifestResource方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。