users@glassfish.java.net

Re: GlassFish with Quercus PHP fails JNDI Lookup of a JDBC Pool?

From: <glassfish_at_javadesktop.org>
Date: Wed, 19 Nov 2008 15:37:43 PST

It appears to be working with the web.xml & sun-web.xml file as follows. Thanks to all who responded.

Adam

[b]web.xml[/b]
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
&nbsp;&nbsp;<servlet>
&nbsp;&nbsp&nbsp;&nbsp;<description>Caucho Quercus PHP5 Engine 3.1.6</description>
&nbsp;&nbsp&nbsp;&nbsp;<servlet-name>Quercus Servlet</servlet-name>
&nbsp;&nbsp&nbsp;&nbsp;<servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
&nbsp;&nbsp&nbsp;&nbsp;<init-param>
&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp;<param-name>database</param-name>
&nbsp;&nbsp&nbsp;&nbsp&nbsp;&nbsp;<param-value>jdbc/myDatabase</param-value>
&nbsp;&nbsp&nbsp;&nbsp;</init-param>
&nbsp;&nbsp;</servlet>
&nbsp;&nbsp;<servlet-mapping>
&nbsp;&nbsp;&nbsp;&nbsp;<servlet-name>Quercus Servlet</servlet-name>
&nbsp;&nbsp;&nbsp;&nbsp;<url-pattern>*.php</url-pattern>
&nbsp;&nbsp;</servlet-mapping>

&nbsp;&nbsp;<resource-ref>
&nbsp;&nbsp;&nbsp;&nbsp;<description>MySQL JDBC DataSource </description>
&nbsp;&nbsp;&nbsp;&nbsp;<res-ref-name>jdbc/myDatabase</res-ref-name>
&nbsp;&nbsp;&nbsp;&nbsp;<res-type>javax.sql.DataSource</res-type>
&nbsp;&nbsp;&nbsp;&nbsp;<res-auth>Container</res-auth>
&nbsp;&nbsp;&nbsp;&nbsp;<res-sharing-scope>Shareable</res-sharing-scope>
&nbsp;&nbsp;</resource-ref>
</web-app>

[b]sun-web.xml[/b]
<sun-web-app error-url="">
&nbsp;&nbsp;<resource-ref>
&nbsp;&nbsp;&nbsp;&nbsp;<res-ref-name>jdbc/myDatabase</res-ref-name>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<jndi-name>jdbc/myDatabase</jndi-name>
&nbsp;&nbsp;&nbsp;&nbsp;</resource-ref>
</sun-web-app>
[Message sent by forum member 'acehlis' (acehlis)]

http://forums.java.net/jive/thread.jspa?messageID=317730