GeekInterview.com
Series: Subject: Topic:

EJB Interview Questions

Showing Questions 1 - 20 of 180 Questions
First | Prev | | Next | Last Page
Sort by: 
 | 

What is the difference between distributed transactions and flat transactions in ejb?

Asked By: Interview Candidate | Asked On: Jul 30th, 2005

Answered by: sudarshan on: Apr 5th, 2013

A nested transaction is a transaction that is logically decomposed into the hierarchy of sub transaction.

A distributed transaction that is logically flat, indivisible transaction that operates on distributed data

Answered by: Mannu Kumar Pandey on: Nov 3rd, 2005

Distributed transaction are executed in a distributed manner (may on more than one machine) while flat are not having this feature.

How do you establish a connection between two ear files

Asked By: srikanthsabari | Asked On: Sep 5th, 2011

Answered by: Sandhya.Kishan on: Jun 22nd, 2012

The Connection Pool Manager is used to establish a connection between two ear files.

What are the main performance issues in jboss server?

Asked By: althafrahman | Asked On: Nov 15th, 2011

What are the main metrics we have to monitor in jboss server?

What is the difference between eAR, jar and war file

Asked By: Interview Candidate | Asked On: May 8th, 2005

Answered by jey on 2005-05-08 11:23:41: in j2ee application modules are packaged as eAR, jar and war based on their functionality  jar: ejb modules which contains enterprise Java beans class files and ejb deployment descriptor are packed as jar files with .Jar extenstion war web...

Answered by: rameshkumaraj on: Oct 7th, 2011

JAR : JAVA Archives and it allows aggregating many files into One.It usually hold java classes in lib.

WAR : Web Application Archives and it stores xml,Java Classes and JSP for Web Application.

EAR : Enterprise Archives it combines JAR and WAR files into combined Archives

Answered by: Vineet on: May 30th, 2007

EAR is an EEnterprise Aapplication archive and may contain ejb JAR files, WAR files, and RAR (connector) files. They may also contain third-party libraries - but you have to know how to manipulate the...

Session bean interface

Asked By: rabia.sultana14 | Asked On: Mar 25th, 2011

Which method is declared in the sessionbean interface?

Answered by: Ranjith on: Oct 3rd, 2011

ejbActivate
ejbPassivate
ejbRemove
setSessionContext

Answered by: Andrei VISAN on: Aug 26th, 2011

create() method is declared in the session bean interface.

What is the difference between cmp and bmp

Asked By: Interview Candidate | Asked On: Jul 25th, 2005

Answered by jey on 2005-05-08 11:32:16: cmp means container managed persistence. When we write cmp bean , we dont need to write any JDBC code to connect to database. The container will take care of connection our enitty beans fields with database. The container manages the persistence of the bean. Absolutely...

Answered by: Kapil on: Aug 5th, 2011

Only Difference that in CMP no need to Write Database Connectivity Code And In BMP no need to Write the Code

Answered by: Debabrata Sau on: Feb 7th, 2006

CMP means Container Managed Persistence. In case of CMP bean , developers dont need to write any JDBC code to connect to Database. The container will take care of connection our enitty beans...

What is the difference between normal Java object and ejb

Asked By: Interview Candidate | Asked On: Sep 5th, 2005

Answered by: rebolloomare on: Jun 16th, 2011

EJB is a specification to develop JEE applications.

Answered by: srinivask82 on: Jun 11th, 2008

An EJB object is also an java object, but as it follows the EJB Specifications, it can be remotely identified in an Application server. An java object can be deployed in an application server, but can...

What are webservices?

Asked By: suresh | Asked On: Aug 16th, 2006

Answered by: shahbazhafeez on: Apr 18th, 2011

remotely hosted scalable/distributed applications/services (which process and/or store/retrieve data) such that the client does not need to execute locally on a single machine.

Answered by: coolguy_krkr on: May 11th, 2008

Webservices are typically any services that can be published over the internet or on a wide range of networks so that the functionality is available to a wider audience..There is a slight differe...

