2016-03-03 21:44 GMT+01:00 Karl Kildén <[email protected]>:

> I did not. Sorry I will take notes of this and run it tomorrow and also
> look at your test class, thanks for pushing it! Maybe I can add a few tests
> if you did not cover the whole class.
>
>
> mvn clean install -pl tck/cdi-embedded && cd tck/cdi-embedded
>
> I understand the first part of course the install, then I cd into that
> directory and do what?
>
>
mvn clean install ;)

idea is:

0. upgrade OWB in root pom.xml (there is a property)

1. ensure you have all deps locally:

mvn clean install -pl tck/cdi-embedded -am -DskipTests

2. go in tck module and run it

mvn clean install

Side note: you can do the same with tck/cdi-tomee but it is longer so I
tend to check cdi-embedded and let buildbot (our CI) check cdi-tomee


> Then I can upgrade my local tomee root pom with the new owb version I now
> installed locally and run mvn clean install
>
> Thanks for teaching me these
>
> cheers
>
> On 3 March 2016 at 13:35, Romain Manni-Bucau (JIRA) <[email protected]>
> wrote:
>
> >
> >     [
> >
> https://issues.apache.org/jira/browse/OWB-1124?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15177754#comment-15177754
> > ]
> >
> > Romain Manni-Bucau commented on OWB-1124:
> > -----------------------------------------
> >
> > [~karlkilden] pushed a test. Did you test OWB snapshot with tomee cdi
> > tcks? (mvn clean install -pl tck/cdi-embedded && cd  tck/cdi-embedded &&
> > mvn clean install from tomee trunk once openwebbeans version property
> > upgraded to the snapshot in root pom).
> >
> > > Lazy start on SessionContext NPE on no active RequestContext
> > > ------------------------------------------------------------
> > >
> > >                 Key: OWB-1124
> > >                 URL: https://issues.apache.org/jira/browse/OWB-1124
> > >             Project: OpenWebBeans
> > >          Issue Type: Bug
> > >         Environment: TomEE 7.0M1
> > >            Reporter: Karl Kildén
> > >            Assignee: Romain Manni-Bucau
> > >         Attachments: changes.diff
> > >
> > >
> > > I upgraded to TomEE 7-M1 and I have a problem with checking for active
> > contexts. Now this behavior:
> > >         ServletRequestContext requestContext = getRequestContext(true);
> > >         if (requestContext == null)
> > >         {
> > >             logger.log(Level.WARNING, "Could NOT lazily initialize
> > session context because NO active request context");
> > >         }
> > > Only logs it and goes ahead and breaks on NPE on line 815 but before it
> > simply never executed any code if requestContext was null.
> > > This is the code in my application that actually uses Deltaspike now
> for
> > checking:
> > >       private boolean isActive(Class<? extends Annotation> scope) {
> > >               return ContextUtils.isContextActive(scope);
> > >       }
> > > Full stacktrace
> > >             at
> >
> org.apache.webbeans.web.context.WebContextsService.lazyStartSessionContext(WebContextsService.java:815)
> > >             at
> >
> org.apache.webbeans.web.context.WebContextsService.getSessionContext(WebContextsService.java:739)
> > >             at
> >
> org.apache.webbeans.web.context.WebContextsService.getCurrentContext(WebContextsService.java:277)
> > >             at
> >
> org.apache.webbeans.container.BeanManagerImpl.getContext(BeanManagerImpl.java:287)
> > >             at
> >
> org.apache.webbeans.container.InjectableBeanManager.getContext(InjectableBeanManager.java:129)
> > >             at
> >
> org.apache.deltaspike.core.util.ContextUtils.isContextActive(ContextUtils.java:60)
> > >             at
> >
> org.apache.deltaspike.core.util.ContextUtils.isContextActive(ContextUtils.java:46)
> > >             at
> com.company.ContextLookup.isActive(ContextLookup.java:23)
> > > My actual use case is that I tag all my entities if I can find out who
> > changed it but in this case it was a background thread.
> >
> >
> >
> > --
> > This message was sent by Atlassian JIRA
> > (v6.3.4#6332)
> >
>

Reply via email to