public void run()
{
String provider = config.get( KEY_INDEX_PROVIDER );
String dataSourceName = getIndexProvider( provider ).getDataSourceName();
XaDataSource dataSource = graphDbImpl.getConfig().getTxModule().getXaDataSourceManager().getXaDataSource( dataSourceName );
IndexXaConnection connection = (IndexXaConnection) dataSource.getXaConnection();
Transaction tx = graphDbImpl.beginTx();
try
{
javax.transaction.Transaction javaxTx = graphDbImpl.getConfig().getTxModule().getTxManager().getTransaction();
javaxTx.enlistResource( connection.getXaResource() );
connection.createIndex( cls, indexName, config );
tx.success();
}
catch ( Exception e )
{
this.exception = e;