Results 1 to 2 of 2

Thread: Setting properties of JNDI Datasource

  1. #1
    Join Date
    Sep 2004
    Location
    Winterthur, Switzerland
    Posts
    58

    Default Setting properties of JNDI Datasource

    I would like to get a Datasource via JNDI . Simple enough.

    But then also set the Properties of the retrieved Datasource.

    All via Spring Declarative Bean Configuration.

    Is this possible? How? Via ProxyInterface?

    Background:

    I have a oracle.jdbc.pool.OracleDataSource JNDI Resource in Tomcat.
    The OracleDataSource only has a

    Code:
    public  void setConnectionCacheProperties(Properties properties)
    to configure the Cache and Tomcat ResourceParams does'nt know about Properties.

    And since Spring does, it that maybe i can configure the ConnectionCacheProperties with Spring.

    Any hints are greatly welcomed.

    Christoph

  2. #2
    Join Date
    Sep 2004
    Location
    Winterthur, Switzerland
    Posts
    58

    Default

    More Background:

    The Oracle JDBC Driver supports since 10g what they call Implicit Connection Caching.

    This seems for shops with Oracle Databases a good option.
    Most likely anybody using the Oracle Application Server 10g with be useing this feature.

    It supports for instance setting User Credentials upon getConnection().
    The only other Pool i know of, which supports this is the C3P0 Pool.
    Commons DBCP certainly does'nt.

    Now not all are using the Oracle AS, but prefer to use like Tomcat, specially since one has Spring ;-) .

    The draw back in terms of Connection Pooling as mentioned in my previous
    message, is that the Pool can only be configured through Properties,
    which Tomcat doesnt support for configuring JNDI Resources, as far as i know.

    What i did to workaround this problem is :

    Create a Subclass of DelegatingDataSource, which in afterPropertiesSet
    sets the properties, which are configured through Spring.

    Don't know if this is the best solution, but it works ;-)

    Another option could be a Bean Wrapper around ConnectionCacheManager of Oracle, with which the Cache could be managee in an own Servlet.

    Any other suggestions?

    Christoph

Similar Threads

  1. Replies: 13
    Last Post: Feb 5th, 2010, 12:31 AM
  2. FlowExecutionStorage in a DB
    By cacho in forum Web Flow
    Replies: 7
    Last Post: Oct 19th, 2009, 03:36 PM
  3. Transaction Management
    By caverns in forum Data
    Replies: 3
    Last Post: Mar 8th, 2005, 06:38 AM
  4. Replies: 1
    Last Post: Feb 12th, 2005, 07:30 AM
  5. Ignoring missing Jndi DataSource within IDE?
    By Bill Pearce in forum Container
    Replies: 2
    Last Post: Oct 27th, 2004, 09:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •