Hi!
I'm always open to comments and suggestions, but please try to provide a
fix or a solution.
That error happens both on CDI and ManagedBeanS. Excluding one and
guessing that the other one might be the problem shows that you didn't
actually get the bug.
If you don't know the other Tomee properties, please check Tomcat and
Tomee documentation. For Facebook4j, please use Google.
Best,
Mircea
On 10/1/2013 6:37 PM, Howard W. Smith, Jr. wrote:
responses inline, below.
On Tue, Oct 1, 2013 at 3:45 AM, Zmirc <zmircmir...@gmail.com> wrote:
set JAVA_OPTS=%JAVA_OPTS% -Dorg.apache.catalina.session.**
StandardSession.ACTIVITY_**CHECK=true
set JAVA_OPTS=%JAVA_OPTS% -Dopenejb.session-context=http
these two are definitely interesting, even though you stated, earlier, that
you are not really doing much/any session-management logic/checks. i don't
know the purpose of standardsession.activity_check and
openejb.session-context=http, but 'session' says a lot (to me).
set JAVA_OPTS=%JAVA_OPTS% -Dfacebook4j.loggerFactory=**
facebook4j.internal.logging.**NullLoggerFactory
facebook4j? wow, never heard of that. interesting.
So...the error happens randomly (just sometimes to some users) for all
pages that modify information and are backed by a @ViewScoped bean:
I looked at your bean, and it is quite interesting that this (JSF)
'managedbean',
@ManagedBean(name = "addItem")
@ViewScoped
public class AddItemB implements Serializable {
uses CDI to @Inject the following:
@Inject
UserDataB udB;
@Inject
ItemC itemC;
@Inject
ImageC imageC;
@Inject
UserC userC;
I don't know if MyFaces' implementation is expecting JSF managed beans to
do CDI @Inject. maybe MyFaces implementation does allow for this and does
'not' place assumption that JSF managedbean will 'never' have or allow for
CDI @Inject. I know, in my JSF/PrimeFaces/MyFaces/TomEE web app, I would
never try something like this. I would do CDI managed bean and do CDI
@Inject into other CDI managed beans. that is why i migrated 'from' JSF
managed beans to CDI managed beans, when I migrated from Glassfish/R.I. to
TomEE/OpenWebBeans.
also, the CDI @RequestScoped bean below,
@Named("editProfile")
@RequestScoped
public class EditProfileB {
looks more correct to me, since it is already a CDI managed bean doing the
following CDI @Inject,
@Inject
UserDataB udB;
@Inject
UserC userC;
@Inject
ImageC imageC;
maybe your JSF-managed ViewScoped bean is using CDI @Inject to reference
another bean, and the whole thing may be throwing MyFaces into a flux. but
i'm definitely not the expert here.
...my two cents. :)