tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Paul Carter-Brown <paul.carter-br...@smilecoms.com>
Subject Servlet & CDI Context Propogation
Date Sat, 09 Sep 2017 13:40:41 GMT
Hi,

I have an issue where a servlet Injects a singleton that in turn injects a
ManagedThreadFactory.

The servlet then uses the singleton that then uses the thread factory to
create a ScheduledThreadPoolExecutor.

When the ScheduledThreadPoolExecutor is used, the threads don't seem to be
able to look up things in JNDI such as java:comp/BeanManager. The code gets
a NamingException that it cannot find comp.

Attached is a test maven project that shows the error. Any idea why this is
happening. I need to be able to create an executor that has the proper app
server context.

Using TomEE 7.0.3


Paul

-- 


This email is subject to the disclaimer of Smile Communications at http://www.smilecoms.com/home/email-disclaimer/
<http://www.smilecoms.com/disclaimer>


Mime
View raw message