List of usage examples for org.springframework.jca.support ResourceAdapterFactoryBean setResourceAdapter
public void setResourceAdapter(ResourceAdapter resourceAdapter)
From source file:com.spring.jca.tuxedo.ApplicationConfig.java
@Bean public ResourceAdapterFactoryBean tuxedoResourceAdapter() { try {/*from w w w.j a v a 2s . co m*/ SimpleNamingContextBuilder.emptyActivatedContextBuilder(); } catch (NamingException e) { System.out.println("Simple Naming context builder error: " + e.getMessage()); } TuxedoResourceAdapter ra = new TuxedoResourceAdapter(); ra.setTraceLevel("100000"); ra.setDebugAdapter(true); ra.setDebugBuffer(true); ra.setDebugJatmi(true); ra.setDebugRouting(true); ra.setDebugSession(true); ra.setDebugXa(true); ra.setDebugConfig(true); ra.setDebugPdu(true); ra.setDebugPerf(true); ra.setDebugSec(true); ra.setDebugNet(true); ra.setXaAffinity("true"); ra.setDmconfig("C:\\Users\\40042466\\workspace\\Silk Tuxedo\\configuration\\runtime\\dmconfig.xml"); ResourceAdapterFactoryBean fc = new ResourceAdapterFactoryBean(); fc.setResourceAdapter(ra); SimpleTaskWorkManager stwm = new SimpleTaskWorkManager(); fc.setWorkManager(stwm); fc.setBootstrapContext(new SimpleBootstrapContext(stwm)); return fc; }
From source file:com.spring.jca.tuxedo.ApplicationConfig.java
ResourceAdapterFactoryBean tuxedoCSResourceAdapter() {
// http://stackoverflow.com/questions/5682732/how-does-an-application-that-uses-springs-simplenamingcontextbuilder-know-to-se
try {/*from w ww . j av a 2s.c o m*/
SimpleNamingContextBuilder.emptyActivatedContextBuilder();
} catch (NamingException e) {
System.out.println("Simple Naming context builder error: " + e.getMessage());
}
TuxedoClientSideResourceAdapter ra = new TuxedoClientSideResourceAdapter();
ra.setTraceLevel("100000");
ra.setDebugAdapter(true);
ra.setDebugBuffer(true);
ra.setDebugJatmi(true);
ra.setDebugRouting(true);
ra.setDebugSession(true);
ra.setDebugXa(true);
ra.setDebugConfig(true);
ra.setDebugPdu(true);
ra.setDebugPerf(true);
ra.setDebugSec(true);
ra.setDebugNet(true);
ra.setXaAffinity("true");
ra.setAutoTran(true);
ra.setSpCredentialPolicy("LOCAL");
ra.setRapAllowAnonymous(false);
ra.setLocalAccessPointSpec("//INV000000121176.ads.sfa.se:7001/domainId=INV000000121176");
ra.setRemoteAccessPointSpec("//vsgtu702.sfa.se:47022/domainId=tr703tu");
ra.setImpResourceName("levereraPerson");
ra.setFieldTable32Classes("se.fk.silk.tuxedo.SampleFldTbl");
ResourceAdapterFactoryBean fc = new ResourceAdapterFactoryBean();
fc.setResourceAdapter(ra);
SimpleTaskWorkManager stwm = new SimpleTaskWorkManager();
fc.setWorkManager(stwm);
fc.setBootstrapContext(new SimpleBootstrapContext(stwm));
return fc;
}