Which getter?

I have a similiar method just for customers and contacts. I tried it like
this:

        public Customer getCustomer(
                        String customerId, String sessionId) throws Exception{
                Session session = sessionBean.isSessionValid(sessionId);
                if(session!=null) {
                        Customer customer = (Customer) 
entityManager.find(Customer.class,
customerId);
                        if(customer==null) {
                                throw new Exception("Customer does not exists 
>>> "+customerId);
                        }
                        customer.getContactList();
                        return customer;
                }
                return null;
        }

Before I return my Entity i call the getter-Method which should load all
Contacts in my Customer Object. But my session is still closed?! I think i
didnt understand you.

--
View this message in context: 
http://openejb.979440.n4.nabble.com/CMP-failed-with-3-layered-Object-structure-tp4655311p4655563.html
Sent from the OpenEJB User mailing list archive at Nabble.com.

Reply via email to