You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomee.apache.org by Marco DE BOOIJ <ma...@debooy.eu> on 2015/12/19 16:37:17 UTC

SessionScoped does not seem to work

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.

Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
Hope that they are all in now. It is in the 3 repositories: Tomee3, 
Components and doosutils. How can I remove the ones that were not 
correctly created?

Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
> Yep on github or bitbucket or any public source repository - no binary. Mvn
> tomee:run is a nice to have.
> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>> only found a message about the facelets library but this I get for a
>> working application too:
>>
>> dec 19, 2015 4:59:19 PM
>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>> SEVERE: Error Loading Library:
>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>> java.io.IOException: Error parsing
>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>
>> I added a debug message in the constructor method and this message is
>> written evertime that I use the bean.
>>
>> I suppose that I need to upload the application to some GIT server? It
>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>
>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>
>>> Hi
>>>
>>> Stateless and Singleton are Dependent by spec. No log message? Sure it is
>>> created during a request? Do you have a sample to reproduce it?
>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>> écrit :
>>>
>>> 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.
>>>>
>>>>


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
Thank you Greg for your explanation. With the hint of Romain I found 
this just before I read your mail. I think that there is even a third 
SessionScoped class.

Op 20-12-15 om 22:44 schreef Greg Trasuk:
> Marco:
>
> There are two different @SessionScoped annotations in the JEE6 API - ‘javax.faces.bean.SessionScoped’ (this is from the JSF spec) and ‘javax.enterprise.context.SessionScoped’ (this is from the CDI spec).  When you created a JSF managed bean, you need to be consistent - if you use the @ManagedBean annotation, then you can use the jsf @SessionScoped annotation, but if you use the @Named annotation, then you need to use the CDI spec annotation.
>
> Unfortunately, Eclipse doesn’t know this, so if you used ‘Ctrl-Shift-O’ to organize your imports, and you’re not paying attention to which one it picks, you can end up importing the wrong annotation very easily.
>
> Change the ‘import’ statement in your ‘Tomee.java’ to import javax.enterprise.context.SessionScoped rather than javax.faces.beans.SessionScoped and your bean should work as you intend.
>
> Cheers,
>
> Greg Trasuk
> http://www.webagesolutions.com
>


Re: SessionScoped does not seem to work

Posted by Greg Trasuk <tr...@stratuscom.com>.
Marco:

There are two different @SessionScoped annotations in the JEE6 API - ‘javax.faces.bean.SessionScoped’ (this is from the JSF spec) and ‘javax.enterprise.context.SessionScoped’ (this is from the CDI spec).  When you created a JSF managed bean, you need to be consistent - if you use the @ManagedBean annotation, then you can use the jsf @SessionScoped annotation, but if you use the @Named annotation, then you need to use the CDI spec annotation.

Unfortunately, Eclipse doesn’t know this, so if you used ‘Ctrl-Shift-O’ to organize your imports, and you’re not paying attention to which one it picks, you can end up importing the wrong annotation very easily.

Change the ‘import’ statement in your ‘Tomee.java’ to import javax.enterprise.context.SessionScoped rather than javax.faces.beans.SessionScoped and your bean should work as you intend.

Cheers,

Greg Trasuk
http://www.webagesolutions.com

> On Dec 20, 2015, at 11:45 AM, Marco DE BOOIJ <ma...@debooy.eu> wrote:
> 
> Keep it in this question :)
> 
> I created a basic application. It has the same behavior. Every call to the bean does an initialisation. I uploaded it to github. The URL is https://github.com/mdebooy/SessionScoped.
> 
> Op 20-12-15 om 15:56 schreef Marco DE BOOIJ:
>> After a nights sleep I came to the conclusion that it will be hard to have it tested this way. Too much things involved (database, application that 'delivers' the texts on the screen). I will se if I can make something simpler and hope that the problem remains. I then will make a new question when I am ready.
>> 
>> Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
>>> probably try to make it a single module to make it easy to test
>>> 
>>> 
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> <http://www.tomitribe.com>
>>> 
> 


Re: SessionScoped does not seem to work

Posted by Mark Struberg <st...@yahoo.de>.
Was about to write the same pointer (wrong import) ;)

In Apache DeltaSpike we even have a small Extension which ‚corrects‘ those wrong scope annoations for you because it’s such a frequent user-error ;)

LieGrue,
strub


