Win a copy of Svelte and Sapper in Action this week in the JavaScript forum!

Suman Chaudhuri

Greenhorn
+ Follow
since Jan 10, 2002
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by Suman Chaudhuri

Thomas, you wrote :
Here's the deal... NotSupported indicates that the message will be processed without a transaction. Required indicates that the message will be processed with a container-initiated transaction.
I understand what NotSupported and Required are meant to do...but NotSupported also states that if there is a client transaction, then it will suspend it...and since there is no client in a MDB, this is meaningless. Same with Required..which states that if there is a client transaction, it will execute under it (otherwise initiate its own transaction)...again, no client makes this meaningless too.
So I still dont understand why these 2 can apply to MDB.
Hi,
I posted this question earlier, but haven't gotten a response to it yet :
---------------
Hi all,
The EJB 2.0 spec says that Message Driven Beans (MDB) are only allowed a transactional attribute of either Required or NotSupported. The reasons it gives for this is as follows :
1) Since a MDB never gets called by a client so to speak, there is never a pre-existing transactional context, hence, RequiresNew and Supports, both which deal with client transactions, are meaningless to MDBs
2) Also, since Mandatory and Never throw exceptions to clients if the methods are executed in a transaction, and since there is never an MDB client, these 2 are also meaningless.
Now, I understand these 2 points totally. But in the same vein, why allow Required and NotSupported ??? Required also deals with client transactions (if one exists, Required means container will execute the transaction under the client transaction) and NotSupported suspends a client transaction (if one exists)...and since a MDB never has a client, these 2 also should be meaningless in the context of a MDB. So why allow these 2 but not the rest ??
I know that the container, according to the specs, creates a new transaction everytime for a MDB as it has no client, but I do not understand why it allows Requires and NotSupported, but not the others ???
Any ideas ??
--------------
If anyone knows the answer to this, please let me know.
Regards,
Suman
If ALL you are going to use are JSPs and entity beans, then you have no choice but to make JSPs your controllers (your Front Controller now becomes a JSP page) as well as your views...but this is not considered good design. You are better off with a servlet as a front controller.
Sanjeev,
To post a really short and direct reply to your question, your JSPs are your views, EJB is your model and normally, you would use Servlets for your controllers.
Regards,
Suman
Hi all,
Are there any sites I can go to to test my knowledge on EJBs ? I mean a site that provides some good quizzes that test your knowledge thoroughly (instead of providing questions like "Who implements the remote interface?", "What is the purpose of a session bean?", etc).
If anyone who can provide me with links, I would appreciate it.
Regards,
Suman
Is it SUPPORTS ? I thought the default transaction attribute was REQUIRED. Can anyone pls clairfy this. Does the spec specify a default ??