users@glassfish.java.net

_at_Inject a stateless session bean

From: <glassfish_at_javadesktop.org>
Date: Fri, 23 Apr 2010 10:18:03 PDT

I have a local stateless session bean that I am attempting to @Inject into a Weld SessionScoped Managed Bean.

When I inject with @EJB, everything works fine. When I change from @EJB to @Inject I get an UnserializableDependencyException.

When I remove @Stateless from my bean and just make it a plain @Named bean, the inject occurs without the serialization error.

I want to use @Inject so I take advantage of the @Alternative functionality of Weld for testing purposed.

I have using Glassfish v3. If this a defect or am I missing something?
[Message sent by forum member 'choicegh']

http://forums.java.net/jive/thread.jspa?messageID=398705