Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Threads in j2ee

 
Ryan Pritchard
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I have a Java application running on WebSphere 3.5 that I am upgrading to WebSphere 5.0. The application spawns 5 threads on start up to manage the data being cached in memory. The application has been changed from using a direct JDBC connection to using a WS managed DataSource and I'm getting this error in the log: "ConnectionMan W J2CA0075W: An active transaction should be present while processing method allocateMCWrapper." After some reading online, I've realized that I'm getting this message because the WS managed DataSource is being used by the unmanaged threads and that spawning threads is not allowed in the J2EE spec.
But now I have a problem... What should I convert these threads over to? What is the proper way to do this? Is there an easy way out?
Thanks...
 
Howard Kushner
author
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello Ryan,
Here is the easy way out... lose the threads. The data source is the way to go. Let the container do its job. I can elaborate, but only if you ask for it.
Brevity is the soul of wit:
  • Pythagorean theorem: 24 words
  • The Lord's Prayer: 66 words
  • Archimedes' Principle: 67 words


  • [ October 27, 2003: Message edited by: Howard Kushner ]
     
    • Post Reply
    • Bookmark Topic Watch Topic
    • New Topic