this is what I use and works with no problem.


k.

        <data-source
                class="com.evermind.sql.DriverManagerDataSource"
                name="Informix"
                location="jdbc/InformixCoreDS"
                xa-location="jdbc/xa/InformixXADS"
                ejb-location="jdbc/InformixDS"
                connection-driver="com.informix.jdbc.IfxDriver"
                username="myid"
                password="mypassword"
                
url="jdbc:informix-sqli://xxxxx:xxxx:informixserver=xxxx;Database=xxxxx"
                schema="database-schemas/informix.xml"
                inactivity-timeout="30"



also this is my informix.xml:


<?xml version="1.0"?>
<!DOCTYPE database-schema PUBLIC "-//Evermind//- Database schema"
"http://www.orionserver.com/dtds/database-schemas.dtd">

<database-schema name="informix-sqli" not-null="not null" null=""
primary-key="primary key">
        <type-mapping type="java.lang.String" name="varchar (50)" />
        <type-mapping type="int" name="int" />
        <type-mapping type="long" name="int" />
        <type-mapping type="float" name="float" />
        <type-mapping type="double" name="double" />
        <type-mapping type="byte" name="byte" />
        <type-mapping type="char" name="char" />
        <type-mapping type="short" name="short" />
        <type-mapping type="boolean" name="boolean" />
        <type-mapping type="java.util.Date" name="datetime year to fraction(5)" />
        <disallowed-field name="username" />
        <disallowed-field name="order" />
</database-schema>









-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]]On Behalf Of Josh Lisle
Sent: Monday, April 16, 2001 1:33 PM
To: Orion-Interest
Subject: datasource configuration


Howdy All.

I'm running Orion 1.3.8 on Linux with an Informix database.  I'm getting
strange database errors such as:

                com.evermind.server.rmi.OrionRemoteException:
                    Database error:  Column size too large.

Informix limits column names to 18 characters and I'm below that limit.

I've also been getting an error saying that a database file is locked.
No-one else is in my database, so I believe that I'm trying to access
the same table in sequential finder method calls that are too close
together, time-wise.

So, I suspect that my problems lie with database connections.

How do I determine if my data-source is capable of pooling connections?

My data-sources.xml looks like this:

<data-source
  name="K2 data source"
  class="com.evermind.sql.ConnectionDataSource"
  location="jdbc/DefaultDS"
  pooled-location="jdbc/DefaultPooledDS"
  xa-location="jdbc/xa/DefaultXADS"
  ejb-location="jdbc/DefaultEJBDS"
  schema="/usr/local/orion-1.3.8/config/database-schemas/informix.xml"
  url="jdbc:informix-sqli://xxx:xxx/xxx:informixserver=xxx"
  connection-driver="com.informix.jdbc.IfxDriver"
  username = xxx
  password = xxx
/>

Are there better driver managers to use instead of ConnectionDataSource?

I did some jndi lookups and got the following info:

When I do:
    Object pooledDs = namingContext("jdbc/DefaultPooledDS");
    System.out.println(pooledDs);
I get:
    jdbc/DefaultPooledDS

When I do:
    Object xaDs = namingContext("jdbc/xa/DefaultXADS");
    System.out.println(xaDs);
I get:
    XA Orion Pooled jdbc:informix-sqli://xxx:xxx/xxx:informixserver=xxx

When I do:
    Object ejbDs = namingContext("jdbc/DefaultEJBDS");
    System.out.println(ejbDs);
I get:
    jdbc/DefaultEJBDS

When I do:
    Object defaultDs = namingContext("jdbc/DefaultDS");
    System.out.println(defaultDs);
I get:
    jdbc:informix-sqli://xxx:xxx/xxx:informixserver=xxx

Are these 4 names all bound to the same driver? (Ifxjdbc.jar)

Thanks.

Josh Lisle
[EMAIL PROTECTED]









Reply via email to