I've created some JDBC resources and Custom resources in GlassFish. I named JDBC resource jdbc/mydb and the Custom resource service/test.
The JDBC connection is lookedup with the call ic.lookup("java:comp/env/jdbc/mydb"). It can also be found with ic.lookup("jdbc/mydb"), which has some disadvantages, see answer of Robin below.
But my custom resource has to be lookedup with ic.lookup("service/test"). The line does not work. Is it possible, and if yes: how?ic.lookup("java:comp/env/service/test")