-->
These old forums are deprecated now and set to read-only. We are waiting for you on our new forums!
More modern, Discourse-based and with GitHub/Google/Twitter authentication built-in.

All times are UTC - 5 hours [ DST ]



Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
 Post subject: It seems Problem With EJB3 Session Beans.
PostPosted: Wed Feb 08, 2006 3:11 pm 
Regular
Regular

Joined: Tue Nov 08, 2005 1:30 pm
Posts: 50
Hi
Quote:
IT seems its having problem with EJB3 Session Beans


If its not the right place to post then let me know where to post..


Here is the Issue...

Session Bean Contains FindbyName Method..

that
Quote:
FindbyName
method just contains EJBQL which returns RESULTSET....

IMPORTANT HERE....

Clent

Sessionbean.findbyName method doesnot contain loops coz ur looping outside..i.e looping in cleint..
Code:
for (int i = 0; i < 50000; i += 2)
sessionbean.findbyName();



then it does really good

But when i do loop INSIDE SESSION BEAN

Like BELOW EXAMPE
in SESSIONBEAN.findbyName method

Code:
try {
            System.out.println("its in  query");
            Query query1;
                            System.out.println("elapsed time" + elapsedTime);
            for (int i = 0; i < 50000; i += 2) {

                               query1 = em.createQuery(" from EntitBean po where po.id = " + i);
                timer1 = System.currentTimeMillis();

                orders = query1.getResultList();
                timer2 = System.currentTimeMillis();
                elapsedTime += (timer2 - timer1);
               
                if (i % 200 == 0) {
                    System.out.println("elapsed time for 100   " + elapsedTime);
                    elapsedTime = 0;
                }
                orders.clear();
             

            }



This time i Get timming is too late.. if u want i can post the code also.. with all methods...




please let me know why i am getting that...


SEEMS ISSUE IN EJB3..



Thanks
Nag


Top
 Profile  
 
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC - 5 hours [ DST ]


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
© Copyright 2014, Red Hat Inc. All rights reserved. JBoss and Hibernate are registered trademarks and servicemarks of Red Hat, Inc.