Connection pool for ldap

Hi
My application is an interface to ldap directory. I have not used any ldap open source api to retrieve data from ldap. I have written connection pool that will help the application to connect to the ldap. It's working fine, but it's creating threads which are not invited.
ConnectionPool class takes care of the connection storage and creation, while Housekeeping thread relases these connection when idle after a given time.
Can someone please help in finding the problem in the code that creates additional threads.
package com.ba.cdLookup.manager;
import com.ba.cdLookup.exception.CDLookupException;
import com.ba.cdLookup.server.CdLookupProperties;
import java.util.Vector;
import javax.naming.Context;
import javax.naming.NamingException;
public class HouseKeeperThread extends Thread {
         * Apache Logger to log erro/info/debug statements.
    protected static org.apache.commons.logging.Log log = org.apache.axis.components.logger.LogFactory
         .getLog(HouseKeeperThread.class.getName());
    private static HouseKeeperThread houseKeeperThread;
         * Close all connections existing.
         * @param connections
         *                void
    private void closeConnections(Vector connections) {
     String methodIdentifier = "closeConnections";
     int numOfConn = connections.size();
     try {
         for (int i = 0; i < numOfConn; i++) {
          Context context = (Context) connections.get(i);
          if (context != null) {
              context.close();
              context = null;
              connections.remove(i);
              numOfConn--;
              log.info(" connection name:" + context
                   + " removed. Threadcount =" + (connections.size()));
     } catch (NamingException e) {
         String errMsg = "CDLdapBuilder connect() - failure while releasing connection "
              + " Exception is " + e.toString();
         log.error(errMsg);
     } catch (Exception e) {
         String errMsg = "CDLdapBuilder connect() - failure while releasing connection "
              + " Exception is " + e.toString();
         log.error(errMsg);
         * Thread run method
    public void run() {
     String methodIdentifier = "run";
     try {
         while(true){
          log.debug("house keeping :" + this + " ---sleep");
          //sleep(100000);
          log.debug("house keeping :" + this + " startd after sleep");
           sleep(CdLookupProperties.getHouseKeepConnectionTime());
          ConnectionPool connectionPool = ConnectionPool
               .getConnectionPool();
          Vector connList = connectionPool.getAvailableConnections();
          closeConnections(connList);
     } catch (CDLookupException cde) {
         log.error(methodIdentifier + " " + cde.getStackTrace());
     } catch (InterruptedException ie) {
         log.error(methodIdentifier + " " + ie.getStackTrace());
     * @param connectionPool
     * @return
     * Thread
    public static Thread getInstance() {
     if(houseKeeperThread==null){
         houseKeeperThread = new HouseKeeperThread();
     return houseKeeperThread ;
package com.ba.cdLookup.manager;
import com.ba.cdLookup.exception.CDLookupException;
import com.ba.cdLookup.server.CdLookupProperties;
import com.ba.cdwebservice.schema.cdLookupPacket.LookupFailureReasons;
import java.util.Properties;
import java.util.Vector;
import javax.naming.Context;
import javax.naming.NamingException;
import javax.naming.directory.DirContext;
import javax.naming.directory.InitialDirContext;
* ConnectionPool class manages, allocates LDAP connections. It works as a lazy
* binder and retrieves connections only when required. It doesn't allow
* connection greater then the maximum connection stated.
* To retrieve a connection the singelton method getConnectionPool is to used,
* which retruns thread safe singleton object for the connection.
public class ConnectionPool implements Runnable {
    private int initialConnections = 0;
    private int maxConnections = 0;
    private boolean waitIfBusy = false;
    private Vector availableConnections, busyConnections;
    private boolean connectionPending = false;
    private static int threadCount = 0;
         * classIdentifier
    private final String classIdentifier = "ConnectionPool";
         * Apache Logger to log erro/info/debug statements.
    protected static org.apache.commons.logging.Log log = org.apache.axis.components.logger.LogFactory
         .getLog(CDLdapBuilder.class.getName());
         * To get the attribute a systemaccessfor out of the search result
    private String vendorContextFactoryClass = "com.sun.jndi.ldap.LdapCtxFactory";// "com.ibm.jndi.LDAPCtxFactory";
         * context factory to use
    private String ldapServerUrl = "LDAP://test.ldap.com"; // default ldap
         * server live used by default
    private String searchBase;
         * environment properties.
    private Properties env;
         * DirContext
    private javax.naming.directory.DirContext ctx;
         * default search base to be used in Corporate Directory searches
    private String defaultSearchBase = "dc=Pathway";
         * search criteria
    private String searchAttributes;
         * search filter to retrieve data from CD
    private String searchFilter;
         * CorporateDirectoryLookup Constructor
         * <p>
         * loads the setup parameters from the properties file and stores them
         * Makes a connection to the directory and sets default search base
         * @throws CDLookupException
         * @throws CDLookupException
    private ConnectionPool() throws CDLookupException {
     this.maxConnections = CdLookupProperties.getMaxConnection();// maxConnections;
     this.initialConnections = CdLookupProperties.getInitialConnection();
     this.waitIfBusy = CdLookupProperties.isWaitIfBusy();
     this.searchBase = CdLookupProperties.getDefaultSearchBase();
     //for local env testing
//      this.maxConnections = 5;
//      this.initialConnections = 1;
//      this.waitIfBusy = true;
         * For keeping no of connections in the connection pool if
         * (initialConnections > maxConnections) { initialConnections =
         * maxConnections; }
     availableConnections = new Vector(maxConnections);
     busyConnections = new Vector(maxConnections);
     for (int i = 0; i < maxConnections; i++) {
         availableConnections.add(makeNewConnection());
         *  ConnectionPoolHolder provide Thread safe singleton
         *         instance of ConnectionPool class
    private static class ConnectionPoolHolder {
         * connection pool instance
     private static ConnectionPool connectionPool = null;
         * If no ConnectionPool object is present, it creates instance of
         * ConnectionPool class and initiates thread on that.
         * @return ConnectionPool Returns singleton object of ConnectionPool
         *         class.
         * @throws CDLookupException
     private static ConnectionPool getInstance() throws CDLookupException {
         if (connectionPool == null) {
          connectionPool = new ConnectionPool();
          new Thread(connectionPool).start();
          // Initiate house keeping thread.
          HouseKeeperThread.getInstance().start();
         return connectionPool;
         * Returns singleton object of ConnectionPool class.
         * @return ConnectionPool
         * @throws CDLookupException
    public static ConnectionPool getConnectionPool() throws CDLookupException {
     return ConnectionPoolHolder.getInstance();
         * getConnection retrieves connections to the corp directory. In case
         * there is no available connections in the pool then it'll try to
         * create one, if the max connection limit for the connection pool
         * reaches then this waits to retrieve one.
         * @return Context
         * @throws CDLookupException
    public synchronized Context getConnection() throws CDLookupException {
     String methodIdentifier = "getConnection";
     if (!availableConnections.isEmpty()) {
         int connectionSize = availableConnections.size() - 1;
         DirContext existingConnection = (DirContext) availableConnections
              .get(connectionSize);
         availableConnections.remove(connectionSize);
                 * If connection on available list is closed (e.g., it timed
                 * out), then remove it from available list and repeat the
                 * process of obtaining a connection. Also wake up threads that
                 * were waiting for a connection because maxConnection limit was
                 * reached.
         if (existingConnection == null) {
          notifyAll(); // Freed up a spot for anybody waiting
          return (getConnection());
         } else {
          busyConnections.add(existingConnection);
          return (existingConnection);
     } else {
                 * Three possible cases: 1) You haven't reached maxConnections
                 * limit. So establish one in the background if there isn't
                 * already one pending, then wait for the next available
                 * connection (whether or not it was the newly established one).
                 * 2) You reached maxConnections limit and waitIfBusy flag is
                 * false. Throw SQLException in such a case. 3) You reached
                 * maxConnections limit and waitIfBusy flag is true. Then do the
                 * same thing as in second part of step 1: wait for next
                 * available connection.
         if ((totalConnections() < maxConnections) && !connectionPending) {
          makeBackgroundConnection();
         } else if (!waitIfBusy) {
          throw new CDLookupException("Connection limit reached", 0);
                 * Wait for either a new connection to be established (if you
                 * called makeBackgroundConnection) or for an existing
                 * connection to be freed up.
         try {
          wait();
         } catch (InterruptedException ie) {
          String errMsg = "Exception raised =" + ie.getStackTrace();
          log.error(errMsg);
          throw new CDLookupException(classIdentifier, methodIdentifier,
               errMsg, ie);
         // connection freed up, so try again.
         return (getConnection());
         * You can't just make a new connection in the foreground when none are
         * available, since this can take several seconds with a slow network
         * connection. Instead, start a thread that establishes a new
         * connection, then wait. You get woken up either when the new
         * connection is established or if someone finishes with an existing
         * connection.
    private void makeBackgroundConnection() {
     connectionPending = true;
     try {
         Thread connectThread = new Thread(this);
         log.debug("background thread created");
         connectThread.start();
     } catch (OutOfMemoryError oome) {
         log.error("makeBackgroundConnection ="+ oome.getStackTrace());
         * Thread run method
    public void run() {
     String methodIdentifier = "run";
     try {
         Context connection = makeNewConnection();
         synchronized (this) {
          availableConnections.add(connection);
          connectionPending = false;
          notifyAll();
     } catch (Exception e) { // SQLException or OutOfMemory
         // Give up on new connection and wait for existing one
         // to free up.
         String errMsg = "Exception raised =" + e.getStackTrace();
         log.error(errMsg);   
         * This explicitly makes a new connection. Called in the foreground when
         * initializing the ConnectionPool, and called in the background when
         * running.
         * @return Context
         * @throws CDLookupException
    private Context makeNewConnection() throws CDLookupException {
     String methodIdentifier = "makeNewConnection";
     Context context = null;
     env = new Properties();
     log.debug("inside " + methodIdentifier);
     try {
         env.put(Context.INITIAL_CONTEXT_FACTORY,
              getVendorContextFactoryClass());
         env.put(Context.PROVIDER_URL, getLdapServerUrl());
         env.put("com.sun.jndi.ldap.connect.pool", "true");
         context = new InitialDirContext(env);
     } catch (NamingException e) {
         String errMsg = "CDLdapBuilder connect() - failure while attempting to contact "
              + ldapServerUrl + " Exception is " + e.toString();
         throw new CDLookupException(classIdentifier, methodIdentifier,
              errMsg, e, LookupFailureReasons.serviceUnavailable);
     } catch (Exception e) {
         String errMsg = "CDLdapBuilder connect() - failure while attempting to contact "
              + ldapServerUrl + " Exception is " + e.toString();
         throw new CDLookupException(classIdentifier, methodIdentifier,
              errMsg, e, LookupFailureReasons.serviceUnavailable);
     log.info("new connection :" + (threadCount++) + " name =" + context);
     log.debug("exit " + methodIdentifier);
     return context;
         * releases connection to the free pool
         * @param context
    public synchronized void free(Context context) {
     busyConnections.remove(context);
     availableConnections.add(context);
     // Wake up threads that are waiting for a connection
     notifyAll();
         * @return int give total no of avail connections.
    public synchronized int totalConnections() {
     return (availableConnections.size() + busyConnections.size());
         * Close all the connections. Use with caution: be sure no connections
         * are in use before calling. Note that you are not <I>required</I> to
         * call this when done with a ConnectionPool, since connections are
         * guaranteed to be closed when garbage collected. But this method gives
         * more control regarding when the connections are closed.
    public synchronized void closeAllConnections() {
     closeConnections(availableConnections);
     availableConnections = new Vector();
     closeConnections(busyConnections);
     busyConnections = new Vector();
         * Close all connections existing.
         * @param connections
         *                void
    private void closeConnections(Vector connections) {
     String methodIdentifier = "closeConnections";
     try {
         for (int i = 0; i < connections.size(); i++) {
          Context context = (Context) connections.get(i);
          if (context != null) {
              log.info(" connection name:" + context
                   + " removed. Threadcount =" + (threadCount++));
              context.close();
              context = null;
     } catch (NamingException e) {
         String errMsg = "CDLdapBuilder connect() - failure while attempting to contact "
              + ldapServerUrl + " Exception is " + e.toString();
         log.error(errMsg);
    public synchronized String toString() {
     String info = "ConnectionPool(" + getLdapServerUrl() + ","
          + getVendorContextFactoryClass() + ")" + ", available="
          + availableConnections.size() + ", busy="
          + busyConnections.size() + ", max=" + maxConnections;
     return (info);
         * @return the defaultSearchBase
    public final String getDefaultSearchBase() {
     return defaultSearchBase;
         * @param defaultSearchBase
         *                the defaultSearchBase to set
    public final void setDefaultSearchBase(String defaultSearchBase) {
     this.defaultSearchBase = defaultSearchBase;
         * @return the ldapServerUrl
    public final String getLdapServerUrl() {
     return ldapServerUrl;
         * @param ldapServerUrl
         *                the ldapServerUrl to set
    public final void setLdapServerUrl(String ldapServerUrl) {
     this.ldapServerUrl = ldapServerUrl;
         * @return the vendorContextFactoryClass
    public final String getVendorContextFactoryClass() {
     return vendorContextFactoryClass;
         * @param vendorContextFactoryClass
         *                the vendorContextFactoryClass to set
    public final void setVendorContextFactoryClass(
         String vendorContextFactoryClass) {
     this.vendorContextFactoryClass = vendorContextFactoryClass;
     * @return the availableConnections
    public final Vector getAvailableConnections() {
        return availableConnections;
}

Hi,
As the connection pool implmentation has the bug of not extending more than the min size, workaround I use is MIN_CONN=100 and MAX_CONN=101,and just waiting for the bug to get fixed. (using Netscape SDK for java4.0)

Similar Messages

  • EP 6.0 SP2 PL28 - connection pool for principal type UACC fails

    Hello,
    does anybody have the same problem? - We always lose the LDAP-Connection after restart of the j2ee-Services on our Enterprise Portal. We get then this error-message:
    ->
    <b>connection pool for principal type UACC fails</b>
    Loading application: com.sap.portal.usermanagement
    Loading services:
    Loading service: com.sap.portal.license.runtime|license
    Jul 2, 2005 4:27:09 AM # System_Thread_32 Fatal [class=com.sap.security.core.persistence.datasource.imp.LDAPConnectionManager][method=initConnectionPool()][cl=13324]connection pool for principal type UACC fails
    Thanks in advance.
    Regards,
    Ralf

    Does anybody can help me? - It´s important.
    Thanks in advance.
    Regards,
    Ralf

  • Different connection pool for a report

    Hi experts,
    For one my reports using 'CLOBS' like explained (http://oraclebizint.wordpress.com/2007/11/12/oracle-bi-ee-101332-working-with-clob-fields/) I need to disable parallel processing because it's not supported.
    NO_PARALLEL and NO_INDEX_PARALLEL hints at the query level couldn't disable the parallelism.the optimizer still use it.
    I thought about having a new connection pool that contains 'before query' and 'after query' statements that will disable the parallelism.This will take me a lot of time to rebuild the whole Presentation and Business layers to point to a new physical tables.
    Any one has an idea about how I can use another connection pool for a specific report?
    Regards

    I have the problem. My issue is that I need to have a webservice use the 2 database connection pools I have created. Originally the pools were Non-XA. When I change them to XA I cannot get the JMS JDBC Store to work.
    java.lang.Exception: WebLogic Pool Driver doesn't support XA driver, Please change your config to use a Non-XA driver
    However, part of what you wrote below I don't understand. You said you configured a brand new JMS JDBC Store and was able to use an XA Connection Pool? I tried to delete my existing one and create it anew, but was not able to use an XA pool.
    Is there any solution around this? I need to have an XA Pool for a webservice but non-XA for my JMS Store.
    "After much digging I found documentation that you cannot configure an XA JDBC Connection Pool for use with a JMS JDBC Store: http://edocs.bea.com/wls/docs81/ConsoleHelp/jms_config.html#1128929
    The only thing is that if I configure a brand new JMS JDBC Store and make it use the XA JDBC Connection Pool (instead of just selecting the new MySQLXAConnPool from the list that includes the non XA pool) it works without an error."

  • Help in creating the connection pool  for Oracle 8i using Jdriver

    Hi
    Iam pretty new to Weblogic and would be greatfull if some one can help me
    out in finding the parameters to be specified in Weblogic console for creating
    a Connection pool for Oracle 8i database running on solaris. I have installed
    necessary client libraries in weblogic machine.
    The details for my database are as follows
    database name : mydb
    database server : 173.24.24.1
    database port : 1521
    username : myuser
    I would appreciate if you can provide me the following details to be entered in
    weblogic console for creating the connection pool
    URL
    DRIVER CLASS NAME
    PROPERTIES
    ACL NAME
    PASSWORD
    Thanks,
    S Hari

    Hari
    Jdbc Connection Pool Configuration
    URL= jdbc:weblogic:oracle
    DRIVER CLASS NAME=weblogic.jdbc.oci.Driver
    PROPERTIES
    user=myuser
    password=<password in mydb>
    server=mydb
    After configuring Connection Pool Select Targets tab. Select Server from Available
    to Chosen.
    Deepak
    Hari wrote:
    Hi
    Iam pretty new to Weblogic and would be greatfull if some one can help me
    out in finding the parameters to be specified in Weblogic console for creating
    a Connection pool for Oracle 8i database running on solaris. I have installed
    necessary client libraries in weblogic machine.
    The details for my database are as follows
    database name : mydb
    database server : 173.24.24.1
    database port : 1521
    username : myuser
    I would appreciate if you can provide me the following details to be entered in
    weblogic console for creating the connection pool
    URL
    DRIVER CLASS NAME
    PROPERTIES
    ACL NAME
    PASSWORD
    Thanks,
    S Hari

  • Unable create Connection pool for Oracle apps Adapter.

    Hi All,
    We are trying to create a connection pool for Oracle Apps adapter in 11G SOA suite.
    However during the process getting the following error:
    An error occurred during activation of changes, please see the log for details.
    A <jndi-name> is specified for the resource adapter bean in weblogic-ra.xml, however no <resourceadapter-class> element is specified in ra.xml
    Can any one help us on this.
    Thanks
    Parker.

    Please refer section "Configuring Connection Information" at below link -
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10537/T430238T430340.htm#T464886
    Regards,
    Anuj

  • Steps to create Connection pool for Oracle apps Adapter.

    Hi All,
    Could please tel me the steps to create connection pool for Oracle Apps Adapter.
    Thanks,
    Parker

    Steps are given in section "Configuring Connection Information" in Apps Adapter User guide at below link -
    http://download.oracle.com/docs/cd/E17904_01/integration.1111/e10537/T430238T430340.htm#T464886
    Regards,
    Anuj

  • Cannot find the Novell Connection Manager for LDAP

    Novell Connection Manger for Java/LDAP
    Cannot find the Novell Connection Manager for LDAP in download
    I am trying to connect through a Java client to the Apache Directory Studio, LDAP server....I have downloaded the classes from the download page...see link below...but I can't see the NovellConnectionManager Class anywhere in this download when I use the open freely application to view the jar details.
    LDAP Classes for Java
    Environment: Windows 7

    Hi MentalSuplex, and a warm welcome to the forums!
    Don't know about Airport cards for it, but other options...
    http://eshop.macsales.com/item/Sonnet%20Technology/N80211PCI/
    Maybe this one, ask them...
    http://eshop.macsales.com/item/Newer%20Technology/MXP802NPCI/
    I use these...
    http://eshop.macsales.com/item/Newer%20Technology/MXP2802NU2C/
    http://eshop.macsales.com/item/Edimax/EW7711UMN/

  • Read data using 2 diff connection pool for same DB folder in physical layer

    Hi All,
    i am using two connection pool which have different dsn connection information (both are directed to different database name or database server)..
    so if i view the data of any table, a prompt will come asking for the connection pool, so how do i automize it....?
    how do i set the different connection pool for different tables?
    please let me know if u need further informtaion to understand my problem..
    thnx...

    thnx Stijn..
    yupe that i know...
    actually i have total of around 300 tables in physical layer (in both the schemas..) , around 12 fact and 100 dimension tables in bmm and same in the presentation layer...
    so i think u can guess how many joins and other stuff, i have made in my bmm layer..
    if now i will start modifying all this it will take lot of time...
    i am just wondering that there is no alternative for this...
    as when i check my data from the physical layer then a prompt ask for the connection pool (i have already made two connection pool..) so there could be some alternative way to automize the default connection pool setting for the tables/schemas folders in case if more than one connection pool exits under the same database in the physical layer...
    isn't it?
    thnx again..

  • Set up DB Connection Pool for Oracle DataBase Using Java App Server8

    Hi,
    In the Admin Console of Java App Server 8, I tried to create a connection pool for the oracle database. I chose Resource Type to be "javax.sql.ConnectionPoolDataSource" and the Vendor is Oracle. So the Data Source Class Name is filled by the system to be "oracle.jdbc.pool.OracleConnectionPoolDataSource". Now, I set up the class path to point to the database driver class "sun.jdbc.odbc.JdbcOdbcDriver" and also the to the Data Source Class Name. Also I set up the JVM options in the console. Restart the server, and then try to ping to the database, but get the error:
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: No suitable driver
    I don't understand what else I should do and why this error is coming?
    Please help me out.
    Thank you
    Regards,
    Sarah

    Hi,
    I've already solve the problem. I did the following:
    set the Url to be: jdbc:oracle:thin:@hostname:port:SID
    set username
    set password
    add oracle.jdbc.drivers.OracleDriver into the JVM options -Djdbc.drivers
    restart the server
    test the connection
    it works :)

  • Setting up connection pool for cloudscape 10 embedded database

    I got problem with setting connection pool via admin console for cloudscape 10 embedded in j2ee 1.4 (Application server 8.1), what im doing is:
    -in resources/jdbc/ConnectionPools i add a new pool
    - datasource classname i set up as: "org.apache.derby.jdbc.EmbeddedXADataSource"
    -resource type: "javax.sql.XADataSource"
    -DatabaseName: "jdbc:derby:D:\\Programowanie\J2EE\domains\domain1\config\notesData"
    -set no password and user, becouse i havet set this in database
    and when i ping to that datebase i got error:"Operation 'pingConnectionPool' failed in 'resources' Config Mbean."
    when i change Datasource Classname to: "org.apache.derby.jdbc.EmbeddedDataSource", this error occur:
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection object cannot be null
    what im doing wrong? i look everywhere and i cant find solution to my problem...hope you can help me.
    Thanks,
    Krystian

    Amit wrote:
    >
    "whats are the settings (URL, driver, properties) required to set up a connection pool for DB2 on OS/390 ?I'm using "COM.ibm.db2.jdbc.app.DB2Driver" as DB2 driverHi. If you can successfully use that driver with one of it's simple
    JDBC example programs, then show me that example, at least the
    part that makes the connection, and I'll show you how to define a pool.
    Joe
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • Problem creating a connection pool for mssql server

    Hi
    i downloaded the microsoft type 4 driver for JDBC and i have installed it. now i am trying to create a connection pool for MS Sql server but each time i ping i keep getting an error telling me
    Operation 'pingConnectionPool' failed in 'resources' Config Mbean. Target exception message: Connection could not be allocated because: [Microsoft][SQLServer 2000 Driver for JDBC]Error establishing socket
    please can someone help out on this
    Ifeanyichukwu

    I assume that you installed the driver correctly. You did go into the app sever admin and set the JVM path? You do this by going to Application Server | JVM Settings | Path Settings and putting in an entry for Classpath Prefix.
    If that is done and it's not something basic like your database isn't turned on, then it must be your settings. To to Sun's site and search for dbping. http://developers.sun.com/prodtech/appserver/utilities/dbping/dbping_overview.html
    Deploy this program and run it. It is a very simple tool that lets you test different property settings. Play around with different settings until you get a ping.
    If that doesn't work post your connect pool settings.
    Good luck
    Mike

  • Problem when creating connection pool for Informix

    Hi all,
    could you please help me to create a connection pool for informix?
    I use a com.informix.jdbcx.IfxXADataSource driver and here are the properties
    user=informix
    password=informix
    url=jdbc:informix-sqli://TW010766:1526/vka:informixserver=TW010766
    dataSourceName=TestEntityPool2
    portNumber=1526
    databaseName=vka
    ifxIFXHOST=TW010766
    serverName=vka
    Here is the error message :
    Error during Data Source creation: weblogic.common.ResourceException: DataSource(TestEntity)
    can't be created with non-existent Pool (connection or multi) (TestEntityPool2)
         at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:127)
         at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:189)
         at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
         at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
         at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:303)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:256)
         at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:207)
    Could you please tell me what's wrong with the configuration?
    Many thanks in advance.
    Hoang

    Hoang Nguyen wrote:
    For JBuilder :
    URL : jdbc:informix-sqli://tra019746:1526/vka:informixserver=vka
    Driver : com.informix.jdbcx.IfxXADataSource
    username : informix; password : informix
    For WebLogic :
    URL : jdbc:informix-sqli://tra019746:1526/vka:informixserver=vka
    Driver : com.informix.jdbcx.IfxXADataSource
    Properties : password=informix
    user=informixOk. The problem may have to do with your reiterating all the properties below.
    url=jdbc:informix-sqli://tra019746:1526/vka:informixserver=vka
    portNumber=1526
    databaseName=vka
    serverName=vka
    ifxIFXHOST=tra019746All these above are implicit in the URL you give to jBuilder and weblogic.
    Try defining the pool with only the user and password as properties.
    >
    >
    Error:
    Error during Data Source creation: weblogic.common.ResourceException:
    DataSource(TestEntity)
    can't be created with non-existent Pool (connection or multi) (TestEntityPool2)
    at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:127)
    at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:189)
    at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
    at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
    Thanks Joe
    Hoang Nguyen wrote:
    Joseph,
    The driver that I use comes from informix.
    I've tried with JBuilder and no problem. JBuilder can connect to informixand
    I can see the tables from JBuilder.
    There's something wrong in the configuration with Weblogic.
    Many thanks for your help.I understand that there's something wrong with the configuration with
    weblogic,
    but the problem is due to a mistake in the input you gave to the pool
    definition,
    and I want to solve that. Please show me the URL, driver name and properties
    you give to JBuilder to make Informix connections. Also, show me the
    first few lines
    that get printend out when you run the weblogic start script. I want
    to see the
    line that prints out the classpath used in the script for starting the
    server.
    thanks,
    Joe
    Joseph Weinstein <[email protected]> wrote:
    Ok, I would like you to download Informix's driver from them, and
    run one of their example programs, just to prove you can connect to
    informix, using their driver, with no weblogic in the picture. We
    have
    to establish that, because that's all weblogic will be doing anyway.
    Once
    we know how to connect to informix via JDBC, we can do weblogic stuff.
    Joe
    Hoang Nguyen wrote:
    Hi,
    I forgot to mention that I'm working with Weblogic server 7 and
    Informix 2000 9.20.
    For the configuration, I followed the example given by Weblogic
    http://edocs.bea.com/wls/docs70/jdbc/thirdparty.html#thirdparty001,
    table 5.2
    Here is the example given by weblogic :
    user=username
    url=jdbc:informix-sqli://dbserver_name_or_ip:port_num/dbname:informixserver=dbserver_name_or_ip
    password=password
    portNumber =port_num;
    databaseName=dbname
    serverName=dbserver_name
    ifxIFXHOST=dbserver_name_or_ip
    If you take a look at the link, you'll see a note :
    "In the Properties string, there is a space between portNumber and=". I've tried
    that but it seems that this bug had been resolved. When I put the
    space,
    I've
    an number exception.
    Thanks for your help.
    Hoang
    Joseph Weinstein <[email protected]> wrote:
    Nguyen Hoang wrote:
    Hi all,
    could you please help me to create a connection pool for informix?
    I use a com.informix.jdbcx.IfxXADataSource driver and here are
    the
    properties
    user=informix
    password=informix
    url=jdbc:informix-sqli://TW010766:1526/vka:informixserver=TW010766
    dataSourceName=TestEntityPool2
    portNumber=1526
    databaseName=vka
    ifxIFXHOST=TW010766
    serverName=vka
    Here is the error message :
    Error during Data Source creation: weblogic.common.ResourceException:DataSource(TestEntity)
    can't be created with non-existent Pool (connection or multi)
    (TestEntityPool2)
    This means the pool was unable to make an informix connection withthe
    properties
    you gave. Please show me the few lines from an informix driver
    example
    program
    that makes a successful JDBC connection to the DBMS you want, andI will
    show
    you how to define a pool for weblogic to do the same.
    Joe
    at weblogic.jdbc.common.internal.JdbcInfo.validateConnectionPool(JdbcInfo.java:127)
    at weblogic.jdbc.common.internal.JdbcInfo.startDataSource(JdbcInfo.java:189)
    at weblogic.jdbc.common.internal.JDBCService.addDeploymentx(JDBCService.java:293)
    at weblogic.jdbc.common.internal.JDBCService.addDeployment(JDBCService.java:270)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployment(DeploymentTarget.java:375)
    at weblogic.management.mbeans.custom.DeploymentTarget.addDeployments(DeploymentTarget.java:303)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateServerDeployments(DeploymentTarget.java:256)
    at weblogic.management.mbeans.custom.DeploymentTarget.updateDeployments(DeploymentTarget.java:207)
    Could you please tell me what's wrong with the configuration?
    Many thanks in advance.
    Hoang

  • Setting up connection pool for DB2

    "whats are the settings (URL, driver, properties) required to set up a connection pool for DB2 on OS/390 ?I'm using "COM.ibm.db2.jdbc.app.DB2Driver" as DB2 driver

    Amit wrote:
    >
    "whats are the settings (URL, driver, properties) required to set up a connection pool for DB2 on OS/390 ?I'm using "COM.ibm.db2.jdbc.app.DB2Driver" as DB2 driverHi. If you can successfully use that driver with one of it's simple
    JDBC example programs, then show me that example, at least the
    part that makes the connection, and I'll show you how to define a pool.
    Joe
    PS: Folks: BEA WebLogic is expanding rapidly, with both entry and advanced positions
    for people who want to work with Java, XML, SOAP and E-Commerce infrastructure products.
    We have jobs at Nashua NH, Liberty Corner NJ, San Francisco and San Jose CA.
    Send resumes to [email protected]

  • Create a dedicated connection pool for initialization blocks

    Hi,
    I'm using OBIEE11.6, then I set a session initialization block in RPD, and this block is based on connection pool '"My_DB".
    "My_CP"'.
    when Consistency Checking it warning as follow:
    Initialization Block 'Authorization' uses Connection Pool '"My_DB".
    "My_CP"' which is used for report queries. This may impact query performance.
    but there is no table under the connection pool "My_CP",so I don't know why it say it's used for report queries? and how to remove the warning?
    any one know it?
    Thank you!

    Hi Leo,
    Generally, when there is only one connection pool for a database in physical layer, the BI Server understands this to be the only connection pool for queries (I do not think this really checks if there are underlying tables. I think this is because there is a way to add tables to a database by right clicking on connection pool and choosing import metadata.).
    As a good practise, when you have init block pointing to a specific database please make sure that you create another connection pool just for the use by init blocks. This would make sure that the report queries and init blocks do not go on a single pool.
    So, for your case, create a second connection pool and point your init blocks to the second one. Yes, you cannot point to the first one as it is kind of reserved by BI Server for reports. (Unless you change this in the Options menu of .rpd)
    Hope this helps.
    Thank you,
    Dhar

  • Server-side connection pooling for clients in different VM's

    We have a need to centeralize our connection pool manger.
    Is there a server-side connection pooling manger product to allow multiple clients running in different VM's to connect to and share connection objects to the same Database?
    e.g. An applet, and a swing and a servlet/web app application all running in different VM's will connect to this central connection pool manager and share connection objects to the same DB.
    We are using connection pooling for all of our applications but each application is maintaining its own connection pool and it is becomming a nightmare to manage and configure each one.
    Also, we have to have at a miniumum one connection open per application to access the database regardless of wether we are using connection pool or not. This means that 100 apps(running in different VM's) will use at minimum 100 connections... where all of these 100 apps will do just fine with just 10-15 connections.
    while back we used T3 server but can't find this product on BEA web site any more.
    does jdbc 2.2 or 3.0 have any server side pool management specs outlined?
    Please HELP as we can't afford anymore licensing fees for our company.
    oh.. We can't open and close connections on each query as they will be slow.
    any suggestions greatly appreciated.

    if i understand you question, i don't think this is possible, since the Connection interface (and basically all of the related jdbc interfaces) aren't Serializable.. so they can't be sent over the wire to your client(s).
    However, you could feasibly write some server side connection pool, and some server side facade which will allow clients to submit queries (either SQL String's or however you want to do it - obviously a more elegant solution involves a series of classes which dynamically create sql based on query criteria), then the server can grab a connection, execute the query, cycle through the results and populate some result object of your creation and send that back over the wire to your client(s).
    .

Maybe you are looking for

  • BOE send email

    Hi, Do you know what need to be done in BOE Server so that we can schedule the report in BOE and send the report to a particular user via email? We're on BOE XI 3.1 SP2. Is this possible? I have read the documentation but it didn't mention on how to

  • Author sales reports

    I'm an author and I have a number of books for sale (and free) on the Istore.  They are distrubuted by Smashwords. Is there a way I can see a sales report from the Istore or Itunes?  The info delevered to Smashwords occassaionally is very sparse.

  • C6-00 where the regional Language Pack with voices...

    I have nokia C6-00, and phone have preinstalled 'text-to-speech' but avaibaled only English language... then i try use option 'doanload other languages' phone open web page http://europe.nokia.com/support/download-software/​text-to-speech - but in de

  • SAP Netweaver Developer Studio (Software) needed

    Dear all, I found out that the Developer Studio is not a part of the SAP Netweaver 200s SR1. Could someone tell me where I can find the 1) "Software of SAP Netweaver Developer Studio" ? 2) a link for Installation? We already installed Netweaver with

  • Is it possible to convert a table of values into a comma-delimited-list?

    Hi, I'd like to turn the following dataset: Parent | Child Charles | William Charles | Harry Anne | Peter Anne | Zara Andrew | Beatrice Andrew | Eugenie into this: Parent | Children Charles | Diana,Camilla Anne | Peter,Zara Andrew | Beatrice,Eugenie