You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@deltaspike.apache.org by "Mark Struberg (JIRA)" <ji...@apache.org> on 2017/03/31 14:32:41 UTC

[jira] [Commented] (DELTASPIKE-1228) ContextControl does not work in Websphere AS

    [ https://issues.apache.org/jira/browse/DELTASPIKE-1228?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15951015#comment-15951015 ] 

Mark Struberg commented on DELTASPIKE-1228:
-------------------------------------------

You have to use @RequestScoped to work in a portable way.

Btw, starting new threads can be done by having a wrapper EJB with an @Asynchronous methods which takes a Callable.
Don't forget to increment the pool size. It's only set to 5 by default I think.

Otherwise there is not much we can do for you in DeltaSpike I fear -> closing.

> ContextControl does not work in Websphere AS
> --------------------------------------------
>
>                 Key: DELTASPIKE-1228
>                 URL: https://issues.apache.org/jira/browse/DELTASPIKE-1228
>             Project: DeltaSpike
>          Issue Type: Bug
>    Affects Versions: 1.7.1
>         Environment: Websphere 8.5.5.9
>            Reporter: Matthias Wronka
>            Assignee: Mark Struberg
>
> I´m getting an Exception in Websphere Application Server 8.5.5.9 when I try to start the SessionScope like this using ContextControl:
> {code:java}
> @Stateless
> @RunAs("scheduled")
> public class ScheduledService {
>     @Inject
>     private DemoConfiguration config; // contains SessionScoped references
>     @Inject
>     private ContextControl contextControl;
>     @Schedule(hour = "*", minute = "*")
>     private void doSth() {
>         contextControl.startContext(SessionScoped.class);
>         // ... use injected config-reference from above
>         contextControl.stopContext(SessionScoped.class);
>     }
> }
> {code}
> The exception is:
> {code}
> java.lang.NoClassDefFoundError: org/apache/webbeans/config/WebBeansContext at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.getContextsService(OpenWebBeansContextControl.java:242) at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.startSessionScope(OpenWebBeansContextControl.java:154) at org.apache.deltaspike.cdise.owb.OpenWebBeansContextControl.startContext(OpenWebBeansContextControl.java:80) 
> {code}
> I think this is because of a rather old owb-implementations, that Websphere uses. I found the missing class in another package: org/apache/webbeans/*context*/WebBeansContext.



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)