{"action":"created","comment":{"url":"https://api.github.com/repos/payara/Payara/pulls/comments/33922805","id":33922805,"diff_hunk":"@@ -206,12 +207,21 @@ public void reset(ContextHandle contextHandle) {\n     }\n \n     private boolean isApplicationEnabled(String appId) {\n+        boolean result = false;\n         if (appId != null) {\n             Application app = applications.getApplication(appId);\n-            if (app != null)\n-                return deployment.isAppEnabled(app);\n+            if (app != null) {\n+                result = deployment.isAppEnabled(app);\n+            } else { \n+                // if app is null then it is likely that appId is still deploying\n+                // and its enabled status has not been written to the domain.xml yet\n+                // this can happen for example with a Startup EJB submitting something\n+                // it its startup method. Reference Payara GitHub issue 204              \n+                logger.info(\"Job submitted for \" + appId + \" likely during deployment. Continuing...\");\n+                result = true;","path":"appserver/concurrent/concurrent-impl/src/main/java/org/glassfish/concurrent/runtime/ContextSetupProviderImpl.java","position":25,"original_position":25,"commit_id":"e5cb62485d82df60a685df0e510c3975e1d56a55","original_commit_id":"e5cb62485d82df60a685df0e510c3975e1d56a55","user":{"login":"jerrinot","id":158619,"avatar_url":"https://avatars.githubusercontent.com/u/158619?v=3","gravatar_id":"","url":"https://api.github.com/users/jerrinot","html_url":"https://github.com/jerrinot","followers_url":"https://api.github.com/users/jerrinot/followers","following_url":"https://api.github.com/users/jerrinot/following{/other_user}","gists_url":"https://api.github.com/users/jerrinot/gists{/gist_id}","starred_url":"https://api.github.com/users/jerrinot/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jerrinot/subscriptions","organizations_url":"https://api.github.com/users/jerrinot/orgs","repos_url":"https://api.github.com/users/jerrinot/repos","events_url":"https://api.github.com/users/jerrinot/events{/privacy}","received_events_url":"https://api.github.com/users/jerrinot/received_events","type":"User","site_admin":false},"body":"so you are making a bet that every unknown `appId` is just a \"deployment-in-progress\" and it'll be enabled eventually? is it a good bet?  what if the `appId` is genuinely unknown? what if it had been just undeployed? ","created_at":"2015-07-06T10:41:14Z","updated_at":"2015-07-06T10:41:14Z","html_url":"https://github.com/payara/Payara/pull/366#discussion_r33922805","pull_request_url":"https://api.github.com/repos/payara/Payara/pulls/366","_links":{"self":{"href":"https://api.github.com/repos/payara/Payara/pulls/comments/33922805"},"html":{"href":"https://github.com/payara/Payara/pull/366#discussion_r33922805"},"pull_request":{"href":"https://api.github.com/repos/payara/Payara/pulls/366"}}},"pull_request":{"url":"https://api.github.com/repos/payara/Payara/pulls/366","id":39225381,"html_url":"https://github.com/payara/Payara/pull/366","diff_url":"https://github.com/payara/Payara/pull/366.diff","patch_url":"https://github.com/payara/Payara/pull/366.patch","issue_url":"https://api.github.com/repos/payara/Payara/issues/366","number":366,"state":"open","locked":false,"title":"PAYARA-220 fixes #204  still submits executor task during deployment.","user":{"login":"smillidge","id":939073,"avatar_url":"https://avatars.githubusercontent.com/u/939073?v=3","gravatar_id":"","url":"https://api.github.com/users/smillidge","html_url":"https://github.com/smillidge","followers_url":"https://api.github.com/users/smillidge/followers","following_url":"https://api.github.com/users/smillidge/following{/other_user}","gists_url":"https://api.github.com/users/smillidge/gists{/gist_id}","starred_url":"https://api.github.com/users/smillidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smillidge/subscriptions","organizations_url":"https://api.github.com/users/smillidge/orgs","repos_url":"https://api.github.com/users/smillidge/repos","events_url":"https://api.github.com/users/smillidge/events{/privacy}","received_events_url":"https://api.github.com/users/smillidge/received_events","type":"User","site_admin":false},"body":"During deployment an @Startup EJB can submit a Batch Job or ManagedExecutorService task. However the Executor Service was checking the domain.xml to see if the referenced application was enabled although its state had not been written to the domain.xml.\r\n\r\nThis race condition caused the task/job submission to fail. This pull request fixes this.","created_at":"2015-07-05T19:15:56Z","updated_at":"2015-07-06T10:41:14Z","closed_at":null,"merged_at":null,"merge_commit_sha":"3258d293817efd69a93d9bdfcef9702d7ea0e06d","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/payara/Payara/pulls/366/commits","review_comments_url":"https://api.github.com/repos/payara/Payara/pulls/366/comments","review_comment_url":"https://api.github.com/repos/payara/Payara/pulls/comments{/number}","comments_url":"https://api.github.com/repos/payara/Payara/issues/366/comments","statuses_url":"https://api.github.com/repos/payara/Payara/statuses/e5cb62485d82df60a685df0e510c3975e1d56a55","head":{"label":"smillidge:PAYARA-220","ref":"PAYARA-220","sha":"e5cb62485d82df60a685df0e510c3975e1d56a55","user":{"login":"smillidge","id":939073,"avatar_url":"https://avatars.githubusercontent.com/u/939073?v=3","gravatar_id":"","url":"https://api.github.com/users/smillidge","html_url":"https://github.com/smillidge","followers_url":"https://api.github.com/users/smillidge/followers","following_url":"https://api.github.com/users/smillidge/following{/other_user}","gists_url":"https://api.github.com/users/smillidge/gists{/gist_id}","starred_url":"https://api.github.com/users/smillidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smillidge/subscriptions","organizations_url":"https://api.github.com/users/smillidge/orgs","repos_url":"https://api.github.com/users/smillidge/repos","events_url":"https://api.github.com/users/smillidge/events{/privacy}","received_events_url":"https://api.github.com/users/smillidge/received_events","type":"User","site_admin":false},"repo":{"id":24259044,"name":"Payara","full_name":"smillidge/Payara","owner":{"login":"smillidge","id":939073,"avatar_url":"https://avatars.githubusercontent.com/u/939073?v=3","gravatar_id":"","url":"https://api.github.com/users/smillidge","html_url":"https://github.com/smillidge","followers_url":"https://api.github.com/users/smillidge/followers","following_url":"https://api.github.com/users/smillidge/following{/other_user}","gists_url":"https://api.github.com/users/smillidge/gists{/gist_id}","starred_url":"https://api.github.com/users/smillidge/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smillidge/subscriptions","organizations_url":"https://api.github.com/users/smillidge/orgs","repos_url":"https://api.github.com/users/smillidge/repos","events_url":"https://api.github.com/users/smillidge/events{/privacy}","received_events_url":"https://api.github.com/users/smillidge/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/smillidge/Payara","description":"Payara Server","fork":true,"url":"https://api.github.com/repos/smillidge/Payara","forks_url":"https://api.github.com/repos/smillidge/Payara/forks","keys_url":"https://api.github.com/repos/smillidge/Payara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/smillidge/Payara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/smillidge/Payara/teams","hooks_url":"https://api.github.com/repos/smillidge/Payara/hooks","issue_events_url":"https://api.github.com/repos/smillidge/Payara/issues/events{/number}","events_url":"https://api.github.com/repos/smillidge/Payara/events","assignees_url":"https://api.github.com/repos/smillidge/Payara/assignees{/user}","branches_url":"https://api.github.com/repos/smillidge/Payara/branches{/branch}","tags_url":"https://api.github.com/repos/smillidge/Payara/tags","blobs_url":"https://api.github.com/repos/smillidge/Payara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/smillidge/Payara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/smillidge/Payara/git/refs{/sha}","trees_url":"https://api.github.com/repos/smillidge/Payara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/smillidge/Payara/statuses/{sha}","languages_url":"https://api.github.com/repos/smillidge/Payara/languages","stargazers_url":"https://api.github.com/repos/smillidge/Payara/stargazers","contributors_url":"https://api.github.com/repos/smillidge/Payara/contributors","subscribers_url":"https://api.github.com/repos/smillidge/Payara/subscribers","subscription_url":"https://api.github.com/repos/smillidge/Payara/subscription","commits_url":"https://api.github.com/repos/smillidge/Payara/commits{/sha}","git_commits_url":"https://api.github.com/repos/smillidge/Payara/git/commits{/sha}","comments_url":"https://api.github.com/repos/smillidge/Payara/comments{/number}","issue_comment_url":"https://api.github.com/repos/smillidge/Payara/issues/comments{/number}","contents_url":"https://api.github.com/repos/smillidge/Payara/contents/{+path}","compare_url":"https://api.github.com/repos/smillidge/Payara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/smillidge/Payara/merges","archive_url":"https://api.github.com/repos/smillidge/Payara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/smillidge/Payara/downloads","issues_url":"https://api.github.com/repos/smillidge/Payara/issues{/number}","pulls_url":"https://api.github.com/repos/smillidge/Payara/pulls{/number}","milestones_url":"https://api.github.com/repos/smillidge/Payara/milestones{/number}","notifications_url":"https://api.github.com/repos/smillidge/Payara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/smillidge/Payara/labels{/name}","releases_url":"https://api.github.com/repos/smillidge/Payara/releases{/id}","created_at":"2014-09-20T09:38:04Z","updated_at":"2015-05-01T20:29:35Z","pushed_at":"2015-07-05T19:13:31Z","git_url":"git://github.com/smillidge/Payara.git","ssh_url":"git@github.com:smillidge/Payara.git","clone_url":"https://github.com/smillidge/Payara.git","svn_url":"https://github.com/smillidge/Payara","homepage":null,"size":56556,"stargazers_count":0,"watchers_count":0,"language":"Java","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"payara:master","ref":"master","sha":"40a6464c0867652936fce06e67f08270bb5e22e0","user":{"login":"payara","id":7817189,"avatar_url":"https://avatars.githubusercontent.com/u/7817189?v=3","gravatar_id":"","url":"https://api.github.com/users/payara","html_url":"https://github.com/payara","followers_url":"https://api.github.com/users/payara/followers","following_url":"https://api.github.com/users/payara/following{/other_user}","gists_url":"https://api.github.com/users/payara/gists{/gist_id}","starred_url":"https://api.github.com/users/payara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/payara/subscriptions","organizations_url":"https://api.github.com/users/payara/orgs","repos_url":"https://api.github.com/users/payara/repos","events_url":"https://api.github.com/users/payara/events{/privacy}","received_events_url":"https://api.github.com/users/payara/received_events","type":"Organization","site_admin":false},"repo":{"id":23930639,"name":"Payara","full_name":"payara/Payara","owner":{"login":"payara","id":7817189,"avatar_url":"https://avatars.githubusercontent.com/u/7817189?v=3","gravatar_id":"","url":"https://api.github.com/users/payara","html_url":"https://github.com/payara","followers_url":"https://api.github.com/users/payara/followers","following_url":"https://api.github.com/users/payara/following{/other_user}","gists_url":"https://api.github.com/users/payara/gists{/gist_id}","starred_url":"https://api.github.com/users/payara/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/payara/subscriptions","organizations_url":"https://api.github.com/users/payara/orgs","repos_url":"https://api.github.com/users/payara/repos","events_url":"https://api.github.com/users/payara/events{/privacy}","received_events_url":"https://api.github.com/users/payara/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/payara/Payara","description":"Payara Server patched and enhanced GlassFish Server Open Source Edition","fork":false,"url":"https://api.github.com/repos/payara/Payara","forks_url":"https://api.github.com/repos/payara/Payara/forks","keys_url":"https://api.github.com/repos/payara/Payara/keys{/key_id}","collaborators_url":"https://api.github.com/repos/payara/Payara/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/payara/Payara/teams","hooks_url":"https://api.github.com/repos/payara/Payara/hooks","issue_events_url":"https://api.github.com/repos/payara/Payara/issues/events{/number}","events_url":"https://api.github.com/repos/payara/Payara/events","assignees_url":"https://api.github.com/repos/payara/Payara/assignees{/user}","branches_url":"https://api.github.com/repos/payara/Payara/branches{/branch}","tags_url":"https://api.github.com/repos/payara/Payara/tags","blobs_url":"https://api.github.com/repos/payara/Payara/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/payara/Payara/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/payara/Payara/git/refs{/sha}","trees_url":"https://api.github.com/repos/payara/Payara/git/trees{/sha}","statuses_url":"https://api.github.com/repos/payara/Payara/statuses/{sha}","languages_url":"https://api.github.com/repos/payara/Payara/languages","stargazers_url":"https://api.github.com/repos/payara/Payara/stargazers","contributors_url":"https://api.github.com/repos/payara/Payara/contributors","subscribers_url":"https://api.github.com/repos/payara/Payara/subscribers","subscription_url":"https://api.github.com/repos/payara/Payara/subscription","commits_url":"https://api.github.com/repos/payara/Payara/commits{/sha}","git_commits_url":"https://api.github.com/repos/payara/Payara/git/commits{/sha}","comments_url":"https://api.github.com/repos/payara/Payara/comments{/number}","issue_comment_url":"https://api.github.com/repos/payara/Payara/issues/comments{/number}","contents_url":"https://api.github.com/repos/payara/Payara/contents/{+path}","compare_url":"https://api.github.com/repos/payara/Payara/compare/{base}...{head}","merges_url":"https://api.github.com/repos/payara/Payara/merges","archive_url":"https://api.github.com/repos/payara/Payara/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/payara/Payara/downloads","issues_url":"https://api.github.com/repos/payara/Payara/issues{/number}","pulls_url":"https://api.github.com/repos/payara/Payara/pulls{/number}","milestones_url":"https://api.github.com/repos/payara/Payara/milestones{/number}","notifications_url":"https://api.github.com/repos/payara/Payara/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/payara/Payara/labels{/name}","releases_url":"https://api.github.com/repos/payara/Payara/releases{/id}","created_at":"2014-09-11T18:32:40Z","updated_at":"2015-07-05T11:16:08Z","pushed_at":"2015-07-05T19:15:56Z","git_url":"git://github.com/payara/Payara.git","ssh_url":"git@github.com:payara/Payara.git","clone_url":"https://github.com/payara/Payara.git","svn_url":"https://github.com/payara/Payara","homepage":"http://www.payara.co","size":91255,"stargazers_count":78,"watchers_count":78,"language":"Java","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":31,"mirror_url":null,"open_issues_count":38,"forks":31,"open_issues":38,"watchers":78,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/payara/Payara/pulls/366"},"html":{"href":"https://github.com/payara/Payara/pull/366"},"issue":{"href":"https://api.github.com/repos/payara/Payara/issues/366"},"comments":{"href":"https://api.github.com/repos/payara/Payara/issues/366/comments"},"review_comments":{"href":"https://api.github.com/repos/payara/Payara/pulls/366/comments"},"review_comment":{"href":"https://api.github.com/repos/payara/Payara/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/payara/Payara/pulls/366/commits"},"statuses":{"href":"https://api.github.com/repos/payara/Payara/statuses/e5cb62485d82df60a685df0e510c3975e1d56a55"}}}}