Using Tuxedo JCA adapter (12.1.1) on Java 1.6_20 and Spring 3.2.0.....
Want to get the Tuxedo adapter going outside a container in Spring via the Spring JCA CCI (http://static.springsource.org/spring/docs/3.2.0.M2/reference/html/cci.html). Not much experience with JCA but got the basic idea.
The resource adapter is the glue for the domain configuration, debug levels and so forth. Started by using the TuxedoClientSideResourceAdapter and registering it to the TuxedoAdapterSupervisor singleton that is used by the TuxedoManagedConnectionFactory. Spring JCA CCI represents the local connection factory inside the LocalConnectionFactoryBean which needs the TuxedoConnectionFactory built by the TuxedoManagedConnectionFactory:
@Bean
public TuxedoManagedConnectionFactory tuxedoManagedConnectionFactory() {
TuxedoClientSideResourceAdapter ra = new TuxedoClientSideResourceAdapter();
.... (set ra all debugs to true)
ra.setTraceLevel("100000");
ra.setLocalAccessPointSpec("//INV000000121176:7001/domainId=matthew");
ra.setRemoteAccessPointSpec("//vsgtu817.sfa.se:48172/domainId=TR817TU");
try {
TuxedoAdapterSupervisor.getInstance().registerClientSideResourceAdapter(ra);
} catch (ResourceAdapterInternalException e) {
System.out.println("Big problem setting resource adapter");
}
TuxedoManagedConnectionFactory mcf = new TuxedoManagedConnectionFactory();
return mcf;
}
@Bean
public ConnectionFactory tuxedoConnectionFactory() {
LocalConnectionFactoryBean cf = new LocalConnectionFactoryBean();
cf.setManagedConnectionFactory(tuxedoManagedConnectionFactory());
try {
cf.afterPropertiesSet();
} catch (ResourceException e) {
System.out.println("Big problem after setting properties");
}
return (ConnectionFactory) cf.getObject();
}
What I am baffled by is that the tracing isn't getting hundred percent. For example I get:
INFO: Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1fe1feb: defining beans [org.springframework.context.annotation.internalConfigurationAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,applicationConfig,org.springframework.context.annotation.ConfigurationClassPostProcessor.importAwareProcessor,tuxedoManagedConnectionFactory,tuxedoConnectionFactory,tuxedoTransactionManager,tuxedoTemplate,tuxedoDAO]; root of factory hierarchy
2012-10-18:14:16:03:10:INFO[TuxedoAdapterSupervisor,registerClientSideResourceAdapter]TJA_0220:Tuxedo JCA Adapter, release 12c(12.1.1), resource archive version 1.4.0.0, build date: June 27 2012.
2012-10-18:14:16:03:10:ERROR[TJAService,TJAService]TJA_0072:Naming exception error: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
2012-10-18:14:16:03:10:INFO[TuxedoAdapterSupervisor,createRemoteAccessPoints#2]TJA_0201:INFO: RemoteAccessPoint TR817TU created.
Expected to see more detailed information about what is going on in the TJASerivce when setting up the context. Which isn't happening due to how I am not correctly rigging Spring. So how to get tracing/debug working? Or can it be that printing via the JUL logger isn't working. Got in my logging.properties file FINEST on everything oracle and weblogic.
Love to see if anybody has built up JCA outside a container!?