Re: Data source for Sybase with Jconnect 5.2
Thanks Ray, Juan, Michael I've got it working. The trick to use rught core class for pooled connection which, thanks to you guys, happen to be com.evermind.sql.ConnectionDataSource Thanks again ~boris Ray Harrison wrote: Boris - Here is an example of a Sybase datasource - we use only the ejb-location but you may be able to find others who use the pooled-location by searching through the mailing list. Cheers Ray data-source name=MyDataSource class=com.evermind.sql.ConnectionDataSource location=jdbc/DefaultDS pooled-location=jdbc/DefaultPooledDS xa-location=jdbc/xa/DefaultXADS ejb-location=jdbc/DefaultEJBDS url=jdbc:sybase:Tds:hostname:8000/mydbname connection-driver=com.sybase.jdbc2.jdbc.SybDriver username=user password=pwd schema=database-schemas/sybase.xml max-connections=4 inactivity-timeout=3600 /data-source --- Boris Erukhimov [EMAIL PROTECTED] wrote: I'm trying to ask it second time. Does anyone use Jconnect 5.2 ? If so could you please share your data-source.xml and access code. I'm particularly interested to see how pooled-location works, not ejb-location. Thanks ~boris __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
Re: Data source for Sybase with Jconnect 5.2
Boris - Here is an example of a Sybase datasource - we use only the ejb-location but you may be able to find others who use the pooled-location by searching through the mailing list. Cheers Ray data-source name=MyDataSource class=com.evermind.sql.ConnectionDataSource location=jdbc/DefaultDS pooled-location=jdbc/DefaultPooledDS xa-location=jdbc/xa/DefaultXADS ejb-location=jdbc/DefaultEJBDS url=jdbc:sybase:Tds:hostname:8000/mydbname connection-driver=com.sybase.jdbc2.jdbc.SybDriver username=user password=pwd schema=database-schemas/sybase.xml max-connections=4 inactivity-timeout=3600 /data-source --- Boris Erukhimov [EMAIL PROTECTED] wrote: I'm trying to ask it second time. Does anyone use Jconnect 5.2 ? If so could you please share your data-source.xml and access code. I'm particularly interested to see how pooled-location works, not ejb-location. Thanks ~boris __ Do You Yahoo!? Get personalized email addresses from Yahoo! Mail http://personal.mail.yahoo.com/
RE: Data source for Sybase with Jconnect 5.2
datasource: data-source class=com.evermind.sql.ConnectionDataSource name=Sybase location=jdbc/SybaseCoreDS xa-location=jdbc/xa/SybaseXADS ejb-location=jdbc/SybaseDS pooled-location=jdbc/SybasePDS connection-driver=com.sybase.jdbc2.jdbc.SybDriver schema=c:\orion\config\database-schemas\sybase.xml username=username password=password url=jdbc:sybase:Tds:Host:Port/Database min-connections=5 max-connections=10 max-connect-attempts=2 inactivity-timeout=30 wait-timeout=0 connection-retry-interval=3 / sample of use: java.sql.Connection conn=null; try { javax.naming.Context ic = new javax.naming.InitialContext(); javax.sql.DataSource ds = (javax.sql.DataSource) ic.lookup(java:comp/env/jdbc/SybasePDS); //acquire conn if (conn==null) conn = ds.getConnection(); ... //use connection ... } catch (Exception e) { //handle error ... } finally { //close conn if (conn!=null) conn.close(); conn = null; } The try-catch-finally is there to ensure errors don't leave connections hanging loose(they would not be returned to the pool, but finally fail due to timeout) HTH JP -Original Message- From: Boris Erukhimov [mailto:[EMAIL PROTECTED]] Sent: MiƩrcoles, 04 de Julio de 2001 3:51 To: Orion-Interest Subject: Data source for Sybase with Jconnect 5.2 I'm trying to ask it second time. Does anyone use Jconnect 5.2 ? If so could you please share your data-source.xml and access code. I'm particularly interested to see how pooled-location works, not ejb-location. Thanks ~boris
Re: Data source for Sybase with Jconnect 5.2
Hi, I use JConnect 5.2. My setup's pretty simple, I have this in my data-sources.xml: data-source class=com.evermind.sql.DriverManagerDataSource name=Sybase Adaptive Server on Luge location=jdbc/SybaseCoreDS xa-location=jdbc/xa/SybaseXADS ejb-location=jdbc/SybaseDS connection-driver=com.sybase.jdbc2.jdbc.SybDriver username=sa password=root123 url=jdbc:sybase:Tds:168.178.125.37:4100/ETSTest_SLCDevComp5?CHARSET=utf8 inactivity-timeout=30 / (I beleive you can leave the CHARSET out of the URL.) I pretty much mimicd the default Hypersonic configuration, replacing my JDBC driver name and Hypersonic with Sybase. Then I have this in my server.xml to get the JConnect jar in my classpath: library path=C:\jdk1.3\lib;C:\JConnect-5_2\classes\jconn2.jar / I'm afraid I never did any direct JDBC access with this, so I couldn't tell you about pooled-location. However, I thought the ejb-location was a connection pool? Mike - Original Message - From: Boris Erukhimov [EMAIL PROTECTED] To: Orion-Interest [EMAIL PROTECTED] Sent: Wednesday, July 04, 2001 1:50 AM Subject: Data source for Sybase with Jconnect 5.2 I'm trying to ask it second time. Does anyone use Jconnect 5.2 ? If so could you please share your data-source.xml and access code. I'm particularly interested to see how pooled-location works, not ejb-location. Thanks ~boris