geronimo-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jacky Liu (JIRA)" <>
Subject [jira] [Commented] (GERONIMO-5288) Cannot use @EJB in java ee component(servlet, JSF) to inject ejb object
Date Fri, 13 May 2011 09:07:47 GMT


Jacky Liu commented on GERONIMO-5288:

I choose Geronimo samples "calculator" to demonstrate my ideas.

Firstly, in ..\calculator\calculator-ejb\src\main\java\org\apache\geronimo\samples\slsb\calculator\

import javax.ejb.Local;
import javax.ejb.Remote;

Secondly, add


to explicitly implicate EJB local business interface use CalcluatorLocal.class as an interface
and EJB remote business interface use CalculatorRemote.class as an interface.

Then with "import org.apache.geronimo.samples.slsb.calculator.CalculatorLocal;" in ..\calculator\calculator-war\src\main\java\org\apache\geronimo\samples\calculator\
, we CAN use @EJB to inject ejb object, that is, "private CalculatorLocal calc = null;" executes

With that, bug fixed.

BUT in Geronimo v2.1, EJB local business interface CAN BE FOUND without explicitly implication.
So there's still a problem here.

> Cannot use @EJB in java ee component(servlet, JSF) to inject ejb object
> -----------------------------------------------------------------------
>                 Key: GERONIMO-5288
>                 URL:
>             Project: Geronimo
>          Issue Type: Bug
>      Security Level: public(Regular issues) 
>          Components: Web Profile
>    Affects Versions: 3.0
>            Reporter: Forrest Xia
>            Assignee: Ivan
>             Fix For: 3.0
> I tried two new java ee 6 samples "jpa20demo-javaee6" and "ejbtimer-javaee6", they both
failed at injecting ejb object in JSF managed bean or servlet.

This message is automatically generated by JIRA.
For more information on JIRA, see:

View raw message