The Jakarta Project The Jakarta Slide Project


User's Guide

Administrator's Guide

Programmer's Corner

Using Slide's WebDAV JCA Connector

Caution: This applies to Slide 2.x, x>0 only as the JCA connector is not part of the Slide 2.0 release.

Caution #2: This connector has been developed and tested with JBoss only. Using it with other J2EE servers most likely will need work.

What is Slide's WebDAV JCA Connector good for

Generally a connector complying to Sun's JCA specification is good for plugging enterprise information systems (EIS) into J2EE servers. Plugging means adding connections to them to the container's connection pooling facilities and include the EIS into the container's transaction management.

In the case of the WebDAV connector Slide is such an EIS. All this allows to upload/download/modify resources to Slide in the same transaction as e.g. EJB or JDBC stuff involving other datasources.

How to I set it up and deploy it
  1. Get the latest version of the webdavclient from the CVS or get it from releases starting with 2.1beta1.
  2. For every J2EE container extra deployment descriptors for connectors are need. Currently, this only provided for JBoss. Thus you will have to make sure you have at least JBoss 3.2.3 installed.
  3. Copy to in the webdavclient dir and modify it to let property jboss.deploy.dir point to the deployment dir of JBoss. E.g. mine is set to "E:/Programme/jboss-3.2.3/server/default/deploy".
  4. Create the connector and demo application and deploy it to JBoss using ant clean deploy-jca-exmaple-jboss
  5. To try the example assure a Slide server runs on your local machine listening to port 8888. If you want it to run somewhere else you will need to change in webdavclient/connector/example/src/java/connector and rebuild the connector
  6. Now invoke the example servlet http://localhost:8080/connector-example (replace host and port with the server JBoss is running on)
  7. If everything works ok you will see an output like this:
    Factory: org.apache.webdav.connector.WebDAVConnectionFactory@dcdffc
    Connection1: org.apache.webdav.connector.WebDAVConnection@1bdbf9d
    WR1: http://localhost:8888/slide/files
    WR2: http://localhost:8888/slide/files
    WR1 sees Content
    WR2 sees this before commit
    HTTP Status 404 - Not Found: No object found at /files/file1
    type Status report
    message Not Found: No object found at /files/file1
    description The requested resource (Not Found: No object found at /files/file1) 
    is not available.
    Apache Tomcat/5.0.16
    WR2 sees this after commit Content
    otherwise you will get nasty exceptions that you might want to post to the Slide user list.
  8. Have a look at the TestServlet in webdavclient/connector/example/src/java/connector. There you can see that JNDI lookups for a user transaction and for the webdav connection factory are done. Now a transaction is started and a webdav connection is created from the factory. Upon creation it will be enlistet in the transaction already started. The rest should be pretty obvious.

Copyright © 1999-2004, Apache Software Foundation