The use of connection pool
Dear all,
I had created a connection pool in Sun Java System Web Server.
But I don't know how to use it.
Would you please tell me how to use it via JSP ?
Thank you very much.
Jack.
InitialContext initialContext = new InitialContext();
DataSource dataSource = (DataSource)initialContext.lookup("connPool");
Connection connection = dataSource.getConnection();You need to do a JNDI lookup for the DataSource and getConnection() from that.
***Annie***
Similar Messages
-
Weblogic Server 9.2 Crashes when using the JMS Wrapped Connection Pooling.
===== BEGIN DUMP =============================================================
JRockit dump produced after 0 days, 01:05:05 on Thu Sep 16 18:27:36 2010
Additional information is available in:
E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.dump
E:\obopay\servers\EWP_9.2_Domain\jrockit.4516.mdmp
If you see this dump, please open a support case with BEA and
supply as much information as you can on your system setup and
the program you were running. You can also search for solutions
to your problem at http://forums.bea.com in
the forum jrockit.developer.interest.general.
Error Message: Illegal memory access. [54]
Exception Rec: EXCEPTION_ACCESS_VIOLATION (c0000005) at 0x0095065F - memory at 0x00740060 could not be read.
Minidump : Wrote mdmp. Size is 567MB
SafeDllMode : -1
Version : BEA JRockit(R) R27.2.0-131-78843-1.5.0_10-20070320-1457-windows-ia32
GC Mode : Garbage collection optimized for throughput
GC Strategy : Generational Parallel Mark & Sweep
: Current OC phase is: not running. YC is not running.
: GC strategy for GC 36 was genparpar
: GC strategy for GC 37 was genparpar
: GC strategy for GC 38 was genparpar
: GC strategy for GC 39 was genparpar
: GC strategy for GC 40 was genparpar
: mmHeap->data = 0x00C00000, mmHeap->top = 0x10C00000
: The nurserylist starts at 0x01BE75E8 and ends at 0x0CB52440
: mmStartCompaction = 0x00C00000, mmEndCompaction = 0x01C00000
: References are 32-bit.
CPU : Intel Pentium III/Pentium III Xeon SSE SSE2 SSE3 SSSE3 EM64T
Number CPUs : 2
Tot Phys Mem : 3451408384 (3291 MB)
OS version : Microsoft Windows XP version 5.1 Service Pack 3 (Build 2600) (32-bit)
Thread System: Windows Threads
State : JVM is running
Command Line : -Djava.library.path=E:\bea\jrockit90_150_10\bin;E:\bea\jrockit90_150_10\jre\bin;E:\bea\weblogic92\server\native\win\32;E:\bea\weblogic92\server\bin;E:\bea\weblogic92\server\native\win\32\oci920_8 -Dweblogic.management.discover=false -Dplatform.home=E:\bea\weblogic92 -Dwls.home=E:\bea\weblogic92\server -Dwli.home=E:\bea\weblogic92\integration -Dweblogic.Name=myserver -Dweblogic.management.username=weblogic -Dweblogic.management.password=weblogic -Dweblogic.ext.dirs=E:\bea\patch_weblogic901\profiles\default\sys_manifest_classpath\weblogic_patch.jar Djava.security.auth.login.config=E://workspace/Bhopal/LoginModulesConfig/ewp_loginmodules.config -Djava.naming.factory.initial.ewp.remote=weblogic.jndi.WLInitialContextFactory -Dcom.ewp.proxy.is_remote=false -Djava.naming.provider.url.ewp.remote=t3://localhost:7001 -Dweblogic.webservice.verbose=true -Dweblogic.log.Log4jLoggingEnabled=true -Dweblogic.security.SSL.ignoreHostnameVerification=true Xdebug -Xnoagent -Dcom.sun.management.jmxremote -Xms256m -Xmx1024m -Dsun.java.launcher=SUN_STANDARD weblogic.Server
java.home : E:\bea\jrockit90_150_10\jre
JAVA_HOME : <not set>
JAVAOPTIONS: <not set>
PATH : E:\bea\jrockit90_150_10\jre\bin;E:\oracle\product\10.2.0\client_1\bin;C:\Program Files\PC Connectivity Solution\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\Program Files\Intel\DMIX;C:\Program Files\TortoiseSVN\bin
C Heap : Good; no memory allocations have failed
StackOverFlow: 0 StackOverFlowErrors have occured
OutOfMemory : 0 OutOfMemoryErrors have occured
Registers (from ThreadContext: 0x4B29E378 / OS context: 0x4B29E764):
eax = 00740060 ecx = 00740060 edx = 45a45ba0 ebx = 08c953b8
esp = 4b29ea30 ebp = 00000000 esi = 4b29ea60 edi = 4b29efb4
es = 00000023 cs = 0000001b ss = 00000023 ds = 00000023
fs = 0000003b gs = 00000000
eip = 0095065f eflags = 00010206
Stack:
(* marks the word pointed to by the stack pointer)
4b29ea30: 00981099* 08c953b8 008ab310 4b29eb34 09e5c308 009810ea
4b29ea48: 4b29ead8 0098ecd2 4b29ea60 4b29ea90 48bd8960 48bd8960
4b29ea60: 00000001 45aa0278 45a45ba0 00000007 00000000 08c953b8
4b29ea78: 08512180 4b29ef60 00000000 09d56368 09d563b0 4b29efb4
Code:
(* marks the word pointed to by the instruction pointer)
0095062c: 5e5f0cc4 c35bc033 01b85e5f 5b000000 ccccccc3 0424448b
00950644: a5f06ca3 ccccc300 cccccccc 04244c8b 01a8018b e0830774
0095065c: 8bc88bfe* 40788301 44408b03 af0f0a75 c0830841 f8e08317
00950674: ccccccc3 cccccccc cccccccc 0424448b 00f4888b 158b0000
Loaded modules:
(* denotes the module causing the exception)
00400000-0040ffff E:\bea\jrockit90_150_10\bin\javaw.exe
7c900000-7c9b1fff C:\WINDOWS\system32\ntdll.dll
7c800000-7c8f5fff C:\WINDOWS\system32\kernel32.dll
7e410000-7e4a0fff C:\WINDOWS\system32\USER32.dll
77f10000-77f58fff C:\WINDOWS\system32\GDI32.dll
77dd0000-77e6afff C:\WINDOWS\system32\ADVAPI32.dll
77e70000-77f02fff C:\WINDOWS\system32\RPCRT4.dll
77fe0000-77ff0fff C:\WINDOWS\system32\Secur32.dll
77c10000-77c67fff C:\WINDOWS\system32\MSVCRT.dll
76390000-763acfff C:\WINDOWS\system32\IMM32.DLL
00820000-00a9cfff *E:\bea\jrockit90_150_10\jre\bin\jrockit\jvm.dll
76b40000-76b6cfff C:\WINDOWS\system32\WINMM.dll
71ab0000-71ac6fff C:\WINDOWS\system32\WS2_32.dll
71aa0000-71aa7fff C:\WINDOWS\system32\WS2HELP.dll
7c340000-7c395fff E:\bea\jrockit90_150_10\bin\MSVCR71.dll
5dac0000-5dac7fff C:\WINDOWS\system32\rdpsnd.dll
76360000-7636ffff C:\WINDOWS\system32\WINSTA.dll
5b860000-5b8b4fff C:\WINDOWS\system32\NETAPI32.dll
76bf0000-76bfafff C:\WINDOWS\system32\PSAPI.DLL
6d700000-6d70bfff E:\bea\jrockit90_150_10\jre\bin\verify.dll
6d370000-6d38cfff E:\bea\jrockit90_150_10\jre\bin\java.dll
6d2f0000-6d2f7fff E:\bea\jrockit90_150_10\jre\bin\hpi.dll
6d720000-6d72efff E:\bea\jrockit90_150_10\jre\bin\zip.dll
6d520000-6d527fff E:\bea\jrockit90_150_10\jre\bin\management.dll
6d530000-6d542fff E:\bea\jrockit90_150_10\jre\bin\net.dll
71a50000-71a8efff C:\WINDOWS\system32\mswsock.dll
662b0000-66307fff C:\WINDOWS\system32\hnetcfg.dll
71a90000-71a97fff C:\WINDOWS\System32\wshtcpip.dll
41c00000-41c26fff C:\WINDOWS\system32\DNSAPI.dll
41c30000-41c37fff C:\WINDOWS\System32\winrnr.dll
41c40000-41c6bfff C:\WINDOWS\system32\WLDAP32.dll
41c80000-41c85fff C:\WINDOWS\system32\rasadhlp.dll
68000000-68035fff C:\WINDOWS\system32\rsaenh.dll
769c0000-76a73fff C:\WINDOWS\system32\USERENV.dll
438b0000-438b8fff E:\bea\jrockit90_150_10\jre\bin\nio.dll
41ba0000-41ba9fff E:\bea\jrockit90_150_10\jre\bin\jmapi.dll
41bb0000-41bbdfff E:\bea\weblogic92\server\native\win\32\wlfileio2.dll
43ce0000-43cf8fff C:\WINDOWS\system32\iphlpapi.dll
43d10000-43d27fff C:\WINDOWS\system32\MPRAPI.dll
77cc0000-77cf1fff C:\WINDOWS\system32\ACTIVEDS.dll
43d30000-43d54fff C:\WINDOWS\system32\adsldpc.dll
43d60000-43d70fff C:\WINDOWS\system32\ATL.DLL
43d80000-43ebcfff C:\WINDOWS\system32\ole32.dll
43ec0000-43f4afff C:\WINDOWS\system32\OLEAUT32.dll
43f50000-43f5dfff C:\WINDOWS\system32\rtutils.dll
71bf0000-71c02fff C:\WINDOWS\system32\SAMLIB.dll
43f60000-44052fff C:\WINDOWS\system32\SETUPAPI.dll
44060000-44064fff E:\bea\weblogic92\server\native\win\32\wlntio.dll
44540000-44545fff E:\bea\jrockit90_150_10\jre\bin\rmi.dll
4d010000-4d122fff E:\bea\jrockit90_150_10\jre\bin\dbghelp.dll
"[STANDBY] ExecuteThread: '21' f" id=87 idx=0xf0 tid=4208 lastJavaFrame=0x4B29EB4C
Stack 0: start=0x4B260000, end=0x4B2A0000, guards=0x4B263000 (ok), forbidden=0x4B261000
Thread Stack Trace:
at _mmGetPossibleMovedObjectSize+15()@0x0095065F
at _refIterInit+393()@0x00981099
at _refIterInit+474()@0x009810EA
at _trProcessLocksForThread+66()@0x0098ECD2
at _javalockCouldBeLock+1047()@0x008AB417
at _javalockConvertThinToFat+42()@0x008AC13A
at RJNIjrockit_vm_Locks_convertThinLockedToFatLocked@8+15()@0x00986B1F
-- Java stack --
at jrockit/vm/Locks.convertThinLockedToFatLocked(Ljava/lang/Object;)V(Native Method)
at jrockit/vm/Locks.createMonitorAndConvert(Ljava/lang/Object;Z)Ljrockit/vm/ObjectMonitor;(Unknown Source)
at java/lang/Object.wait(J)V(Native Method)
at java/lang/Object.wait(Object.java:474)
at weblogic/common/CompletionRequest.getResult(CompletionRequest.java:109)
^-- Holding lock: weblogic/common/CompletionRequest@0x09E5C2A8[thin lock]
at weblogic/store/gxa/internal/GXATransactionImpl.commitStoreIO(GXATransactionImpl.java:99)
at weblogic/store/gxa/internal/GXATransactionImpl.doOperationCallbacks(GXATransactionImpl.java:215)
at weblogic/store/gxa/internal/GXAResourceImpl.commit(GXAResourceImpl.java:1448)
at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:1333)
at weblogic/transaction/internal/XAServerResourceInfo.commit(XAServerResourceInfo.java:577)
at weblogic/transaction/internal/ServerSCInfo.startCommit(ServerSCInfo.java:514)
at weblogic/transaction/internal/ServerTransactionImpl.localCommit(ServerTransactionImpl.java:1993)
at weblogic/transaction/internal/ServerTransactionImpl.globalRetryCommit(ServerTransactionImpl.java:2658)
at weblogic/transaction/internal/ServerTransactionImpl.globalCommit(ServerTransactionImpl.java:2580)
at weblogic/transaction/internal/ServerTransactionImpl.internalCommit(ServerTransactionImpl.java:278)
at weblogic/transaction/internal/ServerTransactionImpl.commit(ServerTransactionImpl.java:227)
at weblogic/deployment/jms/WrappedTransactionalSession.delistFromTransaction(WrappedTransactionalSession.java:258)
^-- Holding lock: weblogic/deployment/jms/PooledSession_weblogic_jms_client_JMSXASession@0x09D56368[thin lock]
at weblogic/deployment/jms/WrappedMessageProducer.send(WrappedMessageProducer.java:149)
at com/obopay/jms/helper/BaseQueueHelper.sendMessage(BaseQueueHelper.java:107)
The above is the jrockit crash dump file..
I am using the JMS Wrapper Connection Poooling provided by Weblogic. When i use Jmeter and do the load testing for around 10 users, the server gets crashed.
I doubt something is going wrong with the Weblogic JMS Connection Pooling, please help me..The problem doesn't look like it has anything to do with wappers per se. The stack indicates that the JVM died when the persistent store tried to invoke a standard Java synchronize operation. JVM crashes need to be analyzed by a JVM expert, so I second the suggestion to solicit help from JVM experts and/or filing a case with customer support. In the mean-time, you can probably work-around the issue by either (A) ensuring you have a recent version of the JVM installed, or (B) temporarily switching to the Sun JVM.
Regards,
tom
Edited by: TomB on Sep 17, 2010 2:33 PM -
How to use JDBC Connection Pools in a standalone application?
Hi, there,
I have a question about how to use JDBC Connection Pools in an application. I know well about connection pool itself, but I am not quite sure how to keep the pool management object alive all the time to avoid being destroyed by garbage collection.
for example, at the website: http://www.developer.com/java/other/article.php/626291, there is a simple connection pool implementation. there are three classes:JDBCConnection, the application's gateway to the database; JDBCConnectionImpl, the real class/object to provide connection; and JDBCPool, the management class to manage connection pool composed by JDBCConnectionImpl. JDBCPool is designed by Singleton pattern to make sure only one instance. supposing there is only one client to use connection for many times, I guess it's ok because this client first needs instantiate JDBCPool and JDBCConnectionImpl and then will hold the reference to JDBCPool all the time. but how about many clients want to use this JDBCPool? supposing client1 finishes using JDBCPool and quits, then JDBCPool will be destroyed by garbage collection since there is no reference to it, also all the connections of JDBCConnectionImpl in this pool will be destroyed too. that means the next client needs recreate pool and connections! so my question is that if there is a way to keep pool management instance alive all the time to provide connection to any client at any time. I guess maybe I can set the pool management class as daemon thread to solve this problem, but I am not quite sure. besides, there is some other problems about daemon thread, for example, how to make sure there is only one daemon instance? how to quit it gracefully? because once the whole application quits, the daemon thread also quits by force. in that case, all the connections in the pool won't get chance to close.
I know there is another solution by JNDI if we develop servlet application. Tomcat provides an easy way to setup JNDI database pooling source that is available to JSP and Servlet. but how about a standalone application? I mean there is no JNDI service provider. it seems a good solution to combine Commons DBCP with JNID or Apache's Naming (http://jakarta.apache.org/commons/dbcp/index.html). but still, I don't know how to keep pool management instance alive all the time. once we create a JNDI enviroment or naming, if it will save in the memory automatically all the time? or we must implement it as a daemon thread?
any hint will be great apprieciated!
SamTo my knoledge the pool management instance stays alive as long as the pool is alive. What you have to figure out is how to keep a reference to it if you need to later access it.
-
Multiple DataSource using single Connection Pool
Previously using Weblogic 6.1 we had a configuration where multiple Datasources used a single connection pool. Now that we are in the process of upgrading to Weblogic 9.1, we are attempting to recreate the same configuration.
The Weblogic 9.1 upgrade wizard appears to have created the relevent datasource & connection pool configuration files but when attempting to use these I am receiving the following errors:
####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901758> <BEA-001508> <Destroying Connection Pool TestDSLegacyPool.>
####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901758> <BEA-001155> <The following exception has occurred:
weblogic.common.ResourceException: Unknown Data Source TestDSLegacyPool
at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:419)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:251)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
>
####<30-Jan-2007 11:18:21 o'clock GMT> <Error> <Deployer> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901773> <BEA-149205> <Failed to initialize the application 'TestDSLegacyPool' due to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:257)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
weblogic.common.ResourceException: weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:239)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
at weblogic.jdbc.common.internal.DataSourceManager.verifyPoolDeployment(DataSourceManager.java:607)
at weblogic.jdbc.common.internal.DataSourceManager.checkDSConfig(DataSourceManager.java:594)
at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:236)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
++++++++++++++++++++++++++++++++++++++++++++++++++
The configuration files content is :
TestDSLegacyPool-9290-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
<name>TestDSLegacyPool</name>
<internal-properties>
<property>
<name>LegacyType</name>
<value>3</value>
</property>
<property>
<name>LegacyPoolName</name>
<value>Beach Brochure Browse Pool</value>
</property>
</internal-properties>
<jdbc-data-source-params>
<jndi-name>beachBrochureBrowseDS</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
CP-Beach_Brochure_Browse_Pool-1043-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
<name>Beach Brochure Browse Pool</name>
<internal-properties>
<property>
<name>LegacyType</name>
<value>1</value>
</property>
</internal-properties>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@aserver:1522:adb</url>
<driver-name>oracle.jdbc.driver.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>gf_user</value>
</property>
<property>
<name>dll</name>
<value>ocijdbc9</value>
</property>
<property>
<name>protocol</name>
<value>thin</value>
</property>
</properties>
<password-encrypted>{3DES}4UT5899x/Z4=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>1</initial-capacity>
<max-capacity>3</max-capacity>
</jdbc-connection-pool-params>
</jdbc-data-source>
Would anyone be able to point me in the right direction with this? Configuring the Datasources through the Admin Console creates a single Datasource configuration file that contains its relevent connection pool configuration, but the Weblogic Upgrade wizard creates a Datasource config file and a separate connection pool config file. What would I need to do to use the config files generated by the Weblogic Upgrade wizard?
Any help appreciated
Thanks
AndrewAndrew Harrison wrote:
Previously using Weblogic 6.1 we had a configuration where multiple Datasources used a single
connection pool. Now that we are in the process of upgrading to Weblogic 9.1, we are attempting
to recreate the same configuration.Hi, sorry to say, that is no longer possible:
http://e-docs.bea.com/wls/docs90/jdbc_admin/jdbc_intro.html#1044158
Simplified JDBC Resource Configuration
In WebLogic Server 9.0, the number of JDBC resource types was reduced to simplify JDBC configuration and to reduce the likelihood
of configuration errors. Instead of configuring a JDBC connection pool and then configuring a data source or tx data source to
point to the connection pool and bind to the JNDI tree, you configure a data source that encompasses a connection pool.
Note: Because of the new configuration design, you can no longer have multiple data sources that point to a single connection
pool. Instead, you can create additional data sources, each with its own pool of connections, or you can bind a single data source
to the JNDI tree with multiple names. See Binding a Data Source to the JNDI Tree with Multiple Names for more information.
Joe
>
The Weblogic 9.1 upgrade wizard appears to have created the relevent datasource & connection pool
configuration files but when attempting to use these I am receiving the following errors:
####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE]
ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
<1170155901758> <BEA-001508> <Destroying Connection Pool TestDSLegacyPool.>
####<30-Jan-2007 11:18:21 o'clock GMT> <Info> <JDBC> <tu0991ws9004> <AdminServer> <[ACTIVE]
ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <>
<1170155901758> <BEA-001155> <The following exception has occurred:
weblogic.common.ResourceException: Unknown Data Source TestDSLegacyPool
at weblogic.jdbc.common.internal.ConnectionPoolManager.shutdownAndDestroyPool(ConnectionPoolManager.java:419)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:251)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
####<30-Jan-2007 11:18:21 o'clock GMT> <Error> <Deployer> <tu0991ws9004> <AdminServer> <[ACTIVE] ExecuteThread: '0' for queue: 'weblogic.kernel.Default (self-tuning)'> <<WLS Kernel>> <> <> <1170155901773> <BEA-149205> <Failed to initialize the application 'TestDSLegacyPool' due to error weblogic.application.ModuleException: .
weblogic.application.ModuleException:
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:257)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
weblogic.common.ResourceException: weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:239)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
weblogic.common.ResourceException: DataSource(TestDSLegacyPool) can't be created with non-existent Pool (connection or multi) (Beach Brochure Browse Pool)
at weblogic.jdbc.common.internal.DataSourceManager.verifyPoolDeployment(DataSourceManager.java:607)
at weblogic.jdbc.common.internal.DataSourceManager.checkDSConfig(DataSourceManager.java:594)
at weblogic.jdbc.common.internal.DataSourceManager.checkDataSource(DataSourceManager.java:236)
at weblogic.jdbc.module.JDBCModule.prepare(JDBCModule.java:247)
at weblogic.application.internal.flow.ModuleListenerInvoker.prepare(ModuleListenerInvoker.java:90)
at weblogic.application.internal.flow.DeploymentCallbackFlow$1.next(DeploymentCallbackFlow.java:318)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:53)
at weblogic.application.internal.flow.DeploymentCallbackFlow.prepare(DeploymentCallbackFlow.java:43)
at weblogic.application.internal.BaseDeployment$1.next(BaseDeployment.java:620)
at weblogic.application.utils.StateMachineDriver.nextState(StateMachineDriver.java:26)
at weblogic.application.internal.BaseDeployment.prepare(BaseDeployment.java:231)
at weblogic.application.internal.DeploymentStateChecker.prepare(DeploymentStateChecker.java:147)
at weblogic.deploy.internal.targetserver.AppContainerInvoker.prepare(AppContainerInvoker.java:61)
at weblogic.deploy.internal.targetserver.SystemResourceDeployment.prepare(SystemResourceDeployment.java:65)
at weblogic.management.deploy.internal.DeploymentAdapter$1.prepare(DeploymentAdapter.java:37)
at weblogic.management.deploy.internal.AppTransition$1.transitionApp(AppTransition.java:21)
at weblogic.management.deploy.internal.ConfiguredDeployments.transitionApps(ConfiguredDeployments.java:232)
at weblogic.management.deploy.internal.ConfiguredDeployments.prepare(ConfiguredDeployments.java:164)
at weblogic.management.deploy.internal.ConfiguredDeployments.deploy(ConfiguredDeployments.java:121)
at weblogic.management.deploy.internal.DeploymentServerService.resume(DeploymentServerService.java:173)
at weblogic.management.deploy.internal.DeploymentServerService.start(DeploymentServerService.java:89)
at weblogic.t3.srvr.SubsystemRequest.run(SubsystemRequest.java:64)
at weblogic.work.ServerWorkManagerImpl$WorkAdapterImpl.run(ServerWorkManagerImpl.java:518)
at weblogic.work.ExecuteThread.execute(ExecuteThread.java:207)
at weblogic.work.ExecuteThread.run(ExecuteThread.java:179)
++++++++++++++++++++++++++++++++++++++++++++++++++
The configuration files content is :
TestDSLegacyPool-9290-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
<name>TestDSLegacyPool</name>
<internal-properties>
<property>
<name>LegacyType</name>
<value>3</value>
</property>
<property>
<name>LegacyPoolName</name>
<value>Beach Brochure Browse Pool</value>
</property>
</internal-properties>
<jdbc-data-source-params>
<jndi-name>beachBrochureBrowseDS</jndi-name>
<global-transactions-protocol>None</global-transactions-protocol>
</jdbc-data-source-params>
</jdbc-data-source>
CP-Beach_Brochure_Browse_Pool-1043-jdbc.xml
<?xml version='1.0' encoding='UTF-8'?>
<jdbc-data-source xmlns="http://www.bea.com/ns/weblogic/90" xmlns:sec="http://www.bea.com/ns/weblogic/90/security" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:wls="http://www.bea.com/ns/weblogic/90/security/wls" xsi:schemaLocation="http://www.bea.com/ns/weblogic/910/domain.xsd">
<name>Beach Brochure Browse Pool</name>
<internal-properties>
<property>
<name>LegacyType</name>
<value>1</value>
</property>
</internal-properties>
<jdbc-driver-params>
<url>jdbc:oracle:thin:@aserver:1522:adb</url>
<driver-name>oracle.jdbc.driver.OracleDriver</driver-name>
<properties>
<property>
<name>user</name>
<value>gf_user</value>
</property>
<property>
<name>dll</name>
<value>ocijdbc9</value>
</property>
<property>
<name>protocol</name>
<value>thin</value>
</property>
</properties>
<password-encrypted>{3DES}4UT5899x/Z4=</password-encrypted>
</jdbc-driver-params>
<jdbc-connection-pool-params>
<initial-capacity>1</initial-capacity>
<max-capacity>3</max-capacity>
</jdbc-connection-pool-params>
</jdbc-data-source>
Would anyone be able to point me in the right direction with this? Configuring the Datasources
through the Admin Console creates a single Datasource configuration file that contains its relevent
connection pool configuration, but the Weblogic Upgrade wizard creates a Datasource config file and
a separate connection pool config file. What would I need to do to use the config files generated
by the Weblogic Upgrade wizard?
Any help appreciated
Thanks
Andrew -
Websphere Application Server 5.1 Hangs when using Oracle Connection Pool
I have a j2ee application that runs on WAS 5.1 ( IBM JDK 1.4 ) and Oracle 10g 10.2.0 . My customer is doing load testing with 25 virtual users and a connection pool with a max size of 10. When the test starts all 25 users attempt to get a connection, and the first 10 get a connection. At this point the application server hangs with the connection pool in allocation. This is seen in Tivoli. Each thread only needs one connection to process it's request.
I have my own home grown connection pool which when used under this load does not experience and issue. Monitoring from Oracle's admin console I see a max of 10 sessions. The home grows connection pool does not use a WAS DataSource.
I have configured my application to use DB2 with a WAS DataSource and the application server does not hang. Monitoring using Tivoli shows the connection pool going into allocation, but it recovers as is expected.
Are there any known issues with the Oracle JDBC drivers when used with WAS 5.1 DataSources?
Any direction would be helpful, as I currently thing there is an issue with Oracle's Connection Pool and the IBM JVM.
Thanks,
Jjust an attention call: OracleDatasource connection pool does not accept parameters such as removeAbandoned, minEvictableIdleTimeMillis, timeBetweenEvictionRunsMillis, etc, these are specific for the tomcat dbcp implementation (http://tomcat.apache.org/tomcat-6.0-doc/jndi-resources-howto.html#JDBC_Data_Sources).
For the accepted ones read this http://download.oracle.com/docs/cd/B28359_01/java.111/b31224/concache.htm
Edited by: user7428636 on 24/Jan/2011 6:22 -
How to config the oracle database connection pool in IAS
Hi,
Does anyone who hows to config the oracle database connection pool in IAS?
Thanks so much!!!
[email protected]
JackyJacky,
You need do the following for oracle type4 driver:
1) register the driver:
$IAS_HOME/bin/jdbcsetup
Driver Identifier: Oracle_Type4_816 (whatever name you like)
Driver Classname: oracle.jdbc.driver.OracleDriver
Driver Classpath: .../classes12.zip (install this this zip file somewhere
and add this zip into the Classpath later).
2) DataSource Setup:
start iAS Administration Tool (iASAT)
Choose Database, unfold iAS1 (your app server instance),
choose External JDBC Datasource -> add: DataSource Registration
JNDI Name: yourPoolName
Driver Type: Oracle_Type4_816 (select what you just register)
DataSource Url: jdbc:oracle:thin:@hostName:portName:dbName
Username: your_user_name
Password: your_passwd
(Datasource Pool: using defaults for now): you can also customrize the
parameters for the pool.
3. Add classes12.zip into CLASSPATH.
In your application, you can use JNDI lookup to get the DataSource from
which you get the connection from the pool.
Hope this helps.
Good luck.
Xuran
"Jacky Yan" <[email protected]> wrote in message
news:9m0tmp$[email protected]..
Hi,
Does anyone who hows to config the oracle database connection pool in IAS?
Thanks so much!!!
[email protected]
Jacky -
Problem in retriving varray when using weblogic connection pool
Hi,
I had similar problem when we I am using the weblogic connection pool. I had similar setup i.e weblogic 5.1 servicepack9 and oracle 8.1.7.
I cofigarud the weblogic connection pool using Oracle thin driver.
But if I am using with oracle thin driver directly I am able to retrive.
If any one know how to retrive varray from procedure using weblogic connection pool please send me it.
Thanx.
Bye,
Satyahttp://docs.oracle.com/javase/6/docs/api/java/sql/Connection.html#setAutoCommit(boolean)
-
What is the use of Streams Pool in oracle Architechture?
Dear All,
I am new to oracle, Could you please explain me what is the use of streams pool in oracle Architechture?
My Understanding :- ( As far as i know it is an optional memory buffer, used in distributed environment like multiple servers hosting a database, like RAC or GRID ) Please correct me if i am wrong.
Is the Streams pool a new feature in 10g or is it since earlier versions?
What is the importance of its in performance tunning?
Thank you,
yousufThe Oracle documentation is available at tahiti.oracle.com
http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/initparams209.htm
Edited by: Robert Geier on Jan 29, 2010 3:46 PM -
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 -
How to use my connection pool in multiple servlets?
I now have a functioning connection pool using these lines in a servlet:
private Connection getConnection(String lookup) throws NamingException, SQLException {
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup(lookup);
Connection ocon = ds.getConnection();
context.close();
return ocon;
} // private Connection getConnection(String lookup) throws NamingException, SQLException {
========================
If I want to create additional servlets in the same web app which query the same database,
do I need to repeat this block of code in every servlet, or can I just put it in one servlet
and have other servlets access it in some way to get a connection? Should I change the code
above from a "private" Connection to a "public" Connection?
An example servlet is shown below. To put my question another way: If I want to
create a second servlet with a different set of queries, would I just make a copy of the first
servlet and then change only the queries, or is there a more efficient way to have multiple
servlets get connections from the pool?
Any suggestions are greatly appreciated.
Thank you.
Logan
************************************servlet example**********************************
package CraigsClasses;
import javax.servlet.*;
import javax.servlet.jsp.*;
import java.net.*;
import java.util.*;
import java.io.*;
import javax.servlet.http.*;
import java.sql.*;
import java.util.Date;
import java.text.*;
import javax.naming.*;
import javax.sql.DataSource;
public class CraigsMain extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
private Connection getConnection(String lookup) throws NamingException, SQLException {
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup(lookup);
Connection ocon = ds.getConnection();
context.close();
return ocon;
} // private Connection getConnection(String lookup) throws NamingException, SQLException {
// Process the http Get request
public void doGet(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
try {
response.setContentType("text/html");
PrintWriter out = response.getWriter();
String sql = "select formtitle from checkboxforms where cbformid = 157";
// error occurs at this line
Connection ocon = getConnection("java:comp/env/jdbc/CraigsList");
PreparedStatement pStmt = ocon.prepareStatement(sql);
ResultSet rs1 = pStmt.executeQuery();
rs1.next();
out.println("<br>" + rs1.getString(1));
rs1.close();
pStmt.close();
ocon.close();
} catch(SQLException sqle) {
System.err.println("sql exception error: " + sqle);
} catch(NamingException ne) {
System.err.println("naming exception error: " + ne);
public void doPost(HttpServletRequest request, HttpServletResponse response)
throws ServletException, IOException {
doGet(request, response);
=======================================================================sjasja, Thank you for the reply. What you are suggesting is exactly what I have been looking for. But I'm pretty weak on how to make this separate con pool servlet work. My first attempt is shown below. It doesn't compile this line, which is obviously wrong:
public static Connection getConnection(String lookup) throws NamingException, SQLException {
Could you please help me with this servlet code? Thanks.
package CraigsClasses;
import javax.servlet.*;
import javax.servlet.jsp.*;
import java.net.*;
import java.io.*;
import javax.servlet.http.*;
import java.sql.*;
import javax.naming.*;
import javax.sql.DataSource;
public class ConPoolInit extends HttpServlet {
public void init(ServletConfig config) throws ServletException {
super.init(config);
try {
public static Connection getConnection(String lookup) throws NamingException, SQLException {
Context context = new InitialContext();
DataSource ds = (DataSource)context.lookup(lookup);
Connection ocon = ds.getConnection();
context.close();
return ocon;
} // private Connection getConnection(String lookup) throws NamingException, SQLException {
} catch(SQLException sqle) {
System.err.println("sql exception error: " + sqle);
} catch(NamingException ne) {
System.err.println("naming exception error: " + ne);
======================================= -
PROBLEM DESCRIPTION :
When I try to read a clob from Oracle, I receive "ORA-03120: two-task
conversion routine: integer overflow" Error.
This error occurs only for CLOB Type and only if I try to connect to
Oracle using WebLogic JDriver/Oracle POOL.
IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
connection to ORacle with out any problem.
Below Please find the JAVA CODE for Both Working and NON Working .
Created a Connection Pool as:
Name: MyJDBCConnectionPool
URL : jdbc:weblogic:oracle
DIRVER:weblogic.jdbc.oci.Driver
NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
Driver myDriver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection mconn =
myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
Driver myDriver =
(Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection mconn =
myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
ERROR MESSAGE:
ORA-03120: two-task conversion routine: integer overflow
I appreciate your help on this problem.PROBLEM DESCRIPTION :
When I try to read a clob from Oracle, I receive "ORA-03120: two-task
conversion routine: integer overflow" Error.
This error occurs only for CLOB Type and only if I try to connect to
Oracle using WebLogic JDriver/Oracle POOL.
IMPORTANT NOTE: I can read CLOB or any other data using direct JDBC
connection to ORacle with out any problem.
Below Please find the JAVA CODE for Both Working and NON Working .
Created a Connection Pool as:
Name: MyJDBCConnectionPool
URL : jdbc:weblogic:oracle
DIRVER:weblogic.jdbc.oci.Driver
NON WORKING JAVA CODE (USES WEBLOGIC JDBC CONNECTION POOL TO ORACLE):
Driver myDriver =
(Driver)Class.forName("weblogic.jdbc.pool.Driver").newInstance();
Connection mconn =
myDriver.connect("jdbc:weblogic:pool:MyJDBCConnectionPool",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
WORKING JAVA CODE (USES DIRECT THIN JDBC CONNECTION TO ORACLE):
Driver myDriver =
(Driver)Class.forName("oracle.jdbc.driver.OracleDriver").newInstance();
Connection mconn =
myDriver.connect("jdbc:oracle:thin:@server:1521:DB",null);
mconn.setAutoCommit (false);
CallableStatement cs = mconn.prepareCall("{call
P_XMLTEST2(?)}"); //This returns a CLOB
cs.registerOutParameter(1,java.sql.Types.CLOB);
cs.execute();
Clob clob = null;
clob = cs.getClob(1);
String data =new String();
data = clob.getSubString(1, (int)clob.length());
System.out.println(data); //print the data
data = null;
clob=null;
cs.close();
ERROR MESSAGE:
ORA-03120: two-task conversion routine: integer overflow
I appreciate your help on this problem. -
How do I find out what is using a connection pool
This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
This caused all the threads to be consumed and the managed server hung.
Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
Cheers in advance for any help.Dave Snaith wrote:
This morning weblogic 8.1.5 complained it couldn't expand a connection pool because it had reached is max concurrent connects limit.
The issue I have is that I don't actually know what is using the connection pool. It should be defunct and redundent but obviously not.
This caused all the threads to be consumed and the managed server hung.
Does anyone know wether it's possible to interigate the pool to find out what it's doing ? I can't check the db as it's managed by another company and I have a v limited read only account.... I can't even select from v&session.
Cheers in advance for any help.If the pool is not supposed to be used, disable it via the console,
and whatever applications are still trying to use it will get
quick exceptions.
Joe -
hi all,
i have some confusion if someone have good suggetions for me.
i make an connection pool class, and in that package and subpackages i have different class files which do interact with DB thus in whole class files i want to use that same connection pool.
would any one tell me which will be best method to do it.
or i have to pass the connection pool to every class object.
ThanksInitialContext initialContext = new InitialContext();
DataSource dataSource = (DataSource)initialContext.lookup("connPool");
Connection connection = dataSource.getConnection();You need to do a JNDI lookup for the DataSource and getConnection() from that.
***Annie*** -
Problem to call a procedure while using External connection pooling in TopL
HI all,
I have implemented external connection pooling in TopLink with JBoss 4.0.3SP1 and it is working fine. But after the connection pooling I am getting error while executing stored procedure with TopLink on Sybase. This is the error I am getting......
Stored procedure 'P_InsReleaseToManufact' may be run only in unchained transaction mode. The 'SET CHAINED OFF' command will cause the current session to use unchained transaction mode.
I got one solution to this problem as to set a tag in sybase-ds.xml file(which is used in JBoss to enable connection pooling) ..............
<connection-property name="SQLINITSTRING">set chained off</connection-property>
but still it is not working.
Can some one please tell me about the solution.Try
session.getLogin().handleTransactionsManuallyForSybaseJConnect(); -
Error using mySQL connection Pool
I see the following error when my application uses the connection pool - can anyone explain this ?
INFO: CORE3282: stdout: =======================>ERROR :com.sun.enterprise.repository.J2EEResourceException
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonSharedResourcePool.java:416)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:625)
WARNING: CORE3283: stderr: at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:520)
INFO: CORE3282: stdout: java.lang.NoSuchMethodException: setdataSourceNameHi,
You have used dataSourceName property while creating a connection pool.This property is not required to be set while creating a connection pool for MySql
Use the following properties:
<property name="serverName" value="<name of server>"
<property name="port" value="<port number>"
<property name="DatabaseName" value="<your db name>"
<property name="User" value="<user name>"
<property name="Password" value="<passwd>"
Get back in case of any issues
Maybe you are looking for
-
Hi All, In the following report in CALC5 column the SUM is not working. It is working for the other columns but not this one. I am not doing anything different to this column(CALC5) other than the same thing I am doing for other calculated columns. A
-
Plese can you contact me ad tell me what is the problem ? Thank you in anticipation ! Looking forward to your response!
-
Check material movement types that are activated for transfer to GTS in 4.7 ecc.
Hi We are using 4.7 Version of R3 and GTS version 10. Please let me know how to check the list of movement types that are activated for transfer to GTS. Thanks & Regards Karthi
-
How do I open the 3D rendering settings panel in PS CS6?
Hi all; Pls have a look here: http://helpx.adobe.com/nl/photoshop/using/3d-panel-settings-photoshop-extended.html Its the lower panel I mean, where the tools are found that in CS5 were in the toolbox. Thanks Maarten
-
How to view skimming or trimming in main viewer?
Hi, I'm really sorry- this must just be really obvious, but I just can't figure it out- Can anybody tell me how to simply view my skimming and trimming in the main viewer? Right now all I see is the tiny little insufficient representation of it in th