File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Please Answer.

 
deepak kukreja
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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 kukreja
Ranch Hand
Posts: 54
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Could somebody pls tell me the answers to these question?
 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 11962
5
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Vishwa Kumba
Ranch Hand
Posts: 1066
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 108
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic