Hi, I have been trying to inject a javax.sql.DataSource into a Seam bean as
@Name("test1")
@Scope(ScopeType.EVENT)
public class Consultar {
@Resource(mappedName="java:/jdbc/processosDS")
private DataSource ds;
public List consultar() {
Connection conn = null;
PreparedStatement ps = null;
ResultSet rs = null;
try {
conn = ds.getConnection(); // NullPointerException
But it doesn't inject, it throws a NPE
The web.xml is configured to support portlet bridge.
The conn-ds.xml is as
<datasources>
<no-tx-datasource>
<jndi-name>jdbc/processosDS</jndi-name>
JBoss EPP 5.1.0
Portlet Bridge 2.1.0