Stateful sessio bean problem

View: New views
1 Messages — Rating Filter:   Alert me  

Stateful sessio bean problem

by szilardd84 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

I've got a login servlet page wher 1 want to store the client name when he enter, so 1 want to use statless session bean



@EJB

    private AktivRemote aktivBean;



this.aktivBean.setItem(id);



the session bean:



@Stateful

public class AktivBean implements AktivRemote {

   



    private LinkedList<String> l = new LinkedList<String>();



    public void setItem(String item) {

        l.add(item);

    }



    public String getItem(){

        return l.getFirst();

    }

}



the remote interface

@Remote

public interface AktivRemote {



    void setItem(String item);



    String getItem();

}





and after the client enterd and i want to ask the id like this

this.aktivBean.getItem()

I got null pointer exception

1 try to use String not list but when i asked the id i gut null

so what can be the problem?