users@javaee-spec.java.net

[javaee-spec users] Question about ejb modules

From: John D. Ament <john.d.ament_at_gmail.com>
Date: Sat, 19 Oct 2013 10:54:45 -0400

Experts,

I ran into an interesting issue on GlassFish 4, which I hadn't seen
before in other application servers. It appears that if I want to
deploy an EAR, I cannot put CDI beans into a standalone module, expect
it to be scanned and added to the application.

Previously, I had used a trick by marking the module as an EJB module
it would scan for CDI beans and make them available within my EAR.
Now ignoring the CDI scoping issues at play, I am seeing an error come
back from GlassFish 4 stating that an EJB module must contain at least
one session bean/entity bean/MDB.

Is this expected? If so, which spec actually defines this behavior? I
was having a hard time finding it.

Thanks,

John