I am not a regular developer. I have written some applications before that do their work. Recently I started with a new one with which I have a problem.

I have a class that I annotate with:
@Named("natuur")
@SessionScoped
The class itself implements Serializable. I did this in my previous applications too and there it worked. In this application it does not. Every time I call the class in my application the class is instantiated again. I first checked the documentation of Tomee. There they use the @Stateless. With this annotation it does not work too. I checked the following with my previous application: - pom.xml: exactly the same except for the project specific tags like artifactId, name, description;
- beans.xml:    exactly the same (=empty);
- web.xml: exactly the same except for the description and display-name tags; - the war file: exactly the same except for the jar file of the application.

My Tomee version is 1.7.2 plus. I do not know where to look further. What am I missing? Must be something obvious but I fail to see what.

Reply via email to