Menu

HA-JDBC and Glassfish

Help
Chris SOUV
2009-01-20
2012-09-28
  • Chris SOUV

    Chris SOUV - 2009-01-20

    Hi,
    I want to use HA-JDBC with Glassfish and derby. I use "XADataSource-based access" in connection pool:
    Datasource className : net.sf.hajdbc.sql.xa.XADataSource
    ResourceType : javax.sql.XADataSource

    The configuration file path "/path/to/glassfish/lib/ha-jdbc-cluster0.xml" was added to "ha-jdbc.configuration system property" and my connection Pool properties contains the property "Cluster=cluster0"

    I have a occured error in my logs when I want test my connection : "Failed to locate database cluster configuration file : /path/to/glassfish/lib/ha-jdbc-cluster0.xml"

    But the configuration file is present..

    Help ?

    ha-jdbc-cluster0.xml :

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE ha-jdbc PUBLIC "-//HA-JDBC//DTD HA-JDBC 2.0//EN" "http://ha-jdbc.sourceforge.net/dtd/ha-jdbc-2.0.dtd">
    <ha-jdbc>
    <sync id="full" class="net.sf.hajdbc.sync.FullSynchronizationStrategy">
    <property name="fetchSize">1000</property>
    <property name="maxBatchSize">100</property>
    </sync>
    <cluster balancer="load" dialect="net.sf.hajdbc.dialect.DerbyDialect" meta-data-cache="none" transaction-mode="parallel"
    min-threads="0" max-threads="100" max-idle="60" default-sync="full">
    <xa-datasource id="derby1" local="true" weight="1">
    <name>org.apache.derby.jdbc.ClientXADataSource</name>
    <property name="serverName">localhost</property>
    <property name="portNumber">1527</property>
    <property name="databaseName">DATABASE1</property>
    </xa-datasource>
    </cluster>
    </ha-jdbc>

     
    • Chris SOUV

      Chris SOUV - 2009-01-21

      oups...
      "file:///" protocol is my friend..

      Thanks

       

Log in to post a comment.