Example usage for org.springframework.jca.support SimpleBootstrapContext SimpleBootstrapContext

List of usage examples for org.springframework.jca.support SimpleBootstrapContext SimpleBootstrapContext

Introduction

In this page you can find the example usage for org.springframework.jca.support SimpleBootstrapContext SimpleBootstrapContext.

Prototype

public SimpleBootstrapContext(@Nullable WorkManager workManager) 

Source Link

Document

Create a new SimpleBootstrapContext for the given WorkManager, with no XATerminator available.

Usage

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 {/*  w w w .  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;
}

From source file:com.spring.jca.tuxedo.ApplicationConfig.java

@Bean
public ResourceAdapterFactoryBean tuxedoResourceAdapter() {
    try {//  w  ww . j  a v  a 2 s .c  om
        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;
}