aspose file tools*
The moose likes EJB and other Java EE Technologies and the fly likes Please Answer. Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Soft Skills this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Java » EJB and other Java EE Technologies
Bookmark "Please Answer." Watch "Please Answer." New topic
Author

Please Answer.

deepak kukreja
Ranch Hand

Joined: Aug 13, 2001
Posts: 54
1. How is concurrency controlled in EJB, i.e. what happens when two client call the same bean at the same time.
2.When is an MDB instantiated?
3.What is dirty read, repeatable read and phantom read, how do you use transaction isolation in EJB.
4.Can you use threading and reflection inside EJB.
5.Why are separate home and remote interfaces required in the EJB architecture, why not only one?
6.Why is there a remove() method in both the EJBHome and the EJBObject?
7.What does the create() method do in the home interface.
8.What protocol is used in EJB.


Deepak<br />SCJP
deepak kukreja
Ranch Hand

Joined: Aug 13, 2001
Posts: 54
Could somebody pls tell me the answers to these question?
Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hi,
These questions look as if ur going for some interview.
Pls refer to some good EJB Books or download Mastering EJB by ed roman or ejb specs pdf file. U will find all the answers.
Seetesh
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
1. How is concurrency controlled in EJB, i.e. what happens when two client call the same bean at the same time.
The EJB container blocks the second call until the first thread has finished.
2.When is an MDB instantiated?
I'm not quite sure if I remember correctly, but I think this is not explicitly dictated by the EJB specification. Could be at application startup or just-in-time when the JMS provider receives a message into the queue the MDB is configured to listen to. Dunno.
3.What is dirty read, repeatable read and phantom read, how do you use transaction isolation in EJB.
The transaction isolation problems are clearly described in the EJB specification. You specify the isolation level with the deployment descriptor.
4.Can you use threading and reflection inside EJB.
Yes, you can. The specification strongly disapproves doing that but vendors haven't enforced these restrictions so technically you can (and many do).
5.Why are separate home and remote interfaces required in the EJB architecture, why not only one?
Separation of concerns. The home interface is for creating/finding/deleting instances while the remote interface (a.k.a. business interface) is for using a bean instance.
6.Why is there a remove() method in both the EJBHome and the EJBObject?
So that you don't have to obtain a reference to a home/remote interface to just to be able to remove a bean if you only have a reference to the other interface.
7.What does the create() method do in the home interface.
Specifies a way to create a bean instance? I'm not quite sure what you mean by this?
8.What protocol is used in EJB.
It depends on the implementation (WebLogic, for example, uses a proprietary "T3" protocol). RMI and IIOP are the most common protocols.


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Vishwa Kumba
Ranch Hand

Joined: Aug 27, 2003
Posts: 1066
Originally posted by Lasse Koskela:
The transaction isolation problems are clearly described in the EJB specification. You specify the isolation level with the deployment descriptor

Is that Vendor specific? Does Weblogic/Websphere/JBoss support it?
Vasantha Prabha
Ranch Hand

Joined: Oct 02, 2003
Posts: 108
So that you don't have to obtain a reference to a home/remote interface to just to be able to remove a bean if you only have a reference to the other interface.
Hi If the Client specify the remove method.Will the bean instance got
removed from the client or It is the method to indicate the
container to remove the bean instance...
Regards,
Sangeetha


Regards,Vasantha<p>Great minds discuss ideas. Average minds discuss events. Small minds discuss people.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Please Answer.