Announcement Announcement Module
Collapse
No announcement yet.
Problem with Annotation based Configuration Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Problem with Annotation based Configuration

    Hello,

    i have a strange Problem i struggle with for some days now.

    I changed my project setup to use Annotation based Confugurations instead of pure XML. I still have the XML Files, but they are linked in a "@Configuration" class and automatically found by a AnnotationConfigApplicationContextvia Scan. That works fine and all Beans are correctly created as expected. There is just one strange behaviour i don't understand!

    During the initialization of the Context it need sometimes up to 10 Minutes for the Application (i have a client and a server, i have the same Problem with both) to come up.

    I turned on Debug for Spring and here you can see the waiting

    2013-04-22 10:03:59,539 [INFO ] (main) org.springframework.jdbc.datasource.SingleConnecti onDataSource - Established shared JDBC Connection: oracle.jdbc.driver.T4CConnection@1583a80
    2013-04-22 10:03:59,539 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Acquired Connection [oracle.jdbc.driver.T4CConnection@1583a80] for JDBC transaction
    2013-04-22 10:03:59,571 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceUtil s - Setting JDBC Connection [oracle.jdbc.driver.T4CConnection@1583a80] read-only
    2013-04-22 10:03:59,571 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Switching JDBC Connection [oracle.jdbc.driver.T4CConnection@1583a80] to manual commit
    2013-04-22 10:03:59,571 [DEBUG] (main) org.springframework.orm.ibatis.SqlMapClientTemplat e - Opened SqlMapSession [com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl@19 ab8d] for iBATIS operation
    2013-04-22 10:03:59,571 [DEBUG] (main) org.springframework.orm.ibatis.SqlMapClientTemplat e - Obtained JDBC Connection [Transaction-aware proxy for target Connection from DataSource [org.springframework.jdbc.datasource.SingleConnecti onDataSource@8140ed]] for iBATIS operation
    2013-04-22 10:05:16,751 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Initiating transaction commit
    2013-04-22 10:05:16,751 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Committing JDBC transaction on Connection [oracle.jdbc.driver.T4CConnection@1583a80]
    2013-04-22 10:05:16,783 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceUtil s - Resetting read-only flag of JDBC Connection [oracle.jdbc.driver.T4CConnection@1583a80]
    2013-04-22 10:05:16,783 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Releasing JDBC Connection [oracle.jdbc.driver.T4CConnection@1583a80] after transaction
    2013-04-22 10:05:16,783 [DEBUG] (main) org.springframework.transaction.annotation.Annotat ionTransactionAttributeSource - Adding transactional method 'getListCalcNewTs' with attribute: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly; ''
    2013-04-22 10:05:16,783 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Creating new transaction with name [de.vattenfall.valsys.impl.persistence.ibatis.Maste rDataPersistenceServiceIbatis.getListCalcNewTs]: PROPAGATION_REQUIRED,ISOLATION_DEFAULT,readOnly; ''
    2013-04-22 10:05:16,783 [DEBUG] (main) org.springframework.jdbc.datasource.DataSourceTran sactionManager - Acquired Connection [oracle.jdbc.driver.T4CConnection@1583a80] for JDBC transaction[/CODE]

    This Log is from a Unit Test i created but even there i have that Problem. The waiting happens after "Obtained JDBC Connection". It seems that with an Annotationbased Context there is a Problem with the JDBC driver. In the Debug Mode i can see that the waiting happend in the class OracleTimeoutPollingThread (i run against a Oracle11g DB).

    I did not had that behaviour before i moved to the Annotation based initialization. Does anyone has an Idea what the Problem could be?

  • #2
    Done .... was just a local configuration problem with an InitializingBean.

    Comment

    Working...
    X