|
Sort of depends... The word 'application' in your question worries me (but only because it can mean so many different things). If you're thinking of running a whole application multiple times, then a new job is what you want. However, for smaller, encapsulated pieces of work, then a thread may fit your design. So the real question is: Can your application stand in the same job as another instance of itself running without negatively effecting the shared resources that you get in a threaded environment? I.e. all open files would be shared, locks would be used to protect access in certain cases (many of which may be your responsibility), global and statidc storage would be shared, etc). Threads versus Jobs which are better depends entirely on the problem/solution and the code used to implement it. In every single ethnic, religious or racial group, there are a very few truly evil people. For each of those people there are many, many, many good people. Assuming anything (evilness or capability for evil) about the particular group is bigotry and idiocy. Don't do it. -- Me Fred A. Kulack - IBM eServer iSeries - Java DB2 access, Jdbc, JTA, etc... IBM in Rochester, MN (Phone: 507.253.5982 T/L 553-5982) mailto:kulack@us.ibm.com Personal: mailto:kulack@magnaspeed.net AOL Instant Messenger: Home:FKulack Work:FKulackWrk "Brad Stone" <brad@bvstools.co To: java400-l@midrange.com m> cc: Sent by: Subject: Jobs or Threads? java400-l-admin@m idrange.com 02/25/2002 11:42 AM Please respond to java400-l Just thinking outload here. Let's assume I have an appliation that I want to run many times simultaniously. Assuming I'm running the aplicate on the 400, what would be "better". 1 - Running the application in multiple jobs (ie submitting the job x times into QSYSNOMAX or something similar) 2 - Running many instances of the apllication using Java threads? I'm guessing it really won't make much of a difference unless job resource allocation comes into play. Bradley V. Stone BVS.Tools www.bvstools.com _______________________________________________ This is the Java Programming on and around the iSeries / AS400 (JAVA400-L) mailing list To post a message email: JAVA400-L@midrange.com To subscribe, unsubscribe, or change list options, visit: http://lists.midrange.com/cgi-bin/listinfo/java400-l or email: JAVA400-L-request@midrange.com Before posting, please take a moment to review the archives at http://archive.midrange.com/java400-l.
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.