Solved

Concurrency, Multithreaded support in EJB

Posted on 2011-09-06
3
354 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

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
map related example 6 55
jsp insert to database example 2 47
eclipse console opening separately 2 29
Problem to Alipay 10 48
Introduction This article is the first of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article explains our test automation goals. Then rationale is given for the tools we use to a…
In this post we will learn how to connect and configure Android Device (Smartphone etc.) with Android Studio. After that we will run a simple Hello World Program.
Viewers will learn about the different types of variables in Java and how to declare them. Decide the type of variable desired: Put the keyword corresponding to the type of variable in front of the variable name: Use the equal sign to assign a v…
Viewers will learn how to properly install Eclipse with the necessary JDK, and will take a look at an introductory Java program. Download Eclipse installation zip file: Extract files from zip file: Download and install JDK 8: Open Eclipse and …

820 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