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.
Similar Messages
-
Problem with creating Connection pool and JNDI, driver is not detected
Hi,
I have an issue with creating Connection Pool and JNDI.
I'm using:
- JDK 1.6
- OS: Linux(ubuntu 8.10)
- Netbeans IDE 6.5.1
- Java EE 5.0
- Apache Tomcat 6.0.18 Its lib directory contains all necessary jar files for Oracle database driver
- Oracle 11g Enterprise
My problem is that the Oracle database driver is not detected when I want to create a pool (it works pretty well and is detected without any problem when I create ordinary connection by DriverManager)
Therefore after running:
InitialContext ic = new InitialContext();
Context context = (Context)ic.lookup("java:comp/env");
DataSource dataSource = (DataSource)context.lookup("jdbc/oracle11g");
Connection connection = dataSource.getConnection();and right after dataSource.getConnection() I have the following exception:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot load JDBC driver class 'oracle.jdbc.OracleDriver'
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1136)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.getConnection(BasicDataSource.java:880)
at servlets.Servlet1.doPost(Servlet1.java:47)
at servlets.Servlet1.doGet(Servlet1.java:29)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:617)
at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:128)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:286)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:845)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:583)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:447)
at java.lang.Thread.run(Thread.java:619)
Caused by: java.lang.ClassNotFoundException: oracle.jdbc.OracleDriver
at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
at sun.misc.Launcher$ExtClassLoader.findClass(Launcher.java:229)
at java.lang.ClassLoader.loadClass(ClassLoader.java:307)
at java.lang.ClassLoader.loadClass(ClassLoader.java:252)
at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:320)
at java.lang.Class.forName0(Native Method)
at java.lang.Class.forName(Class.java:169)
at org.apache.tomcat.dbcp.dbcp.BasicDataSource.createDataSource(BasicDataSource.java:1130)
... 17 more
My application context file (context.xml) is:
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/WebApplication3">
<Resource auth="Container"
driverClassName="oracle.jdbc.OracleDriver"
maxActive="8"
maxIdle="4"
name="jdbc/oracle11g"
username="scott"
password="tiger"
type="javax.sql.DataSource"
url="jdbc:oracle:thin:@localhost:1521:database01" />
</Context>and my web.xml is:
<resource-ref>
<description>Oracle Datasource example</description>
<res-ref-name>jdbc/oracle11g</res-ref-name>
<res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
</resource-ref>
...I found similar threads in different forums including sun, such as
http://forums.sun.com/thread.jspa?threadID=567630&start=0&tstart=0
http://forums.sun.com/thread.jspa?threadID=639243&tstart=0
http://forums.sun.com/thread.jspa?threadID=5312178&tstart=0
, but no solution.
As many suggest, I also tried to put context directly in the server.xml (instead of my application context) and referencing it by <ResourceLink /> inside my application context but it didn't work and instead it gave me the following message:
org.apache.tomcat.dbcp.dbcp.SQLNestedException: Cannot create JDBC driver of class ' ' for connect URL 'null'
Has anyone succeeded in creating a connection pool with JNDI by using Tomcat 6 or higher ? If yes, could kindly explain about the applied method.
Regards,Hello again,
Finally I managed to run my application also with Tomcat 6.0.18. There was only two lines that had to be modified
in the context.xml file (the context of my application project and not server's)
Instead of writing
<Context antiJARLocking="true" path="/WebApplication2">
type="javax.sql.DataSource"
factory="org.apache.tomcat.dbcp.dbcp.BasicDataSourceFactory"
</Context>we had to write:
<Context antiJARLocking="true" path="/WebApplication2">
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
</Context>- No modification was needed to be done at server level (niether server.xml nor server context.xml)
- I just added the ojdbc6.jar in $CATALINA_HOME/lib (I didn't even need to add it in WEB-INF/lib of my project)
- The servlet used to do the test was the same that I presented in my precedent post.
For those who have encountered my problem and are interested in the format of the web.xml and context.xml
with Tomcat 6.0, you can find them below:
Oracle server: Oracle 11g Enterprise
Tomcat server version: 6.0.18
Oracle driver: ojdbc.jar
IDE: Netbeans 6.5.1
The context.xml file of the web application
<?xml version="1.0" encoding="UTF-8"?>
<Context antiJARLocking="true" path="/WebApplication2">
<Resource name="jdbc/oracle11g"
type="oracle.jdbc.pool.OracleDataSource"
factory="oracle.jdbc.pool.OracleDataSourceFactory"
url="jdbc:oracle:thin:@localhost:1521:database01"
driverClassName="oracle.jdbc.OracleDriver"
userName="scott"
password="tiger"
auth="Container"
maxActive="100"
maxIdle="30"
maxWait="10000"
logAbandoned="true"
removeAbandoned="true"
removeAbandonedTimeout="60" />
</Context>The web.xml of my web application
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
<resource-ref>
<description>Oracle Database 11g DataSource</description>
<res-type>oracle.jdbc.pool.OracleDataSource</res-type>
<res-auth>Container</res-auth>
<res-ref-name>jdbc/oracle11g</res-ref-name>
</resource-ref>
<servlet>
<servlet-name>Servlet1</servlet-name>
<servlet-class>servlets.Servlet1</servlet-class>
</servlet>
<servlet-mapping>
<servlet-name>Servlet1</servlet-name>
<url-pattern>/Servlet1</url-pattern>
</servlet-mapping>
<session-config>
<session-timeout>
30
</session-timeout>
</session-config>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
</welcome-file-list>
</web-app>Ok, now I'm happy as the original problem is completely solved
Regards -
What ACLs need to be defined to dynamically create connection pools?
Hi,
What ACLs do I need to define in order to dynamically (i.e. programatically)
create connection pools? I've spent several hours reading doc
and searching on the web but found nothing.
I have defined the following:
weblogic.allow.admin.weblogic.jdbc.connectionPoolcreate=someId
But I still get the following exception when I try to invoke jdbc.createPool(aWeblogicPoolProperties);//jdbc
is an instance of weblogic.jdbc.common.JdbcServices:
java.lang.SecurityException: User "guest" does not have Permission
"modify" based on ACL "weblogic.jndi.weblogic.jdbc.connectionPool"
Can someone PLEASE list the ACLs I'd need to define for this to
work?
Thanks much,
AndrewI'd like to know the answer to your question as well.
On page 4-7 of the Programming WebLogic JDBC, the manual says to "modify the following
ACLs to set up security configuration that supports the dynamic creation of connection
pools.
* acl.admin.dynapool
* acl.admin.weblogic.jdbc.connectionPoolcreate
* acl.modify.weblogic.jndi.weblogic.jdbc.connectionPool
* acl.lookup.weblogic.jndi.weblogic.jdbc.connectionPool
* acl.reserve.dynapool"
These ACL's are not in my ACL list on my WLS6.1. So how can I modify these when
they don't exist for me?
thanks,
Dennis
"Andrew" <[email protected]> wrote:
>
Hi,
What ACLs do I need to define in order to dynamically (i.e. programatically)
create connection pools? I've spent several hours reading doc
and searching on the web but found nothing.
I have defined the following:
weblogic.allow.admin.weblogic.jdbc.connectionPoolcreate=someId
But I still get the following exception when I try to invoke jdbc.createPool(aWeblogicPoolProperties);//jdbc
is an instance of weblogic.jdbc.common.JdbcServices:
java.lang.SecurityException: User "guest" does not have Permission
"modify" based on ACL "weblogic.jndi.weblogic.jdbc.connectionPool"
Can someone PLEASE list the ACLs I'd need to define for this to
work?
Thanks much,
Andrew -
How To create Connection Pooling in Oracle 10.1.2.0 Application Server
Hi,
How to create Conncetion Pooling in Oracle 10g Application Server. I am using 10.1.2.0 version.
Thanx
DhansHi,
How about these tutorials?
http://www.oracle.com/technology/tech/java/newsletter/articles/oc4j_data_sources/oc4j_ds.htm
http://www.oracle.com/technology/products/jdev/tips/duff/mysql_and_oc4j3.html -
Connection pool and datasource
In WL 7, we need to configure a datasource and a connection pool in order for the application to get a connection to the database. How is the datasource and connection pool related?
In WL 9.2, there is no option to configure the connection pool, there is only the option to configure the data source. Where did the connection pool go in WL 9.2?gerald lee wrote:
In WL 7, we need to configure a datasource and a connection pool
in order for the application to get a connection to the database.
How is the datasource and connection pool related?
It depends on the WLS version. pre-9.X, there can be more than one datasource pointing to a given pool,
but you do need a datasource typically to use a pool.
In WL 9.2, there is no option to configure the connection pool, there is only
the option to configure the data source. Where did the connection pool go in WL 9.2?In 9.X and beyond the relationship is one-to-one, and you will create both at the
same time when creating a datasource.
Joe -
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
-
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 use connection pool of datasource to make applications run faster?
Hi, erveryone
I prepare to implement a servlet that access database and do sync with client.
When I access database, I would like to configure a datasource in weblogic and use connection pool.
In order to make servlet application run significantly faster, my servet how to use connection poo is much moreresonable?
For example, my servlet has many times database access. Is it true that geting and close a connection whenever
one time database access finished?
If from the servlet begins, the db connection is hold till servlet finalize. Will the solution affect the servlet performance? Is there any official document to introduce connection pool program? I search some documents.
<The Java EE 6Tutorial> introduce some simple intruduction about connection pool.1. Use WebLogic Servers Data Source for Database Connections.
2. Open and close the connections where you need it. Dont open it in begin and close in finalise. That is bad practice.
3. Even when you invoke Connection.close () webLogic will not close the connection. it will commit the transaction and return it back to the pool rather than physically closing the DB connection.
4. You can tune data source for minimum, maximum and increments of connections that you need based on your application requirement. -
Hi. how to create Subroutine Pool and call it from sapscript
HI,
Can anyone tell is there any standard subroutine pool available which could fetch the customer number.
how to create an subroutine pool and call it from the sapscript..
please help me
Advance Thanks..
Guhapriyan.Hi Guhapriyan,
1. Create a FORM in your program.
2. call it from sapscript using
/: PERFORM GET_COMPANY_INFO IN PROGRAM YHRR_OFFER_CONTRACT_FORM
/: USING &P0001-BUKRS&
/: CHANGING &COMP_NAME&
/: ENDPERFORM
3. The form in your program should be of the following parameters only.
form GET_COMPANY_INFO tables IN_PAR structure ITCSY
OUT_PAR structure ITCSY.
(important is IN_PAR, OUT_PAR -
where in your read the values passed,
and pass back the values
thru internal table using varname, varvalue)
regards,
amit m. -
Can we dynamically create Connection pools
Hi
In Our production environment we bring down oracle for maintenance everynight.
Now our requirement is that we do not want to bring weblogic down whenever oracle
is rolled over.
Is there a way that weblogic can dynamically reconnect to oracle as soon as oracle
is back up without restarting?
If yes, What are the options I have.
Please help !
Thanks
RatanRatan wrote:
Hi
In Our production environment we bring down oracle for maintenance everynight.
Now our requirement is that we do not want to bring weblogic down whenever oracle
is rolled over.
Is there a way that weblogic can dynamically reconnect to oracle as soon as oracle
is back up without restarting?
If yes, What are the options I have.
Please help !
Thanks
RatanYes, several. Either run the admin command to refresh the pool, or you could
set the pool's initial capacity to be zero, and allow shrinking. This means the pool
will close all it's connections during long periods of non-use. In the morning when
users come back, the server will recreate connections as needed. Lastly, if you
simply define your pool to test connections at reserve time, any bad connection
will be replaced with a new good one before being given to your application.
Joe -
How to use Connection pool in Reports
Dear All,
Please help me How to create Connection pool for Reports and How to use in Reports.
Present i am using the report by passing parameter as P_JDBCPDS=username/password@databaseName. I thought this will not manage the coonection pool.
For all reports and every time i am passing userName/password, how to avoid this. Please help me.
1. How to create Connection pool for Report Server
2. How to use that Connection pool in the Reports.
Please help me.
With Regards,
Srinivas.Until now, I have not worked unfortunately with a connection pool, but, I have found a documentation about the Creating an Internal Connection Pool.
http://download-east.oracle.com/docs/cd/B25221_04/web.1013/b13593/cpdef.htm -
Creating Connection Pools/ Connection Pool does not exist error
Hi everyone -
I have a question about when/how weblogic creates connections pools.
Here is the scenario. Sometimes when our weblogic server starts, our
oracle database is not available. Therefor, weblogic can't create the
connection pool. However, after oracle comes weblogic up, weblogic
could create the connection pool, but it doesn't appear to be smart
enough to do this. Is there a way to ask weblogic to attempt to
recreate a connection pool?
We've noticed this behavior on weblogic 6.0 sp2.
Thanks,
ScottIf you define the pool with an initial size of zero, you should be OK. The
server is currently a little severe with a pool when the server cannot
create the pool with it's initial capacity, the pool isn't created. The server
could create it later, if told to via the console or via the admin command line,
or via the dynamic pool API, but init=0 is easiest.
Joe
Scott Gilpin wrote:
Hi everyone -
I have a question about when/how weblogic creates connections pools.
Here is the scenario. Sometimes when our weblogic server starts, our
oracle database is not available. Therefor, weblogic can't create the
connection pool. However, after oracle comes weblogic up, weblogic
could create the connection pool, but it doesn't appear to be smart
enough to do this. Is there a way to ask weblogic to attempt to
recreate a connection pool?
We've noticed this behavior on weblogic 6.0 sp2.
Thanks,
Scott -
Error Message while creating connection pool
Hi all,
I got the following error message while creating connection pool for the
SQL Server thru the Application Server Admin Console.
The message is,
An error has occured.
Operation 'create.Jdbc.ConnectionPool' failed in 'resources' Config Mbean. Target exception message :
JdbcConnectionPool Already Exists: cannot add duplicate.
But the connection pool for the SQL Server was not there in the list.
What may be the possible reason for this error.
i was trying to deploy a BMP entiy bean using the Sun Application Server.
Prior deploying i just tried to create connection pool and test the connection using the Admin Console
Please help me by providing a solution.Kriti Sundar Mazumder wrote:
Hi
I am getting an following error message, while creating database connection pool
in weblogic 7.
"<Jun 18, 2004 4:52:36 AM CDT> <Error> <JDBC> <001060> <Cannot startup connection
pool "MyJDBCConnectionPool" java.sql.SQLException: [IBM][JDBC Driver] CLI0647E
Error allocating DB2 environment handle, rc=-1.>"
Can anyone help me out in this regard
Regards
KritiHi. I am no expert, but it sounds like a problem with the privileges the user
has... The best thing is to step back to a simpler environment. Can you try
connecting to DB2 with a simple program like utils.dbping? Please look at our
driver docs for the DB2 driver, because there are several variations in connect
properties depending on the type of DB2 you are connecting to...
Joe -
How to Retrieve Server Name for creating connection pool during startup!
Hi All,
I am going thru the edocs documentation of weblogic for creating the connection pool and the datasource dynamically. The URL I referred to was as under
http://edocs.bea.com/wls/docs81/jdbc/programming.html
There is a sample given in the above-mentioned URL. The Server MBean is created by passing the server name.
The code below mentioned was have placed in my dblib.java
svrAdminMBean = (ServerMBean)adminMBeanHome.getAdminMBean("myserver", "Server");
I am creating the connection pool from the servlet by invoking the dblib.java
I cannot hard-code the server name in the dblib.java since the same code was shared across multiple servlets.
Each Servlet will create its own connection pool during application server startup.
Is there a way to retrieve the server name in which the dblib.java is invoked.
Any pointers to info source will be REALLY appreciated.
Many Thanks in Advance,
C R BaradwajYou can get it from the Java system property weblogic.Name, i.e. System.getProperty("weblogic.Name");
Cheers
Feargal -
What's the difference between using a connection pool and a datasource
Howdy. I figure this is a newbie question, but I can't seem to find an
answer.
In the docs at bea, the datasource docs say
"DataSource objects provide a way for JDBC clients to obtain a DBMS
connection. A DataSource is an interface between the client program and the
connection pool. Each data source requires a separate DataSource object,
which may be implemented as a DataSource class that supports either
connection pooling or distributed transactions."
In there it says the datasource uses the connection pool, but other than
that, what is the difference between a connection pool and a datasource?Thanks for the info. I think it makes some sense. But it's a bit greek.
I'm sure it'll make more sense the more I work with it. Thanks.
"Chuck Nelson" <[email protected]> wrote in message
news:3dcac1f5$[email protected]..
>
Peter,
Here is a more formal definition of a DataSource from the Sun site
"A factory for connections to the physical data source that thisDataSource object
represents. An alternative to the DriverManager facility, a DataSourceobject
is the preferred means of getting a connection. An object that implementsthe
DataSource interface will typically be registered with a naming servicebased
on the JavaTM Naming and Directory (JNDI) API.
The DataSource interface is implemented by a driver vendor. There arethree types
of implementations:
Basic implementation -- produces a standard Connection object
Connection pooling implementation -- produces a Connection object thatwill automatically
participate in connection pooling. This implementation works with amiddle-tier
connection pooling manager.
Distributed transaction implementation -- produces a Connection objectthat may
be used for distributed transactions and almost always participates inconnection
pooling. This implementation works with a middle-tier transaction managerand
almost always with a connection pooling manager.
Does that help clarify the distinction?
Chuck Nelson
DRE
BEA Technical Support
Maybe you are looking for
-
Setting up a new server with a FQDN
Hi all, after some years of my company using an Xserve G5 we are upgrading to a new Intel XServe running 10.5 server, and I am aware for some of the services we will need a fully qualified domain name, but have no idea how to do this. We have a stati
-
Which speed internal hard drive should I get for FCP editing on a Mac Book
I am going to buy a new Mac Book Pro notebook to edit a feature documentary with FCP. My footage is all on 7200 rpm G-raid external drives. Question: should I buy the 4200 rpm, 5200 rpm, or 7200 rpm hard drive for the notebook? I really like having m
-
For some odd reason my phone isn't syncing when I plug it in to my itunes. please help
help!
-
Why my iMessages are seen on all connected devices to the iTunes account, Why my iMessages are seen on all connected devices to the iTunes account?
-
I am enrolled in an online university program that uses Sakai. Fire Fox updated something that attaches computer script to my Word documents when I upload them. I use a PC and Word 2010