[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [wtp-dev] Another WTP Question
|
This is similar to a question I had as well - see issue
https://bugs.eclipse.org/bugs/show_bug.cgi?id=267993
Rochelle
Tim McConnell wrote:
Hi, I've noticed that whenever I deploy a single module or multiple
modules from the WTP "Add and Remove" wizard and I get a deployment
exception from the server, it still shows up in the Server view as if it
deployed successfully, which is very confusing to our end-users. I
assume we're doing something incorrect in our BehaviorDelegate but it's
not obvious to me. When I debug this code in Server.publishImpl() below,
I see that our BehaviorDelegate CoreException is caught. I also see our
module contained within modules2 below so I expect that it'll get
deleted (or at least not added) but instead it gets saved in the
.metadata\.plugins\org.eclipse.wst.server.core\publish0.dat file even
though it doesn't really exist in the server. Can someone help explain
what else I need to do in our BehaviorDelegate when throwing our
CoreException ?? Or is this a bug or expected behavior ?? Thanks much.....
try {
getBehaviourDelegate(monitor).publish(kind, modules4,
monitor, info);
} catch (CoreException ce) {
Trace.trace(Trace.WARNING, "Error during publishing", ce);
status = ce.getStatus();
}
final List<IModule[]> modules2 = new ArrayList<IModule[]>();
visit(new IModuleVisitor() {
public boolean visit(IModule[] module) {
if (getModulePublishState(module) ==
IServer.PUBLISH_STATE_NONE)
getServerPublishInfo().fill(module);
modules2.add(module);
return true;
}
}, monitor);
getServerPublishInfo().removeDeletedModulePublishInfo(Server.this,
modules2);
getServerPublishInfo().clearCache();
getServerPublishInfo().save();