I am trying to connect to my kerborised DB with Oracle XA datasource using Atomikos. But not able to set the authentication_services and kerberos5_mutual_authentication properties.
@Bean
public DataSource jtaLocalDatasource() {
AtomikosDataSourceBean dataSource = new AtomikosDataSourceBean();
dataSource.setUniqueResourceName("oracleL");
dataSource.setXaDataSourceClassName("oracle.jdbc.xa.client.OracleXADataSource");
Properties p = new Properties();
p.setProperty ("URL","jdbc:oracle:thin:@//<My Oracle Server>");
p.setProperty("oracle.net.authentication_services","(KERBEROS5)");
p.setProperty("oracle.net.kerberos5_mutual_authentication","true");
dataSource.setXaProperties ( p );
dataSource.setPoolSize ( 5 );
return dataSource;
}
Getting error :
Caused by: com.atomikos.beans.PropertyException: no readable property 'oracle' in class 'oracle.jdbc.xa.client.OracleXADataSource'
at com.atomikos.beans.PropertyUtils.getGetter(PropertyUtils.java:273)
at com.atomikos.beans.PropertyUtils.callGetter(PropertyUtils.java:238)
at com.atomikos.beans.PropertyUtils.setProperty(PropertyUtils.java:71)
at com.atomikos.beans.PropertyUtils.setProperties(PropertyUtils.java:110)
at com.atomikos.jdbc.AtomikosDataSourceBean.doInit(AtomikosDataSourceBean.java:185)
at com.atomikos.jdbc.internal.AbstractDataSourceBean.init(AbstractDataSourceBean.java:295)