Example usage for org.springframework.jca.support ResourceAdapterFactoryBean setBootstrapContext

List of usage examples for org.springframework.jca.support ResourceAdapterFactoryBean setBootstrapContext

Introduction

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

Prototype

public void setBootstrapContext(BootstrapContext bootstrapContext) 

Source Link

Document

Specify the JCA BootstrapContext to use for starting the ResourceAdapter.

Usage

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

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

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  w  w  . ja  v  a2 s.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;
}