-->
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.  [ 3 posts ] 
Author Message
 Post subject: getting FullTextSession
PostPosted: Wed Jan 13, 2010 1:46 pm 
Beginner
Beginner

Joined: Wed Dec 16, 2009 10:34 am
Posts: 21
Hello :

I'm getting a exception when invoking the hibernate session factory.
I have the same HibernateUtil class that is in this link : https://www.hibernate.org/42.html
but when invoking the getSessionFactoty method i get the following message :

javax.ejb.EJBException: Stateless SessionBean method returned without completing transaction
at com.sun.ejb.containers.BaseContainer.checkExceptionBeanMgTx(BaseContainer.java:3689)
at com.sun.ejb.containers.BaseContainer.postInvokeTx(BaseContainer.java:3560)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1379)
at com.sun.ejb.containers.BaseContainer.postInvoke(BaseContainer.java:1316)
at com.sun.ejb.containers.BaseContainer.callEJBTimeout(BaseContainer.java:2880)


Does Somebody know about this exception ?

I'll appreciate the help


Top
 Profile  
 
 Post subject: Re: getting FullTextSession
PostPosted: Thu Jan 14, 2010 2:11 pm 
Hibernate Team
Hibernate Team

Joined: Thu Apr 05, 2007 5:52 am
Posts: 1689
Location: Sweden
Never seen this exception before, but I would double check that your session management code properly commits transactions. Also, in a container the Open Session In View pattern works often best.
How do you create/manage transactions? Manually or declaratively?

--Hardy


Top
 Profile  
 
 Post subject: Re: getting FullTextSession
PostPosted: Mon Jan 18, 2010 4:28 pm 
Beginner
Beginner

Joined: Wed Dec 16, 2009 10:34 am
Posts: 21
I solved:

rather than use the sesisonfactory to get a hibernate session, i used hibernateentitymanager.class this way:

Session hsession = ((HibernateEntityManager) em.getDelegate()).getSession();

then i can use the hibernate instance session hsession.


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

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.