[jboss-user] [Beginners Corner] - Re: Php on JBoss?

PeterJ do-not-reply at jboss.com
Fri Aug 14 13:17:51 EDT 2009


I have not tried Quercus under JBoss Web. However, I am currently using Quercus under the server/web configuration of AS 5.1.0 (the web config is basically JBoss Web plus connector support).  I did run into one issue. I had this in my *-ds.xml file:

<use-java-context>false</use-java-context>

This caused an error due to a missing dependency:

** NOT FOUND Depends on 'jboss:service=invoker,type=jrmp' **

I had to remove that line from my *-ds.xml file and then add a resource-ref to my web-xml and add in a jboss-web.xml file to get the datasource to be looked up in the ENC.

mysql-ds.xml
<datasources>
  |   <local-tx-datasource>
  |     <jndi-name>jdbc/NorthwindDS</jndi-name>
  |     <connection-url>jdbc:mysql://localhost:3306/northwind</connection-url>
  |     <driver-class>com.mysql.jdbc.Driver</driver-class>
  |     <user-name>northwind</user-name>
  |     <password>xxxxx</password>
  |     <transaction-isolation>TRANSACTION_READ_COMMITTED</transaction-isolation>
  |     <min-pool-size>5</min-pool-size>
  |     <max-pool-size>20</max-pool-size>
  |     <idle-timeout-minutes>15</idle-timeout-minutes>
  |     <metadata>
  |       <type-mapping>mySQL</type-mapping>
  |     </metadata>
  |   </local-tx-datasource>
  | </datasources>

web.xml
<?xml version="1.0" encoding="utf-8"?>
  | <web-app 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"
  |   version="2.5"
  | >
  |   <description>Caucho Technology's PHP Implementation</description>
  |   <servlet>
  |     <servlet-name>Quercus Servlet</servlet-name>
  |     <servlet-class>com.caucho.quercus.servlet.QuercusServlet</servlet-class>
  |     <init-param>
  |       <param-name>database</param-name>
  |       <param-value>jdbc/NorthwindDS</param-value>
  |     </init-param>
  |   </servlet>
  |   <servlet-mapping>
  |     <servlet-name>Quercus Servlet</servlet-name>
  |     <url-pattern>/index.php/*</url-pattern>
  |   </servlet-mapping>
  |   <welcome-file-list>
  |     <welcome-file>index.php</welcome-file>
  |   </welcome-file-list>
  |   <resource-ref>
  |     <res-ref-name>jdbc/NorthwindDS</res-ref-name>
  |     <res-type>javax.sql.DataSource</res-type>
  |     <res-auth>Container</res-auth>
  |     <res-sharing-scope>Shareable</res-sharing-scope>
  |   </resource-ref>
  | </web-app>

jboss-web.xml
<!DOCTYPE jboss-web PUBLIC "-//JBoss//DTD Web Application 2.4//EN" "http://www.jboss.org/j2ee/dtd/jboss-web_4_0.dtd">
  | <jboss-web>
  |   <resource-ref>
  |     <res-ref-name>jdbc/NorthwindDS</res-ref-name>
  |     <jndi-name>java:jdbc/NorthwindDS</jndi-name>
  |   </resource-ref>
  | </jboss-web>

View the original post : http://www.jboss.org/index.html?module=bb&op=viewtopic&p=4249704#4249704

Reply to the post : http://www.jboss.org/index.html?module=bb&op=posting&mode=reply&p=4249704



More information about the jboss-user mailing list