Main Introduction Architecture News Roadmap FAQ Downloads Contributors Mailing Lists Changelog Query Bug Database Enter a Bug CVS Wiki User's Guide Connecting with Windows XP Using MacOS X webdav_fs Commandline Client Administrator's Guide Installation Configuration Tomcat Bundle J2EE Integration Security Version Control Binding JAAS LoginModule Creating Users JCA Connector Programmer's Corner Getting Started using Eclipse Server JavaDoc WebDAV Client Javadoc |
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
> 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
> > 7. Get the latest version of the webdavclient from the CVS or get it from releases starting with 2.1beta1. 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. Copy build.properties.sample to build.properties 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". Create the connector and demo application and deploy it to JBoss using `ant clean deploy-jca-exmaple-jboss` 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 TestServlet.java in `webdavclient/connector/example/src/java/connector` and rebuild the connector Now invoke the example servlet `http://localhost:8080/connector-example` (replace host and port with the server JBoss is running on) If everything works ok you will see an output like this:
> >        Tx: org.jboss.tm.usertx.client.ServerVMClientUserTransaction@92af24
> >        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. 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