Cache_scheme and OracleConnectionPoolDataSource

Hi guys.
I am implementing Oracle's OracleConnectionPoolDataSource to provide Connection Pooling. So far, so good. However, I also wanted to introduce the use of cache_scheme for optimising once we reach the max connections limit. Do I need to use OracleConnectionCacheImpl instead of OracleConnectionPoolDataSource in order to utilise cache_scheme ? Or does OracleConnectionPoolDataSource make use of this within it's own implementation ?
Thanks.
Steve.

Hi Dmitry,
     The behavior of the near cache depends on the invalidation startegy used. You can choose invalidation strategy by adding <invalidation-strategy> element to your <near-scheme> definition, and choosing one of the following four options:
     none -- typically used with the size and/or time limited front cache. The cache will not use events to evict items from the front cache.
     present -- a separate cache listener will be registered for each item in the front cache. That way front cache only receives the events for the items it cares about.
     all -- a single cache listener is registered that notifies front cache of any changes to the back cache. That means that it receives the events for all cache items, including those it doesn't care about (i.e. does not contain). On the other hand it helps keep the number of cache listeners low.
     auto -- currently same as all and default value if <invalidation-strategy> element is not specified.
     What you have to keep in mind when working with the near cache is that the front cache is only updated on gets, not on puts, unless invalidation strategy is set to none. If that wasn't the case, bulk load through the near cache would be problematic from the performance standpoint because of the large number of listener registrations (present) or the large number of events received (all).
     So, if you use time/size based expiration you can set invalidation strategy to none and items will be cached on the client side (front cache) on inserts. Otherwise, you should simply keep this difference in behavior in mind when working with the near cache.
     Finally, you should also be aware that queries against the near cache are simply passed through to the back cache and the results of the queries are not cached on the client side -- only subsequent gets will cache individual items.
     HTH,
     Aleks
     Message was edited by: aseovic

