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

Similar Messages

  • 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.

  • 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 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

  • A strang problem about Resin database connection pool

    I am a beginner&#65292;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!

  • 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

  • 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.

  • 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.

  • Listener EA2: database connection pool and connection revalidation

    Hi all,
    As one can expect from early adopter release there could be some bugs but I can't find any references in forum to my situation:
    * My 11g XE database and listener are starting as windows services when server boots operating system (Windows Server 2003 R2).
    * I configured my web server (unsupported Jetty 9.0.0.M1) to start as windows service when operating system starts.
    * Apex Listener 2.0.0.268.17.05 configured to connect with XE using JDBC thin driver with default settings (initial pool size 3, max statements 10, min connections 1, max connections 10, inactivity timeout 1800, abandoned connection timeout 900)
    * Because web server starts a bit faster than Oracle database when apex connects first time it gets "ORA-12528, TNS:listener: all appropriate instances are blocking new connections" (could be that database still starting but already registered service with listener)
    * From listener.log file I can see that all further connections made from Apex listener succeeds
    * When I try to open any apex page with browser I am getting 404 error and apex listener logs error (*time is 2 days after system startup*):
    2012-11-30 3:56:02 PM oracle.dbtools.common.config.db.DatabaseConfig badConfiguration
    SEVERE: The pool named: apex is not correctly configured, error: Listener refused the connection with the following error:
    ORA-12528, TNS:listener: all appropriate instances are blocking new connections
    ConnectionPoolException [error=BAD_CONFIGURATION]
         at oracle.dbtools.common.jdbc.ConnectionPoolException.badConfiguration(ConnectionPoolException.java:62)
         at oracle.dbtools.common.config.db.DatabaseConfig.badConfiguration(DatabaseConfig.java:146)
         at oracle.dbtools.common.config.db.DatabaseConfig.createPool(DatabaseConfig.java:168)
         at oracle.dbtools.common.config.db.DatabaseConfig.getConnection(DatabaseConfig.java:68)
         at oracle.dbtools.common.jdbc.ora.OraPrincipal.connection(OraPrincipal.java:25)
         at oracle.dbtools.apex.ModApexContext.getConnection(ModApexContext.java:320)
         at oracle.dbtools.apex.Procedure.getProcedure(Procedure.java:166)
         at oracle.dbtools.apex.OWA.validateProcedure(OWA.java:384)
         at oracle.dbtools.apex.security.Security.isValidRequest(Security.java:171)
         at oracle.dbtools.apex.ModApex.validateRequest(ModApex.java:233)
         at oracle.dbtools.apex.ModApex.doGet(ModApex.java:79)
         at oracle.dbtools.apex.ModApex.service(ModApex.java:263)
         at oracle.dbtools.rt.web.HttpEndpointBase.modApex(HttpEndpointBase.java:288)
         at oracle.dbtools.rt.web.HttpEndpointBase.service(HttpEndpointBase.java:127)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:848)
         at org.eclipse.jetty.servlet.ServletHolder.handle(ServletHolder.java:665)
         <... Jetty web server stack ...>
         at java.lang.Thread.run(Unknown Source)
    2012-11-30 3:56:02 PM oracle.dbtools.rt.web.HttpEndpointBase modApex
    * Oracle listener log for same time (no errors here):
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1078)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1079)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1080)) * establish * xe * 0
    30-NOV-2012 15:56:01 * (CONNECT_DATA=(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))(SERVICE_NAME=xe)(CID=(PROGRAM=JDBC Thin Client)(HOST=__jdbc__)(USER=SYSTEM))) * (ADDRESS=(PROTOCOL=tcp)(HOST=127.0.0.1)(PORT=1081)) * establish * xe * 0
    * For some reason apex listener keeps first connection status and won't try to establish new connection if first attempt finished with ORA-12528
    * The same scenario is valid when at time of web server start oracle database/listener is not available - even if database and listener starts and apex successfully establishes further connections all apex pages gets 404 error
    * If I restart web server windows service (while oracle db and listener still running) browser opens apex pages without errors and apex listener does not log any errors
    * I know that I can avoid this error delaying start of web server windows service but it would be nice to have production release 2.x without such bugs

    Hi,
    Is there any way to use the connection pool or Datasource while connecting to database?If I am using a stateless sesssion bean and using a Data Access layer which just creates a database session to write the persistence toplink objects how I can make use of application server connection pool?Hi Vinod,
    Yes, TopLink allows you to use the app server's connection pooling and transaction services. Chapter 2 of the Oracle9iAS TopLink Foundation Library Guide provides details as do the TopLink examples. The easiest way to set this up is by using the sessions.xml file. The sample XML below is from the file <toplink903>\examples\ias\examples\ejb\sessionbean\sessions.xml. Here we are adding the datasource defined in OC4J and specifying that we are using the OC4J transaction controller also.
    <login>
    <user-name>sa</user-name>
    <password></password>
    <datasource>java:comp/env/jdbc/ejbJTSDataSource</datasource>
    <uses-external-transaction-controller>true</uses-external-transaction-controller>
    <uses-external-connection-pool>true</uses-external-connection-pool>
    </login>
    <external-transaction-controller-class>oracle.toplink.jts.oracle9i.Oracle9iJTSExternalTransactionController</external-transaction-controller-class>
    When using this approach you need to change your TopLink code slightly in the EJB methods:
    a. Acquire the ACTIVE unit of work from the server
    session (again, see the EmployeeSessionEJB code
    example) with something like:
    UnitOfWork uow = clientSession.getActiveUnitOfWork();
    b. Calls to uow.commit() can be ommitted or commented out
    because the EJB will handle this. Note that of course
    the methods you create in the EJB that are using this
    approach must have TX Required (default).
    Hope this helps.
    Pete

  • 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

  • Tomcat 5.0.* global JNDI database connect pooling. complex config question

    Ok. I can't get global connection pooling to work in tomcat 5.0.24. (I am running windows xp pro)
    I am using MySQL (installed on the same machine) and I have succesfully worked through the tutorial titled "MySQL DBCP Example" found at http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    This example does not demonstrate global connection pooling, however. I want to share a single connection pool across all my web applications. I don't want a different connection pool for each webapp.
    So I define the connection pool JDBC resource in the conf/server.xml file under the <GlobalNamingResources> element.
    Here is the entire <GlobalNamingResources> element lifted from conf/server.xml:
    (Please overlook some of the formatting mistakes due to the <code> tag interpreting the xml as java.)
    <!-- Global JNDI resources -->
    <GlobalNamingResources>
        <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
        <Resource name="UserDatabase"
                  auth="Container"
                  type="org.apache.catalina.UserDatabase"
                  description="User database that can be updated and saved">
        </Resource>
        <Resource name="jdbc/MySQL"
                  auth="Container"
                  type="javax.sql.DataSource"/>
        <ResourceParams name="UserDatabase">
            <parameter>
                <name>factory</name>
                <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
            </parameter>
            <parameter>
                <name>pathname</name>
                <value>conf/tomcat-users.xml</value>
            </parameter>
        </ResourceParams>
        <ResourceParams name="jdbc/MySQL">
            <parameter>
                <name>factory</name>
                <value>org.apache.commons.dbcp.BasicDataSourceFactory</value>
            </parameter>
            <parameter>
                <name>maxActive</name>
                <value>100</value>
            </parameter>
            <parameter>
                <name>maxIdle</name>
                <value>30</value>
            </parameter>
            <parameter>
                <name>maxWait</name>
                <value>20000</value>
            </parameter>
            <parameter>
               <name>username</name>
               <value>webapp</value>
            </parameter>
            <parameter>
               <name>password</name>
               <value>******</value>
            </parameter>
            <parameter>
                <name>removeAbandoned</name>
                <value>true</value>
            </parameter>
            <parameter>
                <name>removeAbandonedTimeout</name>
                <value>3000</value>
            </parameter>
            <parameter>
                <name>logAbandoned</name>
                <value>true</value>
            </parameter>
            <parameter>
                <name>url</name>
                <value>jdbc:mysql://localhost:3306/javatest?autoReconnect=true</value>
            </parameter>
        </ResourceParams>
      </GlobalNamingResources>I am still trying to get the DBTest example (described in the link to the tomcat 5 docs above) to work, only now I want it to work using a global connection pool. So here is the contents of webapps/DBTest/WEB-INF/web.xml: (again, please overlook formatting difficulties :)
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app xmlns="http://java.sun.com/xml/ns/j2ee"
             xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
             xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
             http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd"
             version="2.4">
      <description>MySQL Test App</description>
      <resource-ref>
          <description>DB Connection</description>
          <res-ref-name>jdbc/MySQL</res-ref-name>
          <res-type>javax.sql.DataSource</res-type>
          <res-auth>Container</res-auth>
      </resource-ref>
    </web-app>The last thing I need to do, I think, is to include a <resourceLink> element in the context.xml file for this webapp. Now in tomcat 5.0.* it is not recommended that the <context> element appear in the conf/server.xml file. Instead, as I understand it, it should appear in either of the two following places (for a webapp called DBTest):
    $CATALINA_HOME/conf/[engine_name]/[host_name]/DBTest.xml
    $CATALINA_HOME/webapps/DBTest/META-INF/context.xmlSince I would eventually like to package each webapp in its own war file, I prefer the second option above. This will enable me to place the context.xml file within the .war file. Currently, however, I am not using .war files.
    For the DBTest webapp I have the following <context> element in webapps/DBTest/META-INF/context.xml:
    <context path="/DBTest" docBase="/DBTest" debug="1">
        <ResourceLink global="jdbc/MySQL" name="jdbc/MySQL" type="javax.sql.DataSource" />
    </context>Now, when I point my browser to http://localhost:8080/DBTest/test.jsp I get the following message:
    javax.servlet.ServletException: Unable to get connection, DataSource invalid: "org.apache.commons.dbcp.SQLNestedException: Cannot create JDBC driver of class '' for connect URL 'null', cause: No suitable driver"
    For those who are interested, here is test.jsp:
    <%@ taglib uri="http://java.sun.com/jsp/jstl/sql" prefix="sql" %>
    <%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
    <sql:query var="rs" dataSource="jdbc/MySQL">
    select id, foo, bar from javatest.testdata
    </sql:query>
    <html>
      <head>
        <title>DB Test</title>
      </head>
      <body>
      <h2>Results</h2>
    <c:forEach var="row" items="${rs.rows}">
        Foo ${row.foo}<br/>
        Bar ${row.bar}<br/>
    </c:forEach>
      </body>
    </html>Now I know that this is a very long and detailed question and that it is unlikely that anyone is even going to read down this far, let alone take the time to study all that XML, but if anyone is able to tell me why this setup does not allow global connection pooling, I will be pretty *@&$**% impressed. I only wish I had duke dollars to give.
    Jon

    Okay, I went back and double checked that I can get the DBTest example working. It is described here: http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html
    I was not able to get it working exactly according to the tutorial, though. I was required to put the <context> element not in the conf/server.xml but in conf/Catalina/localhost/DBTest.xml. Then, with the DBTest/WEB-INF/web.xml as above, I was able to get the DBTest example working. The output of test.jsp (described above also) is the following:
    Results
    Foo hello
    Bar 12345I would like to be able to put the <context> element in webapps/DBTest/META-INF/context.xml (as I think should be allowed) because then I would be able to include it in a war file that encompassed the entire web application. If I am forced to put the <context> element in a subdirectory of the conf directory, then I cannot include it in a war file and I will be unable to just drop my war files in the webapps directory and go. Instead I will have to drop my war files in the webapps directory, then go and fiddle around with the xml files in conf/Catalina/localhost/
    But if I move the <context> element into webapps/DBTest/META-INF/context.xml then the example stops working. When I put it back in conf/Catalina/localhost/DBTest.xml everything is fine again.
    Ok, no big deal. I guess my war file deployment will just have to be a little more complicated.
    But what if I want the resource to be global??? If I remove the <Resource> and <ResourceParams> elements from the webapp-specific <context> element and put them in the <GlobalNamingResource> element in the conf/server.xml file I should have a global resource, right? I did this, then added a resource link to the <context> element (see above), however, the example stops working. I have tried both with and without the <resource-ref> element in web.xml.
    Can some remarkably intelligent and knowledgeable person please explain to me how global resources work in tomcat 5.0, especially global JDBC connection pooling.
    Thanks,
    Jon

  • Getting error while updateing the URL under connection pool, can anyone help ?

    Our IP for database has changed and we are trying to update it in URL under the connection pool. We are getting below error :
    oracle.oc4j.admin.jmx.shared.exceptions.JMXRuntimeException: Error setting attributes on MBean: oc4j:j2eeType=JDBCResource,name="moPool",J2EEApplication=default,J2EEServer=standalone at oracle.oc4j.admin.jmx.distributed.SimpleInstanceMBeanServerDelegate.setAttributes(SimpleInstanceMBeanServerDelegate.java:873) at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.setAttributes(LocalizationFilterMBeanServer.java:552) at oracle.sysman.ias.studio.jmx.spi.JMXConnectorImpl.setAttributes(JMXConnectorImpl.java:384) at oracle.sysman.ias.studio.sdk.SDKJMXUtil.setAttributeValues(SDKJMXUtil.java:590) at oracle.sysman.ias.studio.oc4j.jdbc.JMXCPAdminBean.editConnectionPool(JMXCPAdminBean.java:109) at oracle.sysman.ias.studio.oc4j.jdbc.CPHelper.editConnectionPool(CPHelper.java:252) at oracle.sysman.ias.studio.oc4j.jdbc.CPHelper.handleEvent(CPHelper.java:167) at oracle.sysman.ias.studio.sdk.AbstractController.handleEvent(AbstractController.java:769) at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:378) at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765) at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283) at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:385) at oracle.cabo.servlet.UIXServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595) Caused by: oracle.oc4j.admin.jmx.shared.exceptions.JMXClusterRuntimeException: Error setting attributes on MBean: oc4j:j2eeType=JDBCResource,name="moPool",J2EEApplication=default,J2EEServer=standalone at oracle.oc4j.admin.jmx.distributed.SimpleInstanceMBeanServerDelegate.setAttributes(SimpleInstanceMBeanServerDelegate.java:827) ... 31 more ---- Embedded exception oracle.oc4j.admin.jmx.shared.exceptions.JMXClusterRuntimeException: Error setting attributes on MBean: oc4j:j2eeType=JDBCResource,name="moPool",J2EEApplication=default,J2EEServer=standalone at oracle.oc4j.admin.jmx.distributed.SimpleInstanceMBeanServerDelegate.setAttributes(SimpleInstanceMBeanServerDelegate.java:827) at oracle.oc4j.admin.jmx.server.state.LocalizationFilterMBeanServer.setAttributes(LocalizationFilterMBeanServer.java:552) at oracle.sysman.ias.studio.jmx.spi.JMXConnectorImpl.setAttributes(JMXConnectorImpl.java:384) at oracle.sysman.ias.studio.sdk.SDKJMXUtil.setAttributeValues(SDKJMXUtil.java:590) at oracle.sysman.ias.studio.oc4j.jdbc.JMXCPAdminBean.editConnectionPool(JMXCPAdminBean.java:109) at oracle.sysman.ias.studio.oc4j.jdbc.CPHelper.editConnectionPool(CPHelper.java:252) at oracle.sysman.ias.studio.oc4j.jdbc.CPHelper.handleEvent(CPHelper.java:167) at oracle.sysman.ias.studio.sdk.AbstractController.handleEvent(AbstractController.java:769) at oracle.sysman.emSDK.svlt.PageHandler.handleRequest(PageHandler.java:378) at oracle.sysman.emSDK.svlt.EMServlet.myDoGet(EMServlet.java:765) at oracle.sysman.emSDK.svlt.EMServlet.doGet(EMServlet.java:283) at oracle.sysman.ias.studio.app.StudioConsole.doGet(StudioConsole.java:385) at oracle.cabo.servlet.UIXServlet.doPost(Unknown Source) at javax.servlet.http.HttpServlet.service(HttpServlet.java:763) at javax.servlet.http.HttpServlet.service(HttpServlet.java:856) at com.evermind.server.http.ResourceFilterChain.doFilter(ResourceFilterChain.java:64) at oracle.sysman.ias.studio.app.BrowserVersionFilter.doFilter(BrowserVersionFilter.java:75) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:15) at oracle.sysman.ias.studio.app.MultipleJVMFilter.doFilter(MultipleJVMFilter.java:85) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.PostLogonFilter.doFilter(PostLogonFilter.java:80) at com.evermind.server.http.EvermindFilterChain.doFilter(EvermindFilterChain.java:17) at oracle.sysman.ias.studio.app.ShortHostnameRedirectFilter.doFilter(ShortHostnameRedirectFilter.java:68) at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:642) at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:391) at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:908) at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:458) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:313) at com.evermind.server.http.AJPRequestHandler.run(AJPRequestHandler.java:199) at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260) at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303) at java.lang.Thread.run(Thread.java:595)
    Can anyone please help to know why this error occurs ? Thanks in advance.

    Hi chandra
    i am trying to get the same result by using sql script and CE functions.i have written the following code
    select A."PRODUCTID",
           E."TEXT" as "PRODUCTNAME",
           C."COUNTRY",
           D."DELIVERYDATE",
           Sum(D."GROSSAMOUNT") as "GROSSAMOUNT"
           from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products" as A     
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.BusinessPartner" as B
           on A."SUPPLIERID" = B."PARTNERID"      
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Addresses" as C
           on B."ADDRESSID" = C."ADDRESSID"
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Purchase.Item" as D
           on A."PRODUCTID" = D."PRODUCTID"
           inner join "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.Util.Texts" as E
           on A."NAMEID" = E."TEXTID"
           GROUP BY A."PRODUCTID",E."TEXT",C."COUNTRY",D."DELIVERYDATE"; 
    this is working fine but i want to split the grossamount based on current year and last year.Any idea how to do this
    In calculation view using script can we use if and case statements?

  • 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

  • Any way to disable encryption of password for database connection pool?

    Dear all,
    Does anybody know how to disable the password encryption for jdbc connection pool under weblogic 8.1? I need to put clear text password in the config.xml but it seems there's no way to disable the password encryption. Any help is appreciated. Thx in advance.
    Paul

    paul wee wrote:
    Dear all,
    Does anybody know how to disable the password encryption for jdbc connection pool under weblogic 8.1? I need to put clear text password in the config.xml but it seems there's no way to disable the password encryption. Any help is appreciated. Thx in advance.
    PaulWhen you create the pool, don't give it any password at all, but when you add the
    driver properties, add
    password=mypassword
    as one of the properties.
    Joe

Maybe you are looking for