A strang problem about Resin database connection pool

I am a beginner,hope somebody can help me.
my web site occured a strange problem after I used the Resin database connection pool instead of
connecting directly
the error message as follows:java.lang.IllegalArgumentException: Request cannot be null
at javax.servlet.ServletRequestWrapper.<init>(ServletRequestWrapper.java:100)
at javax.servlet.http.HttpServletRequestWrapper.<init>(HttpServletRequestWrapper.java:92)
at com.caucho.server.connection.RequestAdapter.<init>(RequestAdapter.java:96)
at com.caucho.server.webapp.DispatchRequest.<init>(DispatchRequest.java:97)
at com.caucho.server.webapp.IncludeDispatchRequest.<init>(IncludeDispatchRequest.java:77)
at com.caucho.server.webapp.IncludeDispatchRequest.createDispatch(IncludeDispatchRequest.java:87)
at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:389)
at com.caucho.server.webapp.RequestDispatcherImpl.include(RequestDispatcherImpl.java:345)
at com.caucho.jsp.PageContextImpl.include(PageContextImpl.java:807)
at _jsp._intro__jsp._jspService(/intro.jsp:60)
at com.caucho.jsp.JavaPage.service(JavaPage.java:75)
at com.caucho.jsp.Page.pageservice(Page.java:571)
at com.caucho.server.dispatch.PageFilterChain.doFilter(PageFilterChain.java:155)
at com.caucho.server.cache.CacheFilterChain.doFilter(CacheFilterChain.java:211)
at com.caucho.server.webapp.WebAppFilterChain.doFilter(WebAppFilterChain.java:177)
at com.caucho.server.dispatch.ServletInvocation.service(ServletInvocation.java:221)
at com.caucho.server.http.HttpRequest.handleRequest(HttpRequest.java:263)
at com.caucho.server.port.TcpConnection.run(TcpConnection.java:331)
at com.caucho.util.ThreadPool.runTasks(ThreadPool.java:464)
at com.caucho.util.ThreadPool.run(ThreadPool.java:408)
at java.lang.Thread.run(Thread.java:595)

<!--
- Resin 3.0 configuration file.
-->
<resin xmlns="http://caucho.com/ns/resin"
xmlns:resin="http://caucho.com/ns/resin/core">
<!--
- Logging configuration for the JDK logging API.
-->
<log name='' level='info' path='stdout:' timestamp='[%H:%M:%S.%s] '/>
<log name='com.caucho.java' level='config' path='stdout:'
timestamp='[%H:%M:%S.%s] '/>
<log name='com.caucho.loader' level='config' path='stdout:'
timestamp='[%H:%M:%S.%s] '/>
<!--
- For production sites, change dependency-check-interval to something
- like 600s, so it only checks for updates every 10 minutes.
-->
<dependency-check-interval>2s</dependency-check-interval>
<!--
- You can change the compiler to "javac" or jikes.
- The default is "internal" only because it's the most
- likely to be available.
-->
<javac compiler="internal" args=""/>
<!-- Security providers.
- <security-provider>
- com.sun.net.ssl.internal.ssl.Provider
- </security-provider>
-->
<!--
- If starting bin/resin as root on Unix, specify the user name
- and group name for the web server user.
- <user-name>resin</user-name>
- <group-name>resin</group-name>
-->
<!--
- Configures threads shared among all HTTP and SRUN ports.
-->
<thread-pool>
<!-- Maximum number of threads. -->
<thread-max>128</thread-max>
<!-- Minimum number of spare connection threads. -->
<spare-thread-min>25</spare-thread-min>
</thread-pool>
<!--
- Configures the minimum free memory allowed before Resin
- will force a restart.
-->
<min-free-memory>1M</min-free-memory>
<server>
<!-- adds all .jar files under the resin/lib directory -->
<class-loader>
<tree-loader path="$resin-home/lib"/>
</class-loader>
<!-- Configures the keepalive -->
<keepalive-max>500</keepalive-max>
<keepalive-timeout>120s</keepalive-timeout>
<!-- The http port -->
<http server-id="" host="*" port="8080"/>
<!--
- SSL port configuration:
- <http port="8443">
- <openssl>
- <certificate-file>keys/gryffindor.crt</certificate-file>
- <certificate-key-file>keys/gryffindor.key</certificate-key-file>
- <password>test123</password>
- </openssl>
- </http>
-->
<!--
- The local cluster, used for load balancing and distributed
- backup.
-->
<cluster>
<srun server-id="" host="127.0.0.1" port="6802" index="1"/>
</cluster>
<!--
- Enables/disables exceptions when the browser closes a connection.
-->
<ignore-client-disconnect>true</ignore-client-disconnect>
<!--
- Enables the cache
-->
<cache path="cache" memory-size="10M"/>
<!--
- Enables periodic checking of the server status.
- With JDK 1.5, this will ask the JDK to check for deadlocks.
- All servers can add <url>s to be checked.
-->
<ping>
<!-- <url>http://localhost:8080/test-ping.jsp</url> -->
</ping>
<!--
- Defaults applied to each web-app.
-->
<web-app-default>
<!--
- Sets timeout values for cacheable pages, e.g. static pages.
-->
<cache-mapping url-pattern="/" expires="5s"/>
<cache-mapping url-pattern="*.gif" expires="60s"/>
<cache-mapping url-pattern="*.jpg" expires="60s"/>
<!--
- Servlet to use for directory display.
-->
<servlet servlet-name="directory"
servlet-class="com.caucho.servlets.DirectoryServlet"/>
</web-app-default>
<!--DataSource jndi configuration-->
<database>
<jndi-name>jdbc/artunion</jndi-name>
<driver type="org.gjt.mm.mysql.Driver">
<url>jdbc:mysql://localhost:3306/union</url>
<user>as</user>
<password>as</password>
</driver>
<prepared-statement-cache-size>8</prepared-statement-cache-size>
<max-connections>20</max-connections>
<max-idle-time>30s</max-idle-time>
</database>
<!--
- Default host configuration applied to all virtual hosts.
-->
<host-default>
<class-loader>
<compiling-loader path='webapps/WEB-INF/classes'/>
<library-loader path='webapps/WEB-INF/lib'/>
</class-loader>
<!--
- With another web server, like Apache, this can be commented out
- because the web server will log this information.
-->
<access-log path='logs/access.log'
format='%h %l %u %t "%r" %s %b "%{Referer}i" "%{User-Agent}i"'
rollover-period='1W'/>
<!-- creates the webapps directory for .war expansion -->
<web-app-deploy path='webapps'/>
<!-- creates the deploy directory for .ear expansion -->
<ear-deploy path='deploy'>
<ear-default>
<!-- Configure this for the ejb server
- <ejb-server>
- <config-directory>WEB-INF</config-directory>
- <data-source>jdbc/test</data-source>
- </ejb-server>
-->
</ear-default>
</ear-deploy>
<!-- creates the deploy directory for .rar expansion -->
<resource-deploy path='deploy'/>
<!-- creates a second deploy directory for .war expansion -->
<web-app-deploy path='deploy'/>
</host-default>
<!-- includes the web-app-default for default web-app behavior -->
<resin:import path="${resinHome}/conf/app-default.xml"/>
<!-- configures the default host, matching any host name -->
<host id=''>
<document-directory>D:/artunion</document-directory>
<!-- configures the root web-app -->
<web-app id='/'>
<!-- adds xsl to the search path -->
<class-loader>
<simple-loader path="$host-root/xsl"/>
</class-loader>
<servlet-mapping url-pattern="/servlet/*" servlet-name="invoker"/>
</web-app>
</host>
</server>
</resin>
Thank you!

