I have run into a few issues with Sybase and OJB and have managed to
overcome most of them. Her is the connection descriptor that I am using
(with all of the proprietary stuff changed to protect my job ;-> ).  

    <jdbc-connection-descriptor
                platform="Sybase"
                jdbc-level="1.0"
        driver="com.sybase.jdbc2.jdbc.SybDriver"
                protocol="jdbc"
                subprotocol="sybase:Tds"
                dbalias="myServerName:4111/myDBName"
                username="myDBUserName"
                password="myDBPassword"
   />   

In terms of other issues:

The connection descriptor has been the biggest pain in the butt with respect
to OJB because the way in which the the
AbstractConnectionFactory/ConnectionFactoryDefaultImpl implement the passing
of properties to the driver....quite simply they really don't implement the
passing of properties to the driver except for user name and password.

For example, I ran into a problem where our DB was using different character
sets so the driver needed those properties set but the OJB configuration
files didn't allow for this by default.  I fixed it by patching the
AbstractConnectionFactory (I am using PB), BUT THIS IS THE WRONG WAY TO DO
IT. I have since done a little more digging in the OJB.properties and found
that you can change the connection factory class used, so what I should have
done was create a SybaseConnectionFactory (inherited from the
ConnectionFactoryDefaultImpl) and fixed my problem there (and then included
that class in the OJB.properties).

Hope this helps,

Tim

-----Original Message-----
From: Gerardo Arroyo [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, September 25, 2002 8:07 PM
To: [EMAIL PROTECTED]
Subject: OJB 0.9.5 and Sybase 11.9.2


Hi,

does anybody has experience using OJB and Sybase 11.9 -with JConnect- ?
I believe that I had problems with the repository.xml, specifically with the
<jdbc-connection-descriptor> using JDBC.

I had a lot of exceptions about "Could not borrow connection from pool".

Any idea or hint??

Thanks in advance!


============================================================================
===========
[org.apache.ojb.broker.util.sequence.SequenceManagerFactory] INFO: Use
sequence manager class: class
org.apache.ojb.broker.util.sequence.SequenceManagerHiLoImpl
Sybase
com.sybase.jdbc2.jdbc.SybDriver
jdbc
sybase
Tds:PATOLUCAS:5000/automotive
sa
[org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory] INFO:
# Create connection pool for JdbcDescriptorKey -1713603576 #
[org.apache.ojb.broker.accesslayer.AbstractConnectionFactory] INFO: #
Already created connections: 1 returning :
com.sybase.jdbc2.jdbc.SybConnection@34a7d8
[org.apache.ojb.broker.accesslayer.ConnectionManager] ERROR: Can't get
connection
Could not borrow connection from pool -
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor:
JdbcConnectionDescriptor
Sybase
com.sybase.jdbc2.jdbc.SybDriver
jdbc
sybase
Tds:PATOLUCAS:5000/automotive
sa
org.apache.ojb.broker.accesslayer.LookupException: Could not borrow
connection from pool -
org.apache.ojb.broker.metadata.JdbcConnectionDescriptor:
JdbcConnectionDescriptor
Sybase
com.sybase.jdbc2.jdbc.SybDriver
jdbc
sybase
Tds:PATOLUCAS:5000/automotive
sa
        at
org.apache.ojb.broker.accesslayer.AbstractPoolableConnectionFactory.lookupCo
nnection(Unknown Source)
        at
org.apache.ojb.broker.accesslayer.ConnectionManager.getConnection(Unknown
Source)
        at
org.apache.ojb.broker.accesslayer.ConnectionManager.localBegin(Unknown
Source)
        at
org.apache.ojb.broker.singlevm.PersistenceBrokerImpl.beginTransaction(Unknow
n Source)
        at com.automotive.pruebaSybase.insert(pruebaSybase.java:49)


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>


<font face="Times New Roman" size="3">
<p>------------------------------------------------------------------------------</p>
<p> This e-mail may be privileged and/or confidential, and the sender does not waive 
any related rights and obligations. Any distribution, use or copying of this e-mail or 
the information it contains by other than an intended recipient is unauthorized. If 
you received this e-mail in error, please advise me (by return e-mail or otherwise) 
immediately.</p>
<p> Ce courriel est confidentiel et prot�g�. L'exp�diteur ne renonce pas aux droits et 
obligations qui s'y rapportent. Toute diffusion, utilisation ou copie de ce message ou 
des renseignements qu'il contient par une personne autre que le (les) destinataire(s) 
d�sign�(s) est interdite. Si vous recevez ce courriel par erreur, veuillez m'en aviser 
imm�diatement, par retour de courriel ou par un autre moyen.</p>
<p>====================================================</p>
</font>

Reply via email to