Hello,
I have installed the MySQL driver together with the resource adapter and my MYSQL database seems to be installed properly. When I try to access it through a JSP using JNDI as follows:
********************
String dbName = "java:comp/env/MySqlDS";
Connection con;
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup(dbName);
con = ds.getConnection();
********************
I get a "javax.naming.NameNotFoundException: MySqlDS not bound" error.
What am I getting wrong here?
Thanks in advance,
Balteo.
I sorted it! JBoss deploys databasources using the following jndi prefix: "java:/MySqlDS" for a DS named MySqlDS.
The "comp/env" part is not required.
Balteo