Do you need to make a
java file for your datasource or connection pool? Or do you just add the following lines in your fooBean.java code? Please do let me know.
Ronak
private Connection getConnection() throws EJBException
{
try
{
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("java:comp/env/jdbc/GangsterDB");
return ds.getConnection();
}
catch(Exception e)
{
throw new EJBException(e.getMessage());
}
}