Auto-Commit and Pooled JDBC Connections

Forum Members,
If I am using Oracle Pooled JDBC Connections in the OC4J container is auto-commit set to "true" by default?
If I set auto-commit to "false" and then close the logical connection, when that connection is handed out again on a later call to getConnection(), is auto-commit automatically set back to "true"?
Thanks,
Richard

Richard,
Pardon me if I am stating the obvious, but you could test that in your code by invoking the getAutoCommit() method in interface java.sql.Connection.
My experience (with OC4J stand-alone versions up to -- and including -- 10.1.2) is that the behaviour depends on which data source you have configured. For example, if you have defined an "ejb-location" attribute in your "data-sources.xml" file, and you use that as your JNDI lookup for your data source, then OC4J handles transactions and you shouldn't deal with "auto-commit" at all. See the following post for more details:
Re: OC4J 10.1.3 Preview 4 - Global transaction active
But if you have defined a "location" attribute and use that, then you do need to handle transactions explicitly.
Hope this helps.
Good Luck,
Avi.

Similar Messages

  • Obtaining an oracle.sql.STRUCT through a pooled JDBC connection

    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection defined in Weblogic. I need the vendor-specific object, rather than simply the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT. I can use reflection on this object to find and call the getVendorObj() method to obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is not a published API and is not guaranteed not to change in future versions.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct through a WebLogic connection pool in WebLogic Server 10?
    Thanks for any advice,
    -Dan Schwemlein

    dan schwemlein wrote:
    Joe,
    Thanks again. With your guidance, I have arrived at the following approach, which I'll post for the benefit of others, and which I'd be thankful if you would validate:
    1) Import the jar com.bea.core.datasource-1.0.0.0.jar from %BEA_HOME%\modules, which is the only location of the class WLConnection, which is the only class with the getVendorConnection() method you refer to.
    2) Get the logical connection from the pooled data source, cast it to a WLConnection, call getVendorConnection() to obtain an OracleConnection (from the ojdbc jar), and use this connection to obtain the required oracle.sql.STRUCT from an OracleResultSet.
    3) Be aware of the limitations and follow the guidelines in the document http://e-docs.bea.com/wls/docs81/jdbc/thirdparty.html#1043646 regarding security, error handling, releasing resources (close only the logical connection), etc.
    Does this sound like the approach you had in mind?
    Thanks again,
    -Danyes.
    Joe
    >
    Re: Obtaining an oracle.sql.STRUCT through a pooled JDBC connection
    Posted: Jul 16, 2007 3:21 PM
    dan schwemlein wrote:
    Thanks for the quick response!I was working today...
    Thank you for the information about the connection being closed.
    I will look into using this configuration setting.
    You say that you can describe a way to get a handle on an unwrapped
    pool object using some documented WLS-specific code. Are you referring
    here to the getVendorConnection() method?yes.
    This method does not help me
    get the oracle.sql.STRUCT object, because even the connection returned
    by getVendorConnection() returns a wrapped WL java.sql.Struct object
    from a call to getObject().I don't believe it. If you are running in WLS, with a local pool,
    the getVendorConnection() will give you the Oracle connection,
    which will give you an Oracle statement, etc, down to an oracle
    STRUCT object. Once you have a direct reference to the oracle connection,
    we're not in the picture when it returns something to you.
    It would be great if getVendorObj() were
    documented and could be counted on in future versions. To use this
    method, one would still have to access it via Java reflection, because
    the wrapper class and its getVendorObj() method would be exposed in an
    API, correct? Could this method be exposed in the API, so that reflection
    doesn't need to be used, or it is exposed somewhere that isn't documented?getVendorObj() is not yet exposed or therefore supported for the general
    wrapped object, so you would have to start from the connection and
    derive all subobjects from it.
    Thanks again,
    -Dan Schwemlein
    Hello,
    I am using WebLogic Server 10 and and Oracle 10 and I am trying to obtain a
    vendor-specific oracle.sql.STRUCT from a ResultSet using a pooled connection
    defined in Weblogic. I need the vendor-specific object, rather than simply
    the java.sql.Struct implementation, because a third party library requires it.
    What gets returned in the ResultSet is a non-exposed WebLogic wrapper object
    which implements java.sql.Struct, but which cannot be cast to an oracle.sql.STRUCT.
    I can use reflection on this object to find and call the getVendorObj() method to
    obtain the oracle.sql.STRUCT, but this solution is not acceptable because this is
    not a published API and is not guaranteed not to change in future versions.Understood. We all benefit from sticking to the J2EE standards,
    but we could also wish Oracle had done so with it's driver objects.
    I will assume your code is running in the WebLogic server, because
    an external JVM can never access the real driver object, which will
    always really be in the WLS JVM. No active JDBC object is serializable.
    How can I reliably obtain a vendor-specific implementation of java.sql.Struct
    through a WebLogic connection pool in WebLogic Server 10?There is no way to get a handle on an unwrapped pool object without using some
    WLS-specific code, though I can describe a way with documented methods,
    and/or I can get our documentation altered to say we'll support the
    getVendorObj() method. We introspect every vendor object, and for those
    implementations that have done the wise thing, projecting any non-standard
    methods as an Interface, we are able to also project that Interface so
    the vndor example code should work. However, in some poorly-done
    cases, such as for some Oracle stuff, there is either no Interface,
    or the Oracle code has extensions that take java.sql objects as input,
    (at least that's the signature of the method) but two lines into the
    method, the Oracle code assumes and casts the java.sql object to a concrete
    Oracle object. In these use cases you need the direct unwrapped object.
    We provide and document Connection.getVendorConnection(), and intend
    getVendorObj() to serve the same for subobjects, but note the dangers
    and responsibilities: We rely on our wrappers to implement the security
    and thread-safety of our pooling system. Because user code can get
    unrestricted access to the actual connection from most JDBC objects,
    we can never trust that we have complete control once a vendor object
    is exposed. Therefore, by default we will close and replace every JDBC
    connection so exposed, as soon as the current thread is finished with
    the pool connection. This hurts performance. We also document a pool
    config setting that will tell us that you take responsibility for any such
    problems, and not to close connections just because they've been exposed.
    HTH,
    Joe
    Thanks for any advice,
    -Dan Schwemlein

  • Some BAPIs are auto commit and some are not.  what is the reason?

    Hi all,
    currently i am working on BAPI.I found that some BAPIs are auto commit and some are not. can anybody tell me what is the reason.

    hi,
    one option to find the difference is you have to look for parameters like test run or commit .
    If the function module  doesn't have them, then it means you have to use BAPI_TRANSACTION_COMMIT or BAPI_TRANSACTION_ROLLBACK based on the success or failure.

  • Pooled jdbc connection(s), and server resources

    Hello All,
    I am curious about the difference between jdbc connections in a connections pool, and 'stand alone' connection. I have Oracle 9.2
    To describe...
    In my application server (WebLogic) I have a connection pool, with 10 connections. Does this take less server resources than 10 separate connections? I notice that there are still 10 server processes appearing.
    thanks!
    JM
    the jdbc Programmer's Guide and Reference says...
    (( start quote ))
    A pooled connection instance encapsulates a physical connection to a database. This
    database would be the one specified in the connection properties of the connection
    pool data source instance used to produce the pooled connection instance.
    A pooled connection instance is an instance of a class that implements the standard
    javax.sql.PooledConnection interface. The getConnection() method
    specified by this interface returns a logical connection instance that acts as a
    temporary handle to the physical connection, as opposed to encapsulating the
    physical connection, as does a non-pooling connection instance:
    (( end quote ))
    ...I had the impression that a connection pool of 10, results in one 'physical' connection. But it appears not!

    No, and yes...
    A pool of 10 connections creates 10 physical database connections, which require exactly the same resources as 10 connections from a standalone Java app or 10 connections from SQL*Plus.
    The connection pool, however, allows those 10 physical connections to server one the order of 100 logical connections (in an average OLTP application). If you have a JSP page that opens a connection, runs a couple of DML statements, and closes the connection, having a connection pool greatly reduces the load on the database because it does not have to create a new physical connection for every JSP page-- the JSP page gets a connection from the pool, uses it for a bit, and returns it to the pool where it can be assigned to another JSP page. Because each user only needs the connection a small percentage of the time, you can server many physical users with only 1 physical database connection.
    Justin
    Distributed Database Consulting, Inc.
    http://www.ddbcinc.com/askDDBC

  • Servlets and multiple JDBC connections...

    Hi Guru's
    I want to perform multiple JDBC queries simultaneously from my servlet. Let's say I have a connection pool containing JDBC connections. Now what I want to do is to use each of this connections simultaneously to perform queries in parallel.
    What is the best way to do this??? create multiple threads, one for each query, and then collate results when all threads are finished???
    Has anyone does this before or know of any links or samples which I can look at??
    your help much appreciated...
    Many Thanks

    Thanks but further questions....
    But take care:
    multithreading might only work parallel if there are
    multiple processors - otherwise the thread fragments
    will be processed one after the other until they are
    finished.I agree. My server has multiple processors hence multi-threading.
    Why do you need to perform the queries
    simultaneously?
    wouldn't it work too when you perform the queries one
    after the other?To speed up performance. Sequential processing is too slow at the moment.
    Hope you don't try doing so inside one single
    database...yes inside a single databse.
    Do you have any links to sample example etc..??? Importantly are you aware of any issues when one does this type of multi-threading from servlet. i.e does it clash with servlet's threading model etc...
    I am aware of how servlets multithread requests and am quite familiar with them. Just wanted some examples on multithreading JDBC connections from servlets and how I can wait for all threads to finish before collecting results....also wanted to make sure that there are no other issues....
    further help will be much appreciated.....

  • JBO-3003 Application pool, Error JDBC connection

    Hi, I'm trying to run a simple webapp but get this error:
    JBO-30003: The application pool (model.RoomReservationsAppModuleLocal) failed to checkout an application module due to the following exception:
    oracle.jbo.JboException: JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.JboException, msg=JBO-29000: Unexpected exception caught: oracle.jbo.DMLException, msg=JBO-26061: Error while opening JDBC connection.
    Anyone know what to do?
    Regards ,
    Ketil
    I

    Hi Erik,
    The solution of having the two root ApplicationModules share a single JDBC connection violates some assumptions of the BC4J architecture and could result in some strange race conditions in JDBC.
    We should focus your solution on how the panels are released. It ought to be possible to release the BindingContainer for the panel without releasing the underlying DataControl. With this solution you would only require one root ApplicationModule and one JDBC connection.
    How are you releasing the ADF and BC4J references when you close the panel? I would expect you to be invoking release on the DCBindingContainer instance only. If you are already doing this then what is causing the commit/rollback?
    Hope this helps,
    JR

  • Issues with JDBC Connection Pooling

    Hi all,
    I'm experiencing some unexpected behaviour when trying to use JDBC Connection Pooling with my BC4J applications.
    The configuraiton is -
    Web Application using BC4J in local mode
    Using Default Connection Stagegy
    Stateless Release Mode
    Retrieving Application Modules using Configuration.createRootApplicationModule( am , cf );
    Returning Application Modules using Configuration.releaseRootApplicationModule( am, false );
    Three application modules
    AppModuleA - connects to DatabaseConnection1
    AppModuleB - connects to DatabaseConnection2
    AppModuleC - connects to DatabaseConnection2
    My requirement is to -
    Use App Module Pooling and have individual pool for each Application Module
    Use JDBC Pooling and have individual pool for each Database connection
    Note: All configuration was achieved in design mode (i.e. right clicking AppModule->Configurations...)
    1. Initial approach -
    In the configuration for each Application Module I specified the connection type as 'JDBC Datasource' and specified to approriate datasource.
    Tried setting doConnecitonPooling to 'true' as well as 'false'
    In the data-sources.xml I specified all the appropriate info including min-connections and max-connections.
    I would expect, with the above config that BC4J would use OC4J's built in JDBC connection pooling.
    2. Second approach -
    In the configuration for each Application Module I specified the connection type as JDBC URL.
    In the configuration I specified doConnectionPooling = 'true' as well as the max connection, max available and min available
    What I experienced in both cases was that the max connections seem to be ignored as the number of connection as reported by the database (v$session) was exceeded by more than 10.
    In addition to this once the load was removed the number of JDBC connecitons did not drop (I would have expected it to drop to max available connections)
    My questions are -
    1. When specifying to use a 'JDBC Datasource' style of connection, is it in fact OC4J that is then responsible for pooling JDBC connections? And in this case should BC4J's doConnectionPooling parameter be set to true or false?
    2. Are there any known issues with the use of the JDBC Conneciton Pool as stated by the above to approaches?

    Thanks for the additional info. Please see my comments. below.
    Sorry should have been more specififc -
    1. Is each application pool using a different JDBC user? You mentioned DatabaseConnection1 and DatabaseConnection2
    above; are these connections to different schemas / users? If so, BC4J will create a separate connection pool for each
    JDBC user. Each connection pool will have its own maximum pool size.
    Each 'DatabaseConnection' refers to a different database, actually hosted on a seperate physical server, different
    schema and different user.BC4J will maintain a separate connection pool for each permutation of JDBC URL / schema. If each user is connecting
    to a different DB instance then I would expect no greater than 10 DB sessions. However, if a DB instance is hosting
    more than user then I would expect greater than 10 DB sessions (though still no more than 10 DB sessions per user).
    2. Are all the v$session sessions related to the JDBC clients? There should be at least one additional database
    session which will be related to the session that is querying v$session.
    When querying the v$session table I specifically look for connections from the user in quesiton and from the machine
    name in question and in doing so eliminate the database system's connections, as well as the query tools'
    connection. One area I'm not sure about is the connection BC4J uses to write to its temporary tables. I am using
    Stateless release mode and have not explicetly stated to save to the database but I'm wondering if it still does if so
    and how does it come into the equation with max connections?BC4J's internal connections are also pooled and the limits apply as mentioned above. So, if you have specified
    internal connection info for a schema which is different than the users above I would expect the additional conns.
    One helpful diagnostic tool, albeit programmatic, might be to print the information about the connection pools after
    your test client(s) have finished. This may be accomplished as follows:
    // get a reference to the BC4J connection pool manager
    import oracle.jbo.server.ConnectionPoolManagerFactory;
    import oracle.jbo.server.ConnectionPoolManagerImpl;
    import oracle.jbo.pool.ResourcePool;
    import java.io.PrintWriter;
    import java.util.Enumeration;
    // get the ConnectionPoolManager. assume that it is an instance of the supplied manager
    ConnectionPoolManagerImpl mgr = (ConnectionPoolManagerImpl)ConnectionPoolManagerFactory.getConnectionPoolManager();
    Enumeration keys = mgr.getResourcePoolKeys();
    PrintWriter pw = new PrintWriter(System.out, true);
    while (keys.hasMoreElements())
    Object key = keys.nextElement();
    ResourcePool pool = (ResourcePool)mgr.getResourcePool(key);
    System.out.println("Dumping pool statistics for pool: " + key);
    pool.dumpPoolStatistics(pw);
    }

  • Oracle.xml.sql.OracleXMLSQLException:Cannot enable auto commit within JTS transaction

    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

    Clearly , there does seem to be something a bit odd with the above stack.
    <Bug:1917808> mentions OracleXMLSave in context of plsql equivalent : dbms_xmlsave . i.e dbms_xmlsave is a wrapper around OracleXMLSave class.
    disabling autocommit on connection as follows should help:
    conn = DriverManager.getConnection("connect string","scott","tiger");
    conn.setAutoCommit(false);
    to disble auto commit and see if this has an effect.
    This issue might be <Bug:1497506>. If disabling autocommit does not work then it appears that it could be this issue .
    Malcolm
    Hi All,
    OracleXMLSave class in the Oracle XDK is being used to load XML data into an 8170 database. The Java code is running in IBM WebSphere with container-managed transactions. When JTA is enabled with the Merant JDBC driver for Oracle, we get the following error when the XML is loaded:
    oracle.xml.sql.OracleXMLSQLException: Cannot enable auto commit within JTS
    transaction
         at java.lang.Throwable.fillInStackTrace(Native Method)
         at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java:2213)
         at oracle.xml.sql.dml.OracleXMLSave.insertXML(Compiled Code)
    This suggests the OracleXMLSave class is not aware of the fact that it is now operating in a JTS transaction where control is managed elsewhere. i.e. should also not attempt to commit or rollback, as this is the responsibility of the container.
    Is there a property which needs to set to prevent the above or does the XDK not work with J2EE (JTS) transactions?.
    If you have any useful comments, let me know. Testing the above presents me with a number of problems so if this is easily explained , let me know.
    Thanks,
    Malcolm

  • Total JDBC Connections

    I have deployed an application to Apps Server 9.0.4.
    I am using oracle.jdbc.pool.OracleConnectionPoolDataSource. I have closed all the connections, however Open JDBC Connections is always 0 and Total JDBC Connections is increasing.
    My inactivity time out is 60 seconds.
    Is this normal or something wrong somewhere?
    Any help is highly appreciable.
    Thanks

    The Total number of connections figure indicates the total number of connections that have been opened since OC4J was started.
    The Open number of connections figure indicates the total number of connections currently open.
    Since you say that the open connections figure stays below 10, this suggests that you do not have a connection leak, but your inactivity time out is too low, and therefore your connections are being closed before they can be reused - hence the large total number of connections.
    Good luck.

  • Can not deploy a report using JDBC connection on CR2008 Server

    Hi Group,
    I have a report created with JDBC connection. When I tried to add it to CR2008 server, it gives an error - "An unexpected error has occurred ". Basically I want to add a report to a public folder via CMC. I am using adminstrator account.
    Then I thought I need to add JDBC driver into CR2008 server. so I put oracle jdbc jar into CR2008 server classpath and add JDBC connection info into CRConfig.xml. but I still got the same error.
    I also tried:
    - Change the report to use native Oracle driver rather than JDBC. The deployment succeeded (but this is not what I want)
    - Add a data source connection via Business View Manager, but no luck.
    I know how to use/change jdbc connection with programtic way, but I just want to know if I want to use built-in components in CR2008 server without any coding the reports can be deployed and managed.
    Thanks in advance.
    Dennis

    Hello Will,
    Crystal Reports supports connections to JDBC/JNDI out of the box, and have done so for a while, whether stand-alone or published to Enterprise.
    To specify where the server would search for the JDBC driver jar files, you'd change the classpath tag found in the CRConfig.xml file found on the machine where the Crystal Reports Page or Job Server is running. 
    For early Crystal Enterprise 10 and before, it used Java Native Interface (JNI) to start the Java process to retrieve the data from the JDBC connection.
    For later Crystal Enterprise 10 and later, it starts off a "Java Server" process, and communicates to the Crystal Reports process via CORBA TCP/IP connection.
    Commonissues that may arise:  (1) CRConfig.xml not configured properly, (2) unable to start or communicate to the "Java Server" because of permissions or firewall.
    Note that this is a separate connectivity map from using ADO or ADO.NET.
    Sincerely,
    Ted Ueda

  • JDBC Connection Encoding

    i have oracle database server with NLS_CHARACTERSET=AR8ISO8859P6 (ISO-8859-6)
    and my jdbc connection is
    public sqlj.runtime.ref.DefaultContext getConnectionContext() throws SQLException
    Properties props = new Properties();
    props.put("charSet","ISO-8859-6");
    props.put("user","oasis");
    props.put("password","*****");
    return Oracle.getConnection("jdbc:oracle:thin:@128.55.0.11:1521:dvlp320t",props);
    when i retrieve String attribute it appear as ???
    what is the problem?

    Try asking on the JDBC forum

  • Long duration jdbc connection

    Am connection through a thin client to a DB. The transaction runs for 3.5 hours, when i call commit and close the connection no exceptions are thrown. But when i look into the DB, no records are inserted, it appears the Tx did not commit. Autocommit is false,
    And yes Verified the database, schema and tables name to ensure was looking at the correct place.
    Same program when run for 30 minutes on a smaller input set, works fine, all inserts take place.
    Has anybody had a very long Tx >4 hour ,and any thing special done for it.
    Thanks
    Tapan
    Edited by: tapan_mokha on Feb 12, 2009 7:37 AM

    or you may have ended up with an automatic rollback after some internal database timeout.
    That way your commit would have committed exactly nothing, and (having been started in an automatically created new transaction) wouldn't yield an error.
    It's a very weird transaction that requires that much time to run and can't have internediate commits (which would refresh the transaction, avoiding such timeouts).

  • Issue JDBC connection pool with Glassfish 3.1.2.2 and Oracle XE 11gR2

    Hello,
    I am experiencing an issue with pinging a JDBC connection Pool.
    I installed the following without any warnings or errors:
    Operating System: Oracle Enterprise Linux 5
    Oracle XE 11gR2 (11.2.0.2.0) database
    Glassfish 3.1.2.2
    I will refer to the steps I did after the installations
    1) In the .profile file of the OS I add the following:
    JRE_HOME=/usr/java/jre1.6.0_31; export JRE_HOME
    JAVA_HOME=/usr/java/jdk1.6.0_31; export JAVA_HOME
    GLASSFISH_DIR=/u01/glassfish3
    GLASSFISH_HOME=/u01/glassfish3/glassfish
    DERBY_HOME=$GLASSFISH_DIR/javadb
    OPEN_MQ_HOME=$GLASSFISH_DIR/mq
    PATH=:$JAVA_HOME/bin:$JRE_HOME/bin:$PATH:$HOME/bin:$GLASSFISH_HOME/bin:$DERBY_HOME/bin:$OPEN_MQ_HOME/bin
    export GLASSFISH_HOME
    export DERBY_HOME
    export OPEN_MQ_HOME
    export PATH
    LD_LIBRARY_PATH=/u01/app/oracle/product/11.2.0/xe/lib; export LD_LIBRARY_PATH
    . /u01/app/oracle/product/11.2.0/xe/bin/oracle_env.sh
    2) I copied the ojdbc6.jar to the $GLASSFISH_HOME/domains/domain1/lib
    3) I login to the Glassfish admin console and created a new JDBC Connection Pool.
    Pool Name: ds_orasys
    Resource Type: javax.sql.DataSource
    Datasource Classname: oracle.jdbc.pool.OracleDataSource
    User: [myschema]
    Password: [myschema password]
    URL: jdbc:oracle:thin:@localhost:1521:xe
    When I ping the connection pool I get the following message in the server log:
    [#|2012-10-23T12:14:37.069+0300|WARNING|glassfish3.1.2|javax.enterprise.resource.resourceadapter.com.sun.enterprise.connectors.service|_ThreadID=22;_ThreadName=Thread-2;|RAR8054: Exception while creating an unpooled [test] connection for pool [ ds_orasys ], Connection could not be allocated because: Invalid Oracle URL specified|#]
    [#|2012-10-23T12:14:37.071+0300|SEVERE|glassfish3.1.2|org.glassfish.admingui|_ThreadID=19;_ThreadName=Thread-2;|RestResponse.getResponse() gives FAILURE. endpoint = 'http://212.205.62.217:4848/management/domain/resources/ping-connection-pool.json'; attrs = '{id=ds_orasys}'|#]
    I tried to use different jar files. I used ojdbc6dms.jar and ojdbc14.jar.
    I also copied the jar files in the $GLASSFISH_HOME/domains/domain1/lib/ext directory as some people suggested. Still no luck. I keep getting the same error messages in the server.log
    Can anybody help me out or point me to the right direction.
    Thank you in advance

    The error is in the URL. It was in front of my eyes and I couldn't see the error. I skipped the ':' before the '@' when I created the pool. It is working fine now.

  • JDBC Connection pools and clusters (is max connection for entire cluster?)

    Hi,
    Quick question.
    When using JDBC connection pools in WAS 6.40 (SP13) in a clustered environment. Are the max connections the number
    a)Each application server can use
    b)The entire cluster can use
    Would believe a), but I'd like it confirmed from someoneelse

    Hi Dagfinn,
    your assumption is correct. Therefore, in a cluster environment you'd need to make sure the DB can open <i>Number of nodes X max connections</i>.

  • Java Web Server 6.1 & Pooled SQL Server 2000 JDBC Connections

    If anyone can shed some light on this problem I would greatly appreciate it.
    I am unsuccessfully trying to use a database connnection retrieved from a pool configured using Java System Web Server 6.1 with the SQL Server 2000 JDBC Driver.
    The background:
    1. I have downloaded the SQL Server 2000 JDBC Driver and installed it on the web server.
    2. I used the Administration GUI to add the .jars(namely msbase.jar, msutil.jar, and mssqlserver.jar), to the classpath.
    3. Upon creating a simply JSP to access connection metadata using the direct connect method, ie.,
    Class.forName( com.microsoft.jdbc.sqlserver.SQLServerDriver);
    Connection con = DriverManager.getConnection( "jdbc:microsoft:sqlserver:// ....
    I am shown a successful output of...
    JDBC Test
    Registering JDBC Driver
    driverClass: com.microsoft.jdbc.sqlserver.SQLServerDriver loaded and registered.
    Driver Information
    Driver Name: SQLServer
    Driver Version: 2.2.0037
    Database Information
    Database Name: Microsoft SQL Server
    Database Version: Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: )
    Avalilable Catalogs
    catalog: master
    catalog: msdb
    catalog: Northwind
    catalog: pubs
    catalog: tempdb
    4. This tells me that the web server has access to the files necessary and the classpath is configured correctly.
    Now the fun begins...
    In order to set up the JDBC Connection Pool I have done the following...
    1. I have created a web.xml file for the web-app which contains the JSP and includes the following entry
    <resource-ref>
    <res-ref-name>jdbc/devjwscp</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    2. I have used the "JDBC Connection Pools" link under the "Java" tab in the Administration GUI to create a connection pool.
    "Pool Name:" is "devjwscp"
    "DataSource Classname" is set to "com.microsoft.jdbcx.sqlserver.SQLServerDataSource". All other properties have been left alone.
    3. I have used the "JDBC Resources" link under the "Java" tab in the Administration GUI to create a JNDI resource.
    "JNDI Name" is set to "jdbc/devjwscp"
    "Status" is "true"
    "Pool Name" is "devjwscp"
    The web-app JSP comes back with the following exception.
    JDBC Test
    Exception Thrown
    Cannot create resource instance
    javax.naming.NamingException: Cannot create resource instanceorg.apache.naming.factory.ResourceFactory.getObjectInstance(ResourceFactory.java:167)
    javax.naming.spi.NamingManager.getObjectInstance(NamingManager.java:301)
    org.apache.naming.NamingContext.lookup(NamingContext.java:834)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:181)
    org.apache.naming.NamingContext.lookup(NamingContext.java:822)
    org.apache.naming.NamingContext.lookup(NamingContext.java:194)
    org.apache.naming.SelectorContext.lookup(SelectorContext.java:183)
    javax.naming.InitialContext.lookup(InitialContext.java:347)
    _jsps._jdbctest_jsp._jspService(_jdbctest_jsp.java:236)
    org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:107)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    com.iplanet.ias.web.jsp.JspServlet$JspServletWrapper.service(JspServlet.java:667)
    com.iplanet.ias.web.jsp.JspServlet.serviceJspFile(JspServlet.java:447)
    com.iplanet.ias.web.jsp.JspServlet.service(JspServlet.java:363)
    javax.servlet.http.HttpServlet.service(HttpServlet.java:908)
    org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:771)
    org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:322)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:209)
    org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:509)
    com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:161)
    com.iplanet.ias.web.WebContainer.service(WebContainer.java:586)
    4. FYI my server.xml <RESOURCE> entry looks as is shown below
    <RESOURCES>
    <JDBCCONNECTIONPOOL name="devjwscp" datasourceclassname="com.microsoft.jdbcx.sqlserver.SQLServerDataSource" steadypoolsize="8" maxpoolsize="32" poolresizequantity="2" idletimeout="300" maxwaittime="60000" connectionvalidationrequired="off" connectionvalidationmethod="auto-commit" validationtablename="" failallconnections="off" transactionisolationlevel="read-uncommitted" isolationlevelguaranteed="off">
    <PROPERTY name="serverName" value="secret"/>
    <PROPERTY name="portNumber" value="1433"/>
    <PROPERTY name="User" value="secret"/>
    <PROPERTY name="Password" value="secret"/>
    </JDBCCONNECTIONPOOL>
    <JDBCRESOURCE jndiname="jdbc/devjwscp" poolname="devjwscp" enabled="on"/>
    </RESOURCES>
    What gives? Do I need to add anything else to the server.xml? I know the server.xml for JWS differs from Apache. I have done an exhaustive search of the web. Many other individuals have had the same thing happen, buy none of them offered any explaination or remedy.
    Thanks in advance.

    Hi,
    Were you able to get it working.
    I am using
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    I am still getiing the same error. I also suspect that there is something wrong with thr DTD too. It gives me the following when the server comes up.
    Sun ONE Web Server 6.1SP2 B04/07/2004 18:47
    Listening for transport dt_socket at address: 1699
    info: CORE5076: Using [Java HotSpot(TM) Server VM, Version 1.4.2_04] from [Sun M
    icrosystems Inc.]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [acsanet]
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.
    wdpr.disy.com] at [testing]
    failure: WEB0120: XML error parsing deployment descriptor [C:/Sun/WebServer6.1/h
    ttps-AW-NYNY-D609628.nna.wdpr.disy.com/webapps/https-AW-NYNY-D609628.nna.wdp
    r.disy.com/testing/WEB-INF/sun-web.xml]
    Failed to create the XML-DOM Document. Check your XML to make sure it is correc
    t.org.xml.sax.SAXParseException: Character conversion error: "Unconvertible UTF-8
    character beginning with 0xa0" (line number may be too low).
    at org.apache.crimson.parser.InputEntity.fatal(InputEntity.java:1100)
    at org.apache.crimson.parser.InputEntity.fillbuf(InputEntity.java:1072)
    at org.apache.crimson.parser.InputEntity.isXmlDeclOrTextDeclPrefix(Input
    Entity.java:914)
    at org.apache.crimson.parser.Parser2.maybeXmlDecl(Parser2.java:1183)
    at org.apache.crimson.parser.Parser2.parseInternal(Parser2.java:653)
    at org.apache.crimson.parser.Parser2.parse(Parser2.java:337)
    at org.apache.crimson.parser.XMLReaderImpl.parse(XMLReaderImpl.java:448)
    at org.apache.crimson.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl
    .java:185)
    at org.netbeans.modules.schema2beans.GraphManager.createXmlDocument(Grap
    hManager.java:711)
    at org.netbeans.modules.schema2beans.BaseBean.createGraph(BaseBean.java:
    2075)
    at com.iplanet.ias.web.WebContainer.loadWebModule(WebContainer.java:695)
    at com.iplanet.ias.web.WebContainer.loadStandaloneWebModule(WebContainer
    .java:626)
    at com.iplanet.ias.web.WebContainer.loadWebModules(WebContainer.java:600)
    at com.iplanet.ias.web.WebContainer.createVS(WebContainer.java:374)
    at com.iplanet.ias.server.J2EERunner.createVS(J2EERunner.java:223)
    info: WEB0100: Loading web module in virtual server [https-AW-NYNY-D609628.nna.wdpr.disy.com] at [search]
    config: HTTP4292: flex-init: Log file C:/Sun/WebServer6.1/https-AW-NYNY-D609628.
    nna.wdpr.disy.com/logs/access should be removed before changing its format
    info: HTTP3072: [LS ls1] http://AW-NYNY-D609628.nna.wdpr.disy.com:80 ready to
    accept requests
    startup: server started successfully
    info: CORE3274: successful server startup
    the sun-web.xml is as below:
    <?xml�version="1.0"�encoding="UTF-8"?>
    <!--
         Copyright 2002 Sun Microsystems, Inc. All rights reserved.
    -->
    <!DOCTYPE�sun-web-app�PUBLIC�"-//Sun�Microsystems,�Inc.//DTD�Application�Server�8.0�Servlet�2.4//EN"�"http://www.sun.com/software/appserver/dtds/sun-web-app_2_4-0.dtd">
    <sun-web-app>
         <resource-ref>
              <res-ref-name>jdbc/oraclePool</res-ref-name>
              <jndi-name>jdbc/oraclePool</jndi-name>
         </resource-ref>
    </sun-web-app>
    Am I using the right DTD ?
    Please let me know.
    Thank you.
    -- Martin Louis

Maybe you are looking for

  • Connected to iTunes and lost all music and random new songs were added but I can't delete them

    I connected my iPod into Itunes (Windows not Mac) and for some reason all my music were deleted. I synched my music again and the default songs that are aready on iTunes were added in my iPod. I can't even delete the default songs now.. Help...

  • Self-Request Resource Fails At Operational Level

    Hi, In our application, we have a Self-Request for a particular resource. When a user raises a request for this resource, the request failed with no error message. No approvals are required in the request level. On clicking "view details", a blank po

  • Best practice to create users - Hybrid scenario

    I would like to know what is the best practice for creating new users in a Hybrid scenario with all mailboxes hosted and no mailboxes on-premise. Currently when creating a new user we go to our local EMC and create a 'New Remote Mailbox'.  This creat

  • ORA-01078 at startup

    Hello guys, i am using an Centos 6.2 linux with installed oracle-xe. I have installed it from an rpm. I use always the default settings. After that i could start it normal and successful connect to apex. Now i want to create an database user. I conne

  • Using Dynamic SQL in Forms

    Does anyone know anything about Dynamic SQL not being available in Forms v. 6.0.8.11.3? I trying to use Dynamic SQL for the first time and am having some difficulty. When I try to put my SQL in a function and run it straight into the database through