• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

When a business method invoked is timed out...?

 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Can some one clarify the following questions please? The anwers are confusing. Help!!!
What happens when a business method is invoked on a bean that has timed out?
1.A new bean instance is created and the method is executed on it.
2.Rempte exception is thrown
3.EJB Exception is thrown
4.ObjectNotFoundException is thrown
5.The implementation is vendor specific

Your J2EE solution that you implemented has been a huge success. The number of customers is almost 5 times what has been anticipated and performance is becoming an issue
(select the best two)
1) Add more RAM to the 4 processor 4GB RAM Appserver
2) Add another AppServer set the webconnector to round-robin
3) Add a second network (LAN) card to the web server
4) Upgrade the database hardware
Two programs are there- and running concurrently.
Both will select multiple rows from the table. No
table updates can occur while the 2 programs are
running. Which isolation can provide BEST performance
while preventing conflicts?
a) TRANSACTION-NO
b) TRANSACTION-READ-UNCOMMITTED
c) TRANSACTION-READ-COMMITTED
d) TRANSACTION-REPEATABLE-READ
e) TRANSACTION-SERIALIZABLE
 
Rahul Mahindrakar
Ranch Hand
Posts: 1869
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Johny,
We have a simple rule over here. The rule is
One Post One Question.
Please do the needful while I ponder over the answers. The questions are good.
 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Oh, I did n't know that. Thanks Rahul.
Anyway here is my first question:
What happens when a business method is invoked on a bean that has timed out?
1.A new bean instance is created and the method is executed on it.
2.Remote exception is thrown
3.EJB Exception is thrown
4.ObjectNotFoundException is thrown
5.The implementation is vendor specific
Could the explanation also be given for the answer.
Thanks.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
A Remote Exception is thrown. The EJBRemote reference of the client is invalid.
HIH
Anil
 
Ram Dhan Yadav K
Ranch Hand
Posts: 321
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Ejb Spec: 12.3.4 specifies that NoSuchObjectException a subclass of RemoteException is thrown.
So the answer must be 2
 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank you so much. Shall we go to the next clarification?
Your J2EE solution that you implemented has been a huge success. The number of customers is almost 5 times what has been anticipated and performance is becoming an issue
(select the best two)
1) Add more RAM to the 4 processor 4GB RAM Appserver
2) Add another AppServer set the webconnector to round-robin
3) Add a second network (LAN) card to the web server
4) Upgrade the database hardware
I feel the best answers are 2 & 4. Am I right? Help...
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
You are write.. 2 and 4
 
Guillaume Compagnon
Ranch Hand
Posts: 106
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Originally posted by Johny Sam:
Two programs are there- and running concurrently.
Both will select multiple rows from the table. No
table updates can occur while the 2 programs are
running. Which isolation can provide BEST performance
while preventing conflicts?
a) TRANSACTION-NO
b) TRANSACTION-READ-UNCOMMITTED
c) TRANSACTION-READ-COMMITTED
d) TRANSACTION-REPEATABLE-READ
e) TRANSACTION-SERIALIZABLE

that seems that dirty reads should not be prevented. So if you want to be trasansactional (no updates in parallel) and to provide the best performance... the READ_UNCOMMITTED shoul be enough
So, the answer is b)
 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I do not think the answer is convincing.
It is not executing the uncommitted data.
Or, by default could it be READ_COMMITTED. HELP???
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Two programs are there- and running concurrently.
Both will select multiple rows from the table. No
table updates can occur while the 2 programs are
running. Which isolation can provide BEST performance
while preventing conflicts?
a) TRANSACTION-NO
b) TRANSACTION-READ-UNCOMMITTED
c) TRANSACTION-READ-COMMITTED
d) TRANSACTION-REPEATABLE-READ
e) TRANSACTION-SERIALIZABLE


The question looks a bit confusing to me..
1. Are we assuming that there will be no updates to the database at when these programs are running ??
OR
2. Are we assuming while one of the programs is updating the DB the other's update is not allowed ??
My response..
Scenario 1.
TRANSACTION-READ-UNCOMMITTED will provide the best performance ( well does everytime ). We don't have to worry about the dirty read, repeatable read and phantom read problems which won't occur since the DB is not updated.
Scenario 2.
TRANSACTION-REPEATABLE-READ will provide the best performace by preventing dirty read and repeatable reads. ( Since only updates are in question).
Phantom read will occur when somebody inserts a new record in that case TRANSACTION-SERIALIZABLE will prevent all the problem but the worst performance. This I guess definitely not the intent of the question.
Hope this helps.
Anil
 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
When two programs are running concurrently,
how can it be read uncommitted.
If there is no concurrent transaction, this is the best one to assign to improve performance.
The answer should be read committed, I mean C.
Am I right? Awaiting reply.
 
Johny Sam
Greenhorn
Posts: 17
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just cleard from the Blue Print. The lower the isolation the greater the concurrency.
So the answer must be B.
 
Anonymous
Ranch Hand
Posts: 18944
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's right..
Anil
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic