You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@cocoon.apache.org by bl...@apache.org on 2001/01/10 16:21:03 UTC

cvs commit: xml-cocoon/src/org/apache/cocoon/components/datasource J2eeDataSource.java

bloritsch    01/01/10 07:21:02

  Modified:    .        Tag: xml-cocoon2 build.xml
  Added:       src/org/apache/cocoon/components/datasource Tag: xml-cocoon2
                        J2eeDataSource.java
  Log:
  Add J2eeDataSource and conditional compilation for it.  In order to use this, you
  need BOTH javax.sql.DataSource AND javax.naming.Context in your classpath.
  This is usually supplied in a jar by J2EE vendors (IBM WebSphere calls ujc.jar).
  
  Revision  Changes    Path
  No                   revision
  
  
  No                   revision
  
  
  1.6.2.52  +14 -1     xml-cocoon/build.xml
  
  Index: build.xml
  ===================================================================
  RCS file: /home/cvs/xml-cocoon/build.xml,v
  retrieving revision 1.6.2.51
  retrieving revision 1.6.2.52
  diff -u -r1.6.2.51 -r1.6.2.52
  --- build.xml	2001/01/03 13:48:56	1.6.2.51
  +++ build.xml	2001/01/10 15:20:58	1.6.2.52
  @@ -192,6 +192,12 @@
           classname="javax.servlet.http.HttpServletRequestWrapper">
         <classpath refid="classpath"/>
       </available>
  +    <available property="jndi.present" classname="javax.naming.Context">
  +      <classpath refid="classpath"/>
  +    </available>
  +    <available property="datasource.present" classname="javax.sql.DataSource">
  +      <classpath refid="classpath"/>
  +    </available>
     </target>
   
     <!-- =================================================================== -->
  @@ -239,10 +245,16 @@
           filtering="on"/>
     </target>
   
  +  <target name="prepare-jndi" depends="prepare-datasource" if="jndi.present"/>
  +
  +  <target name="prepare-datasource" depends="prepare-src-main" if="datasource.present">
  +    <property name="j2ee.present" value="true"/>
  +  </target>
  +
     <!-- =================================================================== -->
     <!-- Prepares the source code                                            -->
     <!-- =================================================================== -->
  -  <target name="prepare-src" depends="prepare-src-22"/>
  +  <target name="prepare-src" depends="prepare-src-22,prepare-jndi"/>
   
     <!-- =================================================================== -->
     <!-- Compiles the source directory                                       -->
  @@ -274,6 +286,7 @@
         <exclude name="**/PNGEncoder*.java"    unless="png.present"/>
         <exclude name="**/JAI*.java"           unless="jai.present"/>
         <exclude name="**/HTMLGenerator.java"  unless="tidy.present"/>
  +      <exclude name="**/J2eeDataSource.java" unless="j2ee.present"/>
       </javac>
     </target>
   
  
  
  
  No                   revision
  
  
  No                   revision
  
  
  1.1.2.1   +70 -0     xml-cocoon/src/org/apache/cocoon/components/datasource/Attic/J2eeDataSource.java