[jbosstools-issues] [JBoss JIRA] (JBIDE-23430) Run as -> Run on server -> browser might open too early causing http 404

Rob Stryker (JIRA) issues at jboss.org
Thu Nov 3 15:45:00 EDT 2016


    [ https://issues.jboss.org/browse/JBIDE-23430?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13317164#comment-13317164 ] 

Rob Stryker commented on JBIDE-23430:
-------------------------------------

We already have logic for that:

{code}

	protected void wait(final IServer server, final IModule[] module) {
		// Wait for the server to be started. No remote polling necessary. 
		// Framework poller is handling that. Here just wait in the state event framework
		waitServerStarted(server);
		
		// Get the module state. It should at least be synchronized. 
		// If it's not synchronized, then its not deployed
		int state = ((Server)server).getModulePublishState(module);
		if( state != IServer.PUBLISH_STATE_NONE) {
			// THe module isn't synchronized, so lets publish the server generally
			server.publish(IServer.PUBLISH_INCREMENTAL, null);
		}
		
		// Now check if we are able to poll the server on module state or not
		ServerExtendedProperties props = (ServerExtendedProperties)server
				.loadAdapter(ServerExtendedProperties.class, new NullProgressMonitor());
		if( props != null && props.canVerifyRemoteModuleState()) {
			IServerModuleStateVerifier verifier = props.getModuleStateVerifier();
			if( verifier != null ) {
				// we can verify the remote state, so go do it, so go wait for the module to be deployed
				verifier.waitModuleStarted(server, module, 20000);
			}
		}
	}
{code}

The verifier is JBoss7ModuleStateVerifier which uses management operations to check if the deployment is ready. This requires proper management credentials to be set up on the vm, so that jboss management commands can actually reach it. 

If it can't be reached over management, we don't wait... we just open the browser. 

Can you verify jmx / management commands are set up, and credentials are provided to the user in the server editor? Without these details, we'll simply give up. 

> Run as -> Run on server -> browser might open too early causing http 404
> ------------------------------------------------------------------------
>
>                 Key: JBIDE-23430
>                 URL: https://issues.jboss.org/browse/JBIDE-23430
>             Project: Tools (JBoss Tools)
>          Issue Type: Bug
>          Components: server
>    Affects Versions: 4.4.2.AM2
>            Reporter: Josef Ludvicek
>            Assignee: Rob Stryker
>         Attachments: runas.png
>
>
> There should be some mechanism to detect when application is succesfully deployed.
> It is possible that on slow machine it starts to deploy and open internal web browser too early - before app is fully deployed.
> Stepps:
> * start eap server
> * right click on app -> Run as -> run on server



--
This message was sent by Atlassian JIRA
(v7.2.3#72005)


More information about the jbosstools-issues mailing list