[jboss-jira] [JBoss JIRA] Commented: (JBAS-3686) Incomplete Deployment error not thrown when DefaultDS not deployed (/ missing at the end of deployment URL)

Adrian Brock (JIRA) jira-events at jboss.com
Fri Sep 22 07:48:01 EDT 2006


    [ http://jira.jboss.com/jira/browse/JBAS-3686?page=comments#action_12343814 ] 
            
Adrian Brock commented on JBAS-3686:
------------------------------------

The issue is caused by the following code in MainDeployer:deploy(URL)

      if( sdi.state != DeploymentState.STARTED )
         checkIncompleteDeployments();

In this case, the top level deployment is started (the deploy folder)
so no check is made.

Since there are no other deployments, it never does this code in URLDeploymentScanner:

      // Validate that there are still incomplete deployments
      if (lastIncompleteDeploymentException != null)
      {
         try
         {
            Object[] args = {};
            String[] sig = {};
            getServer().invoke(getDeployer(),
                               "checkIncompleteDeployments", args, sig);
         }
         catch (Exception e)
         {
            Throwable t = JMXExceptionDecoder.decode(e);
            log.error(t);
         }
      }

This just looks broken to me. In this case, there is nothing wrong with the deployment,
the issue is with the MBeans created as part of the deployment process not having
dependencies satisfied.

In my opinion, the MainDeployer should not be automatically
doing any checks for incomplete deployments it should be invoked by the caller
since only it knows whether there are multiple urls that could have some relation.

main.deploy(url1); // creates mbean1
main.deploy(url2); // creates mbean2 that depends on mbean1
main.checkIncompleteDeployments();

In this way, the URLDeploymentScanner should always check for incompleteness
after every scan that deploys or undeploys something.

You could have a helper method in MainDeployer for simple cases,
which is also what should be used by the testsuite (in most cases).

e.g.
MainDeployer::deployAndCheck(URL url)
{
   deploy(url);
   checkIncompleteDeployments();
}

> Incomplete Deployment error not thrown when DefaultDS not deployed (/ missing at the end of deployment URL)
> -----------------------------------------------------------------------------------------------------------
>
>                 Key: JBAS-3686
>                 URL: http://jira.jboss.com/jira/browse/JBAS-3686
>             Project: JBoss Application Server
>          Issue Type: Bug
>      Security Level: Public(Everyone can see) 
>          Components: Deployment services
>    Affects Versions: JBossAS-4.0.4.GA
>            Reporter: Galder Zamarreno
>         Assigned To: Dimitris Andreadis
>
> A URL deployment attribute like this on jboss.deployment:type=DeploymentScanner,flavor=URL 
> (notice missing / at the end):
>       <attribute name="URLs">
>          deploy
>       </attribute>
> leads to the datasource not deploying due to waiting on:
> 2006-09-22 12:04:07,640 DEBUG [org.jboss.system.ServiceController] waiting in start jboss.jca:service=ManagedConnectionFactory,name=DefaultDS on jboss.jca:service=RARDeployment,name='jboss-local-jdbc.rar'
> JBoss deploys this instead:
> 2006-09-22 12:04:06,062 DEBUG [org.jboss.resource.deployment.RARDeployment] Created jboss.jca:service=RARDeployment,name='deploy#jboss-local-jdbc.rar'
> The bug is that DefaultDS is an incomplete deployment and the 
> URLDeploymentScanner should throw something like this:
> 17:29:03,852 ERROR [URLDeploymentScanner] Incomplete Deployment listing: ......

-- 
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 jboss-jira mailing list