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