|
From: <php...@li...> - 2009-01-22 17:55:04
|
Hi,
> This example is in Java. So I assume that I must create the
> connection in Java, and then call this script from PHP?
Just take the java code and replace all "·" with "->", "new xxx" with new java("xxx") and xxx.FOO with java("xxx")->foo to create the PHP code. Please note that the driver must be in the bootstrap classpath, see our FAQ for details. Or deploy the driver via the Bea-/Oracle-/Sun- application server deploy tool.
> In this example, would I first need to setup and code an
> EJB in Java that creates the database connection?
Yes. Although it is possible to use a pooled resource directly from the servlet, you may need o/r mapping, anyway.
You can find several Java examples which show how to fetch a JNDI resource.
Regards,
Jost Bökemeier
|