When injecting a datasource into a stateless sessionbean I get this deployment exception:
java.lang.RuntimeException: You did not specify a @Resource.mappedName() on javax.sql.DataSource com.headwall.ejb.MyStatelessBean.ds and there is no binding for that enc name in XML
Ok, what bindings where?
After migrating to EJB 3.0 I thought I did not need the ejb-jar.xml or the jboss.xml any more? Well I put them both back with resource-ref and resource-managers tag in place, still does not work.
Think I need some help, what is needed in order to get this annotation working:
@Stateless
public class MyStatelessBean implements MyStatelessLocal
{
@Resource(name="jdbc/MySqlDS") javax.sql.DataSource ds;
...
By the way the same datasource used by the entity-manager set up in the persistence.xml.