[ https://issues.apache.org/jira/browse/OFBIZ-5216?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13678973#comment-13678973 ]
Adrian Crum commented on OFBIZ-5216: ------------------------------------ I have reviewed all of your attachments, but unfortunately they do not help me. I can't reproduce the problem using multiple databases on my local copy, so this appears to be a problem specific to your configuration. Unless you can tell me which line the threads are blocked on, I won't be able to help you. Adding the synchronized keyword to the method is not an option because it will become a huge bottleneck. I have a suspicion threads are being blocked somewhere around loading the MSSQL JDBC driver, and if so, we could wrap that bit of code with thread synchronization. > The thread is locked at DBCPConnectionFactory.getConnection() when connects > to multiple databases > ------------------------------------------------------------------------------------------------- > > Key: OFBIZ-5216 > URL: https://issues.apache.org/jira/browse/OFBIZ-5216 > Project: OFBiz > Issue Type: Bug > Components: framework > Affects Versions: SVN trunk > Reporter: Wei Zhang > Assignee: Adrian Crum > Priority: Blocker > Fix For: SVN trunk > > Attachments: entityengine.xml, jsconsole.png, jtds-1.2.5.jar, > OFBIZ-5216.zip, postgresql-9.0-801.jdbc4.jar, screen.png > > > I connected 5 databases, ofbiz, ofbiz_olap, ofbiz_tenant and 2 MSSQL > databases of myself. Three ofbiz databases were created in Postgres. But the > the thread will locked at DBCPConnectionFactory.getConnection() when OFBiz > was starting. > And I changed > public Connection getConnection(GenericHelperInfo helperInfo, JdbcElement > abstractJdbc) throws SQLException, GenericEntityException > to > public synchronized Connection getConnection(GenericHelperInfo > helperInfo, JdbcElement abstractJdbc) throws SQLException, > GenericEntityException > it then works. -- This message is automatically generated by JIRA. If you think it was sent incorrectly, please contact your JIRA administrators For more information on JIRA, see: http://www.atlassian.com/software/jira