tomee-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Lars Knemeyer <lars.kneme...@gmail.com>
Subject CDI not working inside EAR with Atmosphere (BeanManager)
Date Tue, 22 Apr 2014 10:47:29 GMT
Hi,

I am currently migrating my application from javax.websocket API to the
Atmosphere framework.
Sadly this migration is now stuck because CDI is not working inside my
Atmosphere service.
At first I thought it was an Atmosphere-specific problem so I filed an issue
on the Atmosphere issue tracker:
https://github.com/Atmosphere/atmosphere/issues/1559
There the problem is described in detail and a sample project is provided.
Short story: CDI works with Atmosphere only if the application is deployed
as a WAR but not inside an EAR.

There more I dig into this issue myself, the more I believe it might not be
specifically related to Atmosphere but might be a problem with TomEE and
classloading inside EAR. (as I wrote in the github issue, the sample works
fine in WildFly 8.0.0.Final)
I also tested TomEE 1.6.0.1 and today's TomEE 1.6.1-SNAPSHOT, there the
problem also exists.

The Atmosphere code that fails to inject the beans can be found here:
https://github.com/Atmosphere/atmosphere-extensions/blob/master/cdi/modules/src/main/java/org/atmosphere/cdi/CDIObjectFactory.java
bm.getBeans() does not return any results when looking for the beans that
should be injected.

It would be great if anyone could look into this issue. Thanks in advance!

Best regards
Lars





--
View this message in context: http://openejb.979440.n4.nabble.com/CDI-not-working-inside-EAR-with-Atmosphere-BeanManager-tp4668939.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Mime
View raw message