[jbosstools-issues] [JBoss JIRA] Resolved: (JBIDE-1117) Run as fails if just one module of many is delete

Rob Stryker (JIRA) jira-events at lists.jboss.org
Thu Oct 18 18:22:15 EDT 2007


     [ http://jira.jboss.com/jira/browse/JBIDE-1117?page=all ]

Rob Stryker resolved JBIDE-1117.
--------------------------------

    Resolution: Done

added more description to the exceptions. 

> Run as fails if just one module of many is delete
> -------------------------------------------------
>
>                 Key: JBIDE-1117
>                 URL: http://jira.jboss.com/jira/browse/JBIDE-1117
>             Project: JBoss Tools
>          Issue Type: Bug
>          Components: JBossAS
>    Affects Versions: 2.0.0.CR1
>            Reporter: Max Andersen
>         Assigned To: Rob Stryker
>            Priority: Critical
>             Fix For: 2.0.0.CR1
>
>
> Create 2 seam projects and have them deployed to the same server.
> delete 1 seam project and try and publish the remaining one.
> Now I get a "The module cannot be published because it cannot be located"
> First: The error message should say *which* module that cannot be published!
> Second: The cause is because the below code just iterates all modules and stop is if just one is wrong....that can't be right.
> public IStatus publishModule(int kind, int deltaKind,
> 			int modulePublishState, IModule[] module, IProgressMonitor monitor)
> 			throws CoreException {
> 		IStatus status = null;
> 		boolean deleted = false;
> 		for( int i = 0; i < module.length; i++ ) {			
> 			if( module[i] instanceof DeletedModule )
> 				deleted = true;
> 		}
> 		
> 		if (ServerBehaviourDelegate.REMOVED == deltaKind) {
> 			status = unpublish(server, module, monitor);
> 		} else if (kind == IServer.PUBLISH_FULL || kind == IServer.PUBLISH_CLEAN) {
> 			if( deleted ) 
> 				throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "The module cannot be published because it cannot be located"));
> 			status = fullPublish(module, module[module.length-1], monitor);	
> 		} else if (kind == IServer.PUBLISH_INCREMENTAL || kind == IServer.PUBLISH_AUTO) {
> 			if( deleted ) 
> 				throw new CoreException(new Status(IStatus.ERROR, JBossServerCorePlugin.PLUGIN_ID, "The module cannot be published because it cannot be located"));
> 			status = incrementalPublish(module, module[module.length-1], monitor);
> 		} 
> 		return status;
> 	}
> 	

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://jira.jboss.com/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        



More information about the jbosstools-issues mailing list