Similar Messages

  • OracleConnectionCacheImpl vs OracleConnectionPoolDataSource

    I'm a little confused as to the division of labor between these two classes... What does the cache give me that the regular ConnectionPoolDataSource doesn't?

    HI,
    The very basic difference between OracleConnectionCacheImpl and OracleConnectionPoolDataSource is that
    OracleConnectionCacheImpl cann connect only to one database and schema while using OracleConnectionPoolDataSource you get the flexibility of connection to different schemas.
    Since ConnCache can connect to only one schema, it stores connection metadata,state....and lot of stuff so that its very efficient than OracleConnectionPoolDataSource.
    But if you need the flexibility of connecting to different schemas, we prefer OracleConnectionPoolDataSource.
    In OracleConnectionCacheImpl we have different conn cache schemes, Dynamic, Fixed wait and Fixed with no wait.
    Going deeper, OracleConnectionPoolDataSource is Oracle's implementation of javax.sql.ConnectionPoolDataSource interface, while
    OracleConnectionCacheImpl is a sample implementation of interface OracleConnectionCache. Anybody can implement there own version of OracleConnectionCache and handle the ConnectionEvents generated.
    Hope this helps
    Elango.

  • Setting roles on connection pools

    Hi,
    using OracleConnectionCacheImpl and OracleConnectionPoolDataSource,
    how can I set a role on the pooled connections since the creation of the physical
    connection is out of my hands ? Ideally, I would like to set the role only once
    so that when I call getConnection() to get the logical connection I do not have
    to set it again and again ...
    We are using exclusively stored procedures which one can execute according to its role.
    Typically, my client has a role and uses a well known ConnectionCache which should
    set the role accordingly.
    Is the only solution to set the role on each request ?
    I hope not.
    Is anybody using roles in their applications ?
    Cheers
    Arnaud

    Hi,
    using OracleConnectionCacheImpl and OracleConnectionPoolDataSource,
    how can I set a role on the pooled connections since the creation of the physical
    connection is out of my hands ? Ideally, I would like to set the role only once
    so that when I call getConnection() to get the logical connection I do not have
    to set it again and again ...
    We are using exclusively stored procedures which one can execute according to its role.
    Typically, my client has a role and uses a well known ConnectionCache which should
    set the role accordingly.
    Is the only solution to set the role on each request ?
    I hope not.
    Is anybody using roles in their applications ?
    Cheers
    Arnaud

  • OracleConnectionPoolDataSource and JNDI

    I am attempting to use the OracleConnectionPoolDataSource via JNDI.
    I have defined two <data-source> items in the data-sources.xml file; one is for a non-pooled javax.sql.DataSource object, the other is for a pooled oracle.jdbc.pool.OracleConnectionPoolDataSource.
    data-sources.xml:
    <!-- Standard JDBC+JNDI -->
    <data-source
    class="javax.sql.DataSource"
    name="jdbc/myDS"
    location="jdbc/myDS"
    url="jdbc:oracle:thin:@nn.nnn.nnn.nnn:1521:MYSID"
    username="xxx"
    password="yyy"
    />
    <!-- Oracle Pool -->
    <data-source
    class="oracle.jdbc.pool.OracleConnectionPoolDataSource"
    name="jdbc/pool/myDS"
    location="jdbc/pool/myDS"
    url=" jdbc:oracle:thin:@nn.nnn.nnn.nnn:1521:MYSID "
    username="xxx"
    password="yyy"
    />
    I can get a non-pooled DataSource, however, when I attempt to obtain a pooled DataSource, OC4J (via JDeveloper 10g) throws an exception:
    Error instantiating web-app JNDI-context: Unknown resource type: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Why can't OC4J recognize this object?

    ok man you shell set teh class12.jar in you server class path , try it

  • How do I use toplink with Spring 2.5 and oc4j 10.1.2?

    Our existing java server environment is limited to Oc4j 10.1.2 due to being tied to Oracle Forms.
    We've added a java 6 jdk to the machine and linked it to a specific container to examine some newer java features since this version of the application server only comes with java 1.4.2.
    Does anyone have some configuration steps for getting toplink essentials and spring to work with oc4j 10.1.2? Even with oc4j 10.1.3 in jdev 10.1.3.4 I'm having problems trying to figure out what needs placed in the persistence.xml file verses what needs placed in the spring-beans.xml file.
    I'm trying to either use the J2SE option of keeping the connection information in the persistence.xml file (which doesn't work) - it tries to connect to //localhost:1521/orcl. If I try to define a datasource within Spring's xml file, I'm not sure how to tie that into the persistence.xml file. Could I use the oc4j 10.1.2 container provided datasource?
    It seems like I'm at a loss as to how to get this working. If you'd like me to post some files, I can do that later on today when I get back to work.
    The configuration that I'm trying to do is based on a modified workspace from an ibm developerworks article with websphere, mixing in the ideas from a JPA with Spring 2.0 article from Mike Keith and Rod Johnson. (That article goes pretty far in the configuration information but never provided an example to download...)
    Any help appreciated.
    Eric (hbg, pa)

    I'm still at a loss with this. Rather than worry about the older version, for now, I just want to see JPA in action. So, I've decided on just running the Spring 2.5.6 petclinic example out of the samples folder. When I try to do this, after only tweaking the web.xml to use the applicationContext-jpa.xml file, the application does not initialize properly. Here's the stack trace I get:
    Target URL -- http://192.168.0.2:8988/petclinic/index.jsp
    09/05/11 23:26:05 Oracle Containers for J2EE 10g (10.1.3.4.0)  initialized
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\connector.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/connector.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\jta.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/jta.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\persistence.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/j2ee/home/lib/persistence.jar (from <code-source> (ignore manifest Class-Path) in META-INF/boot.xml in C:\jdev10134\j2ee\home\oc4j.jar). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    WARNING: Code-source C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib\toplink-essentials.jar (from WEB-INF/lib/ directory in C:\javalib\spring-2.5.6\samples\petclinic\war\WEB-INF\lib) has the same filename but is not identical to /C:/jdev10134/toplink/jlib/toplink-essentials.jar (from <code-source> in /C:/jdev10134/jdev/system/oracle.j2ee.10.1.3.42.70/embedded-oc4j/config/server.xml). If it contains different versions of the same classes, it will be masked as the latter is already visible in the search path of loader current-workspace-app.web.petclinic:0.0.0.
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    09/05/11 23:26:24 log4j: Reading configuration from URL file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/log4j.properties
    09/05/11 23:26:24 log4j: Parsing for [root] with value=[INFO, stdout].
    09/05/11 23:26:24 log4j: Level token is [INFO].
    09/05/11 23:26:24 log4j: Category root set to INFO
    09/05/11 23:26:24 log4j: Parsing appender named "stdout".
    09/05/11 23:26:24 log4j: Parsing layout options for "stdout".
    09/05/11 23:26:24 log4j: Setting property [conversionPattern] to [%d %p [%c] - <%m>%n].
    09/05/11 23:26:24 log4j: End of parsing for "stdout".
    09/05/11 23:26:24 log4j: Parsed "stdout" options.
    09/05/11 23:26:24 log4j: Parsing for [org.springframework.samples.petclinic.aspects] with value=[DEBUG].
    09/05/11 23:26:24 log4j: Level token is [DEBUG].
    09/05/11 23:26:24 log4j: Category org.springframework.samples.petclinic.aspects set to DEBUG
    09/05/11 23:26:24 log4j: Handling log4j.additivity.org.springframework.samples.petclinic.aspects=[null]
    09/05/11 23:26:24 log4j: Finished configuring.
    2009-05-11 23:26:24,593 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization started>
    2009-05-11 23:26:24,687 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@eeb406: display name [Root WebApplicationContext]; startup date [Mon May 11 23:26:24 EDT 2009]; root of context hierarchy>
    2009-05-11 23:26:24,828 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/applicationContext-jpa.xml]>
    2009-05-11 23:26:25,281 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@eeb406]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:25,734 INFO [org.springframework.beans.factory.config.PropertyPlaceholderConfigurer] - <Loading properties file from class path resource [jdbc.properties]>
    2009-05-11 23:26:25,796 INFO [org.springframework.context.weaving.DefaultContextLoadTimeWeaver] - <Determined server-specific load-time weaver: org.springframework.instrument.classloading.oc4j.OC4JLoadTimeWeaver>
    2009-05-11 23:26:28,296 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'org.springframework.orm.jpa.vendor.TopLinkJpaVendorAdapter#c25ae3' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,359 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'dataSource' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,437 INFO [org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean] - <Building JPA container EntityManagerFactory for persistence unit 'PetClinic'>
    2009-05-11 23:26:28,468 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean 'entityManagerFactory' is not eligible for getting processed by all BeanPostProcessors (for example: not eligible for auto-proxying)>
    2009-05-11 23:26:28,562 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b: defining beans [org.springframework.context.weaving.AspectJWeavingEnabler#0,org.springframework.context.config.internalBeanConfigurerAspect,loadTimeWeaver,org.springframework.beans.factory.config.PropertyPlaceholderConfigurer#0,dataSource,entityManagerFactory,transactionManager,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.transaction.config.internalTransactionAspect,org.springframework.samples.petclinic.aspects.UsageLogAspect#0,org.springframework.dao.annotation.PersistenceExceptionTranslationPostProcessor#0,clinic]; root of factory hierarchy>
    2009-05-11 23:26:29,671 INFO [org.springframework.web.context.ContextLoader] - <Root WebApplicationContext: initialization completed in 5078 ms>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization started>
    2009-05-11 23:26:29,734 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Refreshing org.springframework.web.context.support.XmlWebApplicationContext@c00e55: display name [WebApplicationContext for namespace 'petclinic-servlet']; startup date [Mon May 11 23:26:29 EDT 2009]; parent: org.springframework.web.context.support.XmlWebApplicationContext@eeb406>
    2009-05-11 23:26:29,734 INFO [org.springframework.beans.factory.xml.XmlBeanDefinitionReader] - <Loading XML bean definitions from ServletContext resource [WEB-INF/petclinic-servlet.xml]>
    2009-05-11 23:26:30,171 INFO [org.springframework.web.context.support.XmlWebApplicationContext] - <Bean factory for application context [org.springframework.web.context.support.XmlWebApplicationContext@c00e55]: org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b>
    2009-05-11 23:26:30,375 INFO [org.springframework.beans.factory.support.DefaultListableBeanFactory] - <Pre-instantiating singletons in org.springframework.beans.factory.support.DefaultListableBeanFactory@1c5543b: defining beans [addOwnerForm,addPetForm,addVisitForm,clinicController,editOwnerForm,editPetForm,findOwnersForm,org.springframework.context.annotation.internalPersistenceAnnotationProcessor,org.springframework.context.annotation.internalCommonAnnotationProcessor,org.springframework.context.annotation.internalAutowiredAnnotationProcessor,org.springframework.context.annotation.internalRequiredAnnotationProcessor,org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter#0,org.springframework.web.servlet.handler.SimpleMappingExceptionResolver#0,org.springframework.web.servlet.view.InternalResourceViewResolver#0,messageSource]; parent: org.springframework.beans.factory.support.DefaultListableBeanFactory@1da817b>
    2009-05-11 23:26:31,828 INFO [org.springframework.web.servlet.DispatcherServlet] - <FrameworkServlet 'petclinic': initialization completed in 2094 ms>
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.transaction
    WARNING: PersistenceUnitInfo PetClinic has transactionType RESOURCE_LOCAL and therefore jtaDataSource will be ignored
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: TopLink, version: Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    INFO: Server: unknown
    May 11, 2009 11:26:58 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic.connection
    CONFIG: connecting(DatabaseLogin(
            platform=>EssentialsHSQLPlatformWithNativeSequence
            user name=> ""
            connector=>JNDIConnector datasource name=>null
    May 11, 2009 11:27:03 PM oracle.toplink.essentials.session.file:/C:/javalib/spring-2.5.6/samples/petclinic/war/WEB-INF/classes/-PetClinic
    SEVERE:
    Local Exception Stack:
    Exception [TOPLINK-4002] (Oracle TopLink Essentials - 2.0.1 (Build b09d-fcs (12/06/2007))): oracle.toplink.essentials.exceptions.DatabaseException
    Internal Exception: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
    Error Code: 17002
            at oracle.toplink.essentials.exceptions.DatabaseException.sqlException(DatabaseException.java:305)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:150)
            at oracle.toplink.essentials.sessions.DatasourceLogin.connectToDatasource(DatasourceLogin.java:184)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:233)
            at oracle.toplink.essentials.internal.databaseaccess.DatabaseAccessor.connect(DatabaseAccessor.java:242)
            at oracle.toplink.essentials.internal.databaseaccess.DatasourceAccessor.connect(DatasourceAccessor.java:309)
            at oracle.toplink.essentials.threetier.ConnectionPool.buildConnection(ConnectionPool.java:117)
            at oracle.toplink.essentials.threetier.ExternalConnectionPool.startUp(ExternalConnectionPool.java:135)
            at oracle.toplink.essentials.threetier.ServerSession.connect(ServerSession.java:451)
            at oracle.toplink.essentials.internal.sessions.DatabaseSessionImpl.login(DatabaseSessionImpl.java:616)
            at oracle.toplink.essentials.ejb.cmp3.EntityManagerFactoryProvider.login(EntityManagerFactoryProvider.java:282)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerSetupImpl.deploy(EntityManagerSetupImpl.java:229)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.getServerSession(EntityManagerFactoryImpl.java:93)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:126)
            at oracle.toplink.essentials.internal.ejb.cmp3.base.EntityManagerFactoryImpl.createEntityManagerImpl(EntityManagerFactoryImpl.java:120)
            at oracle.toplink.essentials.internal.ejb.cmp3.EntityManagerFactoryImpl.createEntityManager(EntityManagerFactoryImpl.java:91)
            at org.springframework.orm.jpa.JpaTransactionManager.createEntityManagerForTransaction(JpaTransactionManager.java:392)
            at org.springframework.orm.jpa.JpaTransactionManager.doBegin(JpaTransactionManager.java:320)
            at org.springframework.transaction.support.AbstractPlatformTransactionManager.getTransaction(AbstractPlatformTransactionManager.java:374)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:263)
            at org.springframework.transaction.interceptor.TransactionAspectSupport.createTransactionIfNecessary(TransactionAspectSupport.java:220)
            at org.springframework.transaction.aspectj.AbstractTransactionAspect.ajc$before$org_springframework_transaction_aspectj_AbstractTransactionAspect$1$2a73e96c(AbstractTransactionAspect.aj:63)
            at org.springframework.samples.petclinic.jpa.EntityManagerClinic.getVets(EntityManagerClinic.java:39)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.springframework.aop.support.AopUtils.invokeJoinpointUsingReflection(AopUtils.java:307)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.invokeJoinpoint(ReflectiveMethodInvocation.java:182)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:149)
            at org.springframework.dao.support.PersistenceExceptionTranslationInterceptor.invoke(PersistenceExceptionTranslationInterceptor.java:138)
            at org.springframework.aop.framework.ReflectiveMethodInvocation.proceed(ReflectiveMethodInvocation.java:171)
            at org.springframework.aop.framework.JdkDynamicAopProxy.invoke(JdkDynamicAopProxy.java:204)
            at $Proxy19.getVets(Unknown Source)
            at org.springframework.samples.petclinic.web.ClinicController.vetsHandler(ClinicController.java:53)
            at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
            at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
            at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
            at java.lang.reflect.Method.invoke(Method.java:585)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.doInvokeMethod(HandlerMethodInvoker.java:421)
            at org.springframework.web.bind.annotation.support.HandlerMethodInvoker.invokeHandlerMethod(HandlerMethodInvoker.java:136)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.invokeHandlerMethod(AnnotationMethodHandlerAdapter.java:326)
            at org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter.handle(AnnotationMethodHandlerAdapter.java:313)
            at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:875)
            at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:807)
            at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:571)
            at org.springframework.web.servlet.FrameworkServlet.doGet(FrameworkServlet.java:501)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:743)
            at javax.servlet.http.HttpServlet.service(HttpServlet.java:856)
            at com.evermind.server.http.ServletRequestDispatcher.invoke(ServletRequestDispatcher.java:713)
            at com.evermind.server.http.ServletRequestDispatcher.forwardInternal(ServletRequestDispatcher.java:370)
            at com.evermind.server.http.HttpRequestHandler.doProcessRequest(HttpRequestHandler.java:871)
            at com.evermind.server.http.HttpRequestHandler.processRequest(HttpRequestHandler.java:453)
            at com.evermind.server.http.HttpRequestHandler.serveOneRequest(HttpRequestHandler.java:221)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:122)
            at com.evermind.server.http.HttpRequestHandler.run(HttpRequestHandler.java:111)
            at oracle.oc4j.network.ServerSocketReadHandler$SafeRunnable.run(ServerSocketReadHandler.java:260)
            at oracle.oc4j.network.ServerSocketAcceptHandler.procClientSocket(ServerSocketAcceptHandler.java:234)
            at oracle.oc4j.network.ServerSocketAcceptHandler.access$700(ServerSocketAcceptHandler.java:29)
            at oracle.oc4j.network.ServerSocketAcceptHandler$AcceptHandlerHorse.run(ServerSocketAcceptHandler.java:879)
            at com.evermind.util.ReleasableResourcePooledExecutor$MyWorker.run(ReleasableResourcePooledExecutor.java:303)
            at java.lang.Thread.run(Thread.java:595)
    Caused by: java.sql.SQLException: Io exception: The Network Adapter could not establish the connection
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:138)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:175)
            at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:287)
            at oracle.jdbc.driver.T4CConnection.logon(T4CConnection.java:328)
            at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:430)
            at oracle.jdbc.driver.T4CConnection.<init>(T4CConnection.java:151)
            at oracle.jdbc.driver.T4CDriverExtension.getConnection(T4CDriverExtension.java:32)
            at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:608)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:218)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:114)
            at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:77)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.makeCacheConnection(OracleImplicitConnectionCache.java:1361)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getCacheConnection(OracleImplicitConnectionCache.java:441)
            at oracle.jdbc.pool.OracleImplicitConnectionCache.getConnection(OracleImplicitConnectionCache.java:336)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:286)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:179)
            at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:159)
            at oracle.oc4j.sql.DataSourceConnectionPoolDataSource.getPooledConnection(DataSourceConnectionPoolDataSource.java:57)
            at oracle.oc4j.sql.xa.EmulatedXADataSource.getXAConnection(EmulatedXADataSource.java:92)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createXAConnection(ManagedConnectionFactoryImpl.java:211)
            at oracle.oc4j.sql.spi.ManagedConnectionFactoryImpl.createManagedConnection(ManagedConnectionFactoryImpl.java:170)
            at com.evermind.server.connector.ApplicationConnectionManager.createManagedConnection(ApplicationConnectionManager.java:1398)
            at oracle.j2ee.connector.ConnectionPoolImpl.createManagedConnectionFromFactory(ConnectionPoolImpl.java:327)
            at oracle.j2ee.connector.ConnectionPoolImpl.access$800(ConnectionPoolImpl.java:98)
            at oracle.j2ee.connector.ConnectionPoolImpl$NonePoolingScheme.getManagedConnection(ConnectionPoolImpl.java:1211)
            at oracle.j2ee.connector.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:785)
            at oracle.oc4j.sql.ConnectionPoolImpl.getManagedConnection(ConnectionPoolImpl.java:45)
            at com.evermind.server.connector.ApplicationConnectionManager.getConnectionFromPool(ApplicationConnectionManager.java:1596)
            at com.evermind.server.connector.ApplicationConnectionManager.acquireConnectionContext(ApplicationConnectionManager.java:1541)
            at com.evermind.server.connector.ApplicationConnectionManager.allocateConnection(ApplicationConnectionManager.java:1486)
            at oracle.j2ee.connector.OracleConnectionManager.unprivileged_allocateConnection(OracleConnectionManager.java:238)
            at oracle.j2ee.connector.OracleConnectionManager.allocateConnection(OracleConnectionManager.java:192)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:272)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:200)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:142)
            at oracle.oc4j.sql.ManagedDataSource.getConnection(ManagedDataSource.java:127)
            at oracle.toplink.essentials.jndi.JNDIConnector.connect(JNDIConnector.java:145)
            ... 60 moreAny ideas? I'd really like to see JPA, Spring and oc4j working together?
    Thanks,
    Eric

  • Using Oracle Users in Realms and DataSource.getConnection

    Is it possible to authenticate using an Oracle User via JAASRealm and also retrieve connections specific to that user from a DataSource?
    I currently have an application which doesn't use either, but rather sets up a OracleDataSource. So basically I just want to allow the container to administer both the authentication and data source setup, while still allowing the getConnection(user,password):
    CODE
    ocpds = new OracleConnectionPoolDataSource();
    ocpds.setURL(connectionString);
    ocpds.setConnectionProperties(props);
    ods = new OracleDataSource();
    ods.setURL(connectionString);
    ods.setConnectionCachingEnabled(true);
    ods.setConnectionProperties(props);
    // Pool and Cache
    Properties poolProps = new Properties();
    poolProps.setProperty("AbandonedConnectionTimeout", "60");
    poolProps.setProperty("InactivityTimeout", "5");
    poolProps.setProperty("TimeToLiveTimeout", "60");
    poolProps.setProperty("ConnectionWaitTimeout", "60");
    ods.setConnectionCacheProperties(poolProps);
    ods.setConnectionProperties(props);
    Util.logln("Connection Cache Properties");
    cache = OracleConnectionCacheManager.getConnectionCacheManagerInstance();
    cache.createCache(cacheName, ods, poolProps);
    cache.setConnectionPoolDataSource(cacheName, ocpds);
    ........later in the BatCave (JSP or a servlet).....
    conn = (OracleConnection) ods.getConnection(username, password);
    ENDCODE
    This section from OAS Containers for J2EE Services Guide worries me:
    (from: http://download-east.oracle.com/docs/cd/B14099_19/web.1012/b14012/datasrc.htm#sthref572 )
    Using Different User Names for Two Connections to a Single Data Source
    When you retrieve a connection from a DataSource object with a user name and password, this user name and password are used on all subsequent connection retrievals within the same transaction. This is true for all data source types.
    For example, suppose an application retrieves a connection from the jdbc/OracleCMTDS1 data source with the scott user name. When the application retrieves a second connection from the same data source with a different user name, such as adams, the second user name (adams) is ignored. Instead, the original user name (scott) is used.
    Thanks for reading all of this, and I appreciate any help!

    Update:
    I'm still not quite sure what to do. Where I am now:
    1. I don't know how to authenticate against Oracle database users (non-ldap) via JNDI/JAAS/whatever
    2. Proxy authentication (ALTER USER...CONNECT THROUGH...) seems to be promising for using connection pools, and in addition, once realm authentication happens, I can just pass the username and piggyback on the middletier connection without knowing the password used in authentication
    3. I'm not sure if proxy addresses the issue that OAS Containers for J2EE Services Guide talks about in the original post
    4. I'd prefer not to use OID
    Again, if you have any little information, I'd really like to hear it.

  • Ojdbc and clustered environments - how to connect

    Hello there, I am hoping someone can help me out with the problem I'm having getting netbens 5.5.1 and 6 to connect to our databases.
    First of alI, I am not a DBA, but a developer. I am trying to establish a connection with any of our databases in netbeans via a jdbc call. Every time try to use the jdbc:oracle:oci:@<service name>
    It crashes with this error:
    java.lang.UnsatisfiedLinkError: no ocijdbc11 in java.library.path
         at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1682)
         at java.lang.Runtime.loadLibrary0(Runtime.java:823)
         at java.lang.System.loadLibrary(System.java:1030)
         at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3152)
         at java.security.AccessController.doPrivileged(Native Method)
         at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3148)
         at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:233)
         at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:490)
         at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
         at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
         at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:474)
         at org.netbeans.modules.db.explorer.DbDriverManager.getConnection(DbDriverManager.java:99)
         at org.netbeans.modules.db.explorer.DatabaseConnection$2.run(DatabaseConnection.java:500)
         at org.openide.util.RequestProcessor$Task.run(RequestProcessor.java:499)
    [catch] at org.openide.util.RequestProcessor$Processor.run(RequestProcessor.java:932)
    I have also tried jdbc:oracle:thin:@<host>:<port>:<SID> format and I get a different error:
    I/O exception the adapter could not establish a connection to the server.
    I will provide a sample of out tns entries:
    SHDRD.#######.COM =
    (DESCRIPTION =
    (ADDRESS = (PROTOCOL = TCP)(HOST = #######)(PORT = 1603))
    (ADDRESS = (PROTOCOL = TCP)(HOST = #######)(PORT = 1603))
    (LOAD_BALANCE = yes)
    (CONNECT_DATA =
    (SERVER = DEDICATED)
    (SERVICE_NAME = SHDRD.######.com)
    (failover_mode =
    (type = select)
    (method = basic)
    (retries = 20)
    (delay = 15)
    As you can see our tns entries contain multiple host, which I believe are the root cause to my issue. I cant even get SQL DEVELOPER to connect to the database. Are there special considerations I have to take in order to get my application working with servers?
    BTW, I have tried the ojdbc14 and ondbc5 jars without luck.
    Thanks guys!

    Hey, I dont know whether this issue is still open or someone has already found the solution.
    However, I encountered this kind of problem and looking out for solutions.
    --------------------------------- Log Snippet -------------------------------------------
    _1/28/10 3:32:43:544 CST] 00000013 SystemErr R java.lang.UnsatisfiedLinkError: ocijdbc11 (Not found in java.library.path)_
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at java.lang.ClassLoader.loadLibraryWithPath(ClassLoader.java:993)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at java.lang.ClassLoader.loadLibraryWithClassLoader(ClassLoader.java:962)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at java.lang.System.loadLibrary(System.java:465)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.T2CConnection$1.run(T2CConnection.java:3178)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at java.security.AccessController.doPrivileged(AccessController.java:202)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.T2CConnection.loadNativeLibrary(T2CConnection.java:3174)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.T2CConnection.logon(T2CConnection.java:233)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.PhysicalConnection.<init>(PhysicalConnection.java:508)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.T2CConnection.<init>(T2CConnection.java:133)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.T2CDriverExtension.getConnection(T2CDriverExtension.java:53)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.driver.OracleDriver.connect(OracleDriver.java:510)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.pool.OracleDataSource.getPhysicalConnection(OracleDataSource.java:275)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.pool.OracleDataSource.getConnection(OracleDataSource.java:206)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPhysicalConnection(OracleConnectionPoolDataSource.java:139)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at oracle.jdbc.pool.OracleConnectionPoolDataSource.getPooledConnection(OracleConnectionPoolDataSource.java:88)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper$1.run(DSConfigurationHelper.java:1622)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at com.ibm.ws.security.auth.ContextManagerImpl.runAs(ContextManagerImpl.java:4475)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at com.ibm.ws.security.auth.ContextManagerImpl.runAsSystem(ContextManagerImpl.java:4653)
    [1/28/10 3:32:43:544 CST] 00000013 SystemErr R      at com.ibm.ws.security.core.SecurityContext.runAsSystem(SecurityContext.java:255)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper$2.run(DSConfigurationHelper.java:1638)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.security.util.AccessController.doPrivileged(AccessController.java:118)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:1650)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper.getPooledConnection(DSConfigurationHelper.java:1545)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper.getConnectionFromDSOrPooledDS(DSConfigurationHelper.java:3177)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at com.ibm.ws.rsadapter.DSConfigurationHelper.testConnectionForGUI(DSConfigurationHelper.java:3842)
    [1/28/10 3:32:43:545 CST] 00000013 SystemErr R      at sun.reflect.GeneratedMethodAccessor117.invoke(Unknown Source)
    ------------------------------ End of Snippet ----------------------------------------------
    * .profile (environment) details *
    export ORACLE_HOME=/apps/oracle/product/11.1.0.7.CL
    export TNS_ADMIN=/usr/local/tns
    export JAVA_HOME=/opt/IBM/WebSphere/AppServer/java
    export LD_LIBRARY_PATH=/usr/lib:$ORACLE_HOME/lib:/usr/dt/lib:/usr/openwin/bin:/usr/ucblib:JAVA_HOME/lib:/apps/oracle/product/11.1.0.7.CL/jdk/jre/lib:/apps/oracle/product/11.1.0.7.CL/jdbc/lib
    PATH=$PATH:/bin:/usr/ccs/bin:/usr/bin:/usr/sbin:/usr/ucb:$ORACLE_HOME/bin:/etc:/usr/openwin/bin:/opt/cobol/bin:/usr/local/bin:/opt/oracle/bin:$JAVA_HOME/bin:$LD_LIBRARY_PATH:.
    export LIBPATH=$ORACLE_HOME/lib
    Pl. respond if anyone has found the solution... It would be appreciated.
    Thanx...
    Star Nirav
    +91 974.212.7827

  • Use of cache_scheme in data-sources.xml

    Hi guys.
    I have posted a couple of similar topics before - without any response ! I can't believe with all of the gurus out there that NOBODY knows the answer to this ! :-)
    Anyway, we are providing a 'vanilla' type implementation of Oracle's Connection Pooling - just using Oracle's DataSource to open and close connections, and having Oracle dynamically take care of the pooling itself. ( Apparently, under this scenario, even max and min connections are set as required ).
    However, if I specify the cache_scheme property within data-sources.xml, will it take effect using this basic implementation ? In other words, will changing it's value effect the behaviour once the max limit is reached and more connections are requested ?
    Many thanks.
    Steve.

    Timo,
    thanks for your respone! I managed to configure the application to use a data-source connection created on the application server. Also in order to be able to deploy the same EAR to a number of containers on different DB's.
    I know it's possible to connect to a DB without using a data-sources.xml file .. but it seemed like my application was storing some 'old' connection information because it was able to connect to the db without having the data sources configured on the AS.
    Do you need to restart JDeveloper after unchecking the 'Bunde default data-sources.xml during deployment' checkbox? Because it is working correctly right now ... .
    Thanks,
    Koen Verhulst

  • OracleConnectionPoolDataSource creates inactive sessions

    Hi,
    My customer uses OracleConnectionPoolDataSource and finds that the pooled connection had created a huge number of inactive sessions on the database side.
    Any idea why this happens?
    Thanks in advance.
    Regards,
    Sindhiya V.

    Hi Hamdy,
    The inactivity timeout was configured through the Oracle Enterprise Manager.
    We created a Data Source and specified the following attributes on the page.
    JNDI Locations
    Location: jdbc/USPSTFPDADefaultDS
    XA Location: jdbc/xa/USPSTFPDAXADS
    EJB Location: jdbc/USPSTFPDADS
    Connection Attributes
    Connection Retry Interval: 5
    Max Connection Attempts: 3
    Cached Connection Inactivity Timeout: 300
    Maximum Open Connections: 10
    Minimum Open Connections: 1
    Wait For Free Connection Timeout: 5
    Hope you could help me in resolving this issue.
    Thanks & Regards,
    Sindhiya V.

  • Setting connectionProperties on OracleConnectionPoolDataSource

    Hi all,
    we are using on our project the SAP Netweaver 2004, Java 1.4 and the Oracle database with the JDBC driver 10.2.0.4. Netweaver as application server supports the use of JNDI datasources.
    The configuration is as follows:
    Factory: oracle.jdbc.pool.OracleDataSourceFactory
    DataSource Type: ConnectionPoolDataSource
    CPDS Classname: oracle.jdbc.pool.OracleConnectionPoolDataSource
    Due to the huge amount of data, we need to set different parameters to optimize the connection performance.
    connectionProperties     {packetSize=8192, defaultRowPrefetch=100}
    If we set the properties like the user or the password the connectionProperties parameter will be ignored. I read in the JDBC documentation that the class OracleConnectionPoolDataSource extends the OracleDataSource, so the class supports the parameters. For me it looks like that the OracleDataSourceFactory doesn't pass the parameters to the OracleConnectionPoolDataSource instance, therefore the parameters are not set on the connection.
    Now I have the following questions:
    Is it possible to set the connection parameters?
    Is there any reason why the parameters aren't passed to the datasource?
    What others possibilities do we have?
    Thanks in advance
    Detlef

    Change this:
    $users = get-aduser -filter {createTimeStamp -gt $date} -Properties * | select samaccountname
    To this:
    $users = get-aduser -filter {createTimeStamp -gt $date} -Properties * | select -expandproperty samaccountname
    Also, you're creating an access rule that only applies to the folder itself (not to the subfolders and files). If that's what you're after, then leave it as is. If you want to apply to subfolders and files, though, change this:
    $permission = "$_","FullControl","Allow"
    to this:
    $permission = "$_","FullControl","ContainerInherit,ObjectInherit","None","Allow"
    Let me know if that works (there's a chance you're going to have some issues with Set-Acl, but we'll see about that later)

  • OracleConnectionPoolDataSource Problem

    I'm Trying to connect a JSP tomcat-based application to Oracle using
    OracleConnectionPoolDataSource and related classes. I have used
    javax.sql.DataSource an it did work fine. I have made changes I need for using
    that classes and when I get the DataSource it throws exception
    "javax.naming.NamingException: Cannot create resource instance".
    I'm using Apache Tomcat 5.5.23 for windows, Java JDK 1.5.0_05 and Oracle 9i
    Release 2 (9.2.0.1.0). All for windows.
    Changes I have made are these:
    In context.xml:
    <Context path="/test" docBase="test" debug="0"
    reloadable="true" >
    <Resource
    name="jdbc/test" auth="Container"
    type="oracle.jdbc.pool.OracleConnectionPoolDataSource"
    maxActive="0" maxIdle="-1" maxWait="-1"
    removeAbandoned="true" removeAbandonedTimeout="60" logAbandoned="true"
    username="test" password="test"
    driverClassName="oracle.jdbc.pool.OracleConnectionPoolDataSource"
    url="jdbc:oracle:thin:@192.168.1.109:1521:GLOBALDB" />
    </Context>
    In web.xml (only resource-ref):
    <resource-ref>
    <res-ref-name>jdbc/test</res-ref-name>
    <res-type>oracle.jdbc.pool.OracleConnectionPoolDataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    Code that creates connection:
    initCtx = new InitialContext();
    ctx = (Context) initCtx.lookup("java:/comp/env");
    ds = (OracleConnectionPoolDataSource) ctx.lookup("/jdbc/test");
    PooledConnection pc = ds.getPooledConnection();
    con = pc.getConnection();
    I have searched in google and found some examples that use
    oracle.jdbc.driver.OracleDriver in driverClassName. I have also tried this
    option with the same results. I suppose bug is elsewhere.
    I have tried to create DataSource instance in the code instead of get it from
    resource. Doing this it drops no error and page works, but I don't know how can
    I control maximun number of pooled connections. This is the code I have used for
    that:
    initCtx = new InitialContext();
    OracleConnectionPoolDataSource ds = new OracleConnectionPoolDataSource();
    ds.setDataSourceName("oracle.jdbc.pool.OracleConnectionPoolDataSource");
    ds.setURL(dbURL);
    ds.setDescription(DS);
    ds.setUser(dbUsuario);
    ds.setPassword(dbPassword);
    initCtx.rebind(DS, ds);
    pc = ds.getPooledConnection();
    But it creates only one connection and doesn't allow two users to log in at the
    same time.
    Please. I need help.

    how can
    I control maximun number of pooled connections.
    Maximum number of dB connections in pool are set using the maxActive parameter.
    <parameter>
    <name>maxActive</name>
    <value>100</value>
    </parameter>
    Maximum number of idle dB connections to retain in pool are set using the maxIdle parameter.
    <parameter>
    <name>maxIdle</name>
    <value>30</value>
    </parameter>

  • DataSource and ConnectionPoolDataSource

    Could someone explain how to bind a DataSource with JNDI so that it is pooled? The only way I can get it to work is to bind an OracleConnectionPoolDataSource and then lookup a ConnectionPoolDataSource and get the PooledConnection from that. The documentation says that a client should be able to use the pooled DataSource the same way as a non-pooled one. But, in my scenario the client has to get a PooledConnection then get a Connection from that.

    <BLOCKQUOTE><font size="1" face="Verdana, Arial">quote:</font><HR>Originally posted by Brad Lane ([email protected]):
    Could someone explain how to bind a DataSource with JNDI so that it is pooled? The only way I can get it to work is to bind an OracleConnectionPoolDataSource and then lookup a ConnectionPoolDataSource and get the PooledConnection from that. The documentation says that a client should be able to use the pooled DataSource the same way as a non-pooled one. But, in my scenario the client has to get a PooledConnection then get a Connection from that.<HR></BLOCKQUOTE>
    Sun's documentation says that you should be able to create a DataSource and call setDataSourceName() with the ConnectionPoolDataSource name. This doesn't seem to be supported in Oracle's implementation. Is this true? If so, Oracle's driver DOES NOT fully support the JDBC 2.0 Optional Package as they state in the documentation.
    Hello JDBC Dev. Team? Anyone out there?
    null

  • Problems with jsp and jdbc

    I am writing a simple class to start learning about jdbc. I wrote the following WHICH COMPILES:
    public MyClass {
    System.out.println("establishing connection...");
    OracleConnectionPoolDataSource ods = new OracleConnectionPoolDataSource();
    // this is where all the variables are initialised.
    ods.setDriverType ("oci8");
    ods.setServerName ("test");
    ods.setNetworkProtocol ("tcp");
    ods.setDatabaseName ("tester");
    ods.setPortNumber (1521);
    ods.setUser ("test");
    ods.setPassword ("password");
    // this is the variable that will get the connection pool.
    // from this connection pool, you will get all ur connections.
    pool = new OracleConnectionCacheImpl(ods);
    and i am calling it by:
    System.out.println("connecting to DataBase");
    dbc = new MyClass();
    System.out.println("connected to DataBase");
    THIS WORKS FINE when i do either a command line execution - run a query thru a normal main method.
    HOWEVER, when i try and call it from a jsp page, i get the following error from tomcat:
    org.apache.jasper.JasperException: oracle/jdbc/pool/OracleDataSource
    at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:248)
    furthermore, the first system.out.println("establishing connection"); is not printed. "Connecting to Database" is printed however. i am really confused.
    however, i have an ancient copy of tomcat 3.2 that i used - just to test - and that worked fine. i have to get this to work with tomcat 4.1.
    i am really in a jam - any insights, please help!!!
    thankyou so much.

    Mahesh,
    It is the problem of your DRIVER not being in the classpath of TOMCAT. Put the driver in the lib folder of tomcat or else include the folder which contains the driver to the tomcat classpath. It should work OK.
    Good Luck.
    Sekar

  • Difference between OraclePooledConnection and Connection

    Hi,
    Can someone help me in finding the difference between using oracle.jdbc.pool.OracleConnectionPoolDataSource with OraclePooledConnection and oracle.jdbc.pool.OracleConnectionPoolDataSource with Connection.
    Thanks in advance.
    Sindhiya V.

    Hello
    In order to get the meaning of terms Connection and Session let's define first the term Flow.
    The definition of a Flow is historically accepted as:
    A unidirectional sequence of packets between 2 network endpoints that have the following 7 things in common:
    1. Source IP address
    2. Destination IP address
    3. L3 Protocol type
    4. Source port
    5. Destination port
    6. Tos (Type of Service)
    7. Input interface
    The terms Connection and Session can have many different meanings depending on the framework that they are used, but it can be said that:
    Connection: A bidirectional Flow
    Session: Many connections between the same source and same destination
    HTH

  • Pooled Connections and JNDI

    Wondering where to find some sample code for using OracleConnectionPoolDataSource and register with JNDI.
    Thanks in advance,
    Michael

    I think you can try this book.
    Proffesional Java Server Programming - Wrox Publication.

Maybe you are looking for

  • Printing only Text and Subtotals lines in A/R Invoice not Regular lines

    How can I create in PLD for A/R invoice that only prints the Text and Subtotals lines in A/R Invoice but not the regular lines the A/R Invoice ?

  • Officejet 4500 510-f

    hi everyone i have problem with hp officejet 4500n i install this printer with network and i make sure it have an ip address on network . all computers can print ok put all of them can't scan document or send fax  !!!! can you help me please

  • 890GXM-G65 alarm

    Can someone tell me what the high-pitched alarm noise is the 890GXM-G65? It's coming on in a new game I'm trying to play, but doesn't seem to be temperature related (core temp hasn't exceed 41 degrees, according to AMD OverDrive & SpeedFan) and mothe

  • Safari blocked by Apple alert pop up. Virus?

    on safari security alert popped up applealert.com major cause for concern told me to call a number. A guy answered and said he needed to get into my system to see the issue. I didn't trust it as at 10pm apple support is closed. What do I do? Do I hav

  • RE: Field status of the vendor account group

    Hi, I am doing customization for argentina country specific: For the vendor account group there should be a field called Fiscal type in General-control tab, But i dont see it. Can any one please help me on this thing?