summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpshi2012-06-19 04:27:48 (EDT)
committer mwu2012-06-19 04:27:48 (EDT)
commit2dcaafecad09c03b58fe0a8607b80a7fd7a817be (patch)
treea19f62d98e830e3479ce0953ce27c905d4b04b50
parent66aa53674120bd3662bf4334825ee54829449181 (diff)
downloadorg.eclipse.birt-2dcaafecad09c03b58fe0a8607b80a7fd7a817be.zip
org.eclipse.birt-2dcaafecad09c03b58fe0a8607b80a7fd7a817be.tar.gz
org.eclipse.birt-2dcaafecad09c03b58fe0a8607b80a7fd7a817be.tar.bz2
Summary:fix 50971 Cancel does not work for getResultSetMetaData().
Description of the resolution: Support cancel for method "prepareColumns".
-rw-r--r--data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java18
1 files changed, 15 insertions, 3 deletions
diff --git a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java
index f76acbf..c96f1cd 100644
--- a/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java
+++ b/data/org.eclipse.birt.data/src/org/eclipse/birt/data/engine/executor/DataSourceQuery.java
@@ -305,6 +305,8 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre
if( session.getDataSetCacheManager( ).getCurrentDataSetDesign( ) instanceof IOdaDataSetDesign )
design = (IOdaDataSetDesign)session.getDataSetCacheManager( ).getCurrentDataSetDesign( );
+ ICancellable queryCanceller = new OdaQueryCanceller( odaStatement, session.getStopSign() );
+
if ( design != null )
{
if ( canAccessResultSetByName( design ) )
@@ -332,11 +334,21 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre
}
else
{
- prepareColumns( );
+ this.session.getCancelManager( ).register( queryCanceller );
+ if ( !session.getStopSign( ).isStopped( ) )
+ {
+ prepareColumns( );
+ }
+ this.session.getCancelManager( ).deregister( queryCanceller );
}
}else
{
- prepareColumns( );
+ this.session.getCancelManager( ).register( queryCanceller );
+ if ( !session.getStopSign( ).isStopped( ) )
+ {
+ prepareColumns( );
+ }
+ this.session.getCancelManager( ).deregister( queryCanceller );
}
@@ -344,7 +356,7 @@ public class DataSourceQuery extends BaseQuery implements IDataSourceQuery, IPre
// If ODA can provide result metadata, get it now
try
{
- ICancellable queryCanceller = new OdaQueryCanceller( odaStatement, session.getStopSign() );
+
this.session.getCancelManager( ).register( queryCanceller );
if( !session.getStopSign().isStopped() )