• RELEVANCY SCORE 4.24

    DB:4.24:Connection Pooling To Mssql 2000 Through Jdbc c1




    Guys

    Which Drivers currently support connection pooling to MsSQL 2000 ?
    i was going through the process of installing MsSQL JDBC driver and then i
    noticed they say it dosent support connection pooling.

    is there any thing free out there ?

    regards,
    ben

    DB:4.24:Connection Pooling To Mssql 2000 Through Jdbc c1

    Which version are you using? According to the following url, connection pooling is supported:
    http://msdn.microsoft.com/downloads/default.asp?URL=/downloads/sample.asp?url=/MSDN-FILES/027/001/779/msdncompositedoc.xml

  • RELEVANCY SCORE 3.52

    DB:3.52:Problem In Configuring Jdbc Connection Pool fj




    Hi,
    iam a new one trying to configure connection pooling.
    i have given all the details but couldnt configure database connection pooling either for oracle or mssql server 2000.

    tell me if i havent given a ny passwor and user name ,wat to use and when i give a dummy...it says jdbc driver not in classpath.

    please reply,
    nagu

    DB:3.52:Problem In Configuring Jdbc Connection Pool fj

    Hi,
    iam a new one trying to configure connection pooling.
    i have given all the details but couldnt configure database connection pooling either for oracle or mssql server 2000.

    tell me if i havent given a ny passwor and user name ,wat to use and when i give a dummy...it says jdbc driver not in classpath.

    please reply,
    nagu

  • RELEVANCY SCORE 3.45

    DB:3.45:Free Jdbc Connection Pooling Software 8c




    hi,
    do anybody know where i can download the free software for jdbc connection pooling.please help.
    thank you,
    J.mouli

    DB:3.45:Free Jdbc Connection Pooling Software 8c

    The jakarta commons-dbcp package:

    http://jakarta.apache.org/commons/dbcp.html

    is probably the best thing you will find.

    Always look to apache first, they have tons of code.

  • RELEVANCY SCORE 3.44

    DB:3.44:Connection Pooling In Jdbc Adapter a3



    Does anybody know if the JDBC Adapter uses connection pooling? If yes, how can one adjust the pool size etc.

    Thanks!

  • RELEVANCY SCORE 3.41

    DB:3.41:Datasource Connection Pooling In 903? 8z


    We are having difficulty getting 9iAS DataSource Pooling to work. We are using 9iAS 9.0.3 (without Infrastructure) and, as per the J2EE Services Guide, have :

    1) Added...
    Context ic = new InitialContext();
    DataSource ds (DataSource) ic.lookup("jdbc/OracleDS")
    Connection con = ds.getConnection();
    ...to our code.

    2) Modified the default DataSource's url, username, password, min-connections max-connections from within Enterprise Manager (leaving ejb-location as is at "jdbc/OracleDS") and restarted the Instance.

    The app generates an exception when trying to locate the OracleDS, however.

    We have also tried replacing the "com.evermind.sql.DriverManagerDataSource" class with "oracle.jdbc.pool.OracleConnectionCacheImpl" as per another post's recommendation.

    It appears that others have had similar problems (prior to 903?), but many have, in fact, (now) got this working successfully -- what are we missing please......?

    Thanks.

    DB:3.41:Datasource Connection Pooling In 903? 8z

    We are having difficulty getting 9iAS DataSource Pooling to work. We are using 9iAS 9.0.3 (without Infrastructure) and, as per the J2EE Services Guide, have :

    1) Added...
    Context ic = new InitialContext();
    DataSource ds (DataSource) ic.lookup("jdbc/OracleDS")
    Connection con = ds.getConnection();
    ...to our code.

    2) Modified the default DataSource's url, username, password, min-connections max-connections from within Enterprise Manager (leaving ejb-location as is at "jdbc/OracleDS") and restarted the Instance.

    The app generates an exception when trying to locate the OracleDS, however.

    We have also tried replacing the "com.evermind.sql.DriverManagerDataSource" class with "oracle.jdbc.pool.OracleConnectionCacheImpl" as per another post's recommendation.

    It appears that others have had similar problems (prior to 903?), but many have, in fact, (now) got this working successfully -- what are we missing please......?

    Thanks.

  • RELEVANCY SCORE 3.38

    DB:3.38:Sqlj + Datasource k7


    hello ,
    could anybody show me please, how i can create a connection context for my sqlj statements if i want to use an existing JDBC connection using datasource and connection pooling.

    thank you

    DB:3.38:Sqlj + Datasource k7

    I have also the same problem.
    I wouldn't recommend you to use SQLJ of Oracle.

  • RELEVANCY SCORE 3.37

    DB:3.37:Jdbc 8.1.6 Connection Pooling f8


    Can anybody provide sample on how to use connection pooling with JDBC 8.1.6?

    I tried to use OracleConnectionCacheImpl directly but I am getting an error:
    User credentials doesn't match the existing ones even though ConnectionPoolDataSource I used to instantiate OracleConnectionCacheImpl works just fine

    DB:3.37:Jdbc 8.1.6 Connection Pooling f8

    BLOCKQUOTEfont size="1" face="Verdana, Arial"quote:/fontHROriginally posted by Jason zheng (java_jason@softhome.net):
    OracleConnectionCacheImpl occ = new OracleConnectionCacheImpl();
    occ.setURL("jdbc:oracle:thin:@xx.xx.xx.xx:1521:xxxx);
    occ.setUser("xx");
    occ.setPassword("xxx");
    //optional
    occ.setMaxLimit(3);
    occ.setMinLimit(1);
    .....//check api doc

    //retrieve connection
    Connection conn = occ.getConnection();
    //close logical connection
    conn.close()
    //close phsical connection
    occ.close();HR/BLOCKQUOTE

    That's all fine and dandy until you try to use JNDI with it. If you create the instance and setMinLimit() when a client tries to get a connection from a JNDI lookup it throws an error saying something like: " user credentials don't match"
    null

  • RELEVANCY SCORE 3.35

    DB:3.35:Problem With Connection Pooling 3a


    Hi,

    I am using netbeans for developing web appliccation .I make datasource and then calliing that datasource but i am facing some error while calling.
    The Code is..
    private javax.sql.DataSource getMyDatabase() throws javax.naming.NamingException {
    javax.naming.Context c = new javax.naming.InitialContext();
    return (javax.sql.DataSource) c.lookup("java:comp/env/jdbc/Shopping1");
    }
    ---------------
    error is

    Exception in connection from lookup:org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'

    please help me out...

    Thanks
    mayank

    DB:3.35:Problem With Connection Pooling 3a

    Verify connection pool parameters including connection URL

  • RELEVANCY SCORE 3.32

    DB:3.32:Jdbc Connectionpooldatasource Vs. Datasource m1


    I wan't to use Oracles implementation of connection pooling. However, I am not using an application server with connection pooling or JNDI.

    The question I have is if I OracleDataSource implements connection pooling for me or if I have to use OracleConnectionPoolDataSource directly.

    Reading the document "JDBC 2.0 Standard Extension API", gave me the impression of not using the ConnectionPoolDataSource directly. They say the connection pooling is done transparently in the DataSource implementation.

    JDBC 2.0 Standard Extension API: http://java.sun.com/products/jdbc/jdbc20.stdext.pdf

    Excerpt taken from chapter 6 - Connection Pooling, page 17:

    Connection pooling doesnt impact application code. The application simply accesses
    a JDBC DataSource and uses it in the standard way. The DataSource implements connection
    pooling transparently to the application using the PooledConnection and ConnectionPoolDataSource
    facilities provided by a JDBC 2.0 driver.

    Oracle9i JDBC Developer's Guide and Reference, Chapter 16
    Connection Pooling and Caching does not give much information on how to use DataSource with connection pooling.

    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/connpoca.htm

    Could you please clarify this for me?

    Best regards,
    Michael Peterson

    DB:3.32:Jdbc Connectionpooldatasource Vs. Datasource m1

    I wan't to use Oracles implementation of connection pooling. However, I am not using an application server with connection pooling or JNDI.

    The question I have is if I OracleDataSource implements connection pooling for me or if I have to use OracleConnectionPoolDataSource directly.

    Reading the document "JDBC 2.0 Standard Extension API", gave me the impression of not using the ConnectionPoolDataSource directly. They say the connection pooling is done transparently in the DataSource implementation.

    JDBC 2.0 Standard Extension API: http://java.sun.com/products/jdbc/jdbc20.stdext.pdf

    Excerpt taken from chapter 6 - Connection Pooling, page 17:

    Connection pooling doesnt impact application code. The application simply accesses
    a JDBC DataSource and uses it in the standard way. The DataSource implements connection
    pooling transparently to the application using the PooledConnection and ConnectionPoolDataSource
    facilities provided by a JDBC 2.0 driver.

    Oracle9i JDBC Developer's Guide and Reference, Chapter 16
    Connection Pooling and Caching does not give much information on how to use DataSource with connection pooling.

    http://download-west.oracle.com/docs/cd/B10501_01/java.920/a96654/connpoca.htm

    Could you please clarify this for me?

    Best regards,
    Michael Peterson

  • RELEVANCY SCORE 3.31

    DB:3.31:Best Connection Pooling Option For Jdbc? Native Connection Cache? Dbcp? k1


    Does anyone have recommendations about what connection pooling option to use when one is using 10.2.0.1 JDBC drivers? I have heard that in the past there were certain issues with the connection pooling features in the JDBC drivers, but I would think that those issues would be worked out by now. Would I be better off using the native connection pooling/connection cache support available in the JDBC driver, or should I use a third-party JDBC driver such as Apache DBCP?

    Any feedback is appreciated!

    Thanks!

    DB:3.31:Best Connection Pooling Option For Jdbc? Native Connection Cache? Dbcp? k1

    I've seen a variety of configurations in production environments and I've never encountered a real, significant problem with the connection pool from an operational standpoint. Realistically, so long as you get comfortable with your chosen solution, you'll be fine in all probability.

    Where I have seen hiccups
    - people using connection pools they aren't comfortable administering. If you have app server admins that are comfortable configuring your chosen app server, they'll probably have no difficulty managing your connection pool. If you don't have anyone that is comfortable administering your chosen app server, you may be better off having your application manage the pool, since that at least puts the configuration in the hands of the developer.
    - organizations that have every flavor of connection pool known to man. Be consistent about what sort of pooling you are doing-- it does no one any good if the app server admins have a pool, each application has a separate pool, and different application teams have decided to use three different flavors of connection pool. It's impossible to be comfortable administering that sort of mish-mash in production and it makes it a pain when developers start working on each other's code.
    - figuring out what flavor of connection you have. If you're using advanced features (i.e. passing arrays), you often have to cast your Connection/ Statement/ etc. to one of the Oracle* types. Oracle's documentation sample code tends to be very good if you're using Oracle's built-in pools. If you have an app server connection pool, it's almost always possible to accomplish the same thing, but you may need to experiment a bit and/or find documetnation from the app server vendor that shows exactly how to get the casting to work.

    Fundamentally, it really does come down to doing what you'll be comfortable with...

    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • RELEVANCY SCORE 3.24

    DB:3.24:Connection Pooling Using Ms Jdbc Driver.. k7


    Hi All,
    I am using the MS JDBC type 4 driver in one of the applications I am working on, without any conection pooling. Now I am seeing a performance degradation in the application without conection pooling. Can anybody show me some examples explaining how to get started with connection pooling using MS JDBC driver. And the issues I need to consider?
    Thanks

    DB:3.24:Connection Pooling Using Ms Jdbc Driver.. k7

    Searching the forums does tend to turn up a lot of garbage. However a Google search using the keywords "java connection pool" turns up some obvious candidates right away.

  • RELEVANCY SCORE 3.24

    DB:3.24:Jdbc - Mssql Problem cs


    hi..
    my server name is SERKANPROX\LOCALHOST .. i couldn't connect to this server. this is the part my code:

    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    Connection con = DriverManager.getConnection("jdbc:microsoft:sqlserver://serkanprox//localhost:1433;DatabaseName=NorthWind","serkan","serkan");

    the exception is : [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

    how can i can change the connection string for connecting to this server ..
    thanksss

    DB:3.24:Jdbc - Mssql Problem cs

    I have replied to a similar problem in the thread: http://forum.java.sun.com/thread.jspa?threadID=608314messageID=3332202#3332202

    Ferad Zyulkyarov

  • RELEVANCY SCORE 3.23

    DB:3.23:Connection Pooling Implementation kx


    Hi,

    I realize that most J2EE containers support pooling as per the JDBC 3.0 API. But I am looking for a generic connection pooling implementation for JDBC that I can use in my applicaiton without having to write the pooling mechanism myself..
    Is there a JDBC connection pool implementation out there (free would be good !), that can be integrated with any app (not neccessarily running inside a J2EE container.

    Thanks

  • RELEVANCY SCORE 3.20

    DB:3.20:Oracleconnection Pooling 7d


    Hi,

    I have two boxes. Oracle 8.i(Free copy I've downloaded from Oracle Site) is running on Linux Suse 6.0 and Apache 1.3 and JServ running on Windows 2000.

    For servlets I am using Oracle jdbc thin driver and Connection Pooling Object. During Development, there is no problem. But, If I put Oracle under test by using JMeter(Apache Test Tool), I am getting error "ORA XXXX Invalid Cursor",Oracle slows down and doesnt respond anymore. I run same test for MSSQL Server 7.0 same setup SQL server runs very well.(like 19 connection threads 300ms Average Connection time.)

    My question is Why Oracle doesn't respond any more or gives Invalid Cursor Error?

    1- I am using free copy of Oracle 8.i(db reports 200 users free.)-is free copy issue here-
    2- Is there any known issues about Oracle Connection Pooling Object.

    thank you

    levent@globespan.net
    null

    DB:3.20:Oracleconnection Pooling 7d

    OracleConnectionCacheImpl cacheImpl;
    OracleConnectionPoolDataSource dataSource= new OracleConnectionPoolDataSource();
    cacheImpl=new OracleConnectionCacheImpl(dataSource);

    I am using OracleConnectionCacheImpl. Its working fine.

    thank you

    Levent@globespan.net

  • RELEVANCY SCORE 3.20

    DB:3.20:Connection Pool Question kf


    To all,

    I want to ask if connection pooling of a DBMS is controlled solely by JDBC programming or it must also involve settings on the DBMS too ?

    Thanks!

    From Jason (Kusanagihk)

    DB:3.20:Connection Pool Question kf

    http://www.javaworld.com/javaworld/jw-10-2000/jw-1027-pool.html

  • RELEVANCY SCORE 3.20

    DB:3.20:Oc4j And Tag Libraries 9s


    Hi,
    i am using JDBC 9i, JDK1.4x with connection pooling. I want to use SQLtaglib e.g. dbopen, dbclose come with OC4J.
    I checked that the taglib comes with OC4J uses the old JDBC (class.zip) which does not support pooling.

    Can I use SQLtaglib with pooling?

    regards,
    KM ku

    DB:3.20:Oc4j And Tag Libraries 9s

    Hi,
    i am using JDBC 9i, JDK1.4x with connection pooling. I want to use SQLtaglib e.g. dbopen, dbclose come with OC4J.
    I checked that the taglib comes with OC4J uses the old JDBC (class.zip) which does not support pooling.

    Can I use SQLtaglib with pooling?

    regards,
    KM ku

  • RELEVANCY SCORE 3.20

    DB:3.20:Connection Pooling 3s


    Hi
    any one can tell me, how to specify the no of connection to achieve the connection pooling, I m using Oracle9i and JDBC 2.

    Regards
    Amit

    DB:3.20:Connection Pooling 3s

    Hi
    any one can tell me, how to specify the no of connection to achieve the connection pooling, I m using Oracle9i and JDBC 2.

    Regards
    Amit

  • RELEVANCY SCORE 3.17

    DB:3.17:Connection Pooling And Jndi sp


    Hi,
    I'm a little confused about Connection Pooling and JNDI. I've been reading the JDBC Optional Extensions spec and they indicate that to use connection pooling and data sources one must do two things.
    One -- Deploy and register with JNDI a ConnectionPoolDataSource that contains the appropriate database connection information.
    Two -- Deploy a DataSource that sets its description and the dataSourceName to the ConnectionPoolDataSource.
    When I try this with the Oracle 8.1.6 thin drivers I get a "Invalid Oracle URL specified: OracleDataSource.makeURL" exception.
    The JDBC developers guide seems to indicate that I can skip the deployment of the DataSource. Is this so, or do I need to provide the DataSource with more information than the dataSourceName and description.
    Thanks!!!
    David

    DB:3.17:Connection Pooling And Jndi sp

    The point is that all of the connection attributes have already been set in the OracleConnectionPoolDataSource. We should then just be able to set the data source name of the OracleDataSource to the pooled one. It should then inherit these attributes from the pooled source. However, what I've found with the thin driver is that you must explicitly set the attributes on the OracleDataSource too. See the following code.

    OracleConnectionPoolDataSource cpds = new OracleConnectionPoolDataSource();
    cpds.setDatabaseName("EIP");
    cpds.setDriverType("thin");
    cpds.setUser("scott");
    cpds.setPassword("tiger");
    cpds.setPortNumber(1521);
    cpds.setServerName("gen2tek-demo");

    // deploy it.
    ctx.bind(pooledDataSourceName, cpds);

    // create an Oracle instance of DataSource.
    OracleDataSource ds = new OracleDataSource();
    ds.setDataSourceName(pooledDataSourceName);
    // calling setURL on ds shouldn't be necessary as ds should inherit
    // it's URL from cpds. but, unfortunately, it doesn't.
    ds.setURL(cpds.getURL());

    // deploy it.
    ctx.bind(dataSourceName, ds);
    null

  • RELEVANCY SCORE 3.17

    DB:3.17:Jdbc Version/Connection Pooling d8


    Hi all

    I am using JDK1.1.8 (this is device dependant so please don't suggest using a different JDK), and jTurbo1.22 as my driver. I have three questions:

    1. What version of JDBC does JDK1.1.8 support?
    2. Can I use Connection Pooling with this set up (driver + JDK)?
    3. If I can't use connection pooling, any suggestions on how to control more than one connection to a database?

    Thanks

    John

    DB:3.17:Jdbc Version/Connection Pooling d8

    Thanks jschell. I managed to get it working from some code I swiped off javaworld.com. Now if only sun would give me my monthly duke dollars, I could reward you.

  • RELEVANCY SCORE 3.15

    DB:3.15:Does Ejb's Take Care Of Connection Pooling? sf


    If I use Session or entity beans(as opposed to JSP pages connecting to database using JDBC) to communicate with database, does EJB's automatically take care of connection pooling, so that application users can utilize the existing connection as opposed to creating new connections?

    DB:3.15:Does Ejb's Take Care Of Connection Pooling? sf

    Yes, any entry in the component's environment (java:comp/env) must be declared. That can be done either through the deployment descriptor corresponding to the component (e.g. ejb-jar.xml, web.xml) or via annotations when using Java EE 5. Using the deployment descriptor you would define a resource-ref. Using annotations, it would look like :

    @Resource(name="jdbc/WebRadio")
    private DataSource ds;

    You can find more information on declaring resource dependencies here :

    https://glassfish.dev.java.net/javaee5/ejb/compdependencies_xmlforum_nov15.pdf

    --ken

  • RELEVANCY SCORE 3.13

    DB:3.13:Tomcat Connection Pooling (Not Db) da


    Hi,
    Can anyone tell me if there is a mean in TOMCAT to monitor a pool of connection, a http connection or something like that (not a JDBC pool).

    DB:3.13:Tomcat Connection Pooling (Not Db) da

    My understanding is that you do not pool http connections, that each request / response is handled individually and disgarded by the server afterwards (http being stateless...)

  • RELEVANCY SCORE 3.11

    DB:3.11:Re: Connecting To Remote Databases... xf


    Connection pooling. See javax.sql.DataSource and your DB vendor's documentation for his JDBC driver.

    DB:3.11:Re: Connecting To Remote Databases... xf

    I am making a little application for my work to make accessing and changing entries in our small database easier for those who don't know sql. I have been able to successfully create database connections, and execute statements. My question is more of a software designing one than a hands-on, how-to one. At the moment, every time I need to grab something from or update the db, I make a Connection (by getting an instance of the driver), and then using that to execute a query. So, every time any kind of transaction occurs, I am generating a new connection to the database. Once I am done doing the task, I make sure the connection is closed. So, is this the way to be going about accessing a db, or should I upon application startup create one "master" connection, and run everything from that? I notice that every time I execute a statement, the program slows down a bit, which I think is one of two things: 1) creating an instance of a Connection is causing a hiccup, or 2) I am connecting to a remote db (hosted by GoDaddy), so the slowdown could be due to the fact that I am running these queries on a far-off server (which is one reason why I am wondering if I should have one "master" connection, because I am sure there is some lag having to authenticate the connection on GoDaddy's end).

  • RELEVANCY SCORE 3.11

    DB:3.11:Oracle Oci Connection Pooling Vs Oracle Ucp kc


    I am researching on various Oracle JDBC connection pooling mechanisms and wanted to understand the pros and cons of using Oracle UCP (Universal Connection Pooling) as compared to Oracle OCI Connection Pooling provided by the OCI driver.

    Please share your thoughts/experience on this topic.

    DB:3.11:Oracle Oci Connection Pooling Vs Oracle Ucp kc

    I will try adding some details based on the reading I have done so far. Below are some distinct features supported by the different connection pooling mechanisms

    Oracle UCP (Universal Connection Pooling)
    a. Supports features like Fast Connection Failover (FCF), Runtime connection load balancing and connection affinity.
    b. JMX Support
    c. Support for labelling connections
    d. Support for connection harvesting

    OCI (Oracle Call Interface) Connection Pooling
    a. Support for session multiplexing.

  • RELEVANCY SCORE 3.11

    DB:3.11:Re: Database Connection Issue From Java Please Let Me Know Solution pm


    I would investigate your connection pooling code/configuration parameters.
    Something is closing your JDBC connections out from under you.

    DB:3.11:Re: Database Connection Issue From Java Please Let Me Know Solution pm

    Java Connection Issue Basically whats happening is were issuing a polling statement every couple seconds that gets us the status of the REPORT_QUEUE table. For a while (at least a day or so) it goes fine, but eventually we start getting a constant connection issue: a. SQL select * from REPORT_QUEUE order by report_id asc; b. The root error seems to be a Connection Closed error. com.lds.webstat.shared.DBException: executeSelect :select * from REPORT_QUEUE order by report_id asc : Closed Connection at com.lds.webstat.usage.SQLStatement2.executeSelect(SQLStatement2.java:162) at com.lds.webstat.usage.ReportQueue.synch(ReportQueue.java:116) at com.lds.webstat.usage.ReportQueueMonitor$ReportQueueMonitorNotifier.run(ReportQueueMonitor.java:69) at java.util.TimerThread.mainLoop(Timer.java:512) at java.util.TimerThread.run(Timer.java:462) java.sql.SQLException: Closed Connection at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:111) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:145) at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:207) at oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:749) at oracle.jdbc.driver.PhysicalConnection.createStatement(PhysicalConnection.java:725) at com.codestudio.sql.PoolManConnection.createStatement(PoolManConnection.java:161) at com.codestudio.sql.PoolManConnectionHandle.createStatement(PoolManConnectionHandle.java:43) at com.lds.webstat.usage.SQLStatement2.connect(SQLStatement2.java:97) at com.lds.webstat.usage.ReportQueueStatus.init(ReportQueueStatus.java:32) at _0002fbatch_0005fusage_0002ejspbatch_0005fusage_jsp_104._jspService(_0002fbatch_0005fusage_0002ejspbatch_0005fusage_jsp_104.java:90) at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:119) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.jasper.servlet.JspServlet$JspServletWrapper.service(JspServlet.java:177) at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:318) at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:391) at javax.servlet.http.HttpServlet.service(HttpServlet.java:853) at org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404) at org.apache.tomcat.core.Handler.service(Handler.java:286) at org.apache.tomcat.core.ServletWrapper.service(ServletWrapper.java:372) at org.apache.tomcat.core.ContextManager.internalService(ContextManager.java:797) at org.apache.tomcat.core.ContextManager.service(ContextManager.java:743) at org.apache.tomcat.service.http.HttpConnectionHandler.processConnection(HttpConnectionHandler.java:210) at org.apache.tomcat.service.TcpWorkerThread.runIt(PoolTcpEndpoint.java:416) at org.apache.tomcat.util.ThreadPool$ControlRunnable.run(ThreadPool.java:498) at java.lang.Thread.run(Thread.java:595)

  • RELEVANCY SCORE 3.11

    DB:3.11:Connection Pooling In Servlets... Any Difference? p7


    Hi there,

    Sorry if I post this twice because I feel this topic is more relevant here. I'm wondering if there's a difference between these two practices of defining connection pooling / data source lookups ...

    (a)
    DataSource pool;

    public void init() throws ServletException {
    try {
    Context env = (Context) new InitialContext().lookup("java:comp/env");

    pool = (DataSource) env.lookup("jdbc/mssql");

    if (pool == null)
    throw new ServletException("'mssql' is an unknown DataSource");
    } catch (NamingException ne) {
    throw new ServletException(ne.getMessage());
    }
    }(b)
    public class Database {
    Connection conn;

    public Database() {
    try {
    Context env = (Context) new InitialContext().lookup("java:comp/env");

    DataSource pool = (DataSource) env.lookup("jdbc/mssql");

    conn = pool.getConnection();

    } catch (NamingException ne) {
    System.out.println(ne.getMessage());
    } catch (SQLException sqle) {
    System.out.println(sqle.getMessage());
    } catch (Exception e) {
    e.printStackTrace();
    }
    }

    public Connection getConnection() {
    return conn;
    }

    // .....
    }If need to, any servlet can access as such
    public void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    Database db = null;

    try {
    db = new Database();

    // Use the resources here

    } catch (SQLException e) {}
    } finally {
    // Release all resources
    }
    }I just wanted to know if the former is inefficient since I almost repeat that in every servlet, or rather if the latter would spell disaster. Please highlight.

    Thanks for reading this.

    DB:3.11:Connection Pooling In Servlets... Any Difference? p7

    avoid multi posting

    http://forum.java.sun.com/thread.jspa?threadID=5252740

  • RELEVANCY SCORE 3.10

    DB:3.10:Connection Pooling cx



    How i can implement connection pooling in OC4J ?.
    I mean AS configurations and code ,
    Now the code i m accessing database is as follows
    Any good help links are cordially appreciated

    try
    {
    InitialContext ic=new InitialContext();
    javax.sql.DataSource ds=(javax.sql.DataSource)(ic.lookup("jdbc/OracleDS"));
    System.out.println("EmployeeDS="+ds);
    conn= ds.getConnection("new_snp_map","ltdice");
    }
    catch(Exception exception)
    {

    }

    Thanks

    DB:3.10:Connection Pooling cx

    Renjith,
    You have to setup the connection pool parameters in the data-sources.xml file. Please look at the OC4J services guide (Data Sources section for all paremeters for a pooled DataSource at

    http://otn.oracle.com/tech/java/oc4j/pdf/oc4j_j2ee_svcguide_r2.pdf

    You can lookup a pooled data source as follows:

    DataSource ds = (DataSource)ic.lookup("jdbc/myPooledDataSource");

    Connection conn = ds.getConnection();

    regards
    Debu Panda

  • RELEVANCY SCORE 3.09

    DB:3.09:Connection Pooling In Jdbc Driver (Type 4) 8k


    Is there any good stuff which can help me out to write Test Specification for Connection Pooling feature for a Type 4 driver.

    DB:3.09:Connection Pooling In Jdbc Driver (Type 4) 8k

    Hai Colin,

    Sorry for late reply,

    Thanx for ur reply.

    Now I will download the Test Suite and how it will be helpful for me.

    Bye.

  • RELEVANCY SCORE 3.09

    DB:3.09:Connection Pooling Vs. Connection Caching 83


    There seems to be contradictory information, both from in Oracle documentation and otherwise, about what JDBC connection pooling is (which Oracle implements) and what a Oracle connection caching is. Can someone please succinctly describe the difference between the two?

    Thank you.

    DB:3.09:Connection Pooling Vs. Connection Caching 83

    There seems to be contradictory information, both from in Oracle documentation and otherwise, about what JDBC connection pooling is (which Oracle implements) and what a Oracle connection caching is. Can someone please succinctly describe the difference between the two?

    Thank you.

  • RELEVANCY SCORE 3.08

    DB:3.08:Mysql - Connection Pooling - Driver? p3


    Hi there!

    I am looking for a JDBC 2.0 compatible driver to use with MySQL. I would like to use connection pooling in a webapplication (JSP:s and Servlets) but I have just found out that the driver I usually use mmmysql do not support connection pooling. Hence, my question: Where can I find a driver to use with MySQL with support for Connection Pooling?

    bw

    DB:3.08:Mysql - Connection Pooling - Driver? p3

    have you tried resin..

    http://www.caucho.com/projects/jdbc-mysql/index.xtp

    i haven't checked it yet but it could be an option
    i'm currently using mmmysql driver also...I tried that driver and when I had more than one statement open at the same time, it gave me garbage results and then threw an exception. So I'm using the mmmysql driver too.

  • RELEVANCY SCORE 3.07

    DB:3.07:Database Connection Pooling fc


    HI I am trying DataBase Connection Pooling

    I am getting the following error:

    javax.servlet.ServletException: Cannot create JDBC driver of class '' for connect URL 'null'

    DB:3.07:Database Connection Pooling fc

    1. Have you checked for other posts regarding this topic? There are many.

    2. A little more information is needed. What connection pool are you trying to setup? Tomcat DBCP maybe?

    3. Please provide some information, like driver, the url you're using, etc. Also if it's DBCP you're setting up we'd need to see the server.xml part that pertains to the connection pool.

  • RELEVANCY SCORE 3.07

    DB:3.07:Java.Sql.Drivermanager.Getconnection Threw An Exception 88


    Problem: i have MSSQL 2000 on machine and JBDC work on another machine, i use the SQL to authenticate users form DB, but the connection between the JBDC and SQL always didn't go up.

    the configuration on the program that using JDBC like that:

    Driver=com/microsoft/jdbc/sqlserver/SQLServerDriver

    Connect=DSN=jdbc:microsoft:sqlserver://x.x.x.x:1433;UID=sa;PWD=test

    but after restart the program, show this error:

    java.sql.DriverManager.getConnection threw an exception.

    but by using the ethereal program, i note that, the program send msql sync packet, but the MSSQL machine reply with RESET packet.

    PLs can any one advice me.

    DB:3.07:Java.Sql.Drivermanager.Getconnection Threw An Exception 88

    Perhaps this will be of help [url http://java.sun.com/developer/onlineTraining/Database/JDBCShortCourse/jdbc/jdbc.html]JDBC short course

  • RELEVANCY SCORE 3.07

    DB:3.07:Connection Pooling Sql Exception - Mssql Jdbc 31


    guys,

    i am running a mssql jdbc driver from microsoft(with javax support) and i can't get it running on my sun one server. Btw, I have tested this driver by connecting using a normal connection and it worked.. right now i am connecting via sun one's connection pooling interface. Do i need to use a diffrent connection string aside from connection as illustrated in the docs jdbc:microsoft:sqlserver://192.168.0.1:1433;databaseName=emp" have.. I am having these messages...

    Exception

    javax.servlet.ServletException: com.sun.enterprise.repository.J2EEResourceException
    java.lang.NoSuchMethodException: setServerName
    at org.apache.struts.action.RequestProcessor.processException(RequestProcessor.java:507)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:448)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:309)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

    Root Cause
    java.sql.SQLException: com.sun.enterprise.repository.J2EEResourceException
    java.lang.NoSuchMethodException: setServerName
    at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:261)
    at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:98)
    at wasp.hr.login.action.LoginSubmitAction.execute(LoginSubmitAction.java:59)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:446)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:266)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1292)
    at org.apache.struts.action.ActionServlet.doPost(ActionServlet.java:510)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:760)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:309)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

    DB:3.07:Connection Pooling Sql Exception - Mssql Jdbc 31

    I am having similiar issue on this as well.. Did you ever resolve this problem successfully?

    Thanks,
    --kuan

  • RELEVANCY SCORE 3.07

    DB:3.07:If Using Connection Pooling Of Ms Sql Server, Can I Use Jdbc From Microsoft? 7k



    I wanna to connect Microsoft SQL Server 2000 database. And i do it via MS's JDBC
    driver. If i wanna to use connection pooling, can i use it? Or i must use drivers
    from BEA? Thx.

    DB:3.07:If Using Connection Pooling Of Ms Sql Server, Can I Use Jdbc From Microsoft? 7k

    Hi Jeff,

    Yes, You can use the driver from MS.

    sree

    "Jeff18" jkong18@hotmail.com wrote in message
    news:3d60b8b3$1@newsgroups.bea.com...

    I wanna to connect Microsoft SQL Server 2000 database. And i do it viaMS's JDBC
    driver. If i wanna to use connection pooling, can i use it? Or i must usedrivers
    from BEA? Thx.

  • RELEVANCY SCORE 3.07

    DB:3.07:Jdbc Connection Pooling 3p


    Does anyone have experience with "Poolman" API for
    JDBC connection pooling?
    Would you suggest
    1) to use it,
    2) or implement my own connection pooling framework,
    3) or any other free API?

    Thank you

    DB:3.07:Jdbc Connection Pooling 3p

    Hi,

    I've written my own connection pool. Take a look at http://connpool.jensn.de/

    Jens

  • RELEVANCY SCORE 3.07

    DB:3.07:Connection Pooling With A 2.0 Jdbc Driver 93


    In fact I'm using MS SQL Server 2000 JDBC driver.
    To perform connection pooling I need to connect to my database through a JNDI Data Source, right?
    How should I do that?
    I've seen the JDBC driver comes with a Driver class and a DataSource class.
    How should I register the connection with a logical name to be able to use this logical name afterwards?
    Thanks.

    DB:3.07:Connection Pooling With A 2.0 Jdbc Driver 93

    Try to use Poolman from Codestudio (http://www.codestudio.com). it supports JNDI etc for connection pooling.

  • RELEVANCY SCORE 3.07

    DB:3.07:Connection Pooling Problem -Please Help 1c


    Hi all,

    I use DBCP Connection pooling with the Tomcat server.Number of database connections are keep on increasing , i am just wondering the way i am using the pool is coorect.

    How do exactly pooling will work?

    Does it creates all the connections at once and keep it ,please shud somelight on that .

    Here is the java code where i access the connection from

    public class SingletonDatabaseConnection {

    private static SingletonDatabaseConnection singleinstance = null;
    DataSource ds;
    Context ctx;

    /**
    *Constructor for the SingletonDatabaseConnection object
    */
    private SingletonDatabaseConnection() {
    System.out.println("Singleton object created");
    }

    /**
    * Description of the Method
    *
    * @return Description of the Return Value
    */
    public static SingletonDatabaseConnection instance() {
    if (null == singleinstance) {
    singleinstance = new SingletonDatabaseConnection();
    }
    return singleinstance;
    }

    /**
    * Gets the dataSource attribute of the SingletonDatabaseConnection object
    *
    * @return The dataSource value
    * @exception Exception Description of the Exception
    */
    public DataSource getDataSource() throws Exception {
    try {

    ctx = new InitialContext();
    if (ctx == null) {
    throw new Exception("Boom - No Context");
    }

    ds = (DataSource) ctx.lookup("java:comp/env/jdbc/NBDCORE_DATABASE");

    } catch (Exception e) {
    throw new SQLException();
    }
    return ds;
    }And here is the configuration i am using in the server.xml

    context
    Context path="/xmlgateway" docBase="xmlgateway"
    debug="0" reloadable="true" crossContext="true"
    Resource name="jdbc/NBDCORE_DATABASE"
    auth="Container"
    type="javax.sql.DataSource"/
    ResourceParams name="jdbc/NBDCORE_DATABASE"
    parameter
    namefactory/name
    valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
    /parameter

    !-- Maximum number of dB connections in pool. Make sure you
    configure your mssql max_connections large enough to handle
    all of your db connections. Set to 0 for no limit.
    --
    parameter
    namemaxActive/name
    value50/value
    /parameter

    !-- Maximum number of idle dB connections to retain in pool.
    Set to 0 for no limit.
    --
    parameter
    namemaxIdle/name
    value30/value
    /parameter

    !-- Maximum time to wait for a dB connection to become available
    in ms, in this example 10 seconds. An Exception is thrown if
    this timeout is exceeded. Set to -1 to wait indefinitely.
    --
    parameter
    namemaxWait/name
    value10000/value
    /parameter

    !-- MSSQL dB username and password for dB connections --
    parameter
    nameusername/name
    valuesa/value
    /parameter
    parameter
    namepassword/name
    valuebl1b1t/value
    /parameter

    !-- Class name for mssql JDBC driver --
    parameter
    namedriverClassName/name
    valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
    /parameter

    parameter
    nameurl/name
    valuejdbc:microsoft:sqlserver://192.168.1.9:1433;DatabaseName=NBD_CORE_LIVE/value
    /parameter
    /ResourceParams
    /contextAnd this is how access a connection from java file

    SingletonDatabaseConnection sdc = SingletonDatabaseConnection.instance();
    DataSource ds = sdc.getDataSource();
    try{
    if (ds != null) {
    conn = ds.getConnection();
    }
    }
    catch(Exception e)
    {

    }Thanks

    DB:3.07:Connection Pooling Problem -Please Help 1c

    Hi all,

    I use DBCP Connection pooling with the Tomcat server.Number of database connections are keep on increasing , i am just wondering the way i am using the pool is coorect.

    How do exactly pooling will work?

    Does it creates all the connections at once and keep it ,please shud somelight on that .

    Here is the java code where i access the connection from

    public class SingletonDatabaseConnection {

    private static SingletonDatabaseConnection singleinstance = null;
    DataSource ds;
    Context ctx;

    /**
    *Constructor for the SingletonDatabaseConnection object
    */
    private SingletonDatabaseConnection() {
    System.out.println("Singleton object created");
    }

    /**
    * Description of the Method
    *
    * @return Description of the Return Value
    */
    public static SingletonDatabaseConnection instance() {
    if (null == singleinstance) {
    singleinstance = new SingletonDatabaseConnection();
    }
    return singleinstance;
    }

    /**
    * Gets the dataSource attribute of the SingletonDatabaseConnection object
    *
    * @return The dataSource value
    * @exception Exception Description of the Exception
    */
    public DataSource getDataSource() throws Exception {
    try {

    ctx = new InitialContext();
    if (ctx == null) {
    throw new Exception("Boom - No Context");
    }

    ds = (DataSource) ctx.lookup("java:comp/env/jdbc/NBDCORE_DATABASE");

    } catch (Exception e) {
    throw new SQLException();
    }
    return ds;
    }And here is the configuration i am using in the server.xml

    context
    Context path="/xmlgateway" docBase="xmlgateway"
    debug="0" reloadable="true" crossContext="true"
    Resource name="jdbc/NBDCORE_DATABASE"
    auth="Container"
    type="javax.sql.DataSource"/
    ResourceParams name="jdbc/NBDCORE_DATABASE"
    parameter
    namefactory/name
    valueorg.apache.commons.dbcp.BasicDataSourceFactory/value
    /parameter

    !-- Maximum number of dB connections in pool. Make sure you
    configure your mssql max_connections large enough to handle
    all of your db connections. Set to 0 for no limit.
    --
    parameter
    namemaxActive/name
    value50/value
    /parameter

    !-- Maximum number of idle dB connections to retain in pool.
    Set to 0 for no limit.
    --
    parameter
    namemaxIdle/name
    value30/value
    /parameter

    !-- Maximum time to wait for a dB connection to become available
    in ms, in this example 10 seconds. An Exception is thrown if
    this timeout is exceeded. Set to -1 to wait indefinitely.
    --
    parameter
    namemaxWait/name
    value10000/value
    /parameter

    !-- MSSQL dB username and password for dB connections --
    parameter
    nameusername/name
    valuesa/value
    /parameter
    parameter
    namepassword/name
    valuebl1b1t/value
    /parameter

    !-- Class name for mssql JDBC driver --
    parameter
    namedriverClassName/name
    valuecom.microsoft.jdbc.sqlserver.SQLServerDriver/value
    /parameter

    parameter
    nameurl/name
    valuejdbc:microsoft:sqlserver://192.168.1.9:1433;DatabaseName=NBD_CORE_LIVE/value
    /parameter
    /ResourceParams
    /contextAnd this is how access a connection from java file

    SingletonDatabaseConnection sdc = SingletonDatabaseConnection.instance();
    DataSource ds = sdc.getDataSource();
    try{
    if (ds != null) {
    conn = ds.getConnection();
    }
    }
    catch(Exception e)
    {

    }Thanks

  • RELEVANCY SCORE 3.05

    DB:3.05:Free Jdbc Connection Pooling Software x1


    hi,
    do anybody know where i can download the free software for jdbc connection pooling.please help.
    thank you,
    J.mouli

    DB:3.05:Free Jdbc Connection Pooling Software x1

    http://www.google.com/search?hl=enie=UTF-8oe=UTF-8q=JDBC+Connection+pool

  • RELEVANCY SCORE 3.05

    DB:3.05:Config Hibernate-Jboss Connection Pooling jk



    on Jboss4.04 hibernate3followed howto's and (thought) I have setup jboss-conn pooling. However, server.log emits "not for production use"?? what pooling am I using? How can I tell hibernate to use jboss pooling?11:18:37,500 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)11:18:37,765 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 2011:18:37,765 INFO [DriverManagerConnectionProvider] autocommit mode: false11:18:37,765 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/alertnet2hibernate-configuration session-factory com.mysql.jdbc.Driver jdbc:mysql://localhost/alertnet2 property name="hibernate.connection.usernamejboss-web context-root//context-root resource-ref res-ref-namejdbc/mySQL/res-ref-name jndi-namejava:/jdbc/mySQL/jndi-name res-typejavax.sql.DataSource/res-type /resource-ref /jboss-webmysql-ds.xml local-tx-datasource jndi-namejdbc/mySQL/jndi-name connection-urljdbc:mysql://localhost/alertnet2/connection-url driver-classcom.mysql.jdbc.Driver/driver-class user-namecapuser/user-name capuser exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter/exception-sorter-class-name !-- intent: close pooled connections sitting idle for 30 minutes -- idle-timeout-minutes30/idle-timeout-minutes !-- should only be used on drivers after 3.22.1 with "ping" support -- valid-connection-checker-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker/valid-connection-checker-class-name !-- sql to call when connection is created -- new-connection-sqlSelect 1 from USER/new-connection-sql !-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers -- check-valid-connection-sqlSelect 1 from USER/check-valid-connection-sql !-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -- type-mappingmySQL/type-mapping /local-tx-datasource

    DB:3.05:Config Hibernate-Jboss Connection Pooling jk


    on Jboss4.04 hibernate3followed howto's and (thought) I have setup jboss-conn pooling. However, server.log emits "not for production use"?? what pooling am I using? How can I tell hibernate to use jboss pooling?11:18:37,500 INFO [DriverManagerConnectionProvider] Using Hibernate built-in connection pool (not for production use!)11:18:37,765 INFO [DriverManagerConnectionProvider] Hibernate connection pool size: 2011:18:37,765 INFO [DriverManagerConnectionProvider] autocommit mode: false11:18:37,765 INFO [DriverManagerConnectionProvider] using driver: com.mysql.jdbc.Driver at URL: jdbc:mysql://localhost/alertnet2hibernate-configuration session-factory com.mysql.jdbc.Driver jdbc:mysql://localhost/alertnet2 property name="hibernate.connection.usernamejboss-web context-root//context-root resource-ref res-ref-namejdbc/mySQL/res-ref-name jndi-namejava:/jdbc/mySQL/jndi-name res-typejavax.sql.DataSource/res-type /resource-ref /jboss-webmysql-ds.xml local-tx-datasource jndi-namejdbc/mySQL/jndi-name connection-urljdbc:mysql://localhost/alertnet2/connection-url driver-classcom.mysql.jdbc.Driver/driver-class user-namecapuser/user-name capuser exception-sorter-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLExceptionSorter/exception-sorter-class-name !-- intent: close pooled connections sitting idle for 30 minutes -- idle-timeout-minutes30/idle-timeout-minutes !-- should only be used on drivers after 3.22.1 with "ping" support -- valid-connection-checker-class-nameorg.jboss.resource.adapter.jdbc.vendor.MySQLValidConnectionChecker/valid-connection-checker-class-name !-- sql to call when connection is created -- new-connection-sqlSelect 1 from USER/new-connection-sql !-- sql to call on an existing pooled connection when it is obtained from pool - MySQLValidConnectionChecker is preferred for newer drivers -- check-valid-connection-sqlSelect 1 from USER/check-valid-connection-sql !-- corresponding type-mapping in the standardjbosscmp-jdbc.xml (optional) -- type-mappingmySQL/type-mapping /local-tx-datasource

  • RELEVANCY SCORE 3.03

    DB:3.03:Connection Pooling In Jsp 7c


    Where is the best place to initialize a database connection pooling in a JSP? I am overriding the jspInit() method and initializing the pooling, but I am getting java.sql.SQLException: Closed Connection exception later on.

    I also migth be doing something wrong in my conncetion pooling class.

    Thx.

    Ulvi.

    DB:3.03:Connection Pooling In Jsp 7c

    Sorry, I haven't checked this for awhile. That's a good question, and you're hovering near the limit of my understanding of some of this too. I don't know what will happen if you make two instances of the pool bean. Since you're having trouble, common sense would suggest making it work with one first, then see what happens if you have two.

    In any case, other than "cleanliness"--being in control of how many useful objects you keep in memory, I can think of one possible reason you'd want to ensure only one pool per database. Your database probably has a limit set on the total number of simultaneous connections it can support. I'm not sure whether you're protected against inadvertently trying to violate that or not if you maintain more than one pool for the same db.

    Thanx for explanation, I'm relatively new to this and
    I have a couple of questions.
    Why is it necessary to ensure that only one instance
    of the connection
    bean be created? If I understand correctly, the
    DataSource object that
    is looked up by the bean will always be one and the
    same, and so the
    getConnection() method will be called on the same
    object even if from
    different bean instances.

  • RELEVANCY SCORE 3.03

    DB:3.03:Connection Pool Problem With Jrun/Mssql af


    In my application iam using jrun as my Application server and MSSQL as database .
    Iam using the connection pooling .each and every page iam getting a connection from the pool and iam closing that connection at the end of the page.When i open my MSSQL process info there is still that connections are open what could be the reason for this can anybody help this

    Iam using a bean(DataBean) to create the connection and given below is my bean code .

    (my jsp code )
    try {
    Connection con = DataBean.getConnection("jndi");
    } catch (Exception ex {
    // . . . code to handle exceptions
    } finally {

    try{
    if(con != null) con.close();

    }catch(SQLException e(){}
    }

    .I think what iam doing is correct.

    Is there is any problem with preaparedstatement call?

    Thank you very much ,
    Biju

    (my databean code)

    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;

    import java.sql.SQLException;
    import java.sql.Connection;

    public class DataBean{

    public Connection getConnection(String strDataSource) throws SQLException {

    InitialContext context = null;
    DataSource ds = null;
    try {
    context = new InitialContext();

    ds =(DataSource) context.lookup("java:comp/env/jdbc/" + strDataSource);

    return ds.getConnection();
    }
    catch(Exception e) {

    throw new SQLException(e.getMessage());
    }
    finally {

    if (context != null)
    {
    // Always close the context
    try {
    context.close();
    }
    catch (NamingException ex) {
    // Ignore errors on close
    }
    }
    }
    }
    }

    DB:3.03:Connection Pool Problem With Jrun/Mssql af

    I am not clear on your code here either ...does the DataSource object that your are calling maintain the pool of connections? Without seeing the other objects it seems to me this is not actually a connection 'pool' per say, but rather an object designed to merely create a connection and hand it to you. No problem with that, its just that this would not really be a 'connection pool'. Usually, a connection pool handles its own creation/destruction of the connections (plural) in its pool ...you tell it you are done with a connection you obtained by calling its closeConnection() method. It then destroys it, removes it from the pool, and creates a new one (possibly) to fill the empty slot for the next client. Mind you it looks like the DataSource is a vendor bean of some sort, so I might be way off base here. I just thought I would add my input to the discussion.

  • RELEVANCY SCORE 3.02

    DB:3.02:Io Exception Broken Pipe Ora-17002 While Using Connection Pooling 3z


    Hi

    We are experiencing "broken pipe ORA-17002 error" when using connection pooling. This seems to be a common error when implementing connection pooling, but I didn't find any solution anywhere.

    we are using Oracle 9i 9.2.0.1 JDBC thin driver
    Our database is Oracle 8.1.7 running on HP Unix
    The middle tier(Tomcat) runs on RedHat linux server
    We are using JDK1.3

    It seems the connections automatically get stale or bad after certain period of time.Iam checking to see if the connection is closed, before giving the connection from the pool to the appilcation.It seems its still open.But when I start using the connection to open a callable statement or setAutocommit to false, it says Broken pipe or No more data to read from the socket.

    We are implementing our own connection pooling class(we experimented with OracleConnectionCacheImpl but it too gave the same errors).

    Does anybody have a solution for this problem??
    Is there a workaround for this?I would like to know how connection pooling is implemented in most of the applications that use oracle database?Or do we need to explicitly test the connection before using it, and reopen a connection if that is bad??

    Thanks
    Anil

    DB:3.02:Io Exception Broken Pipe Ora-17002 While Using Connection Pooling 3z

    We have been getting this since we upgraded our DB server to Ora 9i. From my observation, this happens when the network connection to the database is cut for some reason (i.e., DB bounce, T1 problem, etc). When this happens, the connections at the pool are marked bad and does not recover until you run out of connections which then cause the Broken Pipe IO exception vend code 17002.

    If I am not mistaken the old versions issues Stale connection exceptions but was able to recreate connections in the pool thus avoiding the need to restart the JVM to re-establish connections. This is really killing us.

    Help...

  • RELEVANCY SCORE 3.01

    DB:3.01:Class Cast Exception In Connection Pooling pp


    Hi guys.

    I am using JNDI name lookup for a data source ( specifically an OracleConnectionPoolDataSource ).
    I believe I have set up my data-source.xml entries correctly for Oracle Connection Pooling - but I am beginning to doubt it now ! :-)

    The code that retrieves the Connection Pool object via. JNDI is as follows :

    OracleConnectionPoolDataSource ocpds = new OracleConnectionPoolDataSource();
    InitialContext ctx = new InitialContext();
    ocpds = (OracleConnectionPoolDataSource)ctx.lookup("jdbc/pool/OracleConnectionPoolDS");

    My data-sources.xml file contains the following :

    ?xml version="1.0" standalone='yes'?
    !DOCTYPE data-sources PUBLIC "Orion data-sources" "http://xmlns.oracle.com/ias/dtds/data-sources.dtd"

    data-sources
    data-source
    class="oracle.jdbc.pool.OracleConnectionPoolDataSource"
    name="jdbc/pool/OracleConnectionPoolDS"
    location="jdbc/pool/OracleConnectionPoolDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/pool/OracleConnectionPoolDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@localhost:1521:orcl"
    inactivity-timeout="60"
    connection-retry-interval="1"
    max-connections="100"
    min-connections="10"
    wait-timeout="60"
    max-connection-attempts="3"
    property name="cacheScheme" value="1"/
    /data-source
    /data-sources

    This exception is recieved when the line of code in bold is executed.
    Servlet error: java.lang.ClassCastException: com.evermind.sql.OrionCMTDataSource.

    BUT why is it attempting to return and the cast the Orion class when it should be returning "oracle.jdbc.pool.OracleConnectionPoolDataSource" - the 'class' entry of the xml file above.

    Any ideas ? Help will be GREATLY appreciated !
    Thanks.
    Steve.

    DB:3.01:Class Cast Exception In Connection Pooling pp


    gday Steven --

    I noticed that you have the same "name" value for both the location and ejb-location entries defined within your datasource.

    ...
    location="jdbc/pool/OracleConnectionPoolDS"
    ejb-location="jdbc/pool/OracleConnectionPoolDS"
    ...

    Given that you are looking up the DS using "jdbc/pool/OracleConnectionPoolDS", then try changing the ejb-location to something different, such as:

    ejb-location="jdbc/cmt/OracleConnectionPoolDS"

    That should get you over the hump.

    cheers
    -steve-

  • RELEVANCY SCORE 3.01

    DB:3.01:Connection Pooling Using Oc4j V.S Orale Jdbc Pooling km


    Hi,

    I have used the database connection pooling supported
    in Oracle JDBC driver using the "classOracleConnectionCacheImpl" and pooling
    using OC4J class
    "com.evermind.sql.DriverManagerDataSource"
    I have noted that ppoling using OC4J is much faster.
    I cann't undertsand why? they are supposed to
    have the same performance.

    Ahmed

    DB:3.01:Connection Pooling Using Oc4j V.S Orale Jdbc Pooling km

    Hi,

    I have used the database connection pooling supported
    in Oracle JDBC driver using the "classOracleConnectionCacheImpl" and pooling
    using OC4J class
    "com.evermind.sql.DriverManagerDataSource"
    I have noted that ppoling using OC4J is much faster.
    I cann't undertsand why? they are supposed to
    have the same performance.

    Ahmed

  • RELEVANCY SCORE 3.00

    DB:3.00:Adding A Jdbc Driver In Sun Java System Web Server 7 3x


    I'm trying to configure JDBC database connection pooling for a Microsoft SQL Server 2005 Express Edition though the Sun Java System Web Server 7 administration console. I don't want to use the MSSQL JDBC driver that comes bundled with the SJSWS 7. So I've downloaded the lastest MSSQL JDBC driver from the Microsoft website and put in the "lib" subdirectory of the SJSWS installation directory. So when I go to add a new JDBC resource through the administration console, the newly added MSSQL database driver doesn't appear in the "Driver Vendor" drop-down box.

    How do I add the downloaded JDBC driver to the server so that it appears in the "Driver Vendor" drop-down under "Create JDBC resource".

    DB:3.00:Adding A Jdbc Driver In Sun Java System Web Server 7 3x

    Check this documentation from MS on using the JDBC driver with DataSource

    http://msdn2.microsoft.com/en-us/library/ms379052.aspx

    SJS Web Server 7.0 should work with any driver that has support for javax.sql.DataSource. The great majority of drivers do.

    So instead of using the driver name, use the DataSource class name:

    com.microsoft.sqlserver.jdbc.SQLServerDataSource

    The properties to add should be:

    user=username
    password=password
    servername=sql_server_hostname
    portnumber=sql_server_port
    databasename=databasename

    In general, all the setters required to get the datasource configured can be set as properties.

  • RELEVANCY SCORE 3.00

    DB:3.00:Oracle Global Temporary Tables And Connection Pooling xd



    When connection pooling, (Maintain Connections in cfadmin) is enabled. Oracle Global Temporary tables get messed up. Data bleeds from one page request to the next because CF is reusing the same Oracle session over and over again.

    Is there a JDBC driver that will allow the use of Global Temp Tables while having connection pooling enabled?

    Other application servers, like Oracle Application Server, somehow allow the pooling and GTT work together harmoniously.

    DB:3.00:Oracle Global Temporary Tables And Connection Pooling xd


    If your temporary tables were created with the default setting of on commit delete rows, the cftransaction tag will help you. This code:

    !--- cfquery name="x" datasource="burns"create global temporary table t_dan_test (id integer)/cfquery

    --- cftransactioncfquery name="i" datasource="burns"insert into t_dan_test values(1)/cfquerycfquery name="x1" datasource="burns"select * from t_dan_test/cfquery/cftransaction cfquery name="x2" datasource="burns"select * from t_dan_test/cfquerycfdump var="#x1#"cfdump var="#x2#"

    resulted in x1 dumping 1 record and x2 dumping 0.

  • RELEVANCY SCORE 3.00

    DB:3.00:How To Use Data-Sources.Xml For Jdbc? c3


    This piece of quite common code:

    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource)ic.lookup("java:comp/env/jdbc/OracleDS");
    Connection conn = ds.getConnection();

    and this entry in data-sources.xml:

    data-source
    class="com.evermind.sql.DriverManagerDataSource"
    name="OracleDS"
    location="jdbc/OracleCoreDS"
    xa-location="jdbc/xa/OracleXADS"
    ejb-location="jdbc/OracleDS"
    connection-driver="oracle.jdbc.driver.OracleDriver"
    username="scott"
    password="tiger"
    url="jdbc:oracle:thin:@localhost:5521:oracle"
    inactivity-timeout="30"
    /

    Generates this Exception:

    javax.naming.NoInitialContextException: Need to specify class name in environment or system property

    I wonder why, since thee must be something really basic I am ignoring.

    This is not an EJB, just a simple servlet that needs to use connection pooling in OC4J.

    For an EJB I am used to do hashtables and setting up the environment, but in all the simple samples I have seen, the above three lines of code seem to be sufficient.

    Anyone care to push me inthe right direction?

    Tnx in advance

    DB:3.00:How To Use Data-Sources.Xml For Jdbc? c3

    The solution was to assign new InitialContext() to a Context variable and not to an InitialContext variable.
    Pointing to the ejb-location from within web.xml did not hurt either.

    tnx.

  • RELEVANCY SCORE 3.00

    DB:3.00:Use A Database Connection Pooling In A Java Application? jj


    use a database connection pooling in a java application?

    we know, in tomat we can setup a connection pooling to privide datasource for jsp.
    now i build an application which uses jdbc high frequencily.i think it consumes much
    source of database,whether can i and how to setup a connection pool in application?
    thanks,eager for your help!

    DB:3.00:Use A Database Connection Pooling In A Java Application? jj

    Have you tried searching the web? I thought not. I'm sure there are examples out there.

  • RELEVANCY SCORE 3.00

    DB:3.00:Connection Pooling Size ak



    How to change the connection pooling size in JBOSS-4.0.2/JBOSS-4.0.5 for mssql and oracle both

    DB:3.00:Connection Pooling Size ak


    You can specify the maximum and minimum pool size in the datasource configuration file (*-ds.xml):
    min-pool-size5/min-pool-size
    max-pool-size100/max-pool-size

  • RELEVANCY SCORE 3.00

    DB:3.00:Connection Pool fj


    Is it efficient to use jdbc 2.0 ConnectionPoolDataSource in a j2EE application?or going for own implementation of connection pooling is preferred..can someone also give me some sample code on connection pooling which can be used directly with minor modifications.

    Thanks,
    Roopa

    DB:3.00:Connection Pool fj

    when ConnectionPoolDataSource is provided by the driver
    I guess, we configure connection pooling for a total core java application..Correct me if my understanding is wrong...

    It's just my doubt..I am trying to configure DataSource in ws 5.0.

  • RELEVANCY SCORE 3.00

    DB:3.00:I Was Trying To Connect Ibm Rad With Mssql 2000 To Generate Crystal Reports xz


    After establishing connection through wizard succesfully I try to use the parameters of the connection in .INI file. while establishing normal connection this error msg pops up.
    Failed to open a rowset.
    Details: :SQL Exception: [SQL Error Code] 0 [Error Message:] [IBM] SQL Server JDBC Driver] This driver is locked for use with enbedded application.

    DB:3.00:I Was Trying To Connect Ibm Rad With Mssql 2000 To Generate Crystal Reports xz

    After establishing connection through wizard succesfully I try to use the parameters of the connection in .INI file. while establishing normal connection this error msg pops up.
    Failed to open a rowset.
    Details: :SQL Exception: [SQL Error Code] 0 [Error Message:] [IBM] SQL Server JDBC Driver] This driver is locked for use with enbedded application.

  • RELEVANCY SCORE 2.99

    DB:2.99:Connection Pooling Error c1


    Hello!

    We have a Connection Pool defined, via Merant JDBC drivers to SQL Server, to WebSphere and are getting connections with the following code:
    Context ctx = new InitialContext();
    ConnectionPoolDataSource ds = (ConnectionPoolDataSource) ctx.lookup(dataSource);
    PooledConnection connPool = ds.getPooledConnection();
    conn = connPool.getConnection();

    The problem is that when SQL Server is recycled, connections are severed. The pool doesn't seem to realize that the connections are no longer valid and the next transaction that runs gets one of these bad connections and throws the following exception:
    [MERANT][SQLServer JDBC Driver]System Exception: Broken pipe

    Any ideas on how to make the pool actively monitor and destroy bad connections?

    DB:2.99:Connection Pooling Error c1

    I'm not sure about the Merrant JDBC for SQL Server, but I know that some drivers have a AutoReconnect property. When set to true; it automatically tries to reconnect when the connections are dropped in situations like server rebooted or network connectivity loss. Do the Merrant drivers have anything like that?

    - Chris

  • RELEVANCY SCORE 2.99

    DB:2.99:Connection Pooling For Multiple Db's pp


    Hi,..

    I have four DB's (Oracle,Informix,MSSQL,DB2).
    I have developed a meta search engine which goes thru all these db's.
    so far i was doin with traditional jdbc connection to all these db's using thin drivers..
    now the load is high and the system is very slow,..
    i desperately need some one to guide me for the Connection pooling mechanism..

    thank's in adv...

    Jim

    DB:2.99:Connection Pooling For Multiple Db's pp

    1.connection pooling mechanism usually managed by application servers. what server u r using , it depends on that.Use Datasources which are provided by JDBC 2.0 API.s which supports thin drivers.
    2. if u r not using connection pooling make sure that u close the connection after executing the query.don't keep it open.
    3.add filters in SQL queries , may be ur query is fetching more records.
    GL
    MohanS

  • RELEVANCY SCORE 2.98

    DB:2.98:Socket Connection Pooling dz


    Anyone know where I can get some sample code or libraries to implement client socket connection pooling (i.e. similar to JDBC Connection Pool). NB. I don't mean server side, I mean having a pool of connections to a server and being able to reuse these, check out, check in etc. in a multi-threaded app.

    Thanks

    DB:2.98:Socket Connection Pooling dz

    Have a look at the IBM AIO interface.
    This supports pooling of NIO channels.

  • RELEVANCY SCORE 2.98

    DB:2.98:Urgent Mssql Connection Pooling mf


    Hi,

    I have a problem in connection pooling of MS-SQL.

    1) I have downloaded and installed merant drivers successful and tested , working fine with jdbctest tool

    2) I have updated the environment classpath for mssql server as follows

    merant\lib\util.jar
    merant\lib\base.jar
    merant\lib\sqlserver.jar

    4) I have created the MS-SQL datasource in datasource.xml as follows

    data-source
    class="com.evermind.sql.DriverManagerDataSource"
    connection-driver="com.merant.datadirect.jdbc.sqlserver.SQLServerDriver"
    location="jdbc/woMSPool"
    username="db"
    password=" "
    url="jdbc:merant:sqlserver//master:1433;User=db;Password=' ' "
    inactivity-timeout="30"

    5) I have restarted the oc4j server, but here i am getting the error as follows
    No class found "com.merant.datadirect.jdbc.sqlserver.SQLServerDriver"

    6) Where am i wrong ? what step i missed?

    7) How many number of datasources can bedefined in datasources.xml file?

    8) Where should i define the other connection pool properties like max, min, etc. ?

    catch me at srinivas.gandhari@sankhyainfotech.com

    Please help me in soloving the above problem.

    Thanx in advance

    Regards
    Gandhari

    DB:2.98:Urgent Mssql Connection Pooling mf

    The error is coming from the Merant Driver while making connection. It is not able to connect to the designated server called
    master and erroring out and per my knowledge nothing to do with Oc4J.

    Pease try to write a simple java class that connects to a this SQLserver database and that will validate the connection to the DB

    regards
    Debu

  • RELEVANCY SCORE 2.97

    DB:2.97:Jdbc Connection Establishing cz


    package pooling;
    import java.sql.*;
    public class ConnectionClass {

    public Connection getConnection()
    {
    Connection connection=null;
    try
    {

    try{
    Class.forName ("oracle.jdbc.driver.OracleDriver");
    }
    catch(Exception ex){
    System.out.println("Cannot find database driver"+ex);
    }
    String strDatabaseURL ="jdbc:oracle:thin:@10.152.67.36:1521:ADIDAS" ;
    String strUserName = "rmasupp1";
    String strPassword = "Infosys";
    System.out.println("Inside get connection Metod");
    try
    {
    connection =(Connection) DriverManager.getConnection(strDatabaseURL, strUserName, strPassword);
    }
    catch(Exception e)
    {
    System.out.println("While Crating Connection object"+e);
    }
    System.out.println("after establishing connection");
    }
    catch(Exception E)
    {
    System.out.println("Exception Inside get Connection"+E);
    }
    return connection;
    }

    public static void main(String args[])
    {
    ConnectionClass c=new ConnectionClass();
    Connection con=c.getConnection();
    System.out.print("connection object"+con);
    }

    }in the above code while creating connection object it is giving below exception

    While Crating Connection objectjava.lang.ArrayIndexOutOfBoundsException

    can anybody help me.

    Regards,
    ramvee

    DB:2.97:Jdbc Connection Establishing cz

    Hi i have tried all these things still problem is coming

    the exception is

    Inside get connection Metod
    java.lang.ArrayIndexOutOfBoundsException
    at oracle.security.o3logon.C0.r(C0)
    at oracle.security.o3logon.C0.l(C0)
    at oracle.security.o3logon.C1.c(C1)
    at oracle.security.o3logon.O3LoginClientHelper.getEPasswd(O3LoginClientHelper)
    at oracle.jdbc.ttc7.O3log.init(O3log.java:289)
    at oracle.jdbc.ttc7.TTC7Protocol.logon(TTC7Protocol.java:251)
    at oracle.jdbc.driver.OracleConnection.init(OracleConnection.java:246)
    at oracle.jdbc.driver.OracleDriver.getConnectionInstance(OracleDriver.java:365)
    at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:260)

    I am using Oracle 9i database and JVM 1.4

    Regards,
    Ramesh

  • RELEVANCY SCORE 2.97

    DB:2.97:Jdbc 2.0 Connection Pooling Implementation fm


    I want to implement jdbc 2.0 connection pool interfaces. Can i get the code for the same

    DB:2.97:Jdbc 2.0 Connection Pooling Implementation fm

    Have a look at,
    http://opensource.devdaily.com/ddConnectionBrokerDocs.shtml

    You can download it and use.

    Sudha

  • RELEVANCY SCORE 2.97

    DB:2.97:Connection Pooling Using Jdbc Thin Driver a7


    Hi,
    I want to use the JDBC Thin Driver (Oracle 8.1.7) and connection pooling.
    I have read the connection pooling sample at http://otn.oracle.com/sample_code/tech/java/sqlj_jdbc/files/jdbc20/ConnectionPooling/ConnectionPoolingServlet.java.html

    and have 2 questions:

    1) Do I need to implement my own connection pooling code OR can i simply use the OracleConnectionPoolDataSource class ?

    2) If I can use the connection pooling code as is, where do I configure the MIN and MAX number of connections in the OracleConnectionPoolDataSource pool ?

    Thanks,
    Ema

    DB:2.97:Connection Pooling Using Jdbc Thin Driver a7

    Hi Chandar,

    I'm a diffrent user but One Question came to my mind and that is this values are hard coded in our java code, Do you any way that we set these variables in a Data source and then to look it up somewhere, and then our java program is Portable any different site?

    Thank you very much in advance

  • RELEVANCY SCORE 2.97

    DB:2.97:Mssql Connect Problem z8


    Help to solve MSSQL server connect problem.
    I downloaded msbase.jar, mssqlserver.jar and msutil.jar sp3 and have placed it in tomcat/common/lib.
    Connect String is
    driver=com.microsoft.jdbc.sqlserver.SQLServerDriver
    url=jdbc:Microsoft:sqlserver://192.168.0.2:1433;integratedSecurity=true;databaseName=Northwind
    username=sa
    password=pwd
    I receive an error
    DataSource Connection exception
    org.apache.tomcat.dbcp.dbcp.SQLNestedException:
    Cannot create PoolableConnectionFactory ([Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.)
    at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:855)
    What's the problem ?

  • RELEVANCY SCORE 2.96

    DB:2.96:Jdbc Connection W/Japanese Server x8


    I have an English client doing the following JDBC connection to a Japanese server:

    m_connection = DriverManager.getConnection(
    m_connectionStr,
    m_user, m_password );

    This always results in a SQL exception with the following three messages:

    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]???? 'MSSQL' ???????????????????????????????
    SQL State: HY000
    SQL Code: 4060

    [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]???? 'sa' ??????????????
    SQL State: 28000
    SQL Code: 18456

    [Microsoft][SQLServer 2000 Driver for JDBC]An error occured while attempting to log onto the database.
    SQL State: 08001
    SQL Code: 0

    What do I need to do to get a connection and to send queries that are stored in English?

    Thanks,
    pds2

    DB:2.96:Jdbc Connection W/Japanese Server x8

    Some changes were made on the server end. The SQL exception now is:

    SQLException: Codepage 932 is not supported by the Java environment.

    SQL State: null

    SQL Code: 0

    Can anyone tell me what this means? It is a Japanese MS SQL Server 2000 being inquired from a JDBC type 4 driver.

  • RELEVANCY SCORE 2.96

    DB:2.96:Connection Pooling With Oracle js


    Hello,Using EP6 SP1, my company has implemented the portal's Knowledge Management Connection Pooling feature to access our content on Oracle.At first this worked great, but recently we have been receiving "Connection Timeout" errors in our logs from this connection.Here is our error message we get back:"SQL Exception Error occured in MyListJSPDynPage.java in the doInitialization(). Error is : java.sql.SQLException: [Oracle JDBC Driver]Connection timed out: Connection timed out"Our Oracle DBAs have asked us to send them the sqlnet.log file.Is this log file created for the portal connection pool?Is there a better mechanism for setting up Connection Pools?If anyone can offer an advise or help with this issue, I would appreciate it.Thanks,Erin

    DB:2.96:Connection Pooling With Oracle js

    Hello,Using EP6 SP1, my company has implemented the portal's Knowledge Management Connection Pooling feature to access our content on Oracle.At first this worked great, but recently we have been receiving "Connection Timeout" errors in our logs from this connection.Here is our error message we get back:"SQL Exception Error occured in MyListJSPDynPage.java in the doInitialization(). Error is : java.sql.SQLException: [Oracle JDBC Driver]Connection timed out: Connection timed out"Our Oracle DBAs have asked us to send them the sqlnet.log file.Is this log file created for the portal connection pool?Is there a better mechanism for setting up Connection Pools?If anyone can offer an advise or help with this issue, I would appreciate it.Thanks,Erin

  • RELEVANCY SCORE 2.96

    DB:2.96:Jdbc Adapter - Connection Pooling sm



    Does anybody know if we can specify a Connection Pool to the JDBC Adapter? I mean the number of connections that the Adapter can have open to say Oracle Data.

    Regards

    Mike

    DB:2.96:Jdbc Adapter - Connection Pooling sm


    Hi Michael,

    Some of the specifications that are given while configuring the JDBC adapter, especially regarding the number of connections that you acn have...is given clearly in this documentation for JDBC adapter:-

    http://help.sap.com/saphelp_nw04/helpdata/en/1d/756b3c0d592c7fe10000000a11405a/frameset.htm

    Specifically check for the following parameters :-

    idb.transactionIsolation=0|1|2|4|8

    db.autoCommit=NO|YES

    db.pollInterval=

    db.retryInterval=

    db.logPollInterval=NO|YES/i

    Regards,

    Sushumna

  • RELEVANCY SCORE 2.96

    DB:2.96:Which Type Of Jdbc Driver Is Used By Connection Pooling Using Jndi ? pd


    Hi,
    My application use the connection pooling for the database connection using JNDI. MY database server is MS-SQL server 2000 and connector class is javax.sql.DataSource.
    Totally 4 drivers are available in JDBC, under this which type of driver is used by this connection pooling.
    Can any one please clear my doubt...
    Thanks in advance

    DB:2.96:Which Type Of Jdbc Driver Is Used By Connection Pooling Using Jndi ? pd

    This is one of those it depends questions. Could be a any type of JDBC driver from a type 4 to a type 2. You need to choose the correct driver for your needs.

  • RELEVANCY SCORE 2.95

    DB:2.95:Jdbc Driver 87


    hi all

    I want to know abt the Jdbc driver with inbuilt Connection pooling
    regards
    parvez

    DB:2.95:Jdbc Driver 87

    hi all

    I want to know abt the Jdbc driver with inbuilt Connection pooling
    regards
    parvez

  • RELEVANCY SCORE 2.95

    DB:2.95:Db Pooling Getconnection() Return Null sd


    i am trying to implement DB pooling in java using tomcat 5.5
    my context.xml has code
    Resource name="jdbc/refractor" auth="Container" type="javax.sql.DataSource"
    maxActive="100" maxIdle="30" maxWait="10000"
    username="root" password="JJJJJJ" driverClassName="com.mysql.jdbc.Driver"
    url="jdbc:mysql://localhost:3306/refractor?autoReconnect=true" URIEncoding="UTF-8"/my web.xml look like
    resource-ref
    descriptionDB Connection Pooling/description
    res-ref-namejdbc/refractor/res-ref-name
    res-typejavax.sql.DataSource/res-type
    res-authContainer/res-auth
    /resource-refand code
    is
    public Connection getConnection() throws SQLException {
    Connection connection = null;
    try {
    InitialContext initCtx = new InitialContext();
    Context envCtx = (Context) initCtx.lookup("java:comp/env");
    DataSource ds = (DataSource) envCtx.lookup("jdbc/refractor");
    if (ds != null) {
    connection = ds.getConnection("root","JJJJJJ");/// *HERE it is returning null*
    }


    } catch (Exception e) {
    }
    return connection;

    }

    DB:2.95:Db Pooling Getconnection() Return Null sd

    AmitChalwade123456 wrote:
    Ok i got that it's jar problem .. i solved it thanks a lot for u r helpYour welcome.

  • RELEVANCY SCORE 2.95

    DB:2.95:Enabling Connection Pooling For Jdbc Thin (11g) Client Application mk


    We are using a java application, which connects via JDBC Thin (11g) to a 10.2.0.3 database. Unfortunately, no connection pooling is used and we get up to 15 connections per second.

    Is it possible to enable connection pooling with changing as little as possible in the application, e.g. by only changing properties?

    Best regards,
    Martin

    DB:2.95:Enabling Connection Pooling For Jdbc Thin (11g) Client Application mk

    Hello,

    thank you for this link. We are using 11g so I will check the 11g documentation guide.

    What I wanted to know is whether it is necessary to actually change the application or if it is possible to just change a java properties file or java program arguments.

    Best regards,
    Martin

  • RELEVANCY SCORE 2.95

    DB:2.95:Connection Pooling 71


    Hi,
    Right now I'm using Oracle 7.3.4 jdbc thin driver. I would like to know if this one supports connection pooling.

    TIA,
    sree

    DB:2.95:Connection Pooling 71

    BLOCKQUOTEfont size="1" face="Verdana, Arial"quote:/fontHROriginally posted by sbalasha@ford.com:
    Hi,
    Right now I'm using Oracle 7.3.4 jdbc thin driver. I would like to know if this one supports connection pooling.

    TIA,
    sreeHR/BLOCKQUOTE
    No, Connection Pooling and Caching requires Oracle 8.1.6+ java enabled databases.
    Regards, Marcelo.
    null

  • RELEVANCY SCORE 2.95

    DB:2.95:Which Oracle Jdbc Drivers Support Connection Pooling? V V V Imp m8


    Please Can any one give some advice.

    1--What versions of JDBC drivers work with what versions of the
    Oracle database? And with what version of Javasoft's JDK?

    2--Which Oracle JDBC drivers support Connection Pooling?

    We are using jdk13. with Oracle815 in JRUN

    please mail to nabhilash@tatafin.com

    DB:2.95:Which Oracle Jdbc Drivers Support Connection Pooling? V V V Imp m8

    Please Can any one give some advice.

    1--What versions of JDBC drivers work with what versions of the
    Oracle database? And with what version of Javasoft's JDK?

    2--Which Oracle JDBC drivers support Connection Pooling?

    We are using jdk13. with Oracle815 in JRUN

    please mail to nabhilash@tatafin.com

  • RELEVANCY SCORE 2.94

    DB:2.94:Connection Pooling And Documentation 3s


    Hi,

    I have just downloaded the latest JDBC docs for 10g.

    The way the chapters are organised, it imples that connection pooling is only available with the OCI driver (becuase connection pooling comes under the OCI-specific functionality). I'm sure this was in the thin driver as of 9i.

    Can someone clarify?

    Thanks

    Rakesh

    DB:2.94:Connection Pooling And Documentation 3s

    Rakesh,
    The Oracle JDBC "thin" driver supports connection caching -- which is very similar to connection pooling. Both use logical handles to physical connections. In other words, both allow one physical connection to be used by different clients.

    Hope this clarifies things for you.

    Good Luck,
    Avi.

  • RELEVANCY SCORE 2.94

    DB:2.94:Connection Pooling ck


    Hai friends,
    I am MCA final year student in vijayawada , indai.
    I am using database connection using jdbc. But i want to know how to use jndi connection pooling procedure in BEA WEBLOGIC SERVER.
    In real world Which technology is used to maintain database connection.
    Thank u

    DB:2.94:Connection Pooling ck

    dont use web sphere, have a look at the documentation if you dont get a reply on that.

    You have 2 options for pooling

    1) Let the web server do it (after configuring)
    2) Write a class using commons dbcp

    I have used both methods, in a simple test I performed the server was 5 times faster than my class. i havent got round to analysing what is wrong with the class, but using the web-server is the method reccomended by everyone I have discussed it with in this forum.

  • RELEVANCY SCORE 2.94

    DB:2.94:Re: I Hope This Is Basic Thread Question.. c1


    BTW i am not using Single JDBC source .. I am using Connection Pooling...
    so..

    DB:2.94:Re: I Hope This Is Basic Thread Question.. c1

    sorry but here is what I could found..
    http://www.princeton.edu/~storacle/jdbc8_doc/oracle.jdbc.pool.OracleConnectionPoolDataSource.html

  • RELEVANCY SCORE 2.94

    DB:2.94:Connection Pooling With Ms Jdbc Driver 78


    Hi

    I was trying to setup the connection pooling in websphere using the microsoft JDBC driver(I got the latest from MS site)

    When I try to get a connection using the Dataosource I am getting an error like this

    Does any one have any idea about this , there is no information in the MS site (Strange)

    Thanks in advance

    java.lang.NoClassDefFoundError:com/merant/jdbcspy/SpyLogger

    [3/16/04 16:46:15:775 EST] 2fe2ef98 ConnectionFac E J2CA0036E: An exception occurred while invoking method setDataSourceProperties on com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl used by resource optimizerTXDataSource : java.lang.reflect.InvocationTargetException: java.lang.NoClassDefFoundError: com/merant/jdbcspy/SpyLogger
    at com.microsoft.jdbcx.base.BaseDataSource.setLogWriter(Unknown Source)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.setLogWriter(WSRdbDataSource.java:611)
    at com.ibm.ws.rsadapter.spi.InternalGenericDataStoreHelper.setupInitialJDBCTraceIfNecessary(InternalGenericDataStoreHelper.java:200)
    at com.ibm.ws.rsadapter.spi.WSRdbDataSource.init(WSRdbDataSource.java:351)
    at com.ibm.ws.rsadapter.spi.WSManagedConnectionFactoryImpl.setDataSourceProperties(WSManagedConnectionFactoryImpl.java:862)

    DB:2.94:Connection Pooling With Ms Jdbc Driver 78

    Alin

    Thanks for the info

    I will try a different driver

  • RELEVANCY SCORE 2.93

    DB:2.93:What Is Jdbc Connection Pooling... ? ak


    Can any one explain whta is JDBC Connection Pooling.. when, where and why used ?

    DB:2.93:What Is Jdbc Connection Pooling... ? ak

    Connecting to the DB is expensive (in terms of time). Connection pooling gives you the ability to reuse a set of connections without creating new connections everytime. It might be obvious that this gives very positive results in terms of DB performance.

  • RELEVANCY SCORE 2.93

    DB:2.93:Db Pooling Crash kx


    Hi all

    I' m developing a Web Application on Tomcat 4.1.29 that make use of connection pooling by datasource on Sql Server 2000

    Due to an "date format error" during an INSERT command (e.g. "2004/30/12" instead of "30/ 12/2004" ) JDBS throws an Exception like this

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]The year, 11, is outside the range allowed by the SQL Server.

    That is OK.

    The problem is that hereafter any connection to Db fails as if the connection pooling crashed. The exception is:

    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Connection reset by peer: socket write error (sometimes also e "broken pipe" error ).

    The only way to resolve the problem is to restart the context. an all runs since the above exception get throws.

    Can anyone help me ???

    Best regards

    DB:2.93:Db Pooling Crash kx

    Are you using OJB?

    If so try adding a connection-pool attribute in the jdbc-connection-descriptior... tag

    connection-pool
    validationQuery="select top 1 1 from TABLE_NAME"
    /connection-pool

    Obviously you will need to replace the TABLE_NAME with a suitable table in your db.

    HTH, chris.

  • RELEVANCY SCORE 2.93

    DB:2.93:Tomcat 5.5 Connection Pooling Problem sk


    Hi,
    I am trying to setup JDBC connection pooling in Tomcat 5.5 using DB2 database and IBM RAD 7.0 IDE. Although The setup described in JNDI Resources HOW-TO(http://tomcat.apache.org/tomcat-5.5-doc/jndi-resources-howto.html) for creating JDBC Datasources did work, I would like to work with real connection pooling, which means not declaring datasources into the /META-INF/context.xml file of each web app but having them as GlobalNamingResources into /conf/server.xml and accessing them through ResourceLink references from /conf/context.xml (or /conf/catalina/localhost/ROOT.xml). However I am stuck with Exception javax.naming.NameNotFoundException: Name jdbc is not bound in this Context. Even if I add an: resource-env-ref
    description
    /description
    resource-env-ref-namejdbc/DB2T/resource-env-ref-name
    resource-env-ref-typejavax.sql.DataSource/resource-env-ref-type
    /resource-env-ref record in my /WEB-INF/web.xml I get a javax.naming.NamingException: Cannot create resource instance Exception.

    Does anyone have an idea how to resolve this?
    Here are my configurations:

    -----------------/conf/server.xml-------------------
    Server port="8005" shutdown="SHUTDOWN"

    !-- Global JNDI resources --
    GlobalNamingResources

    Resource name="jdbc/DB2T" auth="Container"
    type="javax.sql.DataSource" removeAbandoned="true"
    factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
    removeAbandonedTimeout="30" maxActive="100"
    maxIdle="30" maxWait="10000" username="id"
    password="pass"
    driverClassName="com.ibm.db2.jcc.DB2Driver"
    url="jdbc:db2://ip-addrr:port/dbname"/
    /GlobalNamingResources------------------/conf/context.xml----------------------
    !-- The contents of this file will be loaded for each web application --
    Context

    !-- Default set of monitored resources --
    WatchedResourceWEB-INF/web.xml/WatchedResource
    WatchedResourceMETA-INF/context.xml/WatchedResource

    ResourceLink name="jdbc/DB2T" global="jdbc/DB2T" type="javax.sql.DataSource"/
    /ContextI also try to get the resource with java code like this:

    DataSource ds;
    InitialContext DSCtx = new InitialContext();
    ds = (DataSource) DSCtx.lookup("java:/comp/env/jdbc/DB2T"); PS: When I start the tomcat and hit http://localhost:8080 I can't get the default page although every web app I run loads without problems. Do you think this has a relation with the above problem?

    DB:2.93:Tomcat 5.5 Connection Pooling Problem sk

    Hi java_2006,
    Thanks for the reply.
    However the setup you propose(with parameter tags) works for tomcat 5 not 5.5.
    In Tomcat 5.5 parameters are passed as attributes.
    I also have checked all stuff in /common/lib (it worked with the default configuration(declaring resources in /META-INF/context.xml)) and they dont seem to have any problem.

  • RELEVANCY SCORE 2.92

    DB:2.92:Wls 6.1 Sp4, Ibm Type 2 Driver - Connection Pool Question c7


    Hello,

    As I understand, when the application requests for a connection from a TX datasource, WebLogic Connection Pooling gets an unreserved connection if there is one or create a new one, test it to make sure it is good before handing it over to the application. While testing an unreserved connection, if JDBC driver throws an SQL exception (it could be for various reasons including TCP timeout if host crashed or socket closed if Firewall kills the connection etc), Does the application gets the exception?

    Thanks
    Ganesh

    DB:2.92:Wls 6.1 Sp4, Ibm Type 2 Driver - Connection Pool Question c7

    ganesh narayanan wrote:

    Hello,

    As I understand, when the application requests for a connection from a TX datasource,WebLogic Connection Pooling gets an unreserved connection if there is one or create
    a new one, test it to make sure it is good before handing it over to the application.
    While testing an unreserved connection, if JDBC driver throws an SQL exception
    (it could be for various reasons including TCP timeout if host crashed or socket
    closed if Firewall kills the connection etc), Does the application gets the exception?

    Thanks
    GaneshHi. If the pool is defined to test connections during reserves, the pool
    will do all it can to give you a good connection. If the test fails, the
    application will not get the SQLException that occurred during the test.
    However, if the connection fails while the application is using it, the
    exception will be seen by the application.
    Joe

  • RELEVANCY SCORE 2.91

    DB:2.91:Connection Pooling In Weblogic Using Db2 xj


    i am trying to configure the connection pooling in Weblogic console using DB2 and i put the ff informations:

    Name: myConnectionPool
    URL: jdbc db2://localhost:5000
    Driver Class Name: COM.ibm.db2.jdbc.DB2Driver
    properties: user=db2admin

    for some reason, i got this error:
    Cannot startup connection pool "myConnectionPool" weblogic.common
    Resource Exception: Cannot load driver class: COM.ibm.db2.jdbc.DB2Driver

    i appreciate if someone can help me with this. thx.

  • RELEVANCY SCORE 2.91

    DB:2.91:Connection Pooling Issue With Compiling With Jdk 1.5.0 x1


    A
    javax.naming.NameNotFoundException: Name jdbc is not bound in this Context exception occurs when I run my web app in Tomcat 5 using jdk 1.5. However, I don't get this problem with I use jdk 1.6.0. The mysql connector version is 3.1.1.4 and my server.xml file has been configured correctly. Any suggestions as to why this exception is occurring - I'm assuming it's a version issue but not sure how to solve it!

    DB:2.91:Connection Pooling Issue With Compiling With Jdk 1.5.0 x1

    Use "java:comp/env/jdbc/DbUser" instead of just "jdbc/DbUser" for datasource config

    See http://www.tek-tips.com/viewthread.cfm?qid=431734

    The mysql connector version is 3.1.1.4Use a more recent jdbc driver
    http://dev.mysql.com/downloads/connector/j/5.0.html
    http://dev.mysql.com/doc/refman/5.0/en/connector-j-versions.html

    Message was edited by:
    java_2006

  • RELEVANCY SCORE 2.90

    DB:2.90:Connection Pools + Special Characters + Jdbc-Odbc a8


    I have 3 questions:

    1) Do you know any good JDBC connection pooling libraries? Maybe one that doesn't need much setup? Something free that I can bundle with my .WARs ?

    2) What characters I need to intercept in a user's input before I can put them in a database? (besides ' and %)

    3) Is connection pooling efficient when it comes to JDBC-ODBC?

    DB:2.90:Connection Pools + Special Characters + Jdbc-Odbc a8

    So. How can you handle such kind of problem? I experience when transfer "double" characters
    to hex code (by java.net.URLEncode.encode()), then save it in MS-SQL through JDBC-ODBC.
    MS-SQL transforms some combination of characters (%nn, +) to else characters.

  • RELEVANCY SCORE 2.90

    DB:2.90:[Question] Jheadstart Uses What Conenction ? x8


    I wanted to know how Jheadstart make connection to data base i.e. it uses what method .... JDBC direct calling or Connection pooling or what ?

    DB:2.90:[Question] Jheadstart Uses What Conenction ? x8

    Usman,

    JHeadstart does not connect to the database, the ADF Business Components framework takes care of the db communication.

    You might want to check out the ADF Dev Guide, sections 1.2 and 4:
    http://download-west.oracle.com/docs/html/B25947_01/toc.htm

    Steven Davelaar,
    JHeadstart team.

  • RELEVANCY SCORE 2.90

    DB:2.90:Connection Pooling Resource Name Question 1m


    Hi there, I've tried creating a new context and put the db connection code there (just to test it). When I try to navigate to the servlet I get a null pointer exception.

    I don't think I'm referring to the resource name correctly, does "TestDB" refer to the database name?

    Resource name="jdbc/TestDB" ....... /

    If so is there a way on Oracle to find the name of the database?

    Cheers again.

    MM

    DB:2.90:Connection Pooling Resource Name Question 1m

    I don't think I'm referring to the resource name
    correctly, does "TestDB" refer to the database name?

    Resource name="jdbc/TestDB" ....... /No, it's not the name of the database.

    Kaj

  • RELEVANCY SCORE 2.90

    DB:2.90:Re: Connection Using Jdbc Is To Slow On Windows Xp z9


    I dont know why it takes so long to connect, but I suggest you use connection pooling instead. Once the connection is made, it takes only milliseconds to get a connection. Connection pooling is the recommended why of getting connections.

    DB:2.90:Re: Connection Using Jdbc Is To Slow On Windows Xp z9

    Hi all! I'm trying to connect to Microsoft SQL Server 2000 using the microsoft jdbc driver. I tested this in linux Fedora and the connection is very fast, but in windows xp it takes about 5 seconds. The drivers are 3 jar files witch I include in the classpath variable : msbase.jar , mssqlserver.jar and msutil.jar To get the connection i use the following code:DriverManager.registerDriver(new com.microsoft.jdbc.sqlserver.SQLServerDriver()); _con=DriverManager.getConnection("jdbc:microsoft:sqlserver://xxx.xxx.xxx.xxx:18345;databasename=DBNAME","MYUSER","MYPASS");Note that the connection is made sucessful, but it takes 5 seconds witch I think it's not a normal time and in linux with the same drivers the connection is made in miliseconds. I searched a lot about this, but found nothing. I hope someone can help me. Thanks in advance. In forget to say that I am using jdk1.6 and jre 1.6 Edited by: GrEg on Apr 21, 2009 10:59 PM

  • RELEVANCY SCORE 2.90

    DB:2.90:Error Establishing Socket To Mssql Server 2000 j3


    Hi. Im using JDK 1.4.2_03, MS SQL Server 2000, and com.microsoft.jdbc.sqlserver.SQLServerDriver as the database driver. The web application works fine but after 5 hours (approx) of database access I encounter this problem:

    SQLException occurred in JDBCPool: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.
    params: com.microsoft.jdbc.sqlserver.SQLServerDriver, jdbc:microsoft:sqlserver://DATASVRAMG:1433;DatabaseName=IAMSFinal;SelectMethod=cursor. Please check your username, password and other connectivity info.
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket.

    There are only 5 concurrent users of the web application. The server has 2GB memory.
    What is the cause? Is this a connection pooling problem? Can anyone suggest a solution? Thanks.

    DB:2.90:Error Establishing Socket To Mssql Server 2000 j3

    Your configuration setting seems not ok, (is pretty obvious from the exception as well),
    still somewhere you are puuting the wrong url, connection string etc.

    Can you please check all of them again ?

  • RELEVANCY SCORE 2.90

    DB:2.90:Re: About Jdbc Connection Pooling..... 9x


    dear ,
    Jdbc3PoolingDataSource extends Jdbc3PoolingDataSource. And getConnection() method is written in PoolingDataSource.
    ok..

    DB:2.90:Re: About Jdbc Connection Pooling..... 9x

    and this is my own DBConnect class

    public class DBConnect {

    /*xml Declaration*/
    private static Document dom;
    /*xml Declaration*/

    DBConnect(){

    }
    public static Connection getConnection() throws SQLException {
    Jdbc3PoolingDataSource source =null;
    Connection con = null;
    try {
    source = new Jdbc3PoolingDataSource();

    Element docEle;
    Element el,elch;
    NodeList nl,nlch;

    File file = new File("AitInventory.cfg.xml");

    DocumentBuilder builder =
    DocumentBuilderFactory.newInstance().newDocumentBuilder();
    Document doc = builder.parse(file);
    NodeList nodes = doc.getElementsByTagName("Config");
    for (int i = 0; i nodes.getLength(); i++) {
    Element element = (Element) nodes.item(i);

    nlch = element.getElementsByTagName("Servername");
    elch = (Element) nlch.item(0);
    System.out.println(elch.getFirstChild().getNodeValue());
    source.setServerName(getCharacterDataFromElement(elch));
    nlch = element.getElementsByTagName("DatabaseName");
    elch = (Element) nlch.item(0);
    System.out.println(elch.getFirstChild().getNodeValue());
    source.setDatabaseName(getCharacterDataFromElement(elch));
    nlch = element.getElementsByTagName("User");
    elch = (Element) nlch.item(0);
    System.out.println(elch.getFirstChild().getNodeValue());
    source.setUser(getCharacterDataFromElement(elch));
    nlch = element.getElementsByTagName("Password");
    elch = (Element) nlch.item(0);
    System.out.println(elch.getFirstChild().getNodeValue());
    source.setPassword(getCharacterDataFromElement(elch));
    nlch = element.getElementsByTagName("MaxConnections");
    elch = (Element) nlch.item(0);
    System.out.println(elch.getFirstChild().getNodeValue());
    source.setMaxConnections(getIntValue(elch));
    }

    } catch (Exception e) {}
    try{
    con =source.getConnection();
    con.setAutoCommit(false);
    System.out.println("Connected to Database");
    } catch (Exception e) {
    System.out.println("PostgreSQL Connection failure");
    e.printStackTrace(System.out);
    throw new SQLException("PostgreSQL Connection failure");
    }
    return con;
    }

    public static void closeConnection(Connection con) throws SQLException {
    try {
    con.rollback();
    con.close();
    } catch (Exception e) {
    System.out.println("PostgreSQL Connection failure");
    throw new SQLException("PostgreSQL Connection failure");
    }
    }

    public static void commitAndCloseConnection(Connection con) throws
    SQLException {
    try {
    con.commit();
    con.close();
    } catch (Exception e) {
    System.out.println("PostgreSQL Connection failure");
    throw new SQLException("PostgreSQL Connection failure");
    }
    }

    public static void main(String[] args) {
    DBConnect testConn = new DBConnect();
    try {
    Connection con = testConn.getConnection();
    System.out.println("Connection is sucessfull 1");
    Connection con1 = testConn.getConnection();
    System.out.println("Connection is sucessfull 2");
    } catch (Exception e) {
    e.printStackTrace(System.out);
    System.out.println("Connection failure");

    }
    }

    public static String getCharacterDataFromElement(Element e) {
    Node child = e.getFirstChild();
    if (child instanceof CharacterData) {
    CharacterData cd = (CharacterData) child;
    return cd.getData();
    }
    return "?";
    }

    private static int getIntValue(Element ele) {
    //in production application you would catch the exception
    return Integer.parseInt(getCharacterDataFromElement(ele));
    }

    }

  • RELEVANCY SCORE 2.89

    DB:2.89:Logging In Fuse Esb fa



    I'm using hikariCP with mssql driver as connection pool in my project. Mssql driver uses java.util.logging as logger.

    What shoud I do to log, for instance, JDBC database queries in fuse esb?

    DB:2.89:Logging In Fuse Esb fa


    I'm using hikariCP with mssql driver as connection pool in my project. Mssql driver uses java.util.logging as logger.

    What shoud I do to log, for instance, JDBC database queries in fuse esb?

  • RELEVANCY SCORE 2.89

    DB:2.89:Re: Reconnecting To A Dropped Connection To Database 7c


    You should either write the servlet to obtain, use, and close a JDBC connection every time it is invoked,
    or use a connection pooling system that will test and keep a stock of healthy connections for you to re-use
    as needed. If a connection fails halfway through executing the servlet after having been tested or newly
    made at the beginning of the servelt then you will still have to handle the exception and re-do your work
    with a new connection if you can.

    DB:2.89:Re: Reconnecting To A Dropped Connection To Database 7c

    Apologies if I'm not giving enough information - I am new to ojdbc connections and servlets in general ~ I am responsible for maintaining a bunch of legacy code which involves several deployed servlets; some through Tomcat 5.5.2, and others through Glassfish 3.3. All connect using the ojdbc14 driver, to Oracle 10 databases. All - or so I am told - use pooled connections. However, occasionally, the connection to the DB is dropped, the DB restarts, etc., and the servlets fail until someone notices and they are re-deployed. Not a great setup. I understand there is some way to monitor the DB connection the servlet makes, so that, in the event of a lost connection, the servlet 'knows' about it and can recover gracefully rather than throwing an SqlException. But how do I accomplish this? Is there a way to make the servlet smart enough to recover itself by reinstigating the DB conection? I've searched around for an answer, but I have not been successful. Suggestions and pointers muchly appreciated. Thank you.

  • RELEVANCY SCORE 2.89

    DB:2.89:Classcastexception; Jdbc Connection Pooling Setup; 71


    I'm trying to set up a JDBC connection pool in Sun ONE 6.1, without much luck.

    I'm gettting a java.lang.ClassCastException somewhere in the sun code. The identical application runs fine in Apache/Tomcat, so I'm puzzled why it's throwing this exception in Sun ONE.

    If anyone has any idea of where to turn, please let me know. Here's the top of the stack trace I'm getting:

    com.sun.enterprise.resource.JdbcAllocator.(JdbcAllocator.java:55)
    com.sun.enterprise.resource.JdbcDataSource.getAllocator(JdbcDataSource.java:234)
    com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:200)
    com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:97)
    jsps.DatabaseTest_jsp._jspService(_DatabaseTest_jsp.java:110)

    Thanks in advance

    DB:2.89:Classcastexception; Jdbc Connection Pooling Setup; 71

    I'm trying to set up a JDBC connection pool in Sun ONE 6.1, without much luck.

    I'm gettting a java.lang.ClassCastException somewhere in the sun code. The identical application runs fine in Apache/Tomcat, so I'm puzzled why it's throwing this exception in Sun ONE.

    If anyone has any idea of where to turn, please let me know. Here's the top of the stack trace I'm getting:

    com.sun.enterprise.resource.JdbcAllocator.(JdbcAllocator.java:55)
    com.sun.enterprise.resource.JdbcDataSource.getAllocator(JdbcDataSource.java:234)
    com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:200)
    com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:97)
    jsps.DatabaseTest_jsp._jspService(_DatabaseTest_jsp.java:110)

    Thanks in advance

  • RELEVANCY SCORE 2.89

    DB:2.89:Cannot Startup Connection Pool 8p



    i'm trying to configure the connection pooling in Weblogic console using DB2 and
    i put the ff informations:

    Name: myConnectionPool
    URL: jdbc db2://localhost:5000
    Driver Class Name: COM.ibm.db2.jdbc.DB2Driver
    properties: user=db2admin

    but i got this error:
    Cannot startup connection pool "MyConnectionPool" weblogic.common.
    Resource Exception : Cannot load driver class: COM.ibm.db2.jdbc.DB2Driver

    i appreciate if somebody can help me. thx.

    DB:2.89:Cannot Startup Connection Pool 8p

    Hi,
    You should ask this in jdbc group, but

    Resource Exception : Cannot load driver class: COM.ibm.db2.jdbc.DB2Driverindicates to me that you don't have the DB2 JDBC driver library in the
    classpath of weblogic.

    Modify your startweblogic script to include this in the classpath.

    Regards,
    Jon

  • RELEVANCY SCORE 2.89

    DB:2.89:J2ee 1.4 Web Asadmin Jdbc Mssql 2000 Cannot Ping k1


    I need help please ;-||

    I am unable to declare a 'ping-able' JDBC connection pool using asadmin to MSSQL 2000 using J2EE SDK 1.4 Developer Edition. Trying to 'ping' the defined connection pool I receive the following error message:

    An error has occurred.
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Error getting connection from the EIS
    ~~~~~
    Using JDBC downloaded from Microsoft
    ~~~~~
    JVM settings / Path Settings (Classpath suffix)

    C:\j2ee\SunAppServer/pointbase/lib/pbclient.jar
    C:\j2ee\SunAppServer/pointbase/lib/pbembedded.jar
    C:\j2ee\SunAppServer\msSql\msjdbc\lib\msbase.jar
    C:\j2ee\SunAppServer\msSql\msjdbc\lib\mssqlserver.jar
    C:\j2ee\SunAppServer\msSql\msjdbc\lib\msutil.jar
    ~~~~~
    None of the following Classnames work as found within the JDBC jar file from MS:
    ~~~~~
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    com.microsoft.jdbc.sqlserver.SQLServerDataSource
    com.microsoft.jdbcx.sqlserver.SQLServerDataSource

    Connection String:
    jdbc:microsoft:sqlserver://192.6.1.172:1433;DatabaseName=EpMaster
    additional properities specified for user and password
    ~~~~~
    The JDBC elements that work with TOMCAT as follows:
    com.microsoft.jdbc.sqlserver.SQLServerDriver
    jdbc:microsoft:sqlserver://192.6.1.172:1433;DatabaseName=EpMaster
    ~~~~~
    Can this be made to work?
    I am wondering if J2EE 1.4 SDK has a compatibility issue with MS JDBC driver?

    DB:2.89:J2ee 1.4 Web Asadmin Jdbc Mssql 2000 Cannot Ping k1

    Please refer to the solution:

    Problem connecting to SQL Server 2000

    earlier in this forum which I had missed.

    I did not have the latest MS JDBC service pack installed, which is service pack 2 which installes a class 4 JDBC.

  • RELEVANCY SCORE 2.88

    DB:2.88:Connection Pooling In Websphere 8m


    Hi all,

    I am new to Websphere.Can somebody tell me the steps I am following to create connection pool are right or wrong. because I'm getting the following exception when I test the connection.(I am trying to connect to oracle 10g)

    Steps:
    1. JDBC- JDBC Provider ,then provided all information there.
    2. Create Data Source.
    and then tested the connection in websphere only it is giving the following error:

    The test connection operation failed for data source data1 on server server1 at node wksit004Node01 with the following exception: java.sql.SQLException: invalid arguments in callDSRA0010E: SQL State = null, Error Code = 17,433

    Thanks in advance.

    Namrta

    DB:2.88:Connection Pooling In Websphere 8m

    1) Consult the documentation of the database and the connection pool implementation used which settings you should need to know at least. E.g. JDBC driver class name, JDBC URL used, login username/password and possibly also some connection pool specific settings such as timeout and max connections.

    2) Consult the documentation of Websphere how to create a datasource, which settings it require and what/how to fill it in.

    Then do the math.

    It might also help to Google on the IBM specific error message: [http://www.google.com/search?q=DSRA0010E%3A+SQL+State+%3D+null%2C+Error+Code+%3D+17%2C433]

  • RELEVANCY SCORE 2.88

    DB:2.88:How To Use The Connection Pooling Using Jdbc2.0 And Type1 Driver For Oracle ca


    I wants to make a connection pooling object while using the jdbc -odbc bridge (type -1 driver) for the oracle. Help me out.

    DB:2.88:How To Use The Connection Pooling Using Jdbc2.0 And Type1 Driver For Oracle ca

    Sir recevie the following error:
    java.sql.SQLException: No suitable driver

    at java.sql.DriverManager.getConnection(DriverManager.java:537)

    at java.sql.DriverManager.getConnection(DriverManager.java:199)

    at db1.main(db1.java:30)

    Exception in thread "main" Process Exit...

    If i use the following code line:
    Connection conn = DriverManager.getConnection "jdbc:oracle:oci7:scott/tiger@localhost:1521:orcl");
    Even without the concept of any connection pooling at all.
    Please tell me that how to solve the problem of TNS Listener of oracle so that i am able to use the type 4 driver and thus use the connection pooling too.

  • RELEVANCY SCORE 2.88

    DB:2.88:Java Connection Pooling s8


    I want to know what is the procedure of getting oracle's jdbc connection pooling api(class files and java doc).
    I also want to know whether it is free or not

    DB:2.88:Java Connection Pooling s8

    I want to know what is the procedure of getting oracle's jdbc connection pooling api(class files and java doc).
    I also want to know whether it is free or not

  • RELEVANCY SCORE 2.87

    DB:2.87:If Jsp File Include Script.. Finally Execute? x3


    Hello
    My English ability very poor sorry

    I make q a board

    source is

    try{
    pstmt.executeUpdate();
    pstmt.close();
    %
    script language=javascript
    location.href ="list.jsp";
    /script
    %
    } catch (Exception e) {
    out.println(e);
    }finally{
    pool.freeConnection("jdbc", con); //db pooling.. connection close()...
    }

    source is like this....
    on the center...
    script linke page list.jsp....
    so I wonder.....
    the filnally{

    }is work?
    don't work?

    DB:2.87:If Jsp File Include Script.. Finally Execute? x3

    Well looking at ur code I guess u want to redirect user to
    list.jsp page once u execute the statement .
    and later u want to return the connection object to pool .

    I don't understand why you need to take the help of jaascript to do this
    you can do the same thing this way

    %
    try{
    pstmt.executeUpdate();
    pstmt.close();
    } catch (Exception e) {
    out.println(e);
    }finally{
    pool.freeConnection("jdbc", con); //db pooling.. connection close()...
    }
    response.sendRedirect("ur url");
    %

    This way you will ensure that your finally block gets executed
    before redirecting the user..

  • RELEVANCY SCORE 2.87

    DB:2.87:I Was Trying To Connect Ibm Rad With Mssql 2000 To Generate Crystal Reports 99


    After establishing connection through wizard succesfully I try to use the parameters of the connection in .INI file. while establishing normal connection this error msg pops up.
    Failed to open a rowset.
    Details: :SQL Exception: [SQL Error Code] 0 [Error Message:] [IBM] SQL Server JDBC Driver] This driver is locked for use with embedded application.

    DB:2.87:I Was Trying To Connect Ibm Rad With Mssql 2000 To Generate Crystal Reports 99

    After establishing connection through wizard succesfully I try to use the parameters of the connection in .INI file. while establishing normal connection this error msg pops up.
    Failed to open a rowset.
    Details: :SQL Exception: [SQL Error Code] 0 [Error Message:] [IBM] SQL Server JDBC Driver] This driver is locked for use with embedded application.

  • RELEVANCY SCORE 2.87

    DB:2.87:Japi Connection Pooling With Essbase 9.3 d8


    I moved to Essbase 9.3 since it supports JAPI in Embedded mode...but I do not have connection pooling now. I have my custom Java Application on WebSphere Server and I am connecting to Oralce as well as Essbase. For Oracle I have the JDBC conneciton pooling but for Essbase, I have nothing. BRIs there a way I am implement Connection Pooling for my setup?

    DB:2.87:Japi Connection Pooling With Essbase 9.3 d8

    BRAs you have found, connection pooling was deprecated in 9.3 and is no longer supported. You could write your own connection pooling algorithm; I am sure you can find open source references to connection pooling to use as a model..BRBRTimBR

  • RELEVANCY SCORE 2.87

    DB:2.87:How To Implement The Connectionpooldatasource ? 9c


    %
    Context ctx = new InitialContext();
    ConnectionPoolDataSource ds =
    (ConnectionPoolDataSource)ctx.lookup("jdbc/EmployeeDB");
    PooledConnection pcon = ds.getPooledConnection("****", "*****");
    %The code above is an example from JDBC document. I tried to make a little change on it and the is as follow:


    %
    Context ctx = new InitialContext();
    ConnectionPoolDataSource ds =
    (ConnectionPoolDataSource)ctx.lookup("jdbc/EmployeeDB");
    pooledConnection pcon = ds.getPooledConnection("****", "*****");
    Connection cn = pcon.getConnection();
    %Then an exception was throwed withInvalidClassCastException.
    The JDBC document marked that : " JDBC drivers do not manage connection pooling. You must use an external connection pool manager. "So any one could tell me how to "use an external conneciton pool manager".

    Wilbert

    DB:2.87:How To Implement The Connectionpooldatasource ? 9c

    Using above web.xml with DataSource class replacing ConnectionPoolDataSource or straightly calling jdbc with Class.forName('') method is workable.
    The main reason to utilize the ConnectionPoolDataSource instead of DataSource or Using Class.forName() method is to build a real connnection pooling function.
    As the JDBC document said as follow will tell you that point in detail:

    Connecting Through Data Sources

    --------------------------------------------------------------------------------

    A SQL Server 2000 Driver for JDBC data source is a DataSource object that provides the connection information needed to connect to an underlying database. The main advantage of using a data source is that it works with the Java Naming Directory Interface (JNDI) naming service, and it is created and managed outside of the applications that use it. Because the connection information is outside of applications, the time it takes to reconfigure your infrastructure when a change is made is minimal. For example, if the underlying database is moved to another server and uses another port number, the administrator must change only the relevant properties of the SQL Server 2000 Driver for JDBC data source (a DataSource object). The applications using the underlying database do not need to change because they only refer to the logical name of the SQL Server 2000 Driver for JDBC data source.

    How SQL Server 2000 Driver for JDBC Data Sources Are Implemented
    Microsoft ships a data source class for the SQL Server 2000 Driver for JDBC. See "SQL Server 2000 Driver for JDBC" for the name of the class.

    The SQL Server 2000 Driver for JDBC data source class provided implements the following interfaces defined in the JDBC 2.0 Optional Package:

    javax.sql.DataSource
    javax.sql.ConnectionPoolDataSource, which enables you to implement connection pooling
    NOTE: You must include the javax.sql.* and javax.naming.* classes to create and use SQL Server 2000 Driver for JDBC data sources. The SQL Server 2000 Driver for JDBC provides all the necessary JAR files that contain the required classes and interfaces.

    Calling a Data Source in an Application
    Applications can call a SQL Server 2000 Driver for JDBC data source using a logical name to retrieve the javax.sql.DataSource object. This object loads the SQL Server 2000 Driver for JDBC and can be used to establish a connection to the underlying database.

    Once a SQL Server 2000 Driver for JDBC data source has been registered with JNDI, it can be used by your JDBC application as shown in the following example:

    Context ctx = new InitialContext();
    DataSource ds = (DataSource)ctx.lookup("jdbc/EmployeeDB");
    Connection con = ds.getConnection("matt", "wwf");

    In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the SQL Server 2000 Driver for JDBC data source (EmployeeDB). The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.DataSource object. Finally, the DataSource.getConnection() method is called to establish a connection with the underlying database.

    Using Connection Pooling
    Connection pooling allows you to reuse connections rather than create a new one every time the SQL Server 2000 Driver for JDBC needs to establish a connection to the underlying database. Connection pooling manages connection sharing across different user requests to maintain performance and reduce the number of new connections that must be created. For example, compare the following transaction sequences.

    Example A: Without Connection Pooling
    The client application creates a connection.

    1.The client application sends a data access query.
    2.The client application obtains the result set of the query.
    3.The client application displays the result set to the end user.
    4.The client application ends the connection.

    Example B: With Connection Pooling
    1.The client checks the connection pool for an unused connection.
    2.If an unused connection exists, it is returned by the pool implementation; otherwise, it creates a new connection.
    3.The client application sends a data access query.
    4.The client application obtains the result set of the query.
    5.The client application displays the result set to the end user.
    6.The client application returns the connection to the pool.

    NOTE: The client application still calls "close()", but the connection remains open and the pool is notified of the close request.

    The pool implementation creates "real" database connections using the getPooledConnection() method of ConnectionPoolDataSource. Then, the pool implementation registers itself as a listener to the PooledConnection. When a client application requests a connection, the pool implementation (Pool Manager) assigns one of its available connections. If there is no connection available, the Pool Manager establishes a new connection and assigns it to that application. When the client application closes the connection, the Pool Manager is notified by the driver through the ConnectionEventListener interface that the connection is free and available for reuse. The pool implementation is also notified by the ConnectionEventListener interface when the client somehow corrupts the database connection, so that the pool implementation can remove that connection from the pool.

    Once a SQL Server 2000 Driver for JDBC data source has been registered with JNDI, it can be used by your JDBC application as shown in the following example, typically through a third-party connection pool tool:

    Context ctx = new InitialContext();
    ConnectionPoolDataSource ds =
    (ConnectionPoolDataSource)ctx.lookup("jdbc/EmployeeDB");
    pooledConnection pcon = ds.getPooledConnection("matt", "wwf");

    In this example, the JNDI environment is first initialized. Next, the initial naming context is used to find the logical name of the JDBC data source (EmployeeDB). The Context.lookup() method returns a reference to a Java object, which is narrowed to a javax.sql.ConnectionPoolDataSource object. Finally, the ConnectionPoolDataSource.getPooledConnection() method is called to establish a connection with the underlying database.

    NOTE: JDBC drivers do not manage connection pooling. You must use an external connection pool manager.

    --------------------------------------------------------------------------------
    Previous Page Next Page Synchronize with Contents

    Popup

  • RELEVANCY SCORE 2.87

    DB:2.87:Implicit Connection Cache 3k


    Hi

    I was going through the Oracle 10g JDBC Developer's Guide and Reference and I have a few issues which require clarification.

    How is the The Implicit Connection Cache different/better from JDBC Connection pooling? What is the difference between connection caching and connection pooling? Where does OCI Driver Connection Pooling come into the picture? What should be used and when?

    Thanks!

    Abhinav

    DB:2.87:Implicit Connection Cache 3k

    application servers will usually have their own connection pooling.
    They just get connections from the driver and keep them.
    Driver-level pooling is not part of the JDBC standard. I am
    ignorant of OCI driver connection pooling, but conceptually
    is would be the same as any other driver-level pooling. Oracle's
    thin driver is usually preferable to an OCI-based one because of
    reliability and ease of install and fixing of bugs. The thin-driver
    capable FCF/FAN functionality is very responsive to load-balancing
    and failover conditions. The thin driver can also connect via the tnsnames.ora
    file so the central connection control is still there. There is no good reason
    I know of for using OCI-based connections.

  • RELEVANCY SCORE 2.87

    DB:2.87:Regular Jdbc Connections Not Possible In Oc4j? ss


    Hello,

    I am trying to migrate an application from Apache / JServ
    (iAS1.0) to OC4J. The application has its own socket listener
    and connection pooling mechanism. When I try to run this
    application under OC4j, I get ArrayIndexOutofBound exception
    while attempting to get a connection from connection pool.

    Is it that we need to use the datasources in oc4j to access the
    database and not the regular jdbc connections (thin.).

    Thanks for all the help in advance.

    Regards

    Prakash

    DB:2.87:Regular Jdbc Connections Not Possible In Oc4j? ss


    Hi

    It is not that OC4J can caonnect to the data base throgh pool
    it can asw well can connect to the data base throgh thin driver.
    this is tested in MS windows platform.

    Cheers
    Raj

  • RELEVANCY SCORE 2.86

    DB:2.86:Connection Pooling With Connector/J d8


    Hi,

    Good day! I am now using MySQL and JBOSS application server. In that case, mysql jdbc driver will be Connectorv / J and i am wondering whether it supports connection pooling or do I need to develop the connection pooling on my own?

    Pls assist.

    Thank you.
    Rajeswary Santhiran

    DB:2.86:Connection Pooling With Connector/J d8

    Hi EagerJava,

    Thanks for the info.

    rgds,
    Rajes

  • RELEVANCY SCORE 2.86

    DB:2.86:Connection Pool Problem With Jrun/Mssql Please Help sj


    In my application iam using jrun as my Application server and MSSQL as database .
    Iam using the connection pooling .each and every page iam getting a connection from the pool and iam closing that connection at the end of the page.When i open my MSSQL process info there is still that connections are open what could be the reason for this can anybody help this

    Iam using a bean(DataBean) to create the connection and given below is my bean code .

    (my jsp code )
    try {
    Connection con = DataBean.getConnection("jndi");
    } catch (Exception ex {
    // . . . code to handle exceptions
    } finally {

    try{
    if(con != null) con.close();

    }catch(SQLException e(){}
    }

    .I think what iam doing is correct.

    Is there is any problem with preaparedstatement call?

    Thank you very much ,
    Biju

    (my databean code)

    import javax.sql.DataSource;
    import javax.naming.InitialContext;
    import javax.naming.NamingException;

    import java.sql.SQLException;
    import java.sql.Connection;

    public class DataBean{

    public Connection getConnection(String strDataSource) throws SQLException {

    InitialContext context = null;
    DataSource ds = null;
    try {
    context = new InitialContext();

    ds =(DataSource) context.lookup("java:comp/env/jdbc/" + strDataSource);

    return ds.getConnection();
    }
    catch(Exception e) {

    throw new SQLException(e.getMessage());
    }
    finally {

    if (context != null)
    {
    // Always close the context
    try {
    context.close();
    }
    catch (NamingException ex) {
    // Ignore errors on close
    }
    }
    }
    }
    }

    DB:2.86:Connection Pool Problem With Jrun/Mssql Please Help sj

    I've used JRun before, and I never worried about closing the connection. They are container managed anyway. The container worries about it. It simply has a pool of connection that it shares among clients. The other thought I had was this. Are you closing your record set when you are done using it? I usually do this, it limits the number of connections that stay open to your data source.

    //dbCon is my own connection holder object

    ResultSet localRS = dbCon.getRS(gp.getAllInactiveUsers());
    while(localRS.next()){
    //do something...
    }
    localRS.Close();

    Anyway, I hope this helps.

  • RELEVANCY SCORE 2.86

    DB:2.86:Is In Oracle Jdbc Drivers Connection Pooling Support x9


    Hi All!

    Can anybody give me information about subj?

    Any information appreciated

    DB:2.86:Is In Oracle Jdbc Drivers Connection Pooling Support x9

    BLOCKQUOTEfont size="1" face="Verdana, Arial"quote:/fontHROriginally posted by Mike:
    Hi All!

    Can anybody give me information about subj?

    Any information appreciatedHR/BLOCKQUOTE

    ------------
    Yes, Oracle JDBC drivers do support connection pooling. Download the latest drivers to get samples and refer doc for more details.

  • RELEVANCY SCORE 2.86

    DB:2.86:Mysql Database Connection Pooling xa



    When i try to user pooling class: driver-classcom.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolDataSource/driver-classerror arised. The same time it works with OrionServer.Anybody know how to set jdbc connection pooling with JBoss?

  • RELEVANCY SCORE 2.86

    DB:2.86:Cannot Connect Java To Mssql Server 2000 13


    I was unable to connect to the mssql server 2000 with the jcreator.

    The following exception was thrown:

    Exception: [Microsoft ] [ SQLServer 2000 Driver for JDBC ] Connection reset

    MY code is:

    import java.sql.*;

    public class JCustomer {

    public static void main(String args[]) {
    Connection con = null;

    try {

    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = DriverManager.getConnection( "jdbc:microsoft:sqlserver://IP:1433","sa"," ");
    if(!con.isClosed())
    System.out.println("Successfully connected to MSSQL server...");

    } catch(Exception e) {
    System.err.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    }
    }
    }

    Your help will be very greatful

    DB:2.86:Cannot Connect Java To Mssql Server 2000 13

    I am unable to connect to the mssql server 2000 with the jcreator, though I have defined the classpath in environment variable.

    I am try to connect JCreator with MsSQL server 2000 and have loaded JDBC for MSSQL.

    The following exception was thrown:

    Exception: com.microsoft.jdbc.sqlserver.SQLServerDriver

    MY code is:

    import java.sql.*;

    public class JCustomer {

    public static void main(String args[]) {

    Connection con = null;
    //String user;
    //String pwd;
    try {

    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    con = DriverManager.getConnection( "jdbc:microsoft:sqlserver://ALU:1433","test","test");
    if(!con.isClosed())
    System.out.println("Successfully connected to MSSQL server...");

    } catch(Exception e) {
    System.out.println("Exception: " + e.getMessage());
    } finally {
    try {
    if(con != null)
    con.close();
    } catch(SQLException e) {}
    }
    }
    }

    Please help me.
    Urgent