I don't think your problem is connection pool, but with JNDI. Do you notice the stack trace?
If you are not in an EJB within JBoss, you need to use an initial context factory. JBoss has a way of allowing you to use a properties file to specify the initial context properties, or you can pass them when creating the InitialContext. This is well documented.
I am using the following piece of code to connect. Try it out:
InitialContext ic = new InitialContext();
DataSource ds = (DataSource) ic.lookup("DB JNDI NAME");
con = ds.getConnection();