This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
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


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Threads in j2ee" Watch "Threads in j2ee" New topic
Author

Threads in j2ee

Ryan Pritchard
Greenhorn

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?
Thanks...
Howard Kushner
author
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="http://www.amazon.com/exec/obidos/tg/detail/-/1931182108/" 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: http://aspose.com/file-tools
     
    subject: Threads in j2ee
     
    Similar Threads
    Teradata Datasource configuration on WAS V5
    BMP, Jboss, and mysql configuring
    Using DataSource Question
    Problems in Websphere AppServer5.1(the latest version)
    RAD 6.0.1, ClassCastException