What is the difference between httpsession and stateful session bean

Asked By: Interview Candidate | Asked On: Jul 28th, 2005

Answered by: J. P. Naidu on: Jul 28th, 2005

Session Bean comes with the implicit services where as HHTPSession does not.  
 
Session Bean can be web based or can be stand alone where the other can only be web based. 
 
Session Bean can be used for multiple operation for a single HTTP request but the other cannot.

Answered by: Sam P on: May 3rd, 2005

From a logical point of view, a Servlet/JSP session is similar to an EJB session. Using a session, in fact, a client can connect to a server and maintain his state. But, is important to understan...

What is requestdespatcher?

Asked By: rao | Asked On: Oct 13th, 2005

Answered by: DHARMENDRA on: Apr 1st, 2006

RequestDispatcher is not a class it is an Interface having forward(ServletRequest,ServletResonse) and include(ServletRequest,ServletResonse) methods.

Answered by: debabrata sau on: Feb 13th, 2006

RequestDispatcher is a class having forward(req,res) & include(req,res) methods

Can I invoke runtime.Gc() in an ejb

Asked By: Interview Candidate | Asked On: Sep 2nd, 2005

Answer posted by mohan on 2005-05-21 19:26:48: no

Answered by: L.GANESH on: Oct 9th, 2006

Hi,We can call Runtime.gc() explicitly as you (all) described. But some time "May be usefull". Otherwise "No Use". When ?. Note that If we call garbage collection explicitly, this "WILL NOT GARBAGE CO...

Answered by: Rajendra on: Feb 27th, 2006

 no we cannot invoke Runtime.gc() in an EJB

Because Enterprise Beans doesn,t need to call gc.

What is the difference between Javabean and ejb

Asked By: Interview Candidate | Asked On: Aug 5th, 2005

Answer posted by mohan on 2005-05-20 08:40:04: Java beans is intra-process component where as ejb is an inter-process component  Javabeans is particularly well-suited for asynchronous, intra-application communications among software

Answered by: sai.pappu on: Sep 12th, 2008

JavaBean :1. Low-level approach for developing re-usable components for building different Java applications (Applets, stand-alone applications etc.).2. Java Beans runs in a JVM, just like other norma...

Answered by: Guest on: Dec 14th, 2005

JavaBeans- are reuseable,non-deployable components. They can't exist independently.EJB - are deployable, reuesable, server side components. They can exist independently or in integration with other components.

Wait(), notify() and notyfyall() methods

Asked By: varalakshmi.k | Asked On: Aug 19th, 2008

Why wait(), notify() and notyfyall() methods are avialble in object class but not in thread class? Explain.

Star Read Best Answer

Editorial / Best Answer

Answered by: janswain

View all answers by janswain

Member Since Sep-2008 | Answered On : Sep 25th, 2008

Each object in java is associated with a lock and the wait and notify methods are not associated with a thread but with a lock, so coupling locks and objects meant that each object should have wait and notify methods that operate on that object’s lock.

Java provides a way to lock the code for a thread which is currently executing it using the synchorinized keyword, and making other threads that wish to use it wait until the first thread is finished.These other threads are placed in the waiting state .Once the first thread completes it task than it notifies others in the queue by giving the lock to JVM.Now JVM decides which thread will exceute next by its internal algo.Hence, the wait and notify methods has to be in Object class as it acquires lock and has to notify others.....

Answered by: tarunkgupta on: Sep 2nd, 2010

A thread having a lock on the shared object (by using synchronized constructs) can invoke these methods on that shared Object. It gives a hint to JVM scheduler to pick or block the next thread contend...

Answered by: NovaCarolina on: May 12th, 2010

A lock is done on an object. It is an obect which is locked, hence these methods are characteristics of the object, hence defined in the Object class.

How to call ejbs from JSP?

Asked By: sadashivarao | Asked On: Sep 25th, 2006

Answered by: bassem.aly on: Jun 2nd, 2010

You have two option.

