Solved

Concurrency, Multithreaded support in EJB

Posted on 2011-09-06
3
351 Views
Last Modified: 2012-05-12
I would like to know differences, similarities, advantages, disadvantages of Concurrency, Multithreaded support in EJBs. How, where, why we use it. I was not clear on this concept. Thanks in advance
0
Comment
Question by:gudii9
  • 2
3 Comments
 
LVL 20

Accepted Solution

by:
a_b earned 500 total points
ID: 36493305
"Why is thread creation and management disallowed?

The EJB specification assigns to the EJB container the responsibility for managing threads. Allowing enterprise bean instances to create and manage threads would interfere with the container's ability to control its components' lifecycle. Thread management is not a business function, it is an implementation detail, and is typically complicated and platform-specific. Letting the container manage threads relieves the enterprise bean developer of dealing with threading issues. Multithreaded applications are still possible, but control of multithreading is located in the container, not in the enterprise bean."

Ref - http://java.sun.com/blueprints/qanda/ejb_tier/restrictions.html

When you use EJBs, the thread management is left to the container that you use.
0
 
LVL 7

Author Comment

by:gudii9
ID: 36589630
If i want some multi threading within my application not system-related functionality can i implement that using EJB. please advise
0
 
LVL 20

Expert Comment

by:a_b
ID: 36907854
Nope. You cannot. AS per the guidelines you should allow the container to instantiate the threads.
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Java Flight Recorder and Java Mission Control together create a complete tool chain to continuously collect low level and detailed runtime information enabling after-the-fact incident analysis. Java Flight Recorder is a profiling and event collectio…
Introduction This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…
Viewers will learn about basic arrays, how to declare them, and how to use them. Introduction and definition: Declare an array and cover the syntax of declaring them: Initialize every index in the created array: Example/Features of a basic arr…
This tutorial will introduce the viewer to VisualVM for the Java platform application. This video explains an example program and covers the Overview, Monitor, and Heap Dump tabs.

943 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

4 Experts available now in Live!

Get 1:1 Help Now