Forums.Sureshkumar.net : A Perfect Place to Share Knowledge         Blogs     Games    Magazines    

"Sharing knowledge does not lessen your store, often it gets you more. Sharing plays a key role in relationships and bonding, happens in small steps and is assisted through community membership."

Go Back   SURESHKUMAR.NET FORUMS > Interview Questions > Interview Questions > Java > J2EE > EJB
Register FAQ Members List Calendar Games Blogs Search Today's Posts Mark Forums Read

EJB EJB Interview Questions asked in various Interviews. Professionals are invited to share Answers for these EJB Interview Questions. EJB Interview Questions with answers, Experiences, Career Advices, Tips and more.

   

Reply
 
LinkBack Thread Tools Rate Thread Display Modes
Old 10-05-08, 02:44 AM   #1 (permalink)
Senior Member
 
Join Date: Apr 2008
Posts: 1,565
Thanks: 0
Thanked 1 Times in 1 Posts
Thanks: 0
Thanked 1 Time in 1 Post
Rep Power: 16 Shailu07 is on a distinguished road
How is persistence implemented in enterprise beans

How is persistence implemented in enterprise beans?
Shailu07 is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Old 08-08-08, 05:04 PM   #2 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 1 poolasumithkumar is on a distinguished road
logic for date difference in years

this is the new method , instead of Date pass Calendar object which need to be calculate


- public static int calcAge(Calendar dob) {
int age = 0;
Calendar curDate = Calendar.getInstance();
Calendar tmpDate = Calendar.getInstance();
tmpDate.setTime(dob.getTime());
tmpDate.set(Calendar.YEAR,curDate.get(Calendar.YEAR));
if (dob.before(curDate)) {
age = curDate.get(Calendar.YEAR) - dob.get(Calendar.YEAR);
if (tmpDate.after(curDate)) {
age--;
}
}
return age;
}
poolasumithkumar is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do enterprise beans access native libraries Shailu07 EJB 0 09-05-08 08:44 PM
How enterprise beans will handle concurrent and loopback calls on entity beans Shailu07 EJB 0 09-05-08 04:22 PM
How entity beans support container managed persistence Shailu07 EJB 0 09-05-08 04:09 PM
One farmer cultivates beans, corns, kale, squash and wheat in a year m.gayatri Aptitude Questions 0 24-01-07 02:19 PM
j2ee interview Q & A jasmine84 JAVA Technologies 4 23-01-07 02:09 AM


All times are GMT +6.5. The time now is 04:54 AM.





Search Engine Optimization by vBSEO 3.1.0