45,000 Jobs - Get an Interview Call,  Post Your Resume Here
SURESHKUMAR.NET FORUMS
Registered Member Login:
Not a member? Register today!



Welcome to the SURESHKUMAR.NET FORUMS.

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.




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.

How is persistence implemented in enterprise beans

        

Reply
 
LinkBack Thread Tools Display Modes
Old 10-05-08, 01:44 AM   #1 (permalink)
Senior Member
 
Join Date: Apr 2008
Posts: 1,613
Thanks: 0
Thanked 4 Times in 4 Posts
Rep Power: 18 Shailu07 will become famous soon enough
How is persistence implemented in enterprise beans

How is persistence implemented in enterprise beans?

Shailu07 is offline Offline   Reply With Quote
Old 08-08-08, 04:04 PM   #2 (permalink)
Junior Member
 
Join Date: Aug 2008
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Rep Power: 2 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 Offline   Reply With Quote
Reply

Tags
beans , enterprise , implemented , persistence


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

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 07:44 PM
How enterprise beans will handle concurrent and loopback calls on entity beans Shailu07 EJB 0 09-05-08 03:22 PM
How entity beans support container managed persistence Shailu07 EJB 0 09-05-08 03: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 05:05 PM.

More Interview Questions Here...

Content Relevant URLs by vBSEO 3.3.0