Announcement Announcement Module
Collapse
No announcement yet.
Restarting Multi-Threaded Application Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Restarting Multi-Threaded Application

    Environment:
    Spring 2.5.5, Eclipselink 1.0.1, Tomcat 5.5.26

    Application:
    I have an application that I schedule to run everyday and its purpose is to map 20-30K XML nodes to corresponding DB2 tables. Since there are about 15 different types of transactions, I create each Spring-managed DAO bean as a separate thread. This way, as I loop through the XML nodes, I can add them to an ArrayDeque (one for each DAO), which the threaded DAO bean can wake up periodically and read in order to map the nodes in the ArrayDeque to its corresponding DB2 entity and have it persisted.

    Problem:
    This all works fine on the first run. Obviously, after program termination, the threads remain active in wait mode. The next day, the threads are created and so it simply wakes them up with a notify and begins processing the next days XML files. BUT, the data does not persist and I don't get any errors.

    I am using a BasicDataSource to insert the datasource into the JpaTransactionManager.

    Any ideas on why the connection apparently is not reattached via the datasource to Spring's transaction manager so that persistence takes place on subsequent runs?

    Thanks for any help.

    R. Grimes
Working...
X