Hi,
I have created sucessfully a data pool name="jdbc/mydb" and below is my
stateless ejb
@Stateless(name="myslsb")
@Local(ISessionLocal.class)
@Remote(ISessionRemote.class)
public class MySLSB implements ISessionLocal, ISessionRemote {
@Resource(name="jdbc/mydb")
private DataSource ds = null;
.........
}
my slsb ejb tried to get a datasource and pass it to another bean which can
execute a stored procedure. however, when I try to deploy it from eclipse, I
got the following error:
Unable to resolve resource reference 'jdbc/mydb' (Could not auto-map to
resource. Try adding a resource-ref mapping to your Geronimo deployment
plan.
1. I have tried all value for the name, including the global JNDI value but
all failed with the same error.
2. If I have to modify openejb-jar.xml, can someone give help on how to add
ref to datasource in the openejb-jar.xml
Thanks
-B
-----
B Amigo:super:
--
View this message in context:
http://www.nabble.com/How-to-Inject-Datasource-into-session-stateless-bean--tp21407678s134p21407678.html
Sent from the Apache Geronimo - Users mailing list archive at Nabble.com.