Hi
i am a pretty new EJB 3.0 noob ... so perhaps someone can help me
package com.business;
|
| import javax.ejb.Local;
| import javax.ejb.Stateless;
| import javax.persistence.EntityManager;
| import javax.persistence.PersistenceContext;
| import javax.persistence.Query;
|
| import com.entity.InterfaceInXmlQueueDtl;
| import com.inter.InterfaceInXmlQueueDtlInter;
|
| @Stateless
| @Local(InterfaceInXmlQueueDtlInter.class)
| public class InterfaceInXmlQueueDtlEJB implements InterfaceInXmlQueueDtlInter
| {
| @PersistenceContext(unitName = "TestEJB")
| private EntityManager em;
|
| public void getList()
| {
| long now = System.currentTimeMillis();
| for (int i = 0; i < 10000; i++)
| {
| Query q = em.createQuery("from InterfaceInXmlQueueDtl");
| q.setMaxResults(1);
| q.setFirstResult(i);
| InterfaceInXmlQueueDtl x = (InterfaceInXmlQueueDtl) q.getSingleResult();
| //System.out.println(x.getPk().getSequenceNum());
|
| }
| long end = System.currentTimeMillis();
| System.out.println((end - now) / 1000);
| }
|
| }
so i have a table that has in total 2.000.000 rows and i am just trying to do a
performance check on ejb 3...
so all i do is looping through the first 10.000 and try to load the bean... and then just
stop the time of how long it took...
so my problem is now after about 5000 rows or something it throws an exception saying
that the transaction is not active and the session is closed...
could this be an timeout error ??
if not what else could it be ?
Thanks for any help
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4124553#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...