Similar Messages

  • A very surprise problem about JDBC and connection pool

    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

    When you are getting connection using datasource lookup from weblogic
    connection pool, this connection is internally wrapped and hence you have to
    cast it to weblogic.jdbc.vendor.oracle.OracleThinClob which you do and so it
    works.
    But when you get connection by loading driver straight, you are getting naked
    oracle connection. In this case when you cast it to oracle.sql.Clob it works,
    as you have seen in your test case.
    I hope this explains what is going on with your code.
    Thanks,
    Mitesh
    Daniel wrote:
    I occur a very problem about JDBC and connection pool on Weblogic Platform
    8.1.
    There is a table in Oracle
    Table
    Name: t1
    id varchar2(5);
    content clob;
    id is primary key.
    If I use a connection pool to connect to Oracle,like following program:
    InitialContext ic = new InitialContext();
    DataSource ds = (DataSource) ic.lookup("cgOracleDataSource");
    con = ds.getConnection();
    then following program will throw a ClassCastException
    String sql = "select content from t1 where id = ?";
    PreparedStatement pst = con.prepareStatement(sql);
    pst.setString(1,"001");
    oracle.sql.CLOB clob = (oralce.sql.CLOB)rs.getClob("content") //this
    statement will throw ClassCastException
    but if I use JNDI to connect to Oracle,like following program, then those
    program above is ok
    private String dbdriver="oracle.jdbc.driver.OracleDriver";
    private String dburl="jdbc:oracle:thin:@192.168.7.148:1521:ep";
    private String username="ep";
    private String password="epuser";
    Class.forName(dbdriver);
    conn = DriverManager.getConnection(dburl, username, password);
    conn.setAutoCommit(false);
    On the contrary, if I use JNDI to connect to Oracle, following program will
    throw ClassCastException
    weblogic.jdbc.vendor.oracle.OracleThinClob clob =
    (weblogic.jdbc.vendor.oracle.OracleThinClob)rs.getClob("content");
    but it is fine if I use connection pool to connect to Oracle.
    I am confused this problem, who can tell me why?
    Daniel

  • Database connection pooling in ADF causing db procedure calls to use different transaction or session

    We have developed an application using JDev Version 11.1.2.1.0 and the database is oracle 11g EE.
    We have many database procedures or function calls from the model (AMImpl.java, VORowImpl.java) and the commit does not happen in the database and it happens from ADF. The database procedures are called in some valueChangeListnener and these procedures use the same transaction or session database session when called and update some records in some tables that are displayed in pages.
    We started using connection pooling recently in our ADF application,  -Djbo.doconnectionpooling=true -Djbo.txn.disconnect_level=1. When using connection pooling, we noticed that the database procedure calls use a different trasanction or different database session and the data or records that these procedures update is lost.
    After removing the connection pooling, we noticed that the procedures again started using the same transaction or same database session and was working fine.
    I want to know why this connnection pooling caused this issue and is there any fix for this when using connection pooling?

    Take a look at
    http://docs.oracle.com/cd/E15523_01/web.1111/b31974/bcampool.htm#CIHCHHEA
    What You May Need to Know About Database User State and jbo.doconnectionpooling = true
    As you can see:
    "At the end of the request when the application module is released back to the application module pool, that application module pool releases the JDBC connection it was using back to the database connection pool. It follows that with jbo.doconnectionpooling set to true the application module instance in the pool may have a completely different JDBC connection each time you check it out of the pool"
    So, the best you can do, is to revert jbo.doconnectionpooling to false.

  • KIMYONG : Applications Database Connection Pool 관련 parameter 설명

    Purpose
    JVM 이 과도한 CPU / Memory를 사용하게 되어 Application Performance에 영향을 미칠때가 있으며 이럴경우 Connection Pool 관련하여 Parameter Tunning을 해야 할때가 있습니다. 이때 사용되는 Parameter들의 의미를 설명하고자 합니다.
    The Applications Database Connection Pool is a pool of JDBC database connections that are shared among java applications. Applications obtain connections from the pool by using the getJDBCConnection(...) methods of AppsContext.
    Essentially, each AppsContext has a single database connection associated with it at all times.
    The AOL/J layer internally borrows and returns this connection to the pool as needed to maintain connection reference that is properly initialized for the current Java tier AOL security context and NLS state.
    FND_MAX_JDBC_CONNECTIONS
    ============================
    The maximum pool size is the maximum allowed sum of the number of available connections and thenumber of locked connections. If the pool reaches the maximum size and all connections are locked, new clients will not be able to borrow a connection until one of the current clients has returned one. The default setting for this parameter is essentially unlimited (about 2 billion).
    FND_JDBC_BUFFER_MIN
    ======================
    The buffer minimum is the minimum number of connections that the pool should try to maintain in the available list. When the buffer size falls below the buffer minimum, the pool maintenance thread will be notified to create new connections. When notified, the thread will immediately attempt to create the number of connections to fill the difference. New connections will not be created if the pool is already at its maximum size. When creating new connections the thread uses the attributes of the most recent client request that resulted in a new connection being created.
    Setting this parameter to "0" will disable maintenance of the buffer minimum.
    However, the buffer maximum will still be maintained.
    Setting this parameter to a number greater than the maximum pool size(FND_MAX_JDBC_CONNECTIONS) will disable all buffer maintenance.
    FND_JDBC_BUFFER_MAX
    ======================
    The buffer maximum is the maximum number of connections that the pool should try to maintain in the available list. During heavy usage, the buffer may exceed this maximum. However, during periods of low usage, the maintenance thread will decrease the buffer size until the buffer maximum is reached.
    If the value of this parameter is an integer, (for example "20") the buffer maximum is static. If the value is a percent (for example, "20%"), the buffer maximum is not constant but instead is calculated dynamically as a percent of total pool size. The buffer minimum is also taken into account when
    determining a dynamic buffer maximum.
    The exact expression used is:
    maximum(t) = buffer minimum + ( (FND_JDBC_BUFFER_MAX/100) * size(t) )
    where maximum(t) and size(t) are the buffer maximum and pool size at some time t.
    The thread is configured to periodically check the buffer size. If the buffer size is greater than the maximum, the thread will remove either the number of available connections specified by FND_JDBC_BUFFER_DECAY_SIZE or the number of connections in excess of the buffer minimum, whichever is smaller. When connections are removed from the available list, the least recently used ones are removed first.
    Setting this parameter to100%, or to a number equal to FND_MAXIMUM_JDBC_CONNECTIONS, or to a number less than or equal to FND_JDBC_BUFFER_MIN will effectively prevent the maintenance thread from ever removing any connections.
    FND_JDBC_BUFFER_DECAY_INTERVAL
    ===================================
    The buffer decay interval specifies how often the connection pool maintenance thread should check the buffer size. The thread will check the buffer size at most once every FND_JDBC_BUFFER_DECAY_INTERVAL seconds. The actual time between consecutive thread cycles will vary somewhat depending on the JVM load.
    This parameter, along with FND_JDBC_BUFFER_DECAY_SIZE, allows the buffer decay rate to be tuned. For example, if the buffer decay size is 2 and the buffer decay interval is one minute, the buffer decay rate will never exceed two connections per minute. When connections are removed, the least recently used ones are removed first.
    FND_JDBC_BUFFER_DECAY_SIZE
    =============================
    The buffer decay size specifies the maximum number of connections that should be removed during any single thread cycle during which the number of available connections is greater than the buffer size. This parameter, along with FND_JDBC_BUFFER_DECAY_INTERVAL, allows the buffer decay rate to be tuned.
    FND_JDBC_MAX_WAIT_TIME
    =========================
    The maximum wait time specifies how much time a client should spend trying to get a connection. The borrow algorithm, used to borrow an object from the pool, contains check points at which the elapsed time is compared to the maximum wait time. If it exceeds the maximum wait time, then a null object will be returned to the client. The pre-configured value for the maximum wait time is
    10 seconds.
    FND_JDBC_SELECTION_POLICY
    ============================
    The selection policy determines how a connection is selected from the list of available connections for a particular client. The connection pool is pre-configured to use a cost-based selection algorithm, which selects the connection that will require the smallest amount of initialization to match the
    client's context.
    FND_JDBC_USABLE_CHECK
    ===========================
    The FND_JDBC_USABLE_CHECK parameter governs whether a pl/sql query is performed before giving a connection to a client. The pool checks whether a connection is usable before handing it to a client. This always involves checking that the connection is not null and is not closed. If FND_JDBC_USABLE_CHECK is set to true, then it also verifies that the connection can be used to perform a simple PL/SQL query. (This parameter may have to be set to "true" in order to clean up
    connections to a database that has been restarted.)
    FND_JDBC_CONTEXT_CHECK
    ==========================
    The FND_JDBC_CONTEXT_CHECK parameter governs whether the AOL security context and NLS state is obtained from the database when the connection is returned to the pool. If FND_JDBC_CONTEXT_CHECK is "true", when the connection is returned to the pool, the AOL security context and NLS state will be obtained from the database. (This is implemented in the DBConnObj.isReusable() method). This check must be done when the connection is returned (rather than when it is borrowed) so that the selection matching algorithm has access to the actual
    session context of the connections in the available list.
    FND_JDBC_PLSQL_RESET
    ========================
    The PL/SQL reset flag, set using the variable FND_JDBC_PLSQL_RESET, governs whether the PL/SQL state associated with a connection should be freed before the pool hands the connection to the client. By default this flag is false.
    If the flag is set by true, by including the line "FND_JDBC_PLSQL_RESET=true" in the .dbc file, each connection to the database will have its PL/SQL state cleared before the pool returns the connection to the client.
    This is how it works. After the pool selects a connection from the available list for a client, it initializes the connection. One of the things initialization does is to set a flag that is later used by SessionManager to determine if the apps initialization routine needs to be performed for the connection. When FND_JDBC_PLSQL_RESET has been set to "true", this flag will always be set to true. After the pool initializes the connection, it also checks whether the connection is usable. In this case, this check will include a call to DBMS_SESSION.RESET_PACKAGE, which frees the PL/SQL state. The table below summaries the affect of FND_JDBC_PLSQL_RESET and the other safety check parameters on borrowing a connection from the pool.
    The FND_JDBC_PLSQL_RESET parameter has been added to only to address the case where production PL/SQL global bugs are known to exist. The performance of the pool is reduced by setting this flag to true.
    Reference : Note 264599.1

    Purpose
    JVM 이 과도한 CPU / Memory를 사용하게 되어 Application Performance에 영향을 미칠때가 있으며 이럴경우 Connection Pool 관련하여 Parameter Tunning을 해야 할때가 있습니다. 이때 사용되는 Parameter들의 의미를 설명하고자 합니다.
    The Applications Database Connection Pool is a pool of JDBC database connections that are shared among java applications. Applications obtain connections from the pool by using the getJDBCConnection(...) methods of AppsContext.
    Essentially, each AppsContext has a single database connection associated with it at all times.
    The AOL/J layer internally borrows and returns this connection to the pool as needed to maintain connection reference that is properly initialized for the current Java tier AOL security context and NLS state.
    FND_MAX_JDBC_CONNECTIONS
    ============================
    The maximum pool size is the maximum allowed sum of the number of available connections and thenumber of locked connections. If the pool reaches the maximum size and all connections are locked, new clients will not be able to borrow a connection until one of the current clients has returned one. The default setting for this parameter is essentially unlimited (about 2 billion).
    FND_JDBC_BUFFER_MIN
    ======================
    The buffer minimum is the minimum number of connections that the pool should try to maintain in the available list. When the buffer size falls below the buffer minimum, the pool maintenance thread will be notified to create new connections. When notified, the thread will immediately attempt to create the number of connections to fill the difference. New connections will not be created if the pool is already at its maximum size. When creating new connections the thread uses the attributes of the most recent client request that resulted in a new connection being created.
    Setting this parameter to "0" will disable maintenance of the buffer minimum.
    However, the buffer maximum will still be maintained.
    Setting this parameter to a number greater than the maximum pool size(FND_MAX_JDBC_CONNECTIONS) will disable all buffer maintenance.
    FND_JDBC_BUFFER_MAX
    ======================
    The buffer maximum is the maximum number of connections that the pool should try to maintain in the available list. During heavy usage, the buffer may exceed this maximum. However, during periods of low usage, the maintenance thread will decrease the buffer size until the buffer maximum is reached.
    If the value of this parameter is an integer, (for example "20") the buffer maximum is static. If the value is a percent (for example, "20%"), the buffer maximum is not constant but instead is calculated dynamically as a percent of total pool size. The buffer minimum is also taken into account when
    determining a dynamic buffer maximum.
    The exact expression used is:
    maximum(t) = buffer minimum + ( (FND_JDBC_BUFFER_MAX/100) * size(t) )
    where maximum(t) and size(t) are the buffer maximum and pool size at some time t.
    The thread is configured to periodically check the buffer size. If the buffer size is greater than the maximum, the thread will remove either the number of available connections specified by FND_JDBC_BUFFER_DECAY_SIZE or the number of connections in excess of the buffer minimum, whichever is smaller. When connections are removed from the available list, the least recently used ones are removed first.
    Setting this parameter to100%, or to a number equal to FND_MAXIMUM_JDBC_CONNECTIONS, or to a number less than or equal to FND_JDBC_BUFFER_MIN will effectively prevent the maintenance thread from ever removing any connections.
    FND_JDBC_BUFFER_DECAY_INTERVAL
    ===================================
    The buffer decay interval specifies how often the connection pool maintenance thread should check the buffer size. The thread will check the buffer size at most once every FND_JDBC_BUFFER_DECAY_INTERVAL seconds. The actual time between consecutive thread cycles will vary somewhat depending on the JVM load.
    This parameter, along with FND_JDBC_BUFFER_DECAY_SIZE, allows the buffer decay rate to be tuned. For example, if the buffer decay size is 2 and the buffer decay interval is one minute, the buffer decay rate will never exceed two connections per minute. When connections are removed, the least recently used ones are removed first.
    FND_JDBC_BUFFER_DECAY_SIZE
    =============================
    The buffer decay size specifies the maximum number of connections that should be removed during any single thread cycle during which the number of available connections is greater than the buffer size. This parameter, along with FND_JDBC_BUFFER_DECAY_INTERVAL, allows the buffer decay rate to be tuned.
    FND_JDBC_MAX_WAIT_TIME
    =========================
    The maximum wait time specifies how much time a client should spend trying to get a connection. The borrow algorithm, used to borrow an object from the pool, contains check points at which the elapsed time is compared to the maximum wait time. If it exceeds the maximum wait time, then a null object will be returned to the client. The pre-configured value for the maximum wait time is
    10 seconds.
    FND_JDBC_SELECTION_POLICY
    ============================
    The selection policy determines how a connection is selected from the list of available connections for a particular client. The connection pool is pre-configured to use a cost-based selection algorithm, which selects the connection that will require the smallest amount of initialization to match the
    client's context.
    FND_JDBC_USABLE_CHECK
    ===========================
    The FND_JDBC_USABLE_CHECK parameter governs whether a pl/sql query is performed before giving a connection to a client. The pool checks whether a connection is usable before handing it to a client. This always involves checking that the connection is not null and is not closed. If FND_JDBC_USABLE_CHECK is set to true, then it also verifies that the connection can be used to perform a simple PL/SQL query. (This parameter may have to be set to "true" in order to clean up
    connections to a database that has been restarted.)
    FND_JDBC_CONTEXT_CHECK
    ==========================
    The FND_JDBC_CONTEXT_CHECK parameter governs whether the AOL security context and NLS state is obtained from the database when the connection is returned to the pool. If FND_JDBC_CONTEXT_CHECK is "true", when the connection is returned to the pool, the AOL security context and NLS state will be obtained from the database. (This is implemented in the DBConnObj.isReusable() method). This check must be done when the connection is returned (rather than when it is borrowed) so that the selection matching algorithm has access to the actual
    session context of the connections in the available list.
    FND_JDBC_PLSQL_RESET
    ========================
    The PL/SQL reset flag, set using the variable FND_JDBC_PLSQL_RESET, governs whether the PL/SQL state associated with a connection should be freed before the pool hands the connection to the client. By default this flag is false.
    If the flag is set by true, by including the line "FND_JDBC_PLSQL_RESET=true" in the .dbc file, each connection to the database will have its PL/SQL state cleared before the pool returns the connection to the client.
    This is how it works. After the pool selects a connection from the available list for a client, it initializes the connection. One of the things initialization does is to set a flag that is later used by SessionManager to determine if the apps initialization routine needs to be performed for the connection. When FND_JDBC_PLSQL_RESET has been set to "true", this flag will always be set to true. After the pool initializes the connection, it also checks whether the connection is usable. In this case, this check will include a call to DBMS_SESSION.RESET_PACKAGE, which frees the PL/SQL state. The table below summaries the affect of FND_JDBC_PLSQL_RESET and the other safety check parameters on borrowing a connection from the pool.
    The FND_JDBC_PLSQL_RESET parameter has been added to only to address the case where production PL/SQL global bugs are known to exist. The performance of the pool is reduced by setting this flag to true.
    Reference : Note 264599.1

  • Is there any problem about 10I oracle connect to 9I oracle  in BW

    we want to know about
    creating a new source system on BW in AIX pointing to an Oracle
    database, bw oracle use 10i database , connect to
    9idatabase(Windows) to get data for BW,
    can you tell me how 10I oracle connect to 9I oracle ??
    is there any problem about 10I oracle connect to 9I oracle ??If
    there exit problem ,how to deal with it ??
    Thank you
    ALLEN ZHOU

    Hi
    You may face some problem in BASIS side especially if one version is Open SQL and other in Old SQL
    Regards
    N Ganesh

  • How database connection pooling works in a application

    Hi Guys,
    I am new to Java and looking into best way of doing J2ee database conectivity. I am using Eclipse galileo3.5 J2EE with Mysql database and Tomcate 6.0.
    I am developing an email application where I need to implement MVC model for my webapplication, using jsp for presentation, servlet for control and java beans for model.
    I came across two tutorial for database connection pooling as given below.
    Eclipse Corner Article: Creating Database Web Applications with Eclipse - In this tutorial connection pooling is configure in Tomcate 6.0
    It says Copy and paste the following into your context.xml file (you may have to click on the Source tab at the bottom of the editor to be able to paste). This defines a DataSource with the name "jdbc/SampleDB". Our application will retrieve database connections from the pool using this name.
    <?xml version="1.0" encoding="UTF-8"?>
    <Context>
    <Resource name="jdbc/SampleDB" auth="Container"
    type="javax.sql.DataSource"
    username="app" password="app"
    driverClassName="org.apache.derby.jdbc.ClientDrive r"
    url="jdbc:derby://localhost:1527/sample"
    maxActive="8" />
    </Context>
    Where as in second tutorial - http://www.roseindia.net/answers/viewanswers/2838.html
    It uses java bean for connection pooling and then use straight way in JSP and no Servlet used.
    conpool.jsp
    <%@page import="java.sql.Connection"%>
    <jsp:useBean id="pl" class="com.CoreJava.ConnectionPooling"/>
    <% Connection con = pl.getConnection(); %>
    //do something using con
    connectionPooling.java
    import com.mysql.jdbc.jdbc2.optional.MysqlConnectionPoolD ataSource;
    public class ConnectionPooling
    static Connection con=null;
    public static Connection getConnection()
    try
    MysqlConnectionPoolDataSource po=new MysqlConnectionPoolDataSource();
    po.setServerName("localhost");
    po.setPortNumber(3306);
    po.setDatabaseName("mydatabase"); //changeur database name
    po.setUser("root");//ur username
    po.setPassword("");//ur password
    con = po.getConnection();
    catch(Exception e)
    System.out.println("Exception Connection :"+e);
    return con;
    Please some one explain which is the best way of doing connection pooling to the database by using MVC pattern
    Please if some one advise me how to use MVC architecture for simple email application and database connectivty.
    Thanks

    >
    >
    Where as in second tutorial - http://www.roseindia.net/answers/viewanswers/2838.html
    Never EVER use roseindia. It is terrible shit.
    [http://balusc.blogspot.com/2008/06/what-is-it-with-roseindia.html]
    The correct answer is what you found in the eclipse article. And you can read the Tomcat docs for more.
    As per usual the code you have posted from Roseindia is a big pile of rubbish that was written by a complete idiot. I mean the person who wrote it apparently doesn't know much Java at all. Let alone JDBC. Or Connection pools. Or J2EE. It's not the worst I've seen from them but it's pretty bad.

  • Database connection pooling with weblogic 8.1.

    Hai All,
    I am new to weblogic database connection pooling.
    I am using Weblogic8.1 and want to use connection pooling to get a jdbc connection. my database server is Oracle 8.1.7.
    Things which i have done using the weblogic admin console.
    I have created a Jdbc connection pool named myconnectionpool.
    I have created a datasource named mydatasource.
    and named the JNDI as myjndi.
    Is the above process correct to create the connection pool in the weblogic8.1.
    I am not aware of the java code to get the database connection object from the connection pool which i have created.
    can any one please let me know the java code to get the connection from the pool.
    Any help is appreciated
    Thanks in advance
    pooja.

    Hai
    I have tried using the code u have mentioned but it returned me
    an error which is below.
    C:\javaexamples\Javaprograms\JDBC>java jdbcexampleconnectionpool
    javax.naming.NoInitialContextException: Need to specify class name in environment or system property, or as an applet parameter, or in an application resource file: java.naming.factory.initial
    I have added the following lines code, which i read in some weblogic documentation. The code i added is below and it worked fine.
    ht.put(Context.INITIAL_CONTEXT_FACTORY,"weblogic.jndi.WLInitialContextFactory");
    ht.put(Context.PROVIDER_URL,"t3://localhost:7001");
    Context ctx = new InitialContext(ht);I am not sure what the above code does.
    Can anyone let me know what does the above code do.
    Thanks a lot and i appreciate ur help,
    Pooja.

  • Database connection Pooling in TOMCAT

    I am trying Database connection Pooling in TOMCAT
    I am getting the following error
    org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null'
    My Web.xml in $CATALINA_HOME\conf\web.xml
    <resource-ref>
    <res-ref-name>WMSPREF</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    and my server.xml in
    $CATALINA_HOME\conf\server.xml
    <ResourceParams name="WMSPREF">
    <parameter>
    <name>factory</name>
    <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:oracle:thin:@10.94.100.148:1521:WMSPREF</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>wmsmigrate</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>abnwms</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>20</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>10</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>-1</value>
    </parameter>
    </ResourceParams>
    And my database.jsp : code
         Context ctx = new InitialContext();
         Context envContext = (Context)ctx.lookup("java:comp/env");
         DataSource ds = (DataSource)envContext.lookup("WMSPREF");
         conn = ds.getConnection();

    What version of Tomcat do you have? 4? 5? 5.5?
    Have you defined a Resource entry in server.xml as well as the ResourceParams?
    I have never had any luck configuring a datasource in the server.xml file.
    What HAS worked for me is putting the config into a myWebApp.xml file.
    My web context is "myWebApp"
    The name of the file is "myWebApp.xml"
    For Tomcat4 for this goes in the webapps directory
    For Tomcat5 this goes in the [TOMCAT_HOME]/conf/Catalina/localhost directory
    <?xml version='1.0' encoding='utf-8'?>
    <Context path="/myWebApp" docBase="myWebApp" debug="1" reloadable="true" crossContext="true" >
    <Resource name="WMSPREF" auth="Container"
                  type="javax.sql.DataSource">
    </Resource>
    <ResourceParams name="WMSPREF">
    <parameter>
      <name>factory</name>
      <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
    </parameter>
    <parameter>
      <name>driverClassName</name>
      <value>oracle.jdbc.driver.OracleDriver</value>
    </parameter>
    <parameter>
      <name>url</name>
      <value>jdbc:oracle:thin:@10.94.100.148:1521:WMSPREF</value>
    </parameter>
    <parameter>
      <name>username</name>
      <value>wmsmigrate</value>
    </parameter>
    <parameter>
      <name>password</name>
      <value>abnwms</value>
    </parameter>
    <parameter>
      <name>maxActive</name>
      <value>20</value>
    </parameter>
    <parameter>
      <name>maxIdle</name>
      <value>10</value>
    </parameter>
    <parameter>
      <name>maxWait</name>
      <value>-1</value>
    </parameter>
    </ResourceParams>
    </Context>Cheers,
    evnafets

  • How to config the oracle database connection pool in IAS

    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

    Jacky,
    You need do the following for oracle type4 driver:
    1) register the driver:
    $IAS_HOME/bin/jdbcsetup
    Driver Identifier: Oracle_Type4_816 (whatever name you like)
    Driver Classname: oracle.jdbc.driver.OracleDriver
    Driver Classpath: .../classes12.zip (install this this zip file somewhere
    and add this zip into the Classpath later).
    2) DataSource Setup:
    start iAS Administration Tool (iASAT)
    Choose Database, unfold iAS1 (your app server instance),
    choose External JDBC Datasource -> add: DataSource Registration
    JNDI Name: yourPoolName
    Driver Type: Oracle_Type4_816 (select what you just register)
    DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
    Username: your_user_name
    Password: your_passwd
    (Datasource Pool: using defaults for now): you can also customrize the
    parameters for the pool.
    3. Add classes12.zip into CLASSPATH.
    In your application, you can use JNDI lookup to get the DataSource from
    which you get the connection from the pool.
    Hope this helps.
    Good luck.
    Xuran
    "Jacky Yan" <[email protected]> wrote in message
    news:9m0tmp$[email protected]..
    Hi,
    Does anyone who hows to config the oracle database connection pool in IAS?
    Thanks so much!!!
    [email protected]
    Jacky

  • Database connection pool to stand alone java class

    Hi all,
    I would like to know the best way to use a database connection pool with a stand alone java class.
    In my web applications I usually use JDBC Data Source version 5 to connect to my database. In this case, I connect to an Oracle database. But in this scene, I've a WebSphere Application Server to provide this connection pool. But for stand alone applications, I don't know how to do because I don't have a Application server to run on.
    Can enyone help me with this beginner question?
    Best regards.

    I tried to find the pool class I created but it must be on another CD. Anyway, you can easily create a number of connections and place them on a stack (your own or java's). When you need one, pop it off. When you are finished, push it back.
    Good luck.

  • Strange problem with the internet connection

    Hello,
    I've a strange problem with the network connection , I have bought a Iphone 3g in Italy in date 31st
    October 2010. Now in Italy I have just subscribed a telephone rental with Wind company, where there is an unlimited internet service. The problem is that in my Iphone there is not the line.
    All this is strange because I receive the messages from social networks (like facebook and msn) but I cannot open tha page for the internet connection. I have gone to Apple store and I have tried to put my SIM in an other phone (iphone 3g or 3gs): my SIM is perfectly working.
    The problem is only for the internet connection on my phone because wifi connection is good.
    Thanks!!

    Please help everyone who has the same problem by posting yr solution, thx!

  • Database connection pooling code required!!Help

    Hi,
    Does any one having Database Connection Pooling Code. Pl. send me to [email protected]
    thanks

    something I posted before,
    1. Wrox Java Server Pages has one,
    2. Bulka's Performance and Scalability,
    3. http://developer.java.sun.com/developer/onlineTraining/Programming/JDCBook/index.html#contents
    the last is the only one I remember that periodically removes the connection. this is important because,
    http://enhydra.enhydra.org/project/mailingLists/enhydra/199907/msg00353.html

  • BPEL - Database Connection Pools, JNDI - How do you do it ?

    Scoured forum and BPEL developer and admin guides, and didn't find any good instructions on how to configure and use database pools for BPEL, except possibly this post nearly two years ago data-sources.xml and oc4j-ra.xml
    I suspect things may have changed some in two years ! Where can I find this info. Does anyone who has done it have step by step instructions ?

    You should have scoured better ;-)
    I had a problem that needed to be fixed with a connection pool. Check this post:
    Strange Toplink errors appearing
    It points to some documentation that will help you:
    http://download-uk.oracle.com/docs/cd/B31017_01/integrate.1013/b28994/adptr_db.htm#sthref528
    Basically you have to do the following:
    - look in the WSDL of your DB adapter. It will have a jca:address section. In this section you will see a jndi location, something like: eis/DB/<a_connection>. Make note of this location
    - on the server look for the file oc4j-ra.xml in <oracle_home>/j2ee/<oc4j_soa>/application-deployments/default/DbAdapter. Edit the file. In there are mappings that basically forward the object in location eis/DB/<a_connection> to jdbc/<connection>.
    E.g.:
    <connector-factory location="eis/DB/DBConnection1" connector-name="Database Adapter">
                    <config-property name="xADataSourceName" value="jdbc/DBConnection1DataSource"/>
                    <config-property name="dataSourceName" value="loc/DBConnection1DataSource"/>
                    <config-property name="platformClassName" value="oracle.toplink.platform.database.Oracle9Platform"/>
                    <config-property name="usesNativeSequencing" value="true"/>
                    <config-property name="sequencePreallocationSize" value="50"/>
                    <config-property name="defaultNChar" value="false"/>
                    <config-property name="usesBatchWriting" value="true"/>
                    <connection-pooling use="none">
                    </connection-pooling>
                    <security-config use="none">
                    </security-config>
            </connector-factory>Now copy one of these blocks and edit it so that the location matches your eis/DB/<a_connection> location. Map the dataSource and xaDataSource properties to jdbc/<connection> s (which you create in the next step)
    - go to the enterprise manager, click on the soa suite oc4j container, choose the 'administration' link. Click on the 'Go to task' icon for JDBC connections. Here you can create your connection pool, and db connection. Make sure the location of your JDBC connection matches what you have configured in the oc4j-ra.xml file.
    - restart your soasuite/bpel oc4j container
    - bob's your uncle ;-)
    HTH,
    Bas

  • Proxy functionality in the database connection pool

    Hi,
    I am scouring the internet and forums looking for a way to connect to my database from the .rpd connection pool using proxy authetication. NOT Act-As proxy that is a BIEE feature, but RDBMS proxy authentication with BIEE acting as the middle-tier connecting on behalf of many users and authenticating to the RDBMS AS THE INDIVIDUAL USER. I haven't had any luck, and am hoping someone here has set up this same kind of access.
    We have a requirement to use SSO with BIEE to integrate with our portal and discoverer apps. We also have a requirement to use EUS (Enterprise User Security). EUS allows you to login to the database using the userids/password from OID. Note that the database doesn't support the SSO token, but it uses the same userid/password stored in OID for authenticating to the database. You still must initiate a connection to the database, but the authentication goes to LDAP. Every connection to BIEE may be using a different userid - we will not have a shared login.
    So the issue I see is:
    - We configure SSO
    - In the BI Server the :USER session variable is set (but NOT :PASSWORD, since BI Server didn't authenticate you it doesn't have the password)
    - We create a connection pool - This is where we hit the issue - we need each connection to BI Server to connect down to the database as the SSO user. Since we aren't using a shared account we can't enter a userid/password in this connection. We also can't user :USER and :PASSWORD since SSO doesn't set the :PASSWORD session variable. What I would hope to find is a checkbox "Proxy Authentication" (around where "Shared Logon" checkbox is located) that would connect to the database as the proxy user and then switch to the SSO user.
    This is what happens with BI Publisher. On the JDBC connection screen there is a "Proxy Authentication" checkbox.
    So, has anyone already solved this problem? Thanks!

    Hello, is there anyone knows what this program does
    and how this program is executed? There is nodatabase
    mentioned.That's because it's expecting the URL (which contains
    the database type, hostname, and so on) to be passed
    in on the command line (argv[0]), as well as the
    username and password (argv[1] and argv[2]).
    Thank you very much for your help.
    Regards,
    Lucas

  • Questions about the database connection

    hi all,
    I am developing a project with JDeveloper 10g and I created a database connection to my Oracle RAC database.
    However, whenever I start the project with the JDeveloper and I do a "netstat -an" with the command prompt window. I show there are over 100 connection ESTABLISHED to my database. I don't have any idea how this happens. The problem is since there are over 100 connection established, I couldn't run the project with the JDeveloper's embedded OC4J.
    Can anyone help me to fix this problem?

    I have set the Max connections to 30 in the connection-pool setting of my project in the Embedded OC4J Server Preferences, but it doesn't work.
    There are still over 100 connections to the database...

Maybe you are looking for

  • How do I import an Iphoto Project (book) directly into Aperture 2?

    I have a book that I did as a project in iPhoto '08 that I would like to import directly into Aperture 2 and "redo" the book using Aperture's new features. Although I imported my iPhoto library I don't seem to have this project in Aperture and when I

  • Relative Path Problem

    Simple problem, i have a file named gallery.swf in /site/gallery/ and when i launch the file swf from that directory the loading is going fine, im loading a xml file with this command "xmlReadGalleries.load("photo_galleries.xml")" so the file is load

  • List the items the user does not have access to.

    I have a requirement to show the user a list of all the libraries of a site with the number of items in each even if the user does not have rights to the library. (the link or button will be grayed out if the user has no access)   I am looking for op

  • AICC Integration - Session ID Question

    I am a learning content software vendor working with a mutual client of SAP's.  Our client is attempting to integrate our product with SAP via the AICC e-learning standard.  We have used AICC to integrate our product with countless LMS packages in th

  • When I sign in to the iTunes store it keeps bringing me back to the prompt to sign in.

    My son has an account also. When I try to sign in under my account the prompt to sign in keeps coming back with my son's ID  in the prompt.  Can we have more than one iTunes account on our computer?