本文整理汇总了Java中org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive类的典型用法代码示例。如果您正苦于以下问题:Java ResourceAdapterArchive类的具体用法?Java ResourceAdapterArchive怎么用?Java ResourceAdapterArchive使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ResourceAdapterArchive类属于org.jboss.shrinkwrap.api.spec包,在下文中一共展示了ResourceAdapterArchive类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。
示例1: createMockResourceAdapterArchive
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
public static ResourceAdapterArchive createMockResourceAdapterArchive() {
JavaArchive ja = ShrinkWrap.create(JavaArchive.class, LIB_JAR_NAME);
ja.addClasses(MessageListener.class, MockActivationSpec.class, MockConnection.class,
MockConnectionFactory.class, MockConnectionManager.class,
MockManagedConnection.class, MockManagedConnectionFactory.class,
MockResourceAdapter.class, MockXAResource.class, InteractionListener.class,
MockInteraction.class, MockRecordFactory.class, MockMappedRecord.class, MockIndexedRecord.class);
try {
return ShrinkWrap.create(ResourceAdapterArchive.class, ADAPTER_ARCHIVE_NAME)
.addAsLibrary(ja)
.setResourceAdapterXML(Classes.getResource(RESOURCE_ADAPTER_XML))
.addAsManifestResource(IRONJACAMAR_XML, "ironjacamar.xml");
} catch (Exception e) {
throw new RuntimeException(e);
}
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:17,代码来源:MockResourceAdapterUtil.java
示例2: 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
示例3: 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
示例4: testDeployment
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
/**
* Deployment
* @throws Throwable In case of an error
*/
@Test
public void testDeployment() throws Throwable
{
ResourceAdapterArchive rar = ResourceAdapterFactory.createWorkRarMCFNoHashCode();
ResourceAdaptersDescriptor raxml = ResourceAdapterFactory.createWorkDeploymentMCFNoHashCode(null);
try
{
embedded.deploy(rar);
embedded.deploy(raxml);
fail();
}
catch (Throwable t)
{
if (!t.getCause().getCause().getClass().equals(ValidatorException.class))
fail();
}
finally
{
embedded.undeploy(raxml);
embedded.undeploy(rar);
}
}
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:29,代码来源:ValidatorTestCase.java
示例5: 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
示例6: 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
示例7: undeploy
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
/**
* Undeploy
* @param raa The resource adapter archive
* @exception Throwable If an error occurs
*/
public void undeploy(ResourceAdapterArchive raa) throws Throwable
{
if (raa == null)
throw new IllegalArgumentException("Url is null");
if (!started)
throw new IllegalStateException("Container not started");
File parentDirectory = new File(SecurityActions.getSystemProperty("java.io.tmpdir"));
File raaFile = new File(parentDirectory, raa.getName());
log.debugf("Undeploying: %s", raaFile);
if (shrinkwrapDeployments == null || !shrinkwrapDeployments.contains(raaFile))
throw new IOException(raa.getName() + " not deployed");
kernel.getMainDeployer().undeploy(raaFile.toURI().toURL());
removeDeployment(raaFile);
}
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:26,代码来源:EmbeddedJCA.java
示例8: 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
示例9: getActivitiResourceAdapterArchive
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
public static ResourceAdapterArchive getActivitiResourceAdapterArchive() {
if (CACHED_JCA_ASSET != null) {
return CACHED_JCA_ASSET;
} else {
ResourceAdapterArchive archive = Maven.resolver().loadPomFromFile("pom.xml")
.resolve("org.agito:activiti-jobexecutor-ee-jca-rar:rar:" + getJobExecutorVersion())
.withoutTransitivity().asSingle(ResourceAdapterArchive.class);
if (archive == null) {
throw new RuntimeException("could not resolve org.agito:activiti-jobexecutor-ee-jca-rar");
} else {
CACHED_JCA_ASSET = archive;
return CACHED_JCA_ASSET;
}
}
}
开发者ID:agito-it,项目名称:activiti-jobexecutor-ee,代码行数:19,代码来源:AbstractContainerTest.java
示例10: 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
示例11: createActiveMQRAR
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
@Deployment(order=1, name="activemq-ra.rar")
public static ResourceAdapterArchive createActiveMQRAR() throws Exception {
startActiveMQBroker();
File rar = Maven.resolver()
.loadPomFromFile("./pom.xml")
.resolve("org.apache.activemq:activemq-rar:rar:?")
.withoutTransitivity()
.asSingleFile();
return ShrinkWrap.create(ZipImporter.class, "activemq-ra.rar")
.importFrom(new ZipFile(rar))
.as(ResourceAdapterArchive.class);
}
开发者ID:jboss-switchyard,项目名称:switchyard,代码行数:13,代码来源:JCAInflowBindingTest.java
示例12: 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
示例13: deploy
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
@Deployment
public static EnterpriseArchive deploy() throws Exception {
JavaArchive rarjar = ShrinkWrap.create(JavaArchive.class, "rar.jar")
.addClasses(
Create.class,
Modify.class,
Delete.class,
FSWatcher.class,
FSWatchingThread.class,
FSWatcherResourceAdapter.class,
FSWatcherActivationSpec.class);
ResourceAdapterArchive rar = ShrinkWrap.create(ResourceAdapterArchive.class, "fswatcher.rar")
.addAsLibrary(rarjar);
JavaArchive ejbjar = ShrinkWrap.create(JavaArchive.class, "ejb.jar")
.addClasses(
FileEvent.class,
FSWatcherMDB.class)
.addAsManifestResource("jboss-ejb3.xml")
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
JavaArchive libjar = ShrinkWrap.create(JavaArchive.class, "lib.jar")
.addClasses(ResourceAdapterTest.class)
.addAsManifestResource(EmptyAsset.INSTANCE, "beans.xml");
return ShrinkWrap.create(EnterpriseArchive.class, "test.ear")
.addAsModules(
rar,
ejbjar)
.addAsLibraries(libjar);
}
开发者ID:robertpanzer,项目名称:filesystemwatch-connector,代码行数:35,代码来源:ResourceAdapterTest.java
示例14: createRarArchive
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
private ResourceAdapterArchive createRarArchive(String rarName) {
JavaArchive jar = ShrinkWrap.create(JavaArchive.class,
new Random().nextInt(100000) + ".jar");
jar.addPackage(AbstractAdapter.class.getPackage());
jar.addPackage(DummyAdapter.class.getPackage());
log.info("Jar: {}", jar.toString(true));
ResourceAdapterArchive rar = ShrinkWrap.create(
ResourceAdapterArchive.class, rarName);
rar.addAsLibrary(jar);
log.info("Rar: {}", rar.toString(true));
return rar;
}
开发者ID:scheuchzer,项目名称:outbound-connector,代码行数:14,代码来源:ResourceAdapterIT.java
示例15: assertRAXml
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
private void assertRAXml(BufferedReader reader, ResourceAdapterArchive raArchive) throws IOException
{
String line = readNextNonemptyLine(reader);
assertEquals("META-INF/ra.xml:", line);
line = reader.readLine();
assertTrue(line, line.matches("-+"));
BufferedReader raReader = new BufferedReader(new InputStreamReader(raArchive.get("META-INF/ra.xml").getAsset().
openStream()));
while ((line = raReader.readLine()) != null)
{
assertEquals(line, reader.readLine());
}
}
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:14,代码来源:RarInfoTestCase.java
示例16: 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
示例17: 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
示例18: 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
示例19: 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
示例20: deploy
import org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive; //导入依赖的package包/类
/**
* Deploy
* @param raa The resource adapter archive
* @exception Throwable If an error occurs
*/
public void deploy(ResourceAdapterArchive raa) throws Throwable
{
if (raa == null)
throw new IllegalArgumentException("Url is null");
if (!raa.getName().endsWith(".rar"))
throw new IllegalArgumentException(raa.getName() + " doesn't end with .rar");
if (!started)
throw new IllegalStateException("Container not started");
File parentDirectory = new File(SecurityActions.getSystemProperty("java.io.tmpdir"));
File raaFile = new File(parentDirectory, raa.getName());
if (shrinkwrapDeployments != null && shrinkwrapDeployments.contains(raaFile))
throw new IOException(raa.getName() + " already deployed");
if (raaFile.exists())
recursiveDelete(raaFile);
raa.as(ZipExporter.class).exportTo(raaFile, true);
if (shrinkwrapDeployments == null)
shrinkwrapDeployments = new ArrayList<File>(1);
shrinkwrapDeployments.add(raaFile);
log.debugf("Deploying: %s", raaFile);
kernel.getMainDeployer().deploy(raaFile.toURI().toURL());
}
开发者ID:ironjacamar,项目名称:ironjacamar,代码行数:37,代码来源:EmbeddedJCA.java
注:本文中的org.jboss.shrinkwrap.api.spec.ResourceAdapterArchive类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论