Have you specified "resource-ref" in web & sun-web.xml ?
eg:
web.xml
<resource-ref>
<res-ref-name>jdbc/omar-registry</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
sun-web.xml
<resource-ref>
<res-ref-name>jdbc/omar-registry</res-ref-name>
<jndi-name>ACTUAL_JDBC_RESOURCE_NAME</jndi-name>
</resource-ref>
Now you can do lookup as:
initialContext.lookup("java:comp/env/jdbc/omar-registry");
Thanks,
-Jagadish
On Tue, 2007-10-23 at 16:26 +0300, Saloustros Georgios wrote:
> Hello.
> Has anyone tried to deploy freebxml(omar.war) to glassfish? I am using
> postgres 8.2 ,I have set a jdbc connection pool using the admin gui ,
> I can ping the database but when I restart glassfish I get a " Unable
> to get JNDI context for dataSource
> java:comp/env/jdbc/omar-registry." .Is there any changes I should do
> in the omar.war?
> Is there any script tha deploys it automatically?
> Thanx,
> GS