The SQL processor supports MySQL. OXF uses regular JDBC datasources, which you must configure in you web.xml and your application server. There are examples in the installation instructions:
http://www.orbeon.com/oxf/doc/intro-install
For Oracle / Tomcat, for example, you might have something like this in your context in server.xml:
<Resource name="jdbc/my-datasource" auth="Container" type="javax.sql.DataSource"/>
<ResourceParams name="jdbc/my-datasource">
<parameter>
<name>username</name>
<value>my-username</value>
</parameter>
<parameter>
<name>password</name>
<value>my-password</value>
</parameter>
<parameter>
<name>driverClassName</name>
<value>oracle.jdbc.driver.OracleDriver</value>
</parameter>
<parameter>
<name>url</name>
<value>jdbc:oracle:thin:@localhost:1521:my-database-id</value>
</parameter>
</ResourceParams>An in your web.xml:
<resource-ref>
<description>DataSource</description>
<res-ref-name>jdbc/my-datasource</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>You will also need to have your driver jar accessible by the application server. With Tomcat, you can put it under the common/lib directory.
In the SQL processor, you simply refer to your datasource name, for example:
<sql:connection>
<sql:datasource>forecast</sql:datasource>
...I hope this helps,
-Erik
Dung wrote:
> Hi, > > Has anybody tried to use a MySQL DB with OXF. > I'm familiar with Cocoon 2, where it was quite easy to connect to MySQL > or Oracle, but there is no documentation for OXF about this point. > Thanks a lot for any clue ! > > I just wanted to say that it's a great job, I'm very excited to > discover OXF possibilities !
_______________________________________________ oxf-users mailing list [EMAIL PROTECTED] http://mail.orbeon.com/mailman/listinfo/oxf-users
