Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 8451

Re: HCP CDI and statefullness of @stateless beans

$
0
0

Hi guys,

sorry i need to open this up again i seriously tried to understand what is going on, tried to read the specs, googled and failed.

 

If you clone the above mentioned repo there is an other test case.

 

the "statelessbean.class" is annotated @statefull and behaving like expected.

 

now i do a bean lookup via beanmanager and get a reference of that Bean which does work well.

 

But what makes me really wonder: while the injected bean in the servlet is counting up as it should be, the reference acquired via beanmanger always starts from 0, so i guess that every time a new instance is created.

 

When i annotate the bean with sessionscoped everything is working fine, but only with statefull, the result is at least to me unexpected.

 

Could one of you verify if that behavior is correct and maybe enlighten me as well, after that i promise i won't ask a CDI question for the rest of the month

 

Regards

Mathias


Viewing all articles
Browse latest Browse all 8451

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>