GeekInterview.com
   Home |  Tech FAQ  |   Interview Questions |  Placement Papers |  Tech Articles |  Learn |  Freelance Projects |  Online Testing |  Geeks Talk |  Job Postings |  Knowledge Base | Site Search |  Add/Ask Question

GeekInterview.com  >  Interview Questions  >  J2EE  >  EJB
Go To First  |  Previous Question  |  Next Question 
 EJB  |  Question 168 of 175    Print  
what is Session Synchronization in EJB

  
Total Answers and Comments: 1 Last Update: March 26, 2007     Asked by: enjoy 
  
 Sponsored Links

 
 Best Rated Answer
Submitted by: Arun Kumar D - SCJP, SCBCD 1.3
 
SessionSynchronization is an interface in the javax.ejb package. This interface can be implemented by the ejb to show the transactional state of the bean.

The different methods that come into this interface are:

1. aferBegin() - Container call this method to inform the instance of the ejb that the transaction is started.

2. beforeCompletion() - To inform the bean that the transaction is about to be committed.

3. afterCompletion() - Called to inform that the transaction is completed.

Another imp. point is that only Statefull session beans can implement SessionSynchronization interface.

Above answer was rated as good by the following members:
srinivask82, damholda, phdsong
March 26, 2007 08:36:18   #1  
Arun Kumar D - SCJP, SCBCD 1.3        

RE: what is Session Synchronization in EJB
SessionSynchronization is an interface in the javax.ejb package. This interface can be implemented by the ejb to show the transactional state of the bean.

The different methods that come into this interface are:

1. aferBegin() - Container call this method to inform the instance of the ejb that the transaction is started.

2. beforeCompletion() - To inform the bean that the transaction is about to be committed.

3. afterCompletion() - Called to inform that the transaction is completed.

Another imp. point is that only Statefull session beans can implement SessionSynchronization interface.

 
Is this answer useful? Yes | NoAnswer is useful 3   Answer is not useful 0Overall Rating: +3    

 Related Questions

Answer posted by Mohan on 2005-05-20 08:44:39: SessionBeans typically are used to represent a client they are of two typse  Stateful Session Beans : they maintain conversational state between 
Latest Answer : Session bean is encapsulates the business logic. and carry out the task for behalf of the client. It have two types.one is stateful session bean. this is maintain the convesional state.another one is stateless session bean. donot maintain the conversional.state. ...

Answer posted by Mohan on 2005-05-20 08:45:36: Stateful session beans have the passivated and Active state which the Stateless bean does not have. 
Latest Answer : Stateful session beans follow the instance passivation techniqueStateless session beans follow the instance pooling technique.ejbActivate() and ejbPassivate() methods are not called in Stateless session beansI ...

Latest Answer : 1. doesnot exsist 2. exsists 3. passivate  invoke ejbcreate() set the sessioncontext() call create()  if the session idle call ejbPassivate() to get back to session call ejbActivate()  to end the ...

Latest Answer : 1. dose not exsist 2. exsist  to start the session set the sessionContext() call create()  to end session call remove ...

Answered by Jey on 2005-05-08 19:41:22: Session bean callback methods differ whether it is Stateless or stateful Session bean. Here they are.  Stateless Session Bean 1. setSessionContext() 2. 
Latest Answer : Session callback methods setSessionContext();unsetSessionContext();ejbLoad();ejbActivate();ejbPassivate();ejbRemove();Entity bean call back methodspublic void setEntityContext(javax.ejb.EntityContext c); public void unsetEntityContext();public void ejbLoad(); ...

Latest Answer : I'll  take a best exmaple to explain.Statefull sessionbean : ATM operationStateless Session Bean : Credit card Once we log into the ATM by entering PIN number. We can do multiple transacations like Balance enquiry, Withdrawl, ministatement..etc... ...

Answered by Jey on 2005-05-08 12:30:37: Message Driven Bean (MDB) is an enterprise bean which runs inside the EJB container and it acts as Listener for the JMS asynchronous message . It does not have Home 
Latest Answer : Message Driven Bean (MDB) is an enterprise bean which runs inside the EJB container and it acts as Listener for the JMS asynchronous message . It does not have Home and Remote interface as Session or Entity bean. It is called by container when container ...

Answered by Jey on 2005-05-08 11:55:29: Activation and Passivation is appilicable for only Stateful session bean and Entity bean.   When Bean instance is not used for a while by client then EJB 
Latest Answer : Activation and Passivation is appilicable for only Stateful session bean and Entity bean.   When Bean instance is not used for a while by client then EJB Container removes it from memory and puts it in secondary storage (often disk) so that ...

Latest Answer : 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 ...

Latest Answer : 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 ...


 Sponsored Links

 
Related Articles

The Interview Snafu

How to turn someone else’s mistake to your advantage Your dream job is about to become reality. A recruiter gave you the heads up about the perfect position at Humungous Conglomerate, Inc. You went through five interviews as well as a battery of psychological tests mandated by their HR de
 

Winning a Job Interview with a Winning Resume

Does your resume unlock your potential, take your skills to the highest level and win you the interview and the job you want now? The job market today is highly competitive and even if you think you have what it takes to get an interview you won’t get over the line without a polished, prof
 

Importance of Proper English during Job Interview

Importance of Proper English during Job Interview Your job interview is crucially important and it will determine whether or not you will get the job Depending on the type of job you re going for it is very important for you to use proper English In most cases jobs which offer higher salaries will h
 

JSP Implicit and Session Objects

JSP Implicit and Session Objects In this JPS tutorial you will learn how to program using JSP JSP expressions and Implicit Objects JSP Session Object methods of session object getAttribute String name getAttributeNames and isNew mosgoogle JSP expressions If a programmer wants to insert data into an
 

HR Interview - HR Interview Mistakes You Will Want To Avoid

HR Interview Mistakes You Will Want To Avoid The job interview can be a stressful process This is especially true for those who are going after a competitive position Your nonverbal communication combined with the answers you give during the interview will determine if you are hired mosgoogle While
 

HR Interview - Behavioral HR Interviews

Behavioral HR Interviews As the name implies a behavioral interview is an interview that is held by a human resources department to determine if an applicant has the behaviors that are appropriate for a job The company must know how an applicant will behave in a certain situations mosgoogle The logi
 

HR Interview - How To Prepare For Your HR Interview

How To Prepare For Your HR Interview Before you begin thinking about how you are going to dress for the interview it is important to do your research first You should learn everything you can about the company you wish to work for When you have detailed information about your employer you will conve
 

HR Interview - Telephone Interview Etiquette

Telephone Interview Etiquette When you conduct a telephone interview for a job it is important to show the proper etiquette Not only is it important it is critical is you wish to be hired by the company There are a number of things you will want to do and other things should never be done mosgoogle
 

HR Interview - How To Succeed At HR Interviews

How To Succeed At HR Interviews There are a number of things you will need to do in order to make sure you pass the interview process Your appearance is something that you will want to pay close attention to Even if you feel that your appearance shouldn t be a factor in whether or not you re highere
 

HR Interview - Do's and Dont's in a HR Interview

Do s and Dont s in a HR Interview There are a number of things that you will want to avoid during the HR interview process While some of these things are directed at the interviewer the other things are directed at the applicant If interviewers fail to follow the proper procedures throughout the int
 





About Us  |   Privacy Policy  |   Terms and Conditions  |   Contact  |   Site Map  |   Add Question  |   Propose Category  |   RSS Feeds  |   Articles Sitemap  |   Site Updates  |   Add Resource

Copyright © 2005 - 2008 GeekInterview.com. All Rights Reserved
Page copy protected against web site content infringement by Copyscape