The moose likes EJB and other Java EE Technologies and the fly likes Threads in j2ee Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Threads in j2ee" Watch "Threads in j2ee" New topic

Threads in j2ee

Ryan Pritchard

Joined: Jul 08, 2003
Posts: 1
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?
Howard Kushner
Ranch Hand

Joined: Sep 19, 2003
Posts: 361
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 ]

    Howard Kushner<br />IBM Certified Enterprise Developer - WebSphere Studio Application Developer V5.0<br />IBM Certified Advanced System Administrator - WebSphere Application Server V5.0<br />IBM Certified Solution Developer - Web Services with WebSphere Studio V5.1<br /><a href="" target="_blank" rel="nofollow">Developing J2EE Applications with WebSphere Studio</a> my Certification Study Guide for IBM Test 287
    I agree. Here's the link:
    subject: Threads in j2ee
    It's not a secret anymore!