rani bedi

Ranch Hand
+ Follow
since Feb 06, 2001
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
(keep public parts private until JForum day)
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt
Moderation Tools

Recent posts by rani bedi

I am in the same situation. Can't decide what to do next? IBM 486, SCEA sounds good.
Congrats !!!

Throw some light on ur preparations for SCEA part 1
Any idea or thoughts when is new version of exam coming out?
I Passed SCBCD yesterday with 82%. Took 3 weeks to prepare for the exam. Would like to thanks Kathy & Bert for the wonderful book HF EJB. Apart from that thanks to all the free mock exams - www.ejbcertificate.com www.jdiscuss.com. Last but not the least thanks goes to JavaRanch.
[ March 23, 2005: Message edited by: Parmeet Sarpal ]
12 years ago
Ravindra, it sounds good
Consider the following relationship between Customer and Address entities.
Customer 0..1 ----------- 0..* Address
What will be the result of the follow method call made by a client?
somecustomer.setAddresses(null);

Select 1 correct option.

1 In the Customer bean, the reference variable pointing to a Collection object for addresses will be set to null.

2 In the Customer bean, the Collection object referenced by variable for addresses will be emptied.

3 This call is illegal. It should pass an empty Collection object if it wants to remove all the addresses for a customer.

4 In the Customer bean, the Collection object referenced by variable for orders will be emptied and all the addresses entities will be deleted from the database.
A client has two object references to a session bean's home interface. How can it find out whether the object references are accessing the same object?

Select 1 correct option.

1 Using the == operator.

2 Using the equals() method.

3 Using the isIdentical() method.

4 Using the isEqual() method.

5 Get the PrimaryKey for both and then use equals() method to compare the primary keys.

6 Get the PrimaryKey for both and then use isIdentical() method to compare the primary keys.

7 None of these.
Gemini, I think MDB beans as well as container can throw EJBException.
Keerthi mentioned about poison messages. In CMT beans the message acknowledge is tied to the status. If bean can't commit, that message will keep coming back again n again. But still I don't understand how can it harm application server?
method-permission can have one or more role-name elements.

<!ELEMENT method-permission (description?, ((role-name+)|unchecked), method+)>
[ March 21, 2005: Message edited by: Parmeet Sarpal ]
1 public void onMessage(Message msg)
2 {
3 System.out.println("Message received.");
4 boolean flag = getBooleanProperty("myflag"); //assume flag is always true
5 if(flag)
6 {
7 throw new EJBException("Can't process this message."); //line 10
8 }
9 }


Which of the given options are correct regarding the following onMessage code for a message driven bean with container managed transactions and a transaction attribute of 'Required'?
Select 1 correct option.

a It is invalid because a message driven bean cannot throw an EJBException.

b It may potentially bring down the application server.

c It will work well if line 7 is replaced with: context.setRollbackOnly();

d It is a valid and harmless code that does nothing.
According to www.ejbcertificate.com the correct answer is 5. Why not 2?
Which one of the following statements regarding the client view of exceptions received from an enterprise bean invocation is correct?

1. The client can safely continue the transaction by retrying the operation if an application exception is received.

2. The client can safely continue the transaction by retrying the operation if an application exception is received, but only after checking the transaction has not been marked for rollback.

3. The client can safely continue the transaction by retrying the operation if a non-application exception is received.

4. A local client cannot continue a transaction if javax.transaction.TransactionRolledbackLocalException is received.

5. A remote client cannot continue a transaction if javax.transaction.TransactionRolledbackException is received.
TransactionRequiredException and TransactionRolledbackException are in the javax.transaction package. In the book it says they are from package - javax.ejb

I have found so many errors in this book. Not very sure how much I can rely on the information from this book?
Which method can access an enterprise bean in a consistent manner for a container managed stateful session bean that implements the SessionSynchronization interface?

1. constructor()
2. setSessionContext()
3. ejbCreate()
4. beforeCompletion()
5. afterCompletion()

The correct is 4 - afterCompletion()

But according to page 196 of the HF EJB ejbCreate() can access another bean's menthods. Please advise.