Atomikos Forum |
|
I am trying to use AtomikosDataSourceBean for 2-phase commit in Informix (IDS) where I need to set equivalent of JDBCTEMP and LOBCACHE in setXaProperties. Could you help me what parameters should I use to set these in properties.
Brief about these params: JDBCTEMP: Specifies where temporary files for handling smart large objects are created. You must supply an absolute pathname. LOBCACHE: Determines the buffer size for large object data that is fetched from the database server Possible values are: A number greater than 0. The maximum number of bytes is allocated in memory to hold the data. If the data size exceeds the LOBCACHE value, the data is stored in a temporary file; if a security violation occurs during creation of this file, the data is stored in memory. Zero (0). The data is always stored in a file. If a security violation occurs, the driver makes no attempt to store the data in memory. A negative number. The data is always stored in memory. If the required amount of memory is not available, an error occurs. If the LOBCACHE value is not specified, the default is 4096 bytes. Thanks in Advance.
Thanks Guy for your response.
I tried setting IfxXADataSource by using setXaDataSource(), I am getting the below compilation errors. Am I doing anything wrong here, any help is greatly appreciated. Code Snippet: AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); IfxXADataSource ifxds = null; ifxds = initIfxXADataSource(nodeName); ds.setXaDataSource((XADataSource)ifxds); I see this compilation error: EntityDataSource.java:346: cannot find symbol [javac] symbol : method setXaDataSource(javax.sql.XADataSource) [javac] location: class com.atomikos.jdbc.AtomikosDataSourceBean [javac] ds.setXaDataSource(ifxds); Code Snippet: AtomikosDataSourceBean ds = new AtomikosDataSourceBean(); IfxXADataSource ifxds = null; ifxds = initIfxXADataSource(nodeName); ds.setXaDataSource(ifxds); I see this compilation error: EntityDataSource.java:346: cannot find symbol [javac] symbol : method setXaDataSource(com.informix.jdbcx.IfxXADataSource) [javac] location: class com.atomikos.jdbc.AtomikosDataSourceBean [javac] ds.setXaDataSource(ifxds); Function definition: public IfxXADataSource initIfxXADataSource (String nodeName) { Properties prop = propMap.get(nodeName); System.out.print ("Create an IDS XA data source: "); IfxXADataSource ds = new IfxXADataSource (); ds.setDescription ("IDS XA data source"); ds.setServerName (prop.getProperty("serverName")); ds.setIfxIFXHOST (prop.getProperty("ifxIFXHOST")); ds.setPortNumber (15038); ds.setDatabaseName (prop.getProperty("databaseName")); ds.setUser (prop.getProperty("user")); ds.setPassword (prop.getProperty("password")); ds.setIfxLOBCACHE (20000); System.out.println ("Okay."); return ds; } Thanks, -Hari |