> Am 20.12.2015 um 22:38 schrieb Marco DE BOOIJ <ma...@debooy.eu>:
> 
> It is intended to use CDI. Did not have a clue what you talked about. Then I searched the web, checked the import in the working and non working SessionScope beans and found that I used the wrong SessionScope class. Changed it to javax.enterprise.context.SessionScoped and now it works. Hope that this is the correct answer to you question :)
> 
> Op 20-12-15 om 21:22 schreef Romain Manni-Bucau:
>> Is it intended to NOT use CDI session scope - guess it makes the issue easy
>> to solve ;)?
>> Le 20 déc. 2015 18:56, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>> 
>>> Keep it in this question :)
>>> 
>>> I created a basic application. It has the same behavior. Every call to the
>>> bean does an initialisation. I uploaded it to github. The URL is
>>> https://github.com/mdebooy/SessionScoped.
>>> 
>>> Op 20-12-15 om 15:56 schreef Marco DE BOOIJ:
>>> 
>>>> After a nights sleep I came to the conclusion that it will be hard to
>>>> have it tested this way. Too much things involved (database, application
>>>> that 'delivers' the texts on the screen). I will se if I can make something
>>>> simpler and hope that the problem remains. I then will make a new question
>>>> when I am ready.
>>>> 
>>>> Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
>>>> 
>>>>> probably try to make it a single module to make it easy to test
>>>>> 
>>>>> 
>>>>> Romain Manni-Bucau
>>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>>> <http://rmannibucau.wordpress.com> | Github <
>>>>> https://github.com/rmannibucau> |
>>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>>>> <http://www.tomitribe.com>
>>>>> 
>>>>> 
> 


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
It is intended to use CDI. Did not have a clue what you talked about. 
Then I searched the web, checked the import in the working and non 
working SessionScope beans and found that I used the wrong SessionScope 
class. Changed it to javax.enterprise.context.SessionScoped and now it 
works. Hope that this is the correct answer to you question :)

Op 20-12-15 om 21:22 schreef Romain Manni-Bucau:
> Is it intended to NOT use CDI session scope - guess it makes the issue easy
> to solve ;)?
> Le 20 déc. 2015 18:56, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> Keep it in this question :)
>>
>> I created a basic application. It has the same behavior. Every call to the
>> bean does an initialisation. I uploaded it to github. The URL is
>> https://github.com/mdebooy/SessionScoped.
>>
>> Op 20-12-15 om 15:56 schreef Marco DE BOOIJ:
>>
>>> After a nights sleep I came to the conclusion that it will be hard to
>>> have it tested this way. Too much things involved (database, application
>>> that 'delivers' the texts on the screen). I will se if I can make something
>>> simpler and hope that the problem remains. I then will make a new question
>>> when I am ready.
>>>
>>> Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
>>>
>>>> probably try to make it a single module to make it easy to test
>>>>
>>>>
>>>> Romain Manni-Bucau
>>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>>> <http://rmannibucau.wordpress.com> | Github <
>>>> https://github.com/rmannibucau> |
>>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>>> <http://www.tomitribe.com>
>>>>
>>>>


Re: SessionScoped does not seem to work

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Is it intended to NOT use CDI session scope - guess it makes the issue easy
to solve ;)?
Le 20 déc. 2015 18:56, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :

> Keep it in this question :)
>
> I created a basic application. It has the same behavior. Every call to the
> bean does an initialisation. I uploaded it to github. The URL is
> https://github.com/mdebooy/SessionScoped.
>
> Op 20-12-15 om 15:56 schreef Marco DE BOOIJ:
>
>> After a nights sleep I came to the conclusion that it will be hard to
>> have it tested this way. Too much things involved (database, application
>> that 'delivers' the texts on the screen). I will se if I can make something
>> simpler and hope that the problem remains. I then will make a new question
>> when I am ready.
>>
>> Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
>>
>>> probably try to make it a single module to make it easy to test
>>>
>>>
>>> Romain Manni-Bucau
>>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>>> <http://rmannibucau.wordpress.com> | Github <
>>> https://github.com/rmannibucau> |
>>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>>> <http://www.tomitribe.com>
>>>
>>>
>

Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
Keep it in this question :)

I created a basic application. It has the same behavior. Every call to 
the bean does an initialisation. I uploaded it to github. The URL is 
https://github.com/mdebooy/SessionScoped.

Op 20-12-15 om 15:56 schreef Marco DE BOOIJ:
> After a nights sleep I came to the conclusion that it will be hard to 
> have it tested this way. Too much things involved (database, 
> application that 'delivers' the texts on the screen). I will se if I 
> can make something simpler and hope that the problem remains. I then 
> will make a new question when I am ready.
>
> Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
>> probably try to make it a single module to make it easy to test
>>
>>
>> Romain Manni-Bucau
>> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
>> <http://rmannibucau.wordpress.com> | Github 
>> <https://github.com/rmannibucau> |
>> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
>> <http://www.tomitribe.com>
>>


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
After a nights sleep I came to the conclusion that it will be hard to 
have it tested this way. Too much things involved (database, application 
that 'delivers' the texts on the screen). I will se if I can make 
something simpler and hope that the problem remains. I then will make a 
new question when I am ready.

