• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Please Answer.

 
Ranch Hand
Posts: 54
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Could somebody pls tell me the answers to these question?
 
Ranch Hand
Posts: 244
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Ranch Hand
Posts: 1066
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 108
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
To get a wish, you need a genie. To get a genie, you need a lamp. To get a lamp, you need a tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic