You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Falko Modler (JIRA)" <ji...@apache.org> on 2015/11/05 16:01:27 UTC

[jira] [Updated] (DELTASPIKE-1019) Enterprise container friendlier deltaspike-cdictrl-weld

     [ https://issues.apache.org/jira/browse/DELTASPIKE-1019?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Falko Modler updated DELTASPIKE-1019:
-------------------------------------
    Description: 
h5. Preface
Although {{deltaspike-cdictrl}} was designed for "SE setups", {{ContextControl}} can be used in an enterprise CDI container like WELD on JBoss/Wildfly just fine. {{CdiControl}} cannot be used.

h5. Problem
Even when you do not use {{CdiControl}}, enterprise WELD will at least log {{ClassNotFoundException}} regarding {{org.jboss.weld.environment.se.Weld}} when {{deltaspike-cdictrl-weld}} is deployed.
In WAR-deployments you might be able to exclude {{WeldContainerControl}} via {{beans.xml}} but with EAR-deployments you are out of luck.

h5. Solution

- *Either* exclude {{WeldContainerControl}} (is created via {{ServiceLoader}} anyway):
{code:xml|title=deltaspike-cdictrl-weld/META-INF/beans.xml}
<weld:exclude name="org.apache.deltaspike.cdise.weld.WeldContainerControl"/>
{code}
PS: Not sure whether {{@Typed()}} would work as well?
- *Or* provide a second assembly of {{deltaspike-cdictrl-weld}} with some classifer like "ctxctrl-only" which does not include the {{CdiControl}} stuff

I think the {{beans.xml}}-approach is the better solution.

h5. Workaround
Custom re-packing/shading of {{deltaspike-cdictrl-weld}} and possibly also {{deltaspike-cdictrl-api}}. Very cumbersome...

  was:
h5. Preface
Although {{deltaspike-cdictrl}} was designed for "SE setups", {{ContextControl}} can be used in an enterprise CDI container like WELD on JBoss/Wildfly just fine. {{CdiControl}} cannot be used.

h5. Problem
Even when you do not use {{CdiControl}}, enterprise WELD will at least log {{ClassNotFoundException}} regarding {{org.jboss.weld.environment.se.Weld}} when {{deltaspike-cdictrl-weld}} is deployed.
In WAR-deployments you might be able to exclude {{WeldContainerControl}} via {{beans.xml}} but with EAR-deployments you are out of luck.

h5. Solution

- *Either* exclude {{WeldContainerControl}} (is created via {{ServiceLoader}}):
{code:xml|title=deltaspike-cdictrl-weld/META-INF/beans.xml}
<weld:exclude name="org.apache.deltaspike.cdise.weld.WeldContainerControl"/>
{code}
PS: Not sure whether {{@Typed()}} would work as well?
- *Or* provide a second assembly of {{deltaspike-cdictrl-weld}} with some classifer like "ctxctrl-only" which does not include the {{CdiControl}} stuff

I think the {{beans.xml}}-approach is the better solution.

h5. Workaround
Custom re-packing/shading of {{deltaspike-cdictrl-weld}} and possibly also {{deltaspike-cdictrl-api}}. Very cumbersome...


> Enterprise container friendlier deltaspike-cdictrl-weld
> -------------------------------------------------------
>
>                 Key: DELTASPIKE-1019
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1019
>             Project: DeltaSpike
>          Issue Type: Improvement
>          Components: CdiControl
>    Affects Versions: 1.0.2
>            Reporter: Falko Modler
>            Priority: Minor
>
> h5. Preface
> Although {{deltaspike-cdictrl}} was designed for "SE setups", {{ContextControl}} can be used in an enterprise CDI container like WELD on JBoss/Wildfly just fine. {{CdiControl}} cannot be used.
> h5. Problem
> Even when you do not use {{CdiControl}}, enterprise WELD will at least log {{ClassNotFoundException}} regarding {{org.jboss.weld.environment.se.Weld}} when {{deltaspike-cdictrl-weld}} is deployed.
> In WAR-deployments you might be able to exclude {{WeldContainerControl}} via {{beans.xml}} but with EAR-deployments you are out of luck.
> h5. Solution
> - *Either* exclude {{WeldContainerControl}} (is created via {{ServiceLoader}} anyway):
> {code:xml|title=deltaspike-cdictrl-weld/META-INF/beans.xml}
> <weld:exclude name="org.apache.deltaspike.cdise.weld.WeldContainerControl"/>
> {code}
> PS: Not sure whether {{@Typed()}} would work as well?
> - *Or* provide a second assembly of {{deltaspike-cdictrl-weld}} with some classifer like "ctxctrl-only" which does not include the {{CdiControl}} stuff
> I think the {{beans.xml}}-approach is the better solution.
> h5. Workaround
> Custom re-packing/shading of {{deltaspike-cdictrl-weld}} and possibly also {{deltaspike-cdictrl-api}}. Very cumbersome...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)