[jboss-user] [EJB 3.0] - Deployment problem

qbacomarch do-not-reply at jboss.com
Mon Jul 17 04:43:02 EDT 2006


This is my bean:

package ejbPackage;

import java.util.Collection;
import javax.ejb.Stateless;
import javax.ejb.*;
import javax.annotation.PostConstruct;
import javax.persistence.EntityManager;
import javax.persistence.PersistenceContext;

@Stateless(name="haloBean")
public class haloBean implements ejbPackage.haloRemote {
    
    private int temp;
    
//    @PersistenceContext
//    EntityManager em;
    
    /** Creates a new instance of helloBean */
    public haloBean() {
    }
    

    
//    public String addTeam(int id,String name, String desc){
//        Team tm = new Team(id,name,desc);
//        em.persist(em);
//        return "dodano - ok";
//    }
    
    @PostConstruct
    public void inicjalizacja(){
        this.temp = 10;
        //nie wypisuje bo to nie jego konsola :-P
        System.out.println("@PostConstruct");
    }
    
    public String sayHello(){
           return "hello master";
    }
    public int getTemp(){
        return temp;
    }
    
//     public Collection getTeam(){    
//        
//        return em.createQuery("from Team t").getResultList();
//    }
    
}

Its run, but when i uncomment it's crasched:

javax.naming.NameNotFoundException: remote not bound
....
I can't find my remote interface in jmx console (there is only client and bean) when the part of code is comment the  interface is visible too.

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3958400#3958400

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3958400



More information about the jboss-user mailing list