session « EJB « JPA Q&A





1. hibernate session has gone    stackoverflow.com

I've faced lazy init with strange conditions.

  1. Transaction: fetch of underlying entites of a persistent object.
  2. Transaction: fetch of underlying entites of a not persistent object.
  3. Transaction: merge of a persistent object. Then persist ...

3. Is it able to share a hibernate session bewteen ejb?    forum.hibernate.org

Hi Experts, I was trying to pass an session object from one ejb A to another B by looking up B from initial context in A's code. The method in B just update entities in the session but not commit, where A would do the commit. But there's error in A's commit statement complaining about Transaction is not active. So I ...

4. Servler or session EJB?    forum.hibernate.org

My view on the whole thing: - Session EJBs is a means to make resusable application logic that can be called through a network. That's the holy grail of software resue, sort of - f.eg, design a method that returns a list of all customers, and place it in a (session) EJB on a server. In the future, whenever you need ...

5. Please critique this reusable PersistenceManager Session EJB    forum.hibernate.org

Beginner Joined: Thu Feb 05, 2004 10:39 pm Posts: 44 Hi all, I am trying to create a reusable persistence manager Session bean that I can use across my application. Naturally, I am happy to share the code here if it is of use to anyone. However, I would like to ask everyone her for a bit of code review in ...

6. Quick Session EJB + Hibernate questions    forum.hibernate.org

I know I have to do my homework in depth, but I would appreciate two quickies please. a) What happens when a remote session EJB business method returns an HBM POJO, that features a lazy-loaded collection (Set foos) and getFoos is called? b) Do you think it's OK for the web layer to pass (unsaved) HBM POJOs to the session EJB ...

7. Create Hibernate Session with in Multiple EJB Calls    forum.hibernate.org

We have the standard design where the Session Bean calls Hibernate DAO'.s. Whicn in turn creates new hibernate session every time when we make a call to the Hibernate DAO. From my understanding Hibernate Session is wrapper around around database connection with hibernate session features. Is creating hibernate session expenise evry time when making call to the Hibernate DAO's.

8. EJB throws ClassCastException during session.save.    forum.hibernate.org

Author Message rgc3679 Post subject: EJB throws ClassCastException during session.save. Posted: Fri Sep 16, 2005 1:58 pm Newbie Joined: Thu Sep 15, 2005 7:45 pm Posts: 6 Hi Forum, I am using Hibernate 3.0.5 under JVM 1.4.2_09. My app server is Oracle 10g iAS (Oracle iAS is an Orion variant). My app includes a stateless session EJB which calls ...

9. EJB and Hibernate Session lazy problem    forum.hibernate.org





10. Tutorial/Example/Sample Code for Hibernate in Session EJB    forum.hibernate.org

Hi. I'm new to Hibernate and I've read through the tutorial roadmap for new users and Chapter 2 of the reference plus some tutorials on the Web. I have so far also completed the Hibernate installation and database configuration successfully. What I would like to do is to develop a session EJB (to deploy under WebLogic server) that acts as a ...

11. how to use Open Session In View w/EJB3    forum.hibernate.org

I tried replacing the CaveatEmptor HibernateThreadExtendedFilter with EntityManagers instead of Sessions so I could just use EJB3. I ran into a problem in that it is trying to pass a EntityManager to the method ThreadLocalSessionContext.bind(Session session); I then look for a similar context in EJB3 javadoc, but can't find one. How does one do "Open Session In View" pattern with EJB3. ...

12. random session close on my hibernate ejb    forum.hibernate.org

Newbie Joined: Tue Oct 17, 2006 5:18 am Posts: 9 Hi, I use following HibernateUtil class for hibernate ejb application I occasionally got session close exception that happen randomly How can I fix this randm exception of session close on ejb application The exception as a follow "[#|2006-12-24T15:58:39.627+0700|WARNING|sun-appserver-pe9.0|javax.enterprise.system.stream.err|_ThreadID=28;_ThreadName=p: thread-pool-1; w: 29;_RequestID=09b98503-a044-473a-90d2-c2f011aaf9a4;|org.hibernate.SessionException: Session is closed at org.hibernate.jdbc.JDBCContext.connection(JDBCContext.java:116) at org.hibernate.transaction.JDBCTransaction.commitAndResetAutoCommit(JDBCTransaction.java:139) at org.hibernate.transaction.JDBCTransaction.commit(JDBCTransaction.java:115) at ...

13. Closing session in EJB?    forum.hibernate.org

Newbie Joined: Tue Jul 22, 2008 5:19 am Posts: 10 Hi, I passed from Hibernate 3.0 to Hibernate 3.3.1 and I have this problem: I'm using websphere 6.1 with EJB. In the previous version all worked good, if I load an entity with a children collection inside (with lazy propert set to true) if I try to get this collection outside ...