users@glassfish.java.net

Re: Sever Deployment Error - Netbeans 6.8 & Glassfish v3

From: <glassfish_at_javadesktop.org>
Date: Mon, 11 Jan 2010 13:22:12 PST

Managed Bean Code:

/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.example.vaadin;

import javax.ejb.Stateless;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;
import javax.annotation.ManagedBean;
import java.util.Collection;
import javax.persistence.Query;

/**
 *
 * @author levin
 */
@Stateless
@ManagedBean
public class DataFetcher {

    @PersistenceContext
    protected EntityManager entityManager;

    public void message() {
        System.out.println(entityManager.toString());
    }

    public Collection<TSo> getSoCollection() {
       
       // entityManager.r
        Query query = entityManager.createNamedQuery("TSo.findAll");
        query.setHint("eclipselink.cache-usage", "DoNotCheckCache");
        //query.
        Collection<TSo> result = query.getResultList();

        return result;


    }
    public Collection<TBe> getBeCollection(TSo parentSo) {

        Collection<TBe> result = parentSo.getTBeCollection();

        return result;
    }
    public void merge(Object object)
    {

        entityManager.merge(object);
    }
    
}
[Message sent by forum member 'levinivel' (christoph.gleichweit_at_student.tugraz.at)]

http://forums.java.net/jive/thread.jspa?messageID=380159