Skip to content

Commit

Permalink
more debug output
Browse files Browse the repository at this point in the history
  • Loading branch information
ap-actoron committed Jan 15, 2021
1 parent ce68640 commit 3a7e62f
Showing 1 changed file with 9 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -542,6 +542,8 @@ protected IFuture<Void> executeShutdownOnFeatures(final List<IComponentFeature>

fut = features.get(features.size()-1).shutdown();
sync = fut.isDone();
if(getId().toString().indexOf("SellerAgent")!=-1)
getLogger().info("feature shutdown called: "+getId()+" "+features.get(features.size()-1)+" done(sync)="+sync);
if(sync)
{
features.remove(features.size()-1);
Expand All @@ -551,20 +553,23 @@ protected IFuture<Void> executeShutdownOnFeatures(final List<IComponentFeature>
// Recurse once for current async feature
if(!sync)
{
if(getId().toString().indexOf("SellerAgent")!=-1)
getLogger().info("async waiting for feature shutdown: "+getId()+" "+features.get(features.size()-1));
final Future<Void> ret = new Future<Void>();
fut.addResultListener(new IResultListener<Void>()
{
public void resultAvailable(Void result)
{
if(getId().toString().indexOf("SellerAgent")!=-1)
getLogger().info("done waiting for feature shutdown: "+getId()+" "+features.get(features.size()-1));
proceed();
}

public void exceptionOccurred(Exception exception)
{
StringWriter sw = new StringWriter();
exception.printStackTrace(new PrintWriter(sw));
getLogger().warning("Exception during component cleanup of "+getId()+": "+exception);
getLogger().info(sw.toString());
if(getId().toString().indexOf("SellerAgent")!=-1)
getLogger().info("exception when waiting for feature shutdown: "+getId()+" "+features.get(features.size()-1));
getLogger().warning("Exception during component cleanup of "+getId()+", "+features.get(features.size()-1)+": "+SUtil.getExceptionStacktrace(exception));

proceed();
}
Expand Down

0 comments on commit 3a7e62f

Please sign in to comment.