Op 20-12-15 om 10:58 schreef Romain Manni-Bucau:
> probably try to make it a single module to make it easy to test
>
>
> Romain Manni-Bucau
> @rmannibucau <https://twitter.com/rmannibucau> |  Blog
> <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
> LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
> <http://www.tomitribe.com>
>
> 2015-12-19 22:27 GMT+01:00 Marco DE BOOIJ <ma...@debooy.eu>:
>
>> Hope that they are all in now. It is in the 3 repositories: Tomee3,
>> Components and doosutils. How can I remove the ones that were not correctly
>> created?
>>
>> Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
>>
>>> Yep on github or bitbucket or any public source repository - no binary.
>>> Mvn
>>>
>>> tomee:run is a nice to have.
>>> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>> écrit :
>>>
>>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>>>> only found a message about the facelets library but this I get for a
>>>> working application too:
>>>>
>>>> dec 19, 2015 4:59:19 PM
>>>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>>>> SEVERE: Error Loading Library:
>>>>
>>>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>>>> java.io.IOException: Error parsing
>>>>
>>>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>>>
>>>> I added a debug message in the constructor method and this message is
>>>> written evertime that I use the bean.
>>>>
>>>> I suppose that I need to upload the application to some GIT server? It
>>>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>>>
>>>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>>>
>>>> Hi
>>>>> Stateless and Singleton are Dependent by spec. No log message? Sure it
>>>>> is
>>>>> created during a request? Do you have a sample to reproduce it?
>>>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>>>> écrit :
>>>>>
>>>>> 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.
>>>>>>
>>>>>>
>>>>>>


Re: SessionScoped does not seem to work

Posted by Romain Manni-Bucau <rm...@gmail.com>.
probably try to make it a single module to make it easy to test


Romain Manni-Bucau
@rmannibucau <https://twitter.com/rmannibucau> |  Blog
<http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> |
LinkedIn <https://www.linkedin.com/in/rmannibucau> | Tomitriber
<http://www.tomitribe.com>

2015-12-19 22:27 GMT+01:00 Marco DE BOOIJ <ma...@debooy.eu>:

> Hope that they are all in now. It is in the 3 repositories: Tomee3,
> Components and doosutils. How can I remove the ones that were not correctly
> created?
>
> Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
>
>> Yep on github or bitbucket or any public source repository - no binary.
>> Mvn
>>
>> tomee:run is a nice to have.
>> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a
>> écrit :
>>
>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>>> only found a message about the facelets library but this I get for a
>>> working application too:
>>>
>>> dec 19, 2015 4:59:19 PM
>>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>>> SEVERE: Error Loading Library:
>>>
>>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>>> java.io.IOException: Error parsing
>>>
>>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>>
>>> I added a debug message in the constructor method and this message is
>>> written evertime that I use the bean.
>>>
>>> I suppose that I need to upload the application to some GIT server? It
>>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>>
>>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>>
>>> Hi
>>>>
>>>> Stateless and Singleton are Dependent by spec. No log message? Sure it
>>>> is
>>>> created during a request? Do you have a sample to reproduce it?
>>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>>> écrit :
>>>>
>>>> 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.
>>>>>
>>>>>
>>>>>
>

Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
Hope that they are all in now. It is in the 3 repositories: Tomee3, 
Components and doosutils. How can I remove the ones that were not 
correctly created?

Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
> Yep on github or bitbucket or any public source repository - no binary. Mvn
> tomee:run is a nice to have.
> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>> only found a message about the facelets library but this I get for a
>> working application too:
>>
>> dec 19, 2015 4:59:19 PM
>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>> SEVERE: Error Loading Library:
>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>> java.io.IOException: Error parsing
>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>
>> I added a debug message in the constructor method and this message is
>> written evertime that I use the bean.
>>
>> I suppose that I need to upload the application to some GIT server? It
>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>
>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>
>>> Hi
>>>
>>> Stateless and Singleton are Dependent by spec. No log message? Sure it is
>>> created during a request? Do you have a sample to reproduce it?
>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>> écrit :
>>>
>>> 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.
>>>>
>>>>


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
Forgot the URL: https://github.com/mdebooy/Tomee3, 
https://github.com/mdebooy/Components, https://github.com/mdebooy/doosutils

Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
> Yep on github or bitbucket or any public source repository - no binary. Mvn
> tomee:run is a nice to have.
> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>> only found a message about the facelets library but this I get for a
>> working application too:
>>
>> dec 19, 2015 4:59:19 PM
>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>> SEVERE: Error Loading Library:
>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>> java.io.IOException: Error parsing
>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>
>> I added a debug message in the constructor method and this message is
>> written evertime that I use the bean.
>>
>> I suppose that I need to upload the application to some GIT server? It
>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>
>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>
>>> Hi
>>>
>>> Stateless and Singleton are Dependent by spec. No log message? Sure it is
>>> created during a request? Do you have a sample to reproduce it?
>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>> écrit :
>>>
>>> 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.
>>>>
>>>>


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
An other thing to learn. I only hope that it does not mess up my own 
private SVN.

