Posts Tagged EJB 3

Pro EJB 3 – Java Persistence API for $10

Same rules as before, you can get this e-book from Apress’ daily deal site for $10 within the 24-hour period.

1590596455 Pro EJB 3

This is one of the few books recommended for SCBCD 5.0 exam.

Comments (1)

EJB Injection in JSF Managed Beans

While trying to create a simple prototype for an application which uses JSF, EJB 3 and JPA, I decided to implement the suggestions from the article: Using an EJB Session Bean as a Model Facade.

I was particularly interested in injecting my EJBs to my JSF Managed Beans (the article mentioned that it should be possible to do this kind of injection with JSF Managed Beans and Servlets).

public class CatalogServlet extends HttpServlet {

@EJB private CatalogFacade cf;

// some variables and methods
}

I tried using JBoss 4 since it already had lots of available documentation regarding EJB 3 only to find out that this feature is not yet supported.

I tried switching to JBoss 5 Beta 4 but the error was the same.

16:16:31,765 ERROR [JBossInjectionProvider] Injection failed on managed bean.
javax.naming.NameNotFoundException: “Name of your Managed Bean goes here” not bound

Hmm, I should probably try this with GlassFish one of these days.

Recommended books:

0131738860 1933988347 1847192602

Comments (3)