Bug 1085421 - Unable to create deployment unit via REST in Business-Central deployed on WebSphere
Summary: Unable to create deployment unit via REST in Business-Central deployed on Web...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: JBoss BRMS Platform 6
Classification: Retired
Component: Business Central
Version: 6.0.2
Hardware: Unspecified
OS: Unspecified
high
high
Target Milestone: ER1
: 6.0.2
Assignee: Maciej Swiderski
QA Contact: Radovan Synek
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-04-08 14:46 UTC by Radovan Synek
Modified: 2014-08-06 19:54 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-06 19:54:49 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
stacktrace (1.51 KB, text/plain)
2014-04-08 14:46 UTC, Radovan Synek
no flags Details

Description Radovan Synek 2014-04-08 14:46:57 UTC
Created attachment 884105 [details]
stacktrace

Description of problem:

deploying project via REST as follows
POST http://${host}:${port}/business-central/rest/deployment/org.jboss:integration:1.2.0-SNAPSHOT/deploy

fails with exception in server log javax.enterprise.context.ContextNotActiveException: WebBeans context with scope type annotation @ApplicationScoped does not exist within current thread (see a more detailed stacktrace in attachment)

Please note that the tested version is community kie-wb-6.1.0.SNAPSHOT.

Comment 1 Maciej Swiderski 2014-04-09 12:14:31 UTC
the main issue is actually CDI implementation in WebSphere that does not work well with background threads, even though the CDI beans are application scoped.
By default deployment requests in REST are processed asynchronously by utilizing internal thread pool to make the processing more efficient in case of larger deployments. Due to the CDI issues on WebSphere deployments in REST have been enhanced to be configurable in terms of what mode does it run with:
- async - default
- sync - must be explicitly enabled by disabling async with system property 
        -Dkie.services.rest.deploy.async=false

that is considered a limitation on WAS until CDI issues will be resolved or enhanced background processing will be introduced on our side like background operations performed by WorkManager (JEE spec).

droolsjbpm-integration
master:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/7ae55443cd284fea1102fc7ef29baa928e692110

6.0.x:
https://github.com/droolsjbpm/droolsjbpm-integration/commit/717230f47978713f6c9bd8eb8e52a1fb7a6ea666

kie-wb-distributions
master:
https://github.com/droolsjbpm/kie-wb-distributions/commit/55a67f0431ad1479a60b18fc75e81cd4f3c3d30d

6.0.x:
https://github.com/droolsjbpm/kie-wb-distributions/commit/a81bdaeda577ce93e28fb8841690a837071b70a4

Comment 2 Radovan Synek 2014-05-22 08:30:19 UTC
Verified with BPMS-6.0.2.ER2


Note You need to log in before you can comment on or make changes to this bug.