If the EJB is local (in the same EAR) you will use @EJB
If the EJB outside ear you will lookup in Application server context.

Answered by: Rizwan on: Feb 7th, 2007

First approach is also correct. But in that approach you have use narrow method whereas in this case you dont need it. By using this approach also we can call EJB from a jsp initalContext ic=...

1. how do j2ee application servers in general and the weblogic servers in particular help software development? 2. what are ejbs? What are factors to determine which type of the ejbs to use? Give an example...

Asked By: Basavaraj | Asked On: Feb 17th, 2006

Answered by: NovaCarolina on: May 12th, 2010

J2EE app servers give freedom to the developer/ application deployer/ end user from vendor lockin. As far as software development is concerned, such ass servers gives flexibility in choosing between d...

Answered by: Supraja on: Feb 28th, 2006

Enterprise JavaBeans (EJBs) contain the application's business logic and live business data. Although it is possible to use standard Java objects to contain your business logic and business data, usin...

Distributed object using rmi-iiop

Asked By: supari | Asked On: Mar 18th, 2008

How are parameters passed to a method of a distributed object using rmi-iiop?

Answered by: NovaCarolina on: May 12th, 2010

The parameters which are passed to remote methods will be a copy of the actual parameter objects. The basic rule is that the parameters should be Serializable or primitives. The remote JVM will get an exact copy of the objects being passed as parameters from the client JVM.

Answered by: nitinpokhriyal on: Jun 14th, 2009

In remote calls, parameters passed by value not by reference.

Why an onmessage call in message-driven bean is always a seperate transaction

Asked By: Interview Candidate | Asked On: Apr 26th, 2005

Answered by: nemashailendra on: Mar 25th, 2010

Message driven beans cannot be instantiated by a client application. The container creates the mdb instantiates an mdb each time a message is available on a jms queue. Hence by default each message is...

Answered by: Anand on: Apr 26th, 2005

The MDB is stateless and inherently each message is unique with respect to the MDB. 
Each message needs to be processed independently. Hence the need for separate transactions

How do you check whether the session is active in stateful session bean

Asked By: Interview Candidate | Asked On: Jul 28th, 2005

Answered by: nemashailendra on: Mar 25th, 2010

Use the callback methods ejbActivate() and ejbPassivate() to throw a user-defined message whenever the container calls these methods to activate or passivate a stateful session bean instance.

Answered by: J. P. Naidu on: Jul 28th, 2005

In Stateful session bean session is not itself a separate entity. it is contained in the bean it self. So in order to check tht we need the check whether the Stateful session bean is present or not which is done by just invoking the home interface with the jndi

What is acid

Asked By: Interview Candidate | Asked On: Jul 25th, 2005

Answered by jey on 2005-05-08 17:27:45: acid is releated to transactions. It is an acronyam of atomic, consistent, isolation and durable. Transaction must following the above four properties to be a better one  atomic: it means a transaction must execute all or nothing at all. consistent:...

Answered by: opbehera on: Feb 8th, 2010

A - AtomocityC - ConsistencyI - IsolationD - Durability.When Transactoon(Tx) middleware service is enabled on the Businesslogic the data on the application available outside or in DB s/w&nbs...

Answered by: Ritesh patni on: Jul 25th, 2005

Atomic-- should execute all or nothing...rollback come into picture Consistent--Consistency is a transactional characteristic that must be enforced by both the transactional system and the applic...

What is ejb

Asked By: Interview Candidate | Asked On: Jul 29th, 2005

Answered by: opbehera on: Feb 8th, 2010

EJB is a distributed technology i.e capable of developing  java based  distributed applications, enterprise application & heavy weight business component giving the advantages of readyma...

Answered by: sai.pappu on: Sep 26th, 2008

EJB is an server side component & its a WODA ( Write Once Deploy Any Where).

EJB's run will under the control of EJB container.

EJB is popular due to System level services provided by it.

Developer can more concentrate on Business Logic due to services provided byu EJB.


thanks.

First | Prev | | Next | Last Page

 

 

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Ads

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.