Hi,
I'm testing a few scenarios using the concurrentutils and TomEE.
I was wondering if this would work (not working now)
Singleton
// Injecting runnable instance
@Inject
Instance<DeltaCustomerRetriever> myRetrieverInstance;
.
.
ArrayList<Callable<DeltaCustomer>> retrieverTasks = new ArrayList<>();
DeltaCustomerRetriever myRetriever = myRetrieverInstance.get();
myRetriever.setCustomer(c);
retrieverTasks.add(myRetriever);
ses.invokeAll(retrieverTasks);
And my Callable:
call()
p.put("java.naming.factory.initial",
"org.apache.openejb.core.LocalInitialContextFactory");
final EJBContext ejbContext;
final InitialContext ctx = new InitialContext(p);
ejbContext = (EJBContext) ctx.lookup("java:comp/EJBContext");
LOG.info(ejbContext.getCallerPrincipal().toString());
this results in NPE
Would it be possible to use @resource sessioncontext? (not sure about the
spec here)
br hw
--
View this message in context:
http://tomee-openejb.979440.n4.nabble.com/TomEE-Managedexecutorservice-and-context-lookup-tp4670305.html
Sent from the TomEE Users mailing list archive at Nabble.com.