How to monitor connection pools using wlsd

Hi
i need to monitor connectionpools , i dont know that much about wlsd, how can we configure wlsd to monitor connection pools.
Cheers
Raghu

U can use a Simple Java Code for that: http://jaysensharma.wordpress.com/2010/02/19/jdbcconnectionpool-parameters-using-jmx/
In the above program you need to just change the following 4-lines:
int port = 7001; // AdminServer Port
String hostname = “localhost”; // AdminSewrver HostName
h.put(Context.SECURITY_PRINCIPAL, “weblogic”); // AdminUserName
h.put(Context.SECURITY_CREDENTIALS, “weblogic”); // Admin Paassword...
====================================
Using WLST if you want to do it then you need to edit the following Script a Bit : http://jaysensharma.wordpress.com/2010/03/23/testing-datasource-status-using-wlst/

Similar Messages

  • How to redeploy connection pool using mbeans ?

    Hi,
    I'm writing up a script to change the password for a connection pool and want to know how to redeploy the connection pool once the password has been changed. To change the password I'm using:
    java -cp .;weblogic.jar weblogic.Admin -url t3://adminServer:7000 -username weblogic -password weblogic SET -mbean mydomain:Name=MyConnPool,Type=JDBCConnectionPool -property Password "password"
    which works fine.
    I've read that just by setting the target, the pool redeploys itself but after using the following command, I still have to go into the console and undeploy/redeploy the pool for the password change to become visible:
    java -cp .;weblogic.jar weblogic.Admin -url t3://adminServer:7000 -username weblogic -password weblogic INVOKE -mbean mydomain:Name=MyConnPool,Type=JDBCConnectionPool -method addTarget "mydomain:Name=MyCluster,Type=Cluster"
    What am I missing to mimick unchecking the Cluster checkbox, rechecking it and clicking the Apply button in the console?
    Another quick question too ... where can i get the list of methods that INVOKE supports for a JDBCConnectionPool MBean? I was hoping there'd be something really obvious like deploy/undeploy there but no joy

    What version of WLS are you using?
    <John Somers> wrote in message news:[email protected]..
    Hi,
    I'm writing up a script to change the password for a connection pool and
    want to know how to redeploy the connection pool once the password has been
    changed. To change the password I'm using:
    java -cp .;weblogic.jar weblogic.Admin -url t3://adminServer:7000 -username
    weblogic -password weblogic SET -mbean
    mydomain:Name=MyConnPool,Type=JDBCConnectionPool -property Password
    "password"
    which works fine.
    I've read that just by setting the target, the pool redeploys itself but
    after using the following command, I still have to go into the console and
    undeploy/redeploy the pool for the password change to become visible:
    java -cp .;weblogic.jar weblogic.Admin -url t3://adminServer:7000 -username
    weblogic -password weblogic INVOKE -mbean
    mydomain:Name=MyConnPool,Type=JDBCConnectionPool -method addTarget
    "mydomain:Name=MyCluster,Type=Cluster"
    What am I missing to mimick unchecking the Cluster checkbox, rechecking it
    and clicking the Apply button in the console?
    Another quick question too ... where can i get the list of methods that
    INVOKE supports for a JDBCConnectionPool MBean? I was hoping there'd be
    something really obvious like deploy/undeploy there but no joy

  • How to configure connection pooling in tomcat?

    how to configure connection pooling in tomcat and how to use the connection pooling in the jsp and servlets?

    thanks for the reply, i have configured the connection pool settings in the tomcat.
    I created a class with static method, which will return the connection object.
    whenever i need the connection object, iam invoking the static method, once its usage is over iam closing thew connection..
    is it the right way of using the connection object in the web application.

  • How to configure connection pooling in WebLogic

    how to configure connection pooling in WebLogic

    You already asked this question, here:
    [http://forums.sun.com/thread.jspa?threadID=5356073&messageID=10549446#10549446|http://forums.sun.com/thread.jspa?threadID=5356073&messageID=10549446#10549446]

  • How do I connect and use a travel drive

    How do I connect and use a travel drive

    I don't believe you can, but there are free services out there, such as dropbox that can accomplish much the same thing.

  • Connecting Pooling using Java Servlets

    Hello Friends I am in search of a programme to make a connection pooling using Java Servlets.
    Please let me know where i will get it or do post it.

    If you mean JDBC connection pools, one solution can be found here - http://www.javaexchange.com
    Chuck

  • How do I create a non-JTS sequence connection pool using JTS

    I'm getting all kinds of errors (DB deadlocks and exceptions) using JTS with sequences. From reading several posts, it is necessary to create a separate non-JTS connection pool.
    I've seen several postings on how to do this in the sessions.xml file, but how do I do this in Java code?
    What I am trying is:
    SequencingControl seqCtrl = ((oracle.toplink.publicinterface.DatabaseSession)serverSession).getSequencingControl();
    seqCtrl.setShouldUseSeparateConnection(true);
    seqCtrl.setLogin(sequenceLogin);
    I've also tried:
    serverSession.addConnectionPool("sequencing", sequenceLogin, 2,5);
    but neither work. The problem with these settings is that the sequence properties on my DatabaseLogin are not honored.
    My table name is T_SEQUENCES and my preAllocation size is 5. However the SQL that is generated by this setup is:
    "UPDATE SEQUENCE SET SEQ_COUNT = SEQ_COUNT + 50 WHERE SEQ_NAME = 'T_GROUPS_SEQ'"
    I'm guessing these may be default values, but I don't know where else to override these except for on the DatabaseLogin I am passing in.
    I know this setup works, because it is the same DatabaseLogin I use for non-JTS configuration.
    Could someone provide me a code-snippet on how to do this?
    Thanks,
    Nate

    I'm not using XML files, all of my setup is in code. I'm not sure how I would use the setLoginAndApplySequenceProperties(DatabaseLogin) call or if it would address my larger problem.
    The main issue I don't want to lose here is, I've got an application where I'm trying to use JTS with JBoss and SQL Server. It's a SessionBean/POJO architecture. The problem I was having that started this thread is that sequence number allocation causes a database deadlock.
    My thought was if I opened a 2nd connection pool dedicated to sequences, it might resolve the issue. I was able to do this with the workaround I posted, but it didn't fix anything. I now get a different error related to my newly inserted objects.
    From working with this off-and-on over the last several months, I would say that I don't think TopLink/JBoss/SQL Server using JTA can be made to work.
    I know that TopLink has a plug-in architecture and in theory if I implemented ExternalTransactionController and SynchronizationListener for JBoss correctly, it should all work.
    But, I've got the JBoss 4.0.0 source that I can step through, I've got all the recent updates to SQL Server and the JDBC driver, and I'm following everything I've been told so far on how to make this all work.
    It plain doesn't work.
    Furthermore, I haven't found anyone (this group, JBoss group) that has gotten this to work (TopLink/JBoss/JTA). This is an important item to us, we'd like to get this to work, and we would be happy to work with Oracle Consulting on this or whatever it takes (already opened a TAR on this).
    Are there any other support options available to making this work?
    Nate

  • Monitor Connection pool

    Hi,
    I am using ODP.Net from Oracle 9i client talking against Oracle 9i. Using in VS2005/.Net2.0.
    I am successfully using connection pooling in my applictaion behind web services running in IIS. My front end calls the web service, and the webservice uses the connection from the pool and retrieves data from the database. This works great. I checkd this by looking at the number of open connections in the v$session table.
    I am wondering is there any other way of monitoring the connections/pool on the IIS web server machine. Is there any other app or does ODP.Net have any counters for the connections and the connection pool which we can monitor.
    Thanks
    - Jaideep

    Hi,
    I think I have the answer. I just have to open up active connection pool in the
    administration console and click on Monitoring.
    Please correct me if I am wrong.
    Thanks and best regards,
    Jaya
    "Jaya" <[email protected]> wrote:
    >
    Hi all,
    Is there a way to monitor active connections from Weblogic administration
    console
    (or from anywhere else)?
    I have configured a connection pool with minumum capacity=50, maximum
    capacity=100
    and capacity increment = 1.
    Is there a way to find out how many connections have been used up from
    the pool
    at a given time?
    Thanks in advance.
    Best regards,
    Jaya

  • Monitor Connection Pool 10g

    I am using odp.net 10gR2. Is there a way I can monitor the connection pool, like action connection, connection strings or active connections etc. Also, can I know the like how many connection pools will be there per cpu in my server and can I make any of the connection pool as inactive or disable or something like that ?
    Thanks,

    Hi,
    isn't the theory that there is no direct guaranteed mapping between connections -> sessions -> process ?!
    atleast on 10.2.0.1 x64 on windows 2003 i'm chasing a issue where v$session and v$process counts do not correspond to the number of thread in the oracle.exe process. Seems like as the connection pools increase the threads go up as you would expect but then stay idle until the client app restarts (also a bug with Dead connection detections and keepalives with this release potentially).
    anybody else with this kind of issue or more insight or even better a method to get a bit more insight?
    thanks

  • How to monitor an application using JMX

    Hi,
    How can I monitor the portal application running on  portal server by using MBeans (JMX)? For this I need to make a connection between my portal application and  MBean class, How to monitor operations? How can I do that? If anybody has come across the same requirement pls explain me with the implementation details.

    Hello,
    I have done that in a project (not Portal, but pure Java Application, should be no difference), working fine.
    The steps are as follows:
    - create MBean Server (e.g. MBeanServerFactory.createMBeanServer("test");)
    - create your MBeans
    - make them accessible to clients (register the MBeans in the server)
    - query them from clients
    see http://java.sun.com/developer/technicalArticles/J2SE/jmx.html
    for very good explanation including sample source code.
    CSY

  • How dynamically create connection pool and Datasource

    Hi
    How I can dynamically create a connection pool and Data source in Oracle 10g Application server. In our J2EE application the user will be login with db user name, password and database name. I want to create connection pool and data source on the fly while login the user with database name. I our application we have access approximate 80 Databases. so my approach is given bellow
    1) Planning to create 80 connection pools and 80 Data sources so when user logs in while selecting the db name i will call the appropriate data source and create the DB connection. Is there any limitation to create number of data sources in oracle app server?
    2) Create DB connection with out using connection pool and data source. But i am not prefer this approach coz we need to handle some transaction in our application.
    Kindly throw some light on managing connection pool programmatically or in application run time.
    I would really appreciate if any one can provide any links or any inormation on this issue.
    Thanks in advance.

    Kindly let me know is there any drawbacks to create 80 Data Sources to connect 80 database in Oracle 10G App server and each data sources should have one connection pool. so i need to create 80 connection pool. Please let me know is this right approach or any work around to create Data source on fly for each request for corresponding database.

  • How to create connection pooling in Tomcat 5.0

    present i am developing one web site in that i am using tomcat 5.0
    i am trying to establish connection pooling in tomcat,i am facing some problems..
    tomcat throws the following exception ie.,
    cannot create JDBC Driver class for connect URL null.
    my code lik this
    i configured the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    my server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <Resource auth="Container" name="sqlserver" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sudha</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sudha</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="sqlserver">
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:SQL</value>
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>select * from employee</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>kpi</value>
    </parameter>
    <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.DbcpDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>kpi</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
    <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
    </Host>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
    </Service>
    </Server>
    and i studied the the tomcat documentation in that tomcat mentioned
    The configuration properties for Tomcat's standard data source resource factory (org.apache.naming.factory.DbcpDataSourceFactory) are as follows:
    driverClassName - Fully qualified Java class name of the JDBC driver to be used.
    maxActive - The maximum number of active instances that can be allocated from this pool at the same time.
    maxIdle - The maximum number of connections that can sit idle in this pool at the same time.
    maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
    password - Database password to be passed to our JDBC driver.
    url - Connection URL to be passed to our JDBC driver. (For backwards compatibility, the property driverName is also recognized.)
    user - Database username to be passed to our JDBC driver.
    validationQuery - SQL query that can be used by the pool to validate connections before they are returned to the application. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
    how to configure server.xml file
    and how to get the org.apache.naming.factory.DbcpDataSourceFactory
    please help me...this module is very very urgen to me..

    http://jakarta.apache.org/tomcat/tomcat-5.0-doc/jndi-datasource-examples-howto.html

  • Can't create connection pool using weblogic 6.1 with Oracle thin driver

    Hi !
    I have tried to create a connection pool from adminconsole. My CLASSPATH setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\      
    url=jdbc:oracle:thin:@test:1521:PROJECT,\      
    driver=oracle.jdbc.driver.OracleDriver,\
         initialCapacity=4,\
         maxCapacity=10,\
         capacityIncrement=1,\
         props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config. Now when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading configuration file
    .\config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting WebLogic Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting discovery of Manag
    ed Server... This feature is on by default, you may turn this off by passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB) can't be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB) can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data Source creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin) can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application Poller not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThread listening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThread listeni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started WebLogic Admin
    Server "petstoreServer" for domain "petstore" running in Production Mode>
    Could anyone please help me ?
    Thanks
    ..Madhuri

    Madhuri wrote:
    >
    Hi Joe !
    I didn't get what you would like to point out. Actully, I am using same config.,
    but not to disclose the info. I gave you @test and username/password xxx/xxx.Ok. Now, assuming your pool looks like what I showed, the issue is probably
    that there are multiple Oracle driver zips around, and your standlaone program
    is using a different, newer, better one than the server. Our weblogic jar files
    include a classes12.zip Oracle thin driver, but there are multiple versions of
    classes12.zip, and the latest from oracle is better than the one we sealed into
    our packaging. Please use jave -verbose to identify exactly which Oracle sip file
    you are using in the successful case, then make sure this zip file comes before
    any weblogic stuff in your weblogic server's classpath, so we'll use the same
    driver. This should work. Edit the script you sue to start weblogic to verify
    the classpath does end up with the oracle driver ahead of all weblogic stuff.
    Joe
    >
    Please let me know.
    Thanks
    .Madhuri
    Joseph Weinstein <[email protected]> wrote:
    Madhuri wrote:
    Hi Joe !
    Here is the sample java code. Please let me know how I can test thisin weblogic
    6.1.
    Thanks
    .MadhuriWell fine! That was easy. Your pool definition didn't have the same URL
    or
    user or password as this code. Try this for your pool definition:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@adl-gbsdevel:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=10,\
    maxCapacity=10,\
    capacityIncrement=1,\
    testConnsOnReserve=true,\
    testTable=dual,\
    props=user=mkelkar;password=mkelkar
    Let me know,,,
    Joe
    Joseph Weinstein <[email protected]> wrote:
    The key is in the log:
    Could not create pool connection.
    The DBMS driver exception was:
    java.sql.SQLException: invalid arguments in call
    at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java:168)
    Now we need to simplify the problem. Please make a simple 15-line
    standalone
    Java program like you'd find with the Oracle driver's examples, with
    no
    weblogic code in the picture. Just make a JDBC connection using Oracle's
    driver, and show me that code. Then I can translate that into a pool
    definition.
    Joe
    Madhuri wrote:
    Hi Joe !
    Thanks for your prompt reply. I tried the way you suggested but
    it
    still it gives
    me the same error. I am attching here the weblogic.log file.
    Thanks again
    ..Madhuri
    Joseph Weinstein <[email protected]> wrote:
    We'd want to see the log during booting, where the pool
    is being created to see why that failed. Try a pool
    definition with no blank lines, no whitespace at the
    end of lines, and no server property. The thin driver
    doesn't like that:
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx
    Joe
    Madhuri wrote:
    Hi !
    I have tried to create a connection pool from adminconsole. My
    CLASSPATH
    setting
    is as follows :
    F:\SOAP\soap-2_2\lib;F:\SOAP\soap-2_2;
    D:\Oracle\Ora81\jdbc\lib\classes12.zip;
    D:\Oracle\Ora81\jdbc\lib\nls_charset12.zip;
    D:\Oracle\Ora81\jdbc\lib\classes111.zip;
    F:\SOAP\soap-2_2\lib\jaf-1.0.1\activation.jar;
    D:\Oracle\Ora8\Apache\Jsdk\src\javax\servlet\http;
    D:\Oracle\Ora81\Apache\Jsdk\src\javax\servlet;
    D:\Oracle\Ora81\lib;
    F:\ant\jakarta-ant1.\bin;
    E:\weblogic\oci\classes;
    E:\weblogic\oci\classes\weblogic\xml\license;
    E:\weblogic\oci\license;
    E:\bea\wlserver6.1\lib;
    E:\PetStoreHome\petstore1.3;
    Following is the configuration.
    #Oracle thin driver Method #2
    weblogic.jdbc.connectionPool.thin=\
    url=jdbc:oracle:thin:@test:1521:PROJECT,\
    driver=oracle.jdbc.driver.OracleDriver,\
    initialCapacity=4,\
    maxCapacity=10,\
    capacityIncrement=1,\
    props=user=xxx;password=xxx;server=test
    #Add a TXDataSource for the connection pool:
    weblogic.jdbc.TXDataSource.weblogic.jdbc.jts.thin=thin
    # Add an ACL for the connection pool:
    weblogic.allow.reserve.weblogic.jdbc.connectionPool.thin=everyone
    I did append the file weblogic.properties with the above config.
    Now
    when I start
    the Weblogic server I get the following error :
    Starting WebLogic Server ....
    <Nov 29, 2001 2:24:16 PM EST> <Notice> <Management> <Loading
    configuration
    file
    \config\petstore\config.xml ...>
    <Nov 29, 2001 2:24:22 PM EST> <Notice> <WebLogicServer> <Starting
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore">
    <Nov 29, 2001 2:24:26 PM EST> <Notice> <Management> <Starting
    discovery
    of Manag
    ed Server... This feature is on by default, you may turn this
    off
    by
    passing -Dw
    eblogic.management.discover=false>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.SignOnDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.EstoreDB)
    can't
    be creat
    ed with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(jdbcthin.InventoryDB)can't be
    cr
    eated with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:35 PM EST> <Error> <JDBC> <Error during Data
    Source
    creation:
    weblogic.common.ResourceException: DataSource(weblogic.jdbc.jts.thin)can't be
    created with non-existent Pool (connection or multi) (thin)>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <Management> <Application
    Poller
    not star
    ted for production server.>
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    After the server has booted, your browser should
    automatically launch and point to the WebLogic Server
    Tour running on this server. If your browser fails to
    launch, point your browser to the URL
    "http://burtsun:7001"
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <ListenThreadlistening
    on port 7001>
    <Nov 29, 2001 2:24:41 PM EST> <Notice> <WebLogicServer> <SSLListenThreadlisteni
    ng on port 7002>
    <Nov 29, 2001 2:24:42 PM EST> <Notice> <WebLogicServer> <Started
    WebLogic
    Admin
    Server "petstoreServer" for domain "petstore" running in ProductionMode>
    Could anyone please help me ?
    Thanks
    ..Madhuri
    Name: weblogic.log
    weblogic.log Type: Text Document (application/x-unknown-content-type-txtfile)
    Encoding: base64
    Name: PrintColumns.java
    PrintColumns.java Type: Visual Cafe File (application/x-unknown-content-type-VisualCafeFile.Document)
    Encoding: base64

  • How to create Connection pool in Tomcat 5

    present i am developing one web site in that i am using tomcat 5.
    i am trying to establish connection pooling in tomcat,i am facing some problems..
    tomcat throws the following exception ie.,
    cannot create JDBC Driver class for connect URL null.
    my code lik this
    i configured the web.xml
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <web-app>
    <resource-ref>
    <description>Oracle Datasource example</description>
    <res-ref-name>sqlserver</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    my server.xml
    <?xml version='1.0' encoding='utf-8'?>
    <Server>
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"/>
    <GlobalNamingResources>
    <Environment name="simpleValue" type="java.lang.Integer" value="30"/>
    <Resource auth="Container" description="User database that can be updated and saved" name="UserDatabase" type="org.apache.catalina.UserDatabase"/>
    <Resource auth="Container" name="sqlserver" type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sudha</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>sudha</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="sqlserver">
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:SQL</value>
    </parameter>
    <parameter>
    <name>validationQuery</name>
    <value>select * from employee</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>username</name>
    <value>kpi</value>
    </parameter>
    <parameter>
    <name>factory</name>
    <value>org.apache.naming.factory.DbcpDataSourceFactory</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>kpi</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <Service name="Catalina">
    <Connector acceptCount="100" connectionTimeout="20000" disableUploadTimeout="true" port="8080" redirectPort="8443" maxSpareThreads="75" maxThreads="150" minSpareThreads="25">
    </Connector>
    <Connector port="8009" protocol="AJP/1.3" protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler" redirectPort="8443">
    </Connector>
    <Engine defaultHost="localhost" name="Catalina">
    <Host appBase="webapps" name="localhost">
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="localhost_log." suffix=".txt" timestamp="true"/>
    </Host>
    <Logger className="org.apache.catalina.logger.FileLogger" prefix="catalina_log." suffix=".txt" timestamp="true"/>
    <Realm className="org.apache.catalina.realm.UserDatabaseRealm"/>
    </Engine>
    </Service>
    </Server>
    and i studied the the tomcat documentation in that tomcat mentioned
    The configuration properties for Tomcat's standard data source resource factory (org.apache.naming.factory.DbcpDataSourceFactory) are as follows:
    driverClassName - Fully qualified Java class name of the JDBC driver to be used.
    maxActive - The maximum number of active instances that can be allocated from this pool at the same time.
    maxIdle - The maximum number of connections that can sit idle in this pool at the same time.
    maxWait - The maximum number of milliseconds that the pool will wait (when there are no available connections) for a connection to be returned before throwing an exception.
    password - Database password to be passed to our JDBC driver.
    url - Connection URL to be passed to our JDBC driver. (For backwards compatibility, the property driverName is also recognized.)
    user - Database username to be passed to our JDBC driver.
    validationQuery - SQL query that can be used by the pool to validate connections before they are returned to the application. If specified, this query MUST be an SQL SELECT statement that returns at least one row.
    how to configure server.xml file
    and how to get the org.apache.naming.factory.DbcpDataSourceFactory
    please help me...this module is very very urgen to me..

    I spent many hours when i first implemented connection pooling trying to put it together. The information is scattered and the config has changed slightly from 5.0 to 5.5 etc. This is how I got it working in 5.5.17:
    * server.xml seems to be a wrong place for the pool configuration if you consider it to be an application specific thing. It might be a better idea to put it into C:\tomcat55\conf\Catalina\localhost\ConfigFileForYourWeapp.xml as follows:
    <Context path="/ClientLink" docBase="C:\eclipseWorkspace\PortfolioUI3\WebRoot">
          <Resource name="jdbc/testportfolios" auth="Container"
                         type="javax.sql.DataSource"
                         factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
                         username="****" password="******"
                         driverClassName="com.mysql.jdbc.Driver"
                         url="jdbc:mysql://192.168.0.101:3306/testportfolios?user=***********&password=***********&useUnicode=true&characterSet=swedish"
                         maxWait="10000" maxActive="30" maxIdle="10" removeAbandoned="true"
                         removeAbandonedTimeout="60" logAbandoned="true" testWhileIdle="true"
                         minEvictableIdleTimeMillis="4000"
                         timeBetweenEvictionRunsMillis="60000" validationQuery="SELECT '1'" />
          </Context>* Then add the following snippet into web.xml in your webapp directory:
    <resource-ref>
                    <description>Database pool defined in ClientLink.xml</description>
                    <res-ref-name>jdbc/testportfolios</res-ref-name>
                    <res-type>javax.sql.DataSource</res-type>
                    <res-auth>Container</res-auth>
               </resource-ref>* Next put the jdbc-driver jar in a place where tomcat can find it. That is common\lib. Note that the shared/lib does not work.
    * Get connections in java as follows:
                    try {
                         Context initCtx = new InitialContext();
                         DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/testportfolios");
                         this.connection = ds.getConnection();
                    } catch (NamingException e) {
                         throw new RuntimeException("Java naming exception when getting connection from tomcat pool: " + e.getMessage());
                    }I hope that this helps you to save the time I lost figuring this out!
    Message was edited by:
    Tomppu

  • How to compile connection pool sample java code

    I recently bought David Knox's "Effective Oracle Database 10g Security by Design", and have been working through his examples with client identifiers and how to leverage database security with anonymous connection pools.
    The database side of things I totally understand and have set up, but I now want to compile/run the java code examples, but don't know what is required to compile this.
    I'm running Oracle 10.2.0.4 (64-bit) Enterprise Edition on a Linux (RHEL 5) PC. Java version is 1.6.0_20. Relevant .bash_profile environment variables are as follows:
    export LD_LIBRARY_PATH=$ORACLE_HOME/lib:/lib:/usr/lib
    export CLASSPATH=$ORACLE_HOME/jre:$ORACLE_HOME/jlib:$ORACLE_HOME/rdbms/jlib
    export PATH=$ORACLE_HOME/bin:$ORACLE_HOME/OPatch:/usr/kerberos/bin:/usr/local/bin:/bin:/usr/bin
    When I try to compile, I get:
    oracle:DB10204$ java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
    at java.security.AccessController.doPrivileged(Native Method)
    at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
    at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301)
    at java.lang.ClassLoader.loadClass(ClassLoader.java:248)
    Could not find the main class: FastConnect.java. Program will exit.
    The java source code of one of the examples is below. Is someone able to point me in the right direction as to how I get this to compile? Do I just have a syntax and/or environment configuration modification to do, or is there more to it than that to get this example working? Any help much appreciated.
    oracle:DB10204$   cat FastConnect.java
    package OSBD;
    import java.sql.*;
    import oracle.jdbc.pool.OracleDataSource;
    public class FastConnect
      public static void main(String[] args)
        long connectTime=0, connectionStart=0, connectionStop=0;
        long connectTime2=0, connectionStart2=0, connectionStop2=0;
        ConnMgr cm = new ConnMgr();
        // time first connection. This connection initializes pool.
        connectionStart = System.currentTimeMillis();
        Connection conn = cm.getConnection("SCOTT");
        connectionStop = System.currentTimeMillis();
        String query = "select ename, job, sal from person_view";
        try {
          // show security by querying from View
          Statement stmt = conn.createStatement();
          ResultSet rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          // close the connection which resets the database session
          cm.closeConnection(conn);
          // time subsequent connection as different user
          connectionStart2 = System.currentTimeMillis();
          conn = cm.getConnection("KING");
          connectionStop2 = System.currentTimeMillis();
          // ensure database can distinguish this new user
          stmt = conn.createStatement();
          rset = stmt.executeQuery(query);
          while (rset.next()) {
            System.out.println("Name:   " + rset.getString(1));
            System.out.println("Job:    " + rset.getString(2));
            System.out.println("Salary: " + rset.getString(3));
          stmt.close();
          rset.close();
          cm.closeConnection(conn);
        } catch (Exception e)    { System.out.println(e.toString()); }
        // print timing results
        connectTime = (connectionStop - connectionStart);
        System.out.println("Connection time for Pool: " + connectTime + " ms.");
        connectTime2 = (connectionStop2 - connectionStart2);
        System.out.println("Subsequent connection time: " +
                            connectTime2 + " ms.");
    }Code download is at: http://www.mhprofessional.com/getpage.php?c=oraclepress_downloads.php&cat=4222
    I'm looking at Chapter 6.

    stuartu wrote:
    When I try to compile, I get:
    oracle:DB10204$  java FastConnect.java
    Exception in thread "main" java.lang.NoClassDefFoundError: FastConnect/java
    Caused by: java.lang.ClassNotFoundException: FastConnect.java
    I will try to explain what is happening here.
    You are launching java telling it to run a class named 'java' in a package named 'FastConnect'
    and java says it cannot find that class.
    What you intended to do:
    $ # make the directory structure match the package structure
    $ mkdir OSBD
    $ # move the source file in the directory structure so it matches the package structure
    $ mv FastConnect.java OSBD/
    $ # compile OSBD/FastConnect.java to OSBD/FastConnect.class
    $ javac OSBD/FastConnect.java
    $ # launch java using the OSBD/FastConnect class
    $ java -cp . OSBD.FastConnectNote that the package 'OSBD' does not follow the recommended naming conventions
    you might consider changing that to 'osbd'.

Maybe you are looking for

  • Change source system in Infosource

    Hi I am working on BI7. I have one isse. For an infosource source system has been assigned to client 100. I would like to change it to 200. Pl let me know how to make this change.

  • How do I put photos in the iPhoto Library onto my external hard drive?

    I used an old iMac for years and I would go into the hard drive in the Originals folder and drag each folder onto the external hard drive. That way I could easily find the different shooting sessions. Now with my new Mac I find an iPhoto Library fold

  • XML GALLERY WONT EXIT

    I have an XML gallery that has been giving me some problems. My as3 refers to an .as file that is in itself a class. This class creates the gallery and has an event listener to exit the gallery when clicked. It works perfectly fine for exiting the ma

  • Entity Bean can only use container-managed transaction demarcation?

    In <<Designing Enterprise Application with J2EE 2nd>> Section 2.3.3.3 Enterprise Bean Transactions,it says:Entity beans can only use container-managed transaction demarcation. That means,i can not get UserTransaction from EJBContext. Is that true?

  • When I open itunes I have no library

    Can someone please help. My daughter has been using my PC to copy cd's. When I restarted PC I open itunes and all I get is a blank library. Suggests to me that the route to my library has become corrupt. Can anyone help me to find my missing library?