Announcement Announcement Module
Collapse
No announcement yet.
Does Web Flow Persistence Context work with a Tomcat Managed DBCP? Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Does Web Flow Persistence Context work with a Tomcat Managed DBCP?

    Will a web flow that uses
    Code:
    <persistence-context/>
    work if the database connection pool is manged by tomcat (in GlobalNamingResources of server.xml) and retrieved by spring using JNDI, or is it required that the dataSource be a spring managed bean of type
    Code:
    org.apache.commons.dbcp.BasicDataSource
    ?

    I am currently using a Tomcat managed pool and after completion of every flow (after the commit), there is always one db connection that becomes unusable and eventually I run out of connections. I am trying to determine if I am not managing Transactions correctly or if Spring Web Flow might not work with a persistence-context unless it uses a spring managed dbcp.

    Anyone know if this SHOULD work with Tomcat managed pool?

  • #2
    It can be any DataSource, local or jndi it matters not...

    Comment


    • #3
      I have the same problem.
      Please can somebody explain where in the documentation this problem is described ?

      Thanks

      Comment


      • #4
        As mentioned it doesn't matter where the datasource comes from, it works with ANY datasource...

        Comment


        • #5
          and your solution is ?

          Comment


          • #6
            There is no solution as it isn't a problem... It works with any datasource a datasource is a datasource regardless if it comes from xml, java or jndi... How to do a jndi lookup is extensively described in the Spring Framework reference guide, which I suggest you read.

            Comment


            • #7
              if you are using hibernate 4 then you are running out of connections, because it is a spring webflow related bug. maybe thats the cause of your problem. normally all connections are correctly returned to the pool.

              Comment

              Working...
              X