The source of the project is already uploaded (the 3rd repository 
finally worked): https://github.com/mdebooy/Tomee3

Will put all the other projects. Suppose that I cannot put them all 
under the same repository.

Op 19-12-15 om 20:55 schreef Romain Manni-Bucau:
> Yep on github or bitbucket or any public source repository - no binary. Mvn
> tomee:run is a nice to have.
> Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
>> only found a message about the facelets library but this I get for a
>> working application too:
>>
>> dec 19, 2015 4:59:19 PM
>> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
>> SEVERE: Error Loading Library:
>> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
>> java.io.IOException: Error parsing
>> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>>
>> I added a debug message in the constructor method and this message is
>> written evertime that I use the bean.
>>
>> I suppose that I need to upload the application to some GIT server? It
>> uses some packages I wrote myself. Suppose they need to be uploaded too?
>>
>> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>>
>>> Hi
>>>
>>> Stateless and Singleton are Dependent by spec. No log message? Sure it is
>>> created during a request? Do you have a sample to reproduce it?
>>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>>> écrit :
>>>
>>> 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.
>>>>
>>>>


Re: SessionScoped does not seem to work

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Yep on github or bitbucket or any public source repository - no binary. Mvn
tomee:run is a nice to have.
Le 19 déc. 2015 20:40, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :

> In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and
> only found a message about the facelets library but this I get for a
> working application too:
>
> dec 19, 2015 4:59:19 PM
> org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
> SEVERE: Error Loading Library:
> jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
> java.io.IOException: Error parsing
> [jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:
>
> I added a debug message in the constructor method and this message is
> written evertime that I use the bean.
>
> I suppose that I need to upload the application to some GIT server? It
> uses some packages I wrote myself. Suppose they need to be uploaded too?
>
> Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
>
>> Hi
>>
>> Stateless and Singleton are Dependent by spec. No log message? Sure it is
>> created during a request? Do you have a sample to reproduce it?
>> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a
>> écrit :
>>
>> 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.
>>>
>>>
>

Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and 
only found a message about the facelets library but this I get for a 
working application too:

dec 19, 2015 4:59:19 PM 
org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
SEVERE: Error Loading Library: 
jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml
java.io.IOException: Error parsing 
[jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]:

I added a debug message in the constructor method and this message is 
written evertime that I use the bean.

I suppose that I need to upload the application to some GIT server? It 
uses some packages I wrote myself. Suppose they need to be uploaded too?

Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
> Hi
>
> Stateless and Singleton are Dependent by spec. No log message? Sure it is
> created during a request? Do you have a sample to reproduce it?
> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> 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.
>>


Re: SessionScoped does not seem to work

Posted by Marco DE BOOIJ <ma...@debooy.eu>.
In the mean time I switched to Tomee 1.7.3. I Checked the logfiles and 
only found a message about the facelets library but this I get for a 
working application too:

dec 19, 2015 4:59:19 PM 
org.apache.myfaces.view.facelets.compiler.TagLibraryConfig loadImplicit
SEVERE: Error Loading Library: 
jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml 

java.io.IOException: Error parsing 
[jar:file:/opt/apache-tomee-plus-1.7.3/webapps/natuur/WEB-INF/lib/jsf-facelets-1.1.14.jar!/META-INF/jstl-fn.taglib.xml]: 


I added a debug message in the constructor method and this message is 
written evertime that I use the bean.

I suppose that I need to upload the application to some GIT server? It 
uses some packages I wrote myself. Suppose they need to be uploaded too?
Op 19-12-15 om 17:35 schreef Romain Manni-Bucau:
> Hi
>
> Stateless and Singleton are Dependent by spec. No log message? Sure it is
> created during a request? Do you have a sample to reproduce it?
> Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :
>
>> 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.
>>


Re: SessionScoped does not seem to work

Posted by Romain Manni-Bucau <rm...@gmail.com>.
Hi

Stateless and Singleton are Dependent by spec. No log message? Sure it is
created during a request? Do you have a sample to reproduce it?
Le 19 déc. 2015 17:03, "Marco DE BOOIJ" <ma...@debooy.eu> a écrit :

> 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.
>