Re: java.lang.IllegalStateException: Must be called before the start element is closed (attribute 'id')

2015-11-16 Thread Howard W. Smith, Jr.
On Mon, Nov 16, 2015 at 2:59 PM, l.pe...@senat.fr  wrote:

>  java.lang.IllegalStateException: Must be called before the start element
> is closed (attribute 'id')
> at
> org.apache.myfaces.shared.renderkit.html.HtmlResponseWriterImpl.writeAttribute(HtmlResponseWriterImpl.java:816)
>

Searched google and found the following:

http://myfaces.apache.org/shared11/myfaces-shared-core/xref/org/apache/myfaces/shared/renderkit/html/HtmlResponseWriterImpl.html#318

Maybe, you can start there. Seems as though you id="..." on one of your
components may need to be fixed.


Re: ViewScoped bean created multiple times?

2014-11-07 Thread Howard W. Smith, Jr.
That's fine.

Can you provide your XHTML and java bean definition (source code) here? You
provided a little bit of your java bean in primefaces forum.

Your XHTML and java bean may help us on this list to help you.


On Fri, Nov 7, 2014 at 4:11 PM, Bjørn T Johansen  wrote:

> Yes, I did.. But since I did not get any answer there and I thought that
> this was more a JSF question than a PrimeFaces question, I thought I should
> try here Was that wrong?
>
> BTJ
>
> On Fri, 7 Nov 2014 15:58:59 -0500
> "Howard W. Smith, Jr."  wrote:
>
> > Interesting, you asked the same question in PrimeFaces forum.
> >
> > http://forum.primefaces.org/viewtopic.php?f=3&t=40267
> >
> >
> > On Fri, Nov 7, 2014 at 3:42 PM, Bjørn T Johansen  wrote:
> >
> > > I trying to create a webapplication using request and/or viewscope
> instead
> > > of sessionscope, which I have always used... (Neved needed to concern
> > > myself with memory usage in the apps I have implemented.. :) )
> > > But I now have a problem using @ViewScoped..
> > > When I access index.xhtml which uses a managed bean in viewscope, the
> > > constructor is called multiple times. And the same with an init
> method, that
> > > should be called only once. I am using..:
> > >
> > > 
> > > 
> > > 
> > >
> > > ..
> > >
> > > to call the init method, but I have also tried using f:event
> prerenderView
> > > and also @PostConstruct but I am not able to make the bean call the
> init
> > > method only once...
> > >
> > > What am I missing?
> > >
> > >
> > > Regards,
> > >
> > > BTJ
> > > --
> > >
> > >
> ---
> > > Bjørn T Johansen
> > >
> > > b...@havleik.no
> > >
> > >
> ---
> > > Someone wrote:
> > > "I understand that if you play a Windows CD backwards you hear strange
> > > Satanic messages"
> > > To which someone replied:
> > > "It's even worse than that; play it forwards and it installs Windows"
> > >
> > >
> ---
> > >
>
>


Re: ViewScoped bean created multiple times?

2014-11-07 Thread Howard W. Smith, Jr.
Interesting, you asked the same question in PrimeFaces forum.

http://forum.primefaces.org/viewtopic.php?f=3&t=40267


On Fri, Nov 7, 2014 at 3:42 PM, Bjørn T Johansen  wrote:

> I trying to create a webapplication using request and/or viewscope instead
> of sessionscope, which I have always used... (Neved needed to concern
> myself with memory usage in the apps I have implemented.. :) )
> But I now have a problem using @ViewScoped..
> When I access index.xhtml which uses a managed bean in viewscope, the
> constructor is called multiple times. And the same with an init method, that
> should be called only once. I am using..:
>
> 
> 
> 
>
> ..
>
> to call the init method, but I have also tried using f:event prerenderView
> and also @PostConstruct but I am not able to make the bean call the init
> method only once...
>
> What am I missing?
>
>
> Regards,
>
> BTJ
> --
>
> ---
> Bjørn T Johansen
>
> b...@havleik.no
>
> ---
> Someone wrote:
> "I understand that if you play a Windows CD backwards you hear strange
> Satanic messages"
> To which someone replied:
> "It's even worse than that; play it forwards and it installs Windows"
>
> ---
>


Re: catch faces message with js?

2014-10-21 Thread Howard W. Smith, Jr.
On Tue, Oct 21, 2014 at 2:44 PM, Karl Kildén  wrote:

> Primefaces growl is very close to what I want but it performed bad on
> safari for touch and seem very hard to center. Centering a growl does not
> make full sense to me personally but it's out of my reach to decide that
> this time ;)
>

Have you tried PrimeFaces 5.x Mobile, since you are doing touch (a.k.a
mobile device) + safari (browser) ?


Re: catch faces message with js?

2014-10-21 Thread Howard W. Smith, Jr.
I am /very/ impressed with the performance of PrimeFaces (5.x) Mobile. very
very fast, much faster than PrimeFaces HTML_BASIC Renderer. that's just my
opinion.



On Tue, Oct 21, 2014 at 2:47 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

>
> On Tue, Oct 21, 2014 at 2:44 PM, Karl Kildén 
> wrote:
>
>> Primefaces growl is very close to what I want but it performed bad on
>> safari for touch and seem very hard to center. Centering a growl does not
>> make full sense to me personally but it's out of my reach to decide that
>> this time ;)
>>
>
> Have you tried PrimeFaces 5.x Mobile, since you are doing touch (a.k.a
> mobile device) + safari (browser) ?
>
>


Re: Decide what to rerender on server side?

2014-09-05 Thread Howard W. Smith, Jr.
http://showcase.omnifaces.org/utils/Ajax

click the AjaxBean tab in the Source code panel on the showcase page (see
below)


import org.omnifaces.util.Ajax;
@ManagedBean@RequestScopedpublic class AjaxBean {

public void update() {
Ajax.update("form:timestamp");
}

public void callback() {
Ajax.oncomplete("alert('Hi, I am the oncomplete callback script!')");
}

public void argument() {
Ajax.data("foo", "bar");
Ajax.data("first", "one", "second", "two");
Map data = new HashMap<>();
data.put("bool", true);
data.put("number", 1.2F);
data.put("date", new Date());
data.put("array", new Integer[] { 1, 2, 3, 4, 5 });
data.put("list", Arrays.asList("one", "two", "three"));
data.put("beans", Arrays.asList(new ExampleEntity(1L, "one"),
new ExampleEntity(2L, "two")));
Ajax.data(data);
Ajax.oncomplete("showData()");
}

public void updateRow(UIData table, int index) {
Ajax.updateRow(table, index);
}

public void updateColumn(UIData table, int index) {
Ajax.updateColumn(table, index);
}
}


On Sep 5, 2014 2:35 AM, "Karl Kildén"  wrote:

> Hi Howard,
>
> Well they use custom ajax so not sure it would be very easy to understand
> but eventually I will look at it yes :-) Still interested in hearing some
> pro input from myfaces guys first
>
> Can you link me the feature in omnifaces? I cannot find it. Regarding
> primefaces I don't want to be to dependent on frameworks as hinted in my
> first email.
>
>
> On 5 September 2014 00:33, Howard W. Smith, Jr. 
> wrote:
>
> > Karl, you could look at PrimeFaces requestContext implementation (source
> > code).
> >
> > also, you can maybe ask for something like this to be added as a feature
> > request in MYFACES JIRA.
> >
> > Is there any reason why you prefer not to use PrimeFaces requestContext
> or
> > the similar feature that is available in OmniFaces library?
> >
> >
> >
> > On Thu, Sep 4, 2014 at 4:30 PM, Karl Kildén 
> wrote:
> >
> > > Primefaces offers several ways to do client side stuff from the server.
> > For
> > > examples see here:
> > > http://www.primefaces.org/showcase/ui/misc/requestContext.xhtml
> > >
> > > While I use primefaces I prefer to keep my hands out of the cookie jar
> > with
> > > stuff like this. I mean a datepicker can be replaced with a js widget
> in
> > 20
> > > minutes if you use a composite component that wraps primefaces date
> > picker.
> > > However this stuff would be painful to replace.
> > >
> > > So my question is, could this be done in some way with JSF or
> > myfaces-impl?
> > >
> > > cheers
> > >
> >
>


Re: Decide what to rerender on server side?

2014-09-04 Thread Howard W. Smith, Jr.
Karl, you could look at PrimeFaces requestContext implementation (source
code).

also, you can maybe ask for something like this to be added as a feature
request in MYFACES JIRA.

Is there any reason why you prefer not to use PrimeFaces requestContext or
the similar feature that is available in OmniFaces library?



On Thu, Sep 4, 2014 at 4:30 PM, Karl Kildén  wrote:

> Primefaces offers several ways to do client side stuff from the server. For
> examples see here:
> http://www.primefaces.org/showcase/ui/misc/requestContext.xhtml
>
> While I use primefaces I prefer to keep my hands out of the cookie jar with
> stuff like this. I mean a datepicker can be replaced with a js widget in 20
> minutes if you use a composite component that wraps primefaces date picker.
> However this stuff would be painful to replace.
>
> So my question is, could this be done in some way with JSF or myfaces-impl?
>
> cheers
>


Re: Help with java.lang.IllegalStateException: Cannot change buffer size after data has been written

2014-07-24 Thread Howard W. Smith, Jr.
how large is your page? maybe you need a larger buffer.



On Thu, Jul 24, 2014 at 3:39 PM, Felipe Jaekel  wrote:

> The 64K buffer didn't worked.
>
> Any other idea?
>
> Thanks
>
>
> 2014-07-16 11:33 GMT-03:00 Howard W. Smith, Jr. :
>
> > On Wed, Jul 16, 2014 at 7:52 AM, Felipe Jaekel 
> wrote:
> >
> > > Not sure if this is this a MyFaces issue, but as I don't remember
> having
> > it
> > > when my projects were running with with Mojarra, I'd like to see if you
> > can
> > > help me.
> > >
> > > I'm eventually seeing this exception in my Tomcat 7.0.47 log:
> > >
> > > java.lang.IllegalStateException: Cannot change buffer size after data
> > > has been written
> > > at
> > >
> >
> org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:254)
> > >
> >
> > Felipe,
> >
> > I think I saw that error long time ago and I discussed with BalusC on/via
> > OmniFaces google-code project's issue tracker.
> >
> > anyway, I think it was caused by the largest XHTML page in my app, which
> > has hundreds of UI components (, etc...).
> >
> > Below, is what I saved in my web.xml per that discussion with BalusC.
> >
> >
> > 
> > 
> > javax.faces.FACELETS_BUFFER_SIZE
> > 65535
> > 
> >
>


Re: Help with java.lang.IllegalStateException: Cannot change buffer size after data has been written

2014-07-16 Thread Howard W. Smith, Jr.
On Wed, Jul 16, 2014 at 7:52 AM, Felipe Jaekel  wrote:

> Not sure if this is this a MyFaces issue, but as I don't remember having it
> when my projects were running with with Mojarra, I'd like to see if you can
> help me.
>
> I'm eventually seeing this exception in my Tomcat 7.0.47 log:
>
> java.lang.IllegalStateException: Cannot change buffer size after data
> has been written
> at
> org.apache.catalina.connector.ResponseFacade.setBufferSize(ResponseFacade.java:254)
>

Felipe,

I think I saw that error long time ago and I discussed with BalusC on/via
OmniFaces google-code project's issue tracker.

anyway, I think it was caused by the largest XHTML page in my app, which
has hundreds of UI components (, etc...).

Below, is what I saved in my web.xml per that discussion with BalusC.




javax.faces.FACELETS_BUFFER_SIZE
65535



Re: Submit form after disabling an input element via javascript?

2014-06-10 Thread Howard W. Smith, Jr.
On Tue, Jun 10, 2014 at 4:38 PM, Leonardo Uribe  wrote:

> The thing to remember here is "never trust on the client".
> No matter how intelligent we want the client to be, in cases like this one
> the state on the server is the king, and that will not change (because we
> can't!).
>

and this is what we are here for and this is the reason why we love Java
'State' Faces, I mean Java 'Server' Faces... or Java State-on-Server Faces.
the UI is maintained on the server... client is just a UI or presentation
of what is maintained on server. :)


Re: Submit form after disabling an input element via javascript?

2014-06-10 Thread Howard W. Smith, Jr.
Leonardo, what are your thoughts on this thread? thanks.



On Wed, Jun 4, 2014 at 11:43 AM, Karl Kildén  wrote:

> Howard,
>
> To do that one would need a purpose. I fail to see the benefit other than
> bending the knee to a JSF limitation.
>
>
>
>
> On 4 June 2014 16:48, Howard W. Smith, Jr.  wrote:
>
> > Karl, if Javascript was written to enable field, why is there not
> > Javascript to disable before submit?
> > On Jun 4, 2014 8:33 AM, "Karl Kildén"  wrote:
> >
> > > Hi,
> > >
> > > my app recently upgraded from JSF 1.2 had a broken page with this in
> the
> > > log:
> > >
> > > WARNING: There should always be a submitted value for an input if it is
> > > rendered, its form is submitted, and it was not originally rendered
> > > disabled or read-only.  You cannot submit a form after disab
> > > ling an input element via javascript.  Consider setting read-only to
> true
> > > instead or resetting the disabled value back to false prior to form
> > > submission. Component : {Component-Path : [Class: javax.fa
> > > ces.component.UIViewRoot,ViewId: /pages/main.xhtml][Class:
> > > javax.faces.component.html.HtmlBody,Id: j_id_10][Class:
> > > javax.faces.component.html.HtmlForm,Id: f][Class:
> > > javax.faces.component.html.HtmlPane
> > > lGroup,Id: body][Class: javax.faces.component.html.HtmlPanelGroup,Id:
> > > contentBody][Class: javax.faces.component.html.HtmlPanelGrid,Id:
> > > j_id_2b_p][Class: javax.faces.component.html.HtmlInputText,Id: im
> > > portName] Location: /WEB-INF/facelets/admin/profileUploadForm.xhtml at
> > line
> > > 88 and column 73}
> > >
> > >
> > > I don't understand this limitation. Is there some global flag I could
> use
> > > to make sure not included inputs are seen as unchanged or something?
> > >
> > > cheers
> > >
> >
>


Re: Submit form after disabling an input element via javascript?

2014-06-08 Thread Howard W. Smith, Jr.
Another similar (really old) discussion where BalusC responded on the topic
in 2009.

https://community.oracle.com/thread/1719243?start=0&tstart=0




On Sun, Jun 8, 2014 at 6:34 AM, Howard W. Smith, Jr.  wrote:

> Karl,
>
>
> http://stackoverflow.com/questions/10021634/jsf-when-disable-component-its-value-does-not-make-into-the-request-map-parame
>
> see the question and BalusC's answer, please.
>
>
>
> On Wed, Jun 4, 2014 at 11:43 AM, Karl Kildén 
> wrote:
>
>> Howard,
>>
>> To do that one would need a purpose. I fail to see the benefit other than
>> bending the knee to a JSF limitation.
>>
>>
>>
>>
>> On 4 June 2014 16:48, Howard W. Smith, Jr. 
>> wrote:
>>
>> > Karl, if Javascript was written to enable field, why is there not
>> > Javascript to disable before submit?
>> > On Jun 4, 2014 8:33 AM, "Karl Kildén"  wrote:
>> >
>> > > Hi,
>> > >
>> > > my app recently upgraded from JSF 1.2 had a broken page with this in
>> the
>> > > log:
>> > >
>> > > WARNING: There should always be a submitted value for an input if it
>> is
>> > > rendered, its form is submitted, and it was not originally rendered
>> > > disabled or read-only.  You cannot submit a form after disab
>> > > ling an input element via javascript.  Consider setting read-only to
>> true
>> > > instead or resetting the disabled value back to false prior to form
>> > > submission. Component : {Component-Path : [Class: javax.fa
>> > > ces.component.UIViewRoot,ViewId: /pages/main.xhtml][Class:
>> > > javax.faces.component.html.HtmlBody,Id: j_id_10][Class:
>> > > javax.faces.component.html.HtmlForm,Id: f][Class:
>> > > javax.faces.component.html.HtmlPane
>> > > lGroup,Id: body][Class: javax.faces.component.html.HtmlPanelGroup,Id:
>> > > contentBody][Class: javax.faces.component.html.HtmlPanelGrid,Id:
>> > > j_id_2b_p][Class: javax.faces.component.html.HtmlInputText,Id: im
>> > > portName] Location: /WEB-INF/facelets/admin/profileUploadForm.xhtml at
>> > line
>> > > 88 and column 73}
>> > >
>> > >
>> > > I don't understand this limitation. Is there some global flag I could
>> use
>> > > to make sure not included inputs are seen as unchanged or something?
>> > >
>> > > cheers
>> > >
>> >
>>
>
>


Re: Submit form after disabling an input element via javascript?

2014-06-08 Thread Howard W. Smith, Jr.
Karl,

http://stackoverflow.com/questions/10021634/jsf-when-disable-component-its-value-does-not-make-into-the-request-map-parame

see the question and BalusC's answer, please.



On Wed, Jun 4, 2014 at 11:43 AM, Karl Kildén  wrote:

> Howard,
>
> To do that one would need a purpose. I fail to see the benefit other than
> bending the knee to a JSF limitation.
>
>
>
>
> On 4 June 2014 16:48, Howard W. Smith, Jr.  wrote:
>
> > Karl, if Javascript was written to enable field, why is there not
> > Javascript to disable before submit?
> > On Jun 4, 2014 8:33 AM, "Karl Kildén"  wrote:
> >
> > > Hi,
> > >
> > > my app recently upgraded from JSF 1.2 had a broken page with this in
> the
> > > log:
> > >
> > > WARNING: There should always be a submitted value for an input if it is
> > > rendered, its form is submitted, and it was not originally rendered
> > > disabled or read-only.  You cannot submit a form after disab
> > > ling an input element via javascript.  Consider setting read-only to
> true
> > > instead or resetting the disabled value back to false prior to form
> > > submission. Component : {Component-Path : [Class: javax.fa
> > > ces.component.UIViewRoot,ViewId: /pages/main.xhtml][Class:
> > > javax.faces.component.html.HtmlBody,Id: j_id_10][Class:
> > > javax.faces.component.html.HtmlForm,Id: f][Class:
> > > javax.faces.component.html.HtmlPane
> > > lGroup,Id: body][Class: javax.faces.component.html.HtmlPanelGroup,Id:
> > > contentBody][Class: javax.faces.component.html.HtmlPanelGrid,Id:
> > > j_id_2b_p][Class: javax.faces.component.html.HtmlInputText,Id: im
> > > portName] Location: /WEB-INF/facelets/admin/profileUploadForm.xhtml at
> > line
> > > 88 and column 73}
> > >
> > >
> > > I don't understand this limitation. Is there some global flag I could
> use
> > > to make sure not included inputs are seen as unchanged or something?
> > >
> > > cheers
> > >
> >
>


Re: Submit form after disabling an input element via javascript?

2014-06-04 Thread Howard W. Smith, Jr.
Karl, if Javascript was written to enable field, why is there not
Javascript to disable before submit?
On Jun 4, 2014 8:33 AM, "Karl Kildén"  wrote:

> Hi,
>
> my app recently upgraded from JSF 1.2 had a broken page with this in the
> log:
>
> WARNING: There should always be a submitted value for an input if it is
> rendered, its form is submitted, and it was not originally rendered
> disabled or read-only.  You cannot submit a form after disab
> ling an input element via javascript.  Consider setting read-only to true
> instead or resetting the disabled value back to false prior to form
> submission. Component : {Component-Path : [Class: javax.fa
> ces.component.UIViewRoot,ViewId: /pages/main.xhtml][Class:
> javax.faces.component.html.HtmlBody,Id: j_id_10][Class:
> javax.faces.component.html.HtmlForm,Id: f][Class:
> javax.faces.component.html.HtmlPane
> lGroup,Id: body][Class: javax.faces.component.html.HtmlPanelGroup,Id:
> contentBody][Class: javax.faces.component.html.HtmlPanelGrid,Id:
> j_id_2b_p][Class: javax.faces.component.html.HtmlInputText,Id: im
> portName] Location: /WEB-INF/facelets/admin/profileUploadForm.xhtml at line
> 88 and column 73}
>
>
> I don't understand this limitation. Is there some global flag I could use
> to make sure not included inputs are seen as unchanged or something?
>
> cheers
>


Re: ViewExpiredException, but session hasn't timed out

2014-04-09 Thread Howard W. Smith, Jr.
Wow, you're using Shiro.

Would be nice to have a list of steps how you duplicate this in your app,
definitely and always.

I definitely suggest you use OmniFaces restore view component to avoid this
exception.
 On Apr 9, 2014 1:41 PM, "Felipe Jaekel"  wrote:

> I'm getting view expired exceptions if the user tries to perform an action
> in a page that isn't fully loaded.
>
> javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> saved view state could be found for the view identifier:
> /page/plano/plano.jsf
> at
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
>
>
> Looking at RestoreViewExceutor source code we have this:
>
>
> if (facesContext.getResponseComplete())
> {
> // If the view handler cannot restore the view
> and the response
> // is complete, it can be an error or some
> logic in restoreView.
> return true;
> }
> else
> {
> // If the return from
> ViewHandler.restoreView() is null, throw a ViewExpiredException with
> an
> // appropriate error message.
> throw new ViewExpiredException("No saved view
> state could be found for the view identifier: " + viewId, viewId);
> }
> }
>
>
> Page hasn't fully loaded yet, so facesContext.getResponseComplete() is
> returning false, but isn't there a way to avoid this? Page gets unusable
> after the VEE is thrown.
>
>
> Thanks in advance,
>
> Phillip
>
>
> Full stackTrace:
>
> javax.faces.application.ViewExpiredException: /page/plano/plano.jsfNo
> saved view state could be found for the view identifier:
> /page/plano/plano.jsf
> at
> org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:181)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:196)
> at
> org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:143)
> at javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:61)
> at
> org.apache.shiro.web.servlet.AdviceFilter.executeChain(AdviceFilter.java:108)
> at
> org.apache.shiro.web.servlet.AdviceFilter.doFilterInternal(AdviceFilter.java:137)
> at
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
> at
> org.apache.shiro.web.servlet.ProxiedFilterChain.doFilter(ProxiedFilterChain.java:66)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter.executeChain(AbstractShiroFilter.java:449)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter$1.call(AbstractShiroFilter.java:365)
> at
> org.apache.shiro.subject.support.SubjectCallable.doCall(SubjectCallable.java:90)
> at
> org.apache.shiro.subject.support.SubjectCallable.call(SubjectCallable.java:83)
> at
> org.apache.shiro.subject.support.DelegatingSubject.execute(DelegatingSubject.java:383)
> at
> org.apache.shiro.web.servlet.AbstractShiroFilter.doFilterInternal(AbstractShiroFilter.java:362)
> at
> org.apache.shiro.web.servlet.OncePerRequestFilter.doFilter(OncePerRequestFilter.java:125)
> at
> org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
> at
> org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
> at
> org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
> at
> org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
> at
> org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
> at
> org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
> at
> com.googlecode.psiprobe.Tomcat70AgentValve.invoke(Tomcat70AgentValve.java:38)
> at
> org.apache.catalina.val

Re: Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-04-09 Thread Howard W. Smith, Jr.
On Wed, Apr 9, 2014 at 1:30 PM, Howard W. Smith, Jr.  wrote:

> s JUEL reliable? JUEL works well. you will have to 'migrate' your XHTML to
> JUEL.
>
> hmmm, i think I had to add '()' (parentheses) to my actionListener="..."
> or action="...". Below is a quick search that I did via TextPad against my
> project; below is first few occurrences.
>
> Searching for: actionlistener
> header_menubar.xhtml(74):
> actionListener="#{pf_rollingStockController.prepareList()}"
> header_menubar.xhtml(77):
> actionListener="#{pf_customerController.prepareList()}"
> header_menubar.xhtml(80):
> actionListener="#{pf_chargesController.prepareList()}"
> header_menubar.xhtml(83):
> actionListener="#{pf_serviceController.prepareList()}"
> header_menubar.xhtml(86):
> actionListener="#{pf_driverController.prepareList()}"
> header_menubar.xhtml(89):
> actionListener="#{pf_vehicleController.prepareList()}"
> header_menubar.xhtml(92):
> actionListener="#{pf_ordersController.prepareUtilitiesMenu()}"
> header_menubar.xhtml(96):
> actionListener="#{pf_usersController.prepareList()}"
> header_menubar.xhtml(100):
> actionListener="#{pf_usersController.prepareChangePassword()}"
> header_menubar.xhtml(103):
> actionListener="#{messengerBean.prepareMessengerForUser()}"
>
> Hmmm, i think if you search google for
>
> site:forum.primefaces.org high expression language
>
> then you may see the forum topic where Thomas recommended JUEL (and
> MyFaces), and I mentioned some of my [migration] challenges. :)
>

For multiple-file-search-and-replace, I use TextPad multiple file
search-and-replace. I used TextPad when I migrated my app to use JUEL (and
MyFaces). :)


Re: Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-04-09 Thread Howard W. Smith, Jr.
Is JUEL reliable? JUEL works well. you will have to 'migrate' your XHTML to
JUEL.

hmmm, i think I had to add '()' (parentheses) to my actionListener="..." or
action="...". Below is a quick search that I did via TextPad against my
project; below is first few occurrences.

Searching for: actionlistener
header_menubar.xhtml(74):
actionListener="#{pf_rollingStockController.prepareList()}"
header_menubar.xhtml(77):
actionListener="#{pf_customerController.prepareList()}"
header_menubar.xhtml(80):
actionListener="#{pf_chargesController.prepareList()}"
header_menubar.xhtml(83):
actionListener="#{pf_serviceController.prepareList()}"
header_menubar.xhtml(86):
actionListener="#{pf_driverController.prepareList()}"
header_menubar.xhtml(89):
actionListener="#{pf_vehicleController.prepareList()}"
header_menubar.xhtml(92):
actionListener="#{pf_ordersController.prepareUtilitiesMenu()}"
header_menubar.xhtml(96):
actionListener="#{pf_usersController.prepareList()}"
header_menubar.xhtml(100):
actionListener="#{pf_usersController.prepareChangePassword()}"
header_menubar.xhtml(103):
actionListener="#{messengerBean.prepareMessengerForUser()}"

Hmmm, i think if you search google for

site:forum.primefaces.org high expression language

then you may see the forum topic where Thomas recommended JUEL (and
MyFaces), and I mentioned some of my [migration] challenges. :)





On Wed, Apr 9, 2014 at 1:22 PM, Felipe Jaekel  wrote:

> Is it reliable? Are there any migration notes?
>
> Thanks
>
>
> 2014-03-27 19:37 GMT-03:00 Howard W. Smith, Jr. :
>
> > On Thu, Mar 27, 2014 at 8:22 AM, Thomas Andraschko <
> > andraschko.tho...@gmail.com> wrote:
> >
> > > I just deliver JUEL in all my apps and setting the EXPRESSION_FACTORY
> to
> > > JUEL.
> > >
> >
> > +1 me too.
> >
> > 
> > org.apache.myfaces.EXPRESSION_FACTORY
> > de.odysseus.el.ExpressionFactoryImpl
> > 
> >
> > 
> >
> org.apache.myfaces.EL_RESOLVER_COMPARATOR
> >
> >
> >
> org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator
> > 
> >
> > 
> >
> > org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> > false
> > 
> >
>


Re: How to disable label warnings?

2014-03-28 Thread Howard W. Smith, Jr.
I just remembered that I had this issue, too, when I migrated from Mojarra
to MyFaces. My quick/easy fix was to use TextPad, search all *.xhtml files
in my project for h:outputLabel, and replce with h:outputText. I don't use
outputLabel, i add label to my PrimeFaces UI components, as/when necessary.



On Fri, Mar 28, 2014 at 8:26 AM, Felipe Jaekel  wrote:

> I'm migrating from Mojarra to MyFaces, so there lots of labels with missing
> for attribute. I can't refactor everything now, so I'd like to disable
> debug at least in production, because it's polluting my server log files.
>
> I'll attach my web.xml (project stage is configured in the global web.xml
> from tomcat, but I also tested locally to make sure)
>
> Thanks
>
> 
>  version="3.0"
> xmlns="http://java.sun.com/xml/ns/javaee";
>  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd";
> >
> Área do Cliente
>
>  
>  
>
> javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
>  true
> 
> 
>  javax.faces.FACELETS_SKIP_COMMENTS
> true
>  
>  
>  
> primefaces.SUBMIT
> partial
>  
> 
> primefaces.THEME
>  redmond
> 
> 
>  primefaces.UPLOADER
> commons
>  
>  
> 
>  org.apache.myfaces.COMPRESS_STATE_IN_SESSION
> false
>  
> 
> org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
>  false
> 
>  
> org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
>  false
> 
>  
> org.apache.myfaces.EXPRESSION_FACTORY
> org.apache.el.ExpressionFactoryImpl
>  
>  
>  PrimeFaces FileUpload Filter
> org.primefaces.webapp.filter.FileUploadFilter
>  
> thresholdSize
> 1048576
>  
> 
> 
>  PrimeFaces FileUpload Filter
> facesServlet
>  
>  
>
>  br.com.spdata.persistence.FirebirdListener
> 
>  
> facesServlet
>  javax.faces.webapp.FacesServlet
> 1
>  
> 
> facesServlet
>  *.jsf
> 
>   
> 15
>  
>  
>  page/comunicados.jsf
> 
>  
> java.lang.Throwable
> /template/error.jsf
>  
> 
> 404
>  /template/notFound.jsf
> 
>
> 
> Restrict raw XHTML Documents
>  
> XHTML
> *.xhtml
>  
> 
> 
> 
>
>
>
> 2014-03-27 18:43 GMT-03:00 Karl Kildén :
>
> > Hrmm this is the debug logging from development mode right? You are
> > supposed to fix the problems and not change the logging properties. The
> > logging is very useful for development.
> >
> > Paste web.xml contents.
> >
> >
> >
> >
> >
> >
> > On 27 March 2014 22:04, Felipe Jaekel  wrote:
> >
> > > I'd like to disable label warnings like this: Advertência: Attribute
> > 'for'
> > > of label component with id form:j_id_8n is not defined
> > >
> > > Searching google I saw some mentioning that changing the project stage
> to
> > > production would solve. Others mentioned that creating a
> > logging.properties
> > > file with
> > org.apache.myfaces.shared.renderkit.html.HtmlLabelRenderer.level
> > > = SEVERE would do the trick.
> > >
> > > I tried both without success.
> > >
> > > Any ideas?
> > >
> > > Thanks
> > >
> >
>


Re: Generic value for org.apache.myfaces.EXPRESSION_FACTORY?

2014-03-27 Thread Howard W. Smith, Jr.
On Thu, Mar 27, 2014 at 8:22 AM, Thomas Andraschko <
andraschko.tho...@gmail.com> wrote:

> I just deliver JUEL in all my apps and setting the EXPRESSION_FACTORY to
> JUEL.
>

+1 me too.


org.apache.myfaces.EXPRESSION_FACTORY
de.odysseus.el.ExpressionFactoryImpl



org.apache.myfaces.EL_RESOLVER_COMPARATOR

org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator



org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
false



Re: 2.2 stability

2014-03-13 Thread Howard W. Smith, Jr.
On Thu, Mar 13, 2014 at 7:34 AM, Karl Kildén  wrote:

> Tried 2.2.2-20140313.024403-5
>
> Duplicate id problems are still present. I have tried for a while now to
> create a simple sample but I am unsuccessful so far.
>

+1 thanks Karl for the report.


Re: 2.2 stability

2014-03-12 Thread Howard W. Smith, Jr.
Following up,

Karl, are you still waiting on Leonardo to trigger a snapshot build? With
all that has been discussed here, is it likely that tomee + myfaces 2.2.x
(snapshot) is a 'go' for you? :)

fingers crossed... :)



On Tue, Mar 11, 2014 at 4:19 AM, Karl Kildén  wrote:

> OK, if enctype is not supported for post (except when fileUpload component
> is present) it could be my headache then. If I have a fileupload or not
> depends on include logic etc. This is somewhat a legacy so I can probably
> rework it in the future.
>
> I assume any build time logic that could conditionally remove fileupload
> will cause this behavior. I think it is awkward and unnecessarily limiting.
> With this information I will make some more attempts.
>
> MYFACES-3867, provided stacktrackes does not match mine but I would love if
> you could perhaps trigger a snapshot?
>
>
>
> On 10 March 2014 23:30, Leonardo Uribe  wrote:
>
> > Hi Karl
> >
> > 2014-03-10 15:15 GMT-05:00 Karl Kildén :
> > > Hi Leo,
> > >
> > > Upgraded to  2.2.1 today (or was it yesterday?) and had problems.
> Removed
> > > org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY and many
> problems
> > > went away. Much later discovered more problems but it's just me and my
> > > silly app until I have proof :-)
> > >
> > > I totally agree that c:forEach was more broken before! Thanks a lot for
> > > fixing it.
> > >
> >
> > I have found the problem related to MYFACES-3867, so I have already
> > fixed the code in trunk. I think this bug deserves a quick-fix release.
> >
> > > I would be very interested in some more input / clarifications about my
> > > other problem actually. Are you saying that forms may not
> > > use  enctype="multipart/form-data"? How are you supposed to
> > > fileUpload? Perhaps you must have a fileUpload component present if the
> > > form has  enctype="multipart/form-data"? Sounds like a weird
> limitation.
> > My
> > > functional requirement is of course a form with a fileupload component,
> > it
> > > is not working though and it's because the form will not post. I ended
> up
> > > removing all markup until I had a single button in a form and it still
> > did
> > > not work, that's when I created a jira. But at one point that form did
> > have
> > > a fileupload too with no difference in the result.
> > >
> > >
> >
> > The example provided by Michael Kurz in:
> >
> >
> >
> https://github.com/jsflive/jsf22-examples/blob/master/jsf22-input-file/src/main/webapp/upload.xhtml
> >
> > 
> > 
> > 
> > 
> >  > validator="#{uploadPage.validateFile}"/>
> > 
> >
> >  > action="#{uploadPage.uploadFile}"/>
> >  > action="#{uploadPage.uploadFile}">
> > 
> > 
> >
> > 
> > 
> >  > value="#{uploadPage.fileContent}"
> > rows="10" cols="100"/>
> > 
> > 
> >
> > Look the enctype="multipart/form-data" is there, but the code also
> > needs the h:inputFile. I don't see how it can work with just the button.
> >
> > 
> > 
> > 
> >
> > I can see the example in the rar file:
> >
> > 
> > 
> > 
> >  > required="true"/>
> > 
> >  > action="#{helloWorld.send}"/>
> > 
> > 
> >
> > but the same, it requires the h:inputFile so the file is uploaded.
> Servlet
> > 3.0 implementation handles the request, and JSF uses the spec, so
> > if the servlet spec works JSF should work.
> >
> > regards,
> >
> > Leonardo Uribe
> >
> > >
> > >
> > >
> > >
> > > On 10 March 2014 21:01, Leonardo Uribe  wrote:
> > >
> > >> 2014-03-10 14:56 GMT-05:00 Karl Kildén :
> > >> > Ah the new release, yes I tried it asap it did not fix my issue.
> > >> >
> > >>
> > >> Which one? #1 or #2 ?
> > >>
> > >> > Regarding the duplicated id issue that I think could be related to
> > >> > c:forEach, No idea what the problem is but it works fine with
> mojarra

Re: 2.2.0 and multipart

2014-03-10 Thread Howard W. Smith, Jr.
Karl, did you see the email below, and did you try that sample, and did
that work for you?



On Tue, Mar 4, 2014 at 10:30 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> wow, okay. :)
>
> Earlier, Leonardo Uribe mentioned the following:
>
> I can confirm a simple example using MyFaces 2.2.0 works. See:
>
> http://jsflive.wordpress.com/2013/04/23/jsf22-file-upload/
>
> Looking forward to hearing why your/Karl's test case does not work.
>
>
>
> On Tue, Mar 4, 2014 at 10:26 AM, Karl Kildén wrote:
>
>> Removing deltaspike has no effect. / Karl
>>
>>
>> On 4 March 2014 16:23, Howard W. Smith, Jr. 
>> wrote:
>>
>> > Have you reported this to Deltaspike? I wonder what happens when you
>> > 'remove' delta spike from the equation/mix, and see if stuff/stack
>> starts
>> > working. :)
>> >
>> >
>> >
>> > On Tue, Mar 4, 2014 at 9:55 AM, Karl Kildén 
>> wrote:
>> >
>> > > It made no difference for me / Karl
>> > >
>> > >
>> > > On 4 March 2014 15:52, Karl Kildén  wrote:
>> > >
>> > > > Nice spot, In my production environment I changed it but I will test
>> > that
>> > > > aspect in the template project
>> > > >
>> > > >
>> > > > On 4 March 2014 15:50, Howard W. Smith, Jr. > > > >wrote:
>> > > >
>> > > >> On Tue, Mar 4, 2014 at 9:18 AM, Karl Kildén > >
>> > > >> wrote:
>> > > >>
>> > > >> > Everyone, this is how I reproduced it in a test project:
>> > > >> >
>> > > >> >
>> > > >> >- Cloned Gerhards template
>> > > >> > project:https://github.com/os890/javaweb-cdi-ds-project-template
>> > > >> >
>> > > >>
>> > > >> h,
>> > > >>
>> > > >> examining the faces-config.xml, i see 2.0 specified instead of 2.1
>> (or
>> > > >> 2.2).
>> > > >>
>> > > >> > > > >> xmlns="http://java.sun.com/xml/ns/javaee";
>> > > >> xmlns:xi="http://www.w3.org/2001/XInclude";
>> > > >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
>> > > >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
>> > > >> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd";>
>> > > >>
>> > > >> 
>> > > >>
>> > > >>
>> > > >> When MyFaces 2.2 was released, i don't think I saw any mention of a
>> > > >> 'requirement' to update faces-config, accordingly, but it would be
>> > nice
>> > > to
>> > > >> know if faces-config.xml has to be updated with '2.2' or 2.1.
>> > > >>
>> > > >
>> > > >
>> > >
>> >
>>
>
>


Re: 2.2.0 and multipart

2014-03-10 Thread Howard W. Smith, Jr.
Leonardo Uribe, see below. I think this is the thread where Karl discussed
his fileUpload issue, and shared a test case (below), too.




On Tue, Mar 4, 2014 at 9:18 AM, Karl Kildén  wrote:

> Leonardo Uribe, Thanks for doing a test with this already.
>
> Everyone, this is how I reproduced it in a test project:
>
>
>- Cloned Gerhards template
> project:https://github.com/os890/javaweb-cdi-ds-project-template
>- Ran with mvn clean install jetty:run ->
>http://localhost:8080/javaweb-cdi-ds-project-template/helloWorld.xhtml-
> >
> Wrote my name and pressed "Press Me" and it successfully navigated.
>- Changed helloWorld.xhtml and added enctype="multipart/form-data" to
>the form.
>- Ran project with mvn clean install jetty:run -> it does not work
>- Ran project with mvn clean install jetty:run -Pmojarra -> works (Note
>that mojarra profile is used)
>
>
> To conclude with a normal form Gerhards project template works just fine.
> It works fine with mojarra in either case. With Myfaces and
> enctype="multipart/form-data" it does not work.
>
> I tried this several times with the same result.
>
> Deltaspike and Myfaces is what's in common with my normal stack. No
> Primefaces needed for reproduce
>
> cheers
>
>
>
>
>
>
>
> On 4 March 2014 14:58, Karl Kildén  wrote:
>
> > Well for me it breaks the form completely. Even if I have only a single
> > component  it's broke. Adding the primefaces parameter
> > has no effect. I will try to put a test application together
> >
> >
> > On 4 March 2014 14:17, Leonardo K. Shikida  wrote:
> >
> >> Karl
> >>
> >> I haven't tested it, but Howard figured out that it may be a primefaces
> >> problem in their autodetection algorithm
> >>
> >> I haven't tested myself yet, but it seems it's just a matter of adding
> >> this
> >> parameter explicitly
> >>
> >> 
> >> primefaces.UPLOADER
> >>   commons
> >> 
> >>
> >> best regards
> >>
> >> Leo
> >>
> >>
> >> []
> >>
> >> Leo
> >>
> >>
> >> On Tue, Mar 4, 2014 at 4:37 AM, Karl Kildén 
> >> wrote:
> >>
> >> > Leo,
> >> >
> >> > I have the same problem, What's your status?
> >> >
> >> > cheers
> >> >
> >> >
> >> > On 22 February 2014 02:58, Leonardo K. Shikida 
> >> wrote:
> >> >
> >> > > Hi
> >> > >
> >> > > Just noticed this thread about tomee, myfacs 2.2.0 and multipart
> >> request
> >> > >
> >> > >
> >> > >
> >> >
> >>
> stackoverflow.com/questions/21948228/how-to-get-jsf-file-upload-to-work-on-tomee-1-6
> >> > >
> >> > > does anyone know if between 2.1.13 and 2.2.0, multipart request has
> >> got
> >> > any
> >> > > new bug? could not find anything in JIRA
> >> > >
> >> > > the guy who posted the stackoverflow question tested with
> >> > >
> >> > > h:commandButton while I've reproduced the problem just switching
> >> > > myfaces jars from vanilla tomee 1.6.0 from 2.1.13 to 2.2.0 and using
> >> > > p:fileUpload
> >> > >
> >> > > []
> >> > >
> >> > > Leo
> >> > >
> >> >
> >>
> >
> >
>


Re: 2.2 stability

2014-03-10 Thread Howard W. Smith, Jr.
response inline,

On Mon, Mar 10, 2014 at 2:43 PM, Karl Kildén  wrote:

> Hi Howard,
>
> If someone proposed a fix for me I must have missed it, so no my issues are
> still not resolved unfortunately. I don't think it's possible to write it
> in another fashion.
>

Leonardo's response, asking you to try MyFaces 2.2.1, which was released
within the last 12 to 24 hours. :)


>
> Problem #1: enctype="multipart/form-data" not working. Not sure if anyone
> tried the demo app I linked in the jira but for now I can't investigate it
> any further on my own.
>

i don't think Leonardo's response was targeting this issue.
maybe/hopefully, Leonardo will respond at his earliest convenience.
earlier, did you say that this issue is resolved via Mojarra 2.2.x (and
some other container... glassfish, jboss, ...) ???


>
> Problem #2 I also have a problem with duplicated id's but it would take
> some time to reproduce it in a demo app so I'm hesitant to bring it up.
> Basically a lot of ajax, dynamic includes, c:forEach, ui:repeat, some
> bindings :-)
>

did you try MyFaces 2.2.1 release to see if the duplicated IDs issue is
fixed in your app/project?

is it best to assume that c:forEach is supposed to work with/via AJAX PPR?
just because Mojarra 'works', should we assume that Mojarra's
implementation is correct?

MyFaces and TomEE committers know that there MyFaces may be a bit more
'strict' than Mojarra (I can agree with that as well, as per my experience
when i migrated from Mojarra 2.1.x to MyFaces 2.1.x), and I think MyFaces
(and TomEE) committers question the fact that Mojarra is really meeting
requirements of the spec, or there is a different set of TCKs that Mojarra
is running against. I hope 'they' will confirm, clarify, or correct what
I'm stating here. :)


Re: 2.2 stability

2014-03-10 Thread Howard W. Smith, Jr.
Karl, does this fix your issue and or meet your requirements? Looking
forward to your response. I'm sure others are, too. :-)

Can you refactor your code, so it is not dependent on c:forEach? Maybe
Leonardo can advise on that, too.
On Mar 9, 2014 9:24 PM, "Leonardo Uribe"  wrote:

> Hi
>
> @MYFACES-3865 It was fixed in 2.2.1, and the artifacts will be released
> in no time. The fix for c:forEach was really complex and painful, but it
> was finally done and the result is the best option we will have. Finally
> we have a proper solution that will work in complex cases and will
> allow all facelets dinamic tags to work well together.
>
> The hack done for:
>
> org.apache.myfaces.STRICT_JSF_2_FACELETS_COMPATIBILITY
>
> Is meant for people that requires the old (and buggy) logic from facelets
> 1.1.x, so it is expected to do not work in some cases.
>
> My personal perception is 2.2.1 will be very stable, it is obvious to have
> some small bugs, but in this release we created a lot of junit tests, so
> the probability of find bugs has become small. Anyway, we will be eager
> to check and fix all new issues as soon as possible.
>
> regards,
>
> Leonardo Uribe
>
> 2014-03-09 18:26 GMT-05:00 Howard W. Smith, Jr. :
> > On Sun, Mar 9, 2014 at 5:20 PM, Ludovic Pénet  wrote:
> >
> >> I found 2.2 to be very stable, almost a drop in replacement for 2.1.
> >
> >
> > +1
> >
> > I was using MyFaces 2.1.13 prior using MyFaces 2.2.0 (final), and MyFaces
> > 2.2.0 seems just as stable as 2.1.13 is/was. I'm very pleased/satisfied
> > with myFaces 2.2.0, and i have had 'no' issues at all. :)
>


Re: 2.2 stability

2014-03-09 Thread Howard W. Smith, Jr.
On Sun, Mar 9, 2014 at 5:20 PM, Ludovic Pénet  wrote:

> I found 2.2 to be very stable, almost a drop in replacement for 2.1.


+1

I was using MyFaces 2.1.13 prior using MyFaces 2.2.0 (final), and MyFaces
2.2.0 seems just as stable as 2.1.13 is/was. I'm very pleased/satisfied
with myFaces 2.2.0, and i have had 'no' issues at all. :)


Re: 2.2.0 and multipart

2014-03-04 Thread Howard W. Smith, Jr.
wow, okay. :)

Earlier, Leonardo Uribe mentioned the following:

I can confirm a simple example using MyFaces 2.2.0 works. See:

http://jsflive.wordpress.com/2013/04/23/jsf22-file-upload/

Looking forward to hearing why your/Karl's test case does not work.



On Tue, Mar 4, 2014 at 10:26 AM, Karl Kildén  wrote:

> Removing deltaspike has no effect. / Karl
>
>
> On 4 March 2014 16:23, Howard W. Smith, Jr. 
> wrote:
>
> > Have you reported this to Deltaspike? I wonder what happens when you
> > 'remove' delta spike from the equation/mix, and see if stuff/stack starts
> > working. :)
> >
> >
> >
> > On Tue, Mar 4, 2014 at 9:55 AM, Karl Kildén 
> wrote:
> >
> > > It made no difference for me / Karl
> > >
> > >
> > > On 4 March 2014 15:52, Karl Kildén  wrote:
> > >
> > > > Nice spot, In my production environment I changed it but I will test
> > that
> > > > aspect in the template project
> > > >
> > > >
> > > > On 4 March 2014 15:50, Howard W. Smith, Jr.  > > >wrote:
> > > >
> > > >> On Tue, Mar 4, 2014 at 9:18 AM, Karl Kildén 
> > > >> wrote:
> > > >>
> > > >> > Everyone, this is how I reproduced it in a test project:
> > > >> >
> > > >> >
> > > >> >- Cloned Gerhards template
> > > >> > project:https://github.com/os890/javaweb-cdi-ds-project-template
> > > >> >
> > > >>
> > > >> h,
> > > >>
> > > >> examining the faces-config.xml, i see 2.0 specified instead of 2.1
> (or
> > > >> 2.2).
> > > >>
> > > >>  > > >> xmlns="http://java.sun.com/xml/ns/javaee";
> > > >> xmlns:xi="http://www.w3.org/2001/XInclude";
> > > >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> > > >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> > > >> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd";>
> > > >>
> > > >> 
> > > >>
> > > >>
> > > >> When MyFaces 2.2 was released, i don't think I saw any mention of a
> > > >> 'requirement' to update faces-config, accordingly, but it would be
> > nice
> > > to
> > > >> know if faces-config.xml has to be updated with '2.2' or 2.1.
> > > >>
> > > >
> > > >
> > >
> >
>


Re: 2.2.0 and multipart

2014-03-04 Thread Howard W. Smith, Jr.
Have you reported this to Deltaspike? I wonder what happens when you
'remove' delta spike from the equation/mix, and see if stuff/stack starts
working. :)



On Tue, Mar 4, 2014 at 9:55 AM, Karl Kildén  wrote:

> It made no difference for me / Karl
>
>
> On 4 March 2014 15:52, Karl Kildén  wrote:
>
> > Nice spot, In my production environment I changed it but I will test that
> > aspect in the template project
> >
> >
> > On 4 March 2014 15:50, Howard W. Smith, Jr.  >wrote:
> >
> >> On Tue, Mar 4, 2014 at 9:18 AM, Karl Kildén 
> >> wrote:
> >>
> >> > Everyone, this is how I reproduced it in a test project:
> >> >
> >> >
> >> >- Cloned Gerhards template
> >> > project:https://github.com/os890/javaweb-cdi-ds-project-template
> >> >
> >>
> >> h,
> >>
> >> examining the faces-config.xml, i see 2.0 specified instead of 2.1 (or
> >> 2.2).
> >>
> >>  >> xmlns="http://java.sun.com/xml/ns/javaee";
> >> xmlns:xi="http://www.w3.org/2001/XInclude";
> >> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> >> xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
> >> http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd";>
> >>
> >> 
> >>
> >>
> >> When MyFaces 2.2 was released, i don't think I saw any mention of a
> >> 'requirement' to update faces-config, accordingly, but it would be nice
> to
> >> know if faces-config.xml has to be updated with '2.2' or 2.1.
> >>
> >
> >
>


Re: 2.2.0 and multipart

2014-03-04 Thread Howard W. Smith, Jr.
On Tue, Mar 4, 2014 at 9:18 AM, Karl Kildén  wrote:

> Everyone, this is how I reproduced it in a test project:
>
>
>- Cloned Gerhards template
> project:https://github.com/os890/javaweb-cdi-ds-project-template
>

h,

examining the faces-config.xml, i see 2.0 specified instead of 2.1 (or 2.2).

http://java.sun.com/xml/ns/javaee";
xmlns:xi="http://www.w3.org/2001/XInclude";
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee
http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd";>




When MyFaces 2.2 was released, i don't think I saw any mention of a
'requirement' to update faces-config, accordingly, but it would be nice to
know if faces-config.xml has to be updated with '2.2' or 2.1.


Re: 2.2.0 and multipart

2014-03-04 Thread Howard W. Smith, Jr.
On Tue, Mar 4, 2014 at 8:58 AM, Karl Kildén  wrote:

> Well for me it breaks the form completely.


interesting. please clarify this statement... breaks the form completely.


> Even if I have only a single component  it's broke.


i'm definitely interested in seeing this h:form and h:commandbutton (and
p:fileUpload) xhtml syntax.


Adding the primefaces parameter has no effect. I will try to put a test
> application together
>

Karl,

Below is my xhtml, which is PrimeFaces 3.x FileUpload syntax. The following
code worked with PrimeFaces 3.x (and PrimeFaces 4.0.x and MyFaces 2.1.13),
but it stopped working when I added MyFaces 2.2 to my PrimeFaces 4.0.x
project/app.








Once I specified 'commons' for PrimeFaces uploader context param in web.xml
(after upgrading to Apache commons fileupload 1.3 JAR), the xhtml 'above'
started working again.


Re: 2.2.0 and multipart

2014-03-03 Thread Howard W. Smith, Jr.
On Mar 3, 2014 7:33 AM, "Leonardo K. Shikida"  wrote:
>
> Hi Howard
>
> thanks for the answer

You're welcome, Leonardo.

>
> except for the "primefaces.UPLOADER" thing, I was using FU 1.3 already and
> the primefaces file upload filter.

FileUpload 1.3, alone, did not solve the issue for me.

>
> the difference is that I use PF4 community
>
> I've also noticed from the manual that this parameter is optional (page
192)
>
> (...)
> FileUpload engine on the server side can either be servlet 3.0 or commons
> fileupload. PrimeFaces
> selects the most appropriate uploader engine by detection and it is
> possible to force one or the other
> usign an optional configuration param.
> 
> primefaces.UPLOADER
> auto|native|commons
> 
> (...)
>
> I'm gonna try setting the parameter explicitly, maybe it's a primefaces
> detection problem.

That's where I think the issue is. Auto detection is failing. That's why I
set to Commons, and then it started working.

>
> thanks!
>
> Leo
>
>
> []
>
> Leo
>
>
> On Sun, Mar 2, 2014 at 8:36 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com
> > wrote:
>
> > On Tue, Feb 25, 2014 at 10:20 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> > > +1 thanks Leonardo for informing the user list about this issue. I am
> > > using MyFaces 2.2 (and/via TomEE 1.6.1 snapshot) with my JSF web
> > > application, and I confirmed this bug/issue too in my app. PrimeFaces
4.x
> > > (simple) fileUpload is no longer working. :(
> > >
> > > maybe, it can/should be confirmed if MyFaces 2.2 (basic/simple)
> > fileUpload
> > > works as designed/expected. i have not tested that though/yet.
> > >
> >
> > okay, this evening, I spent some time with this.
> >
> > 1. I searched google for
> >
> > site:forum.primefaces.org fileupload 2.2
> >
> > 2. found the following on PrimeFaces forum
> >
> > http://forum.primefaces.org/viewtopic.php?f=3&t=31210
> >
> > 3. which referenced the following (solution seemed to be too much)
> >
> >
> >
http://stackoverflow.com/questions/17204355/glassfish-4-jsf-2-2-and-primefaces-fileuploadevent-not-working-together/17363970#17363970
> >
> > 4. which referenced the following as a related link,
> >
> >
> >
http://stackoverflow.com/questions/20316773/primefaces-4-0-fileupload-works-with-mojarra-2-2-but-not-myfaces-2-2?rq=1
> >
> > 5. the answer below, motivated me to upgrade from apache commons
fileupload
> > 1.2.2 to 1.3
> >
> > http://stackoverflow.com/a/20347508/933054
> >
> > 6. and then I looked at PrimeFaces 4.0 user guide, and recognized
something
> > 'new' that could be specified in web.xml. So, I added the following to
my
> > web.xml,
> >
> > 
> > primefaces.UPLOADER
> > commons
> > 
> >
> > and finally, PrimeFaces (Elite) 4.0.x works with MyFaces 2.2.
> >
> > 7. as per PrimeFaces 4.0 user guide, I already had the following (FYI,
> > below is required if 'commons' fileupload is used)
> >
> > 
> > 
> > PrimeFaces FileUpload Filter
> >
> >
org.primefaces.webapp.filter.FileUploadFilter
> > 
> > 
> > PrimeFaces FileUpload Filter
> > Faces Servlet
> > 
> >


Re: 2.2.0 and multipart

2014-03-02 Thread Howard W. Smith, Jr.
On Tue, Feb 25, 2014 at 10:20 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> +1 thanks Leonardo for informing the user list about this issue. I am
> using MyFaces 2.2 (and/via TomEE 1.6.1 snapshot) with my JSF web
> application, and I confirmed this bug/issue too in my app. PrimeFaces 4.x
> (simple) fileUpload is no longer working. :(
>
> maybe, it can/should be confirmed if MyFaces 2.2 (basic/simple) fileUpload
> works as designed/expected. i have not tested that though/yet.
>

okay, this evening, I spent some time with this.

1. I searched google for

site:forum.primefaces.org fileupload 2.2

2. found the following on PrimeFaces forum

http://forum.primefaces.org/viewtopic.php?f=3&t=31210

3. which referenced the following (solution seemed to be too much)

http://stackoverflow.com/questions/17204355/glassfish-4-jsf-2-2-and-primefaces-fileuploadevent-not-working-together/17363970#17363970

4. which referenced the following as a related link,

http://stackoverflow.com/questions/20316773/primefaces-4-0-fileupload-works-with-mojarra-2-2-but-not-myfaces-2-2?rq=1

5. the answer below, motivated me to upgrade from apache commons fileupload
1.2.2 to 1.3

http://stackoverflow.com/a/20347508/933054

6. and then I looked at PrimeFaces 4.0 user guide, and recognized something
'new' that could be specified in web.xml. So, I added the following to my
web.xml,


primefaces.UPLOADER
commons


and finally, PrimeFaces (Elite) 4.0.x works with MyFaces 2.2.

7. as per PrimeFaces 4.0 user guide, I already had the following (FYI,
below is required if 'commons' fileupload is used)



PrimeFaces FileUpload Filter

org.primefaces.webapp.filter.FileUploadFilter


PrimeFaces FileUpload Filter
Faces Servlet



Re: 2.2.0 and multipart

2014-02-25 Thread Howard W. Smith, Jr.
On Tue, Feb 25, 2014 at 3:20 AM, Werner Punz  wrote:

> Am 22.02.14 02:58, schrieb Leonardo K. Shikida:
>
>  Hi
>>
>> Just noticed this thread about tomee, myfacs 2.2.0 and multipart request
>>
>> stackoverflow.com/questions/21948228/how-to-get-jsf-file-
>> upload-to-work-on-tomee-1-6
>>
>> does anyone know if between 2.1.13 and 2.2.0, multipart request has got
>> any
>> new bug? could not find anything in JIRA
>>
>> the guy who posted the stackoverflow question tested with
>>
>> h:commandButton while I've reproduced the problem just switching
>> myfaces jars from vanilla tomee 1.6.0 from 2.1.13 to 2.2.0 and using
>> p:fileUpload
>>
>> []
>>
>> Leo
>>
>>  Hi this could be a new bug, we introduced a fileupload handling with JSF
> 2.2 (the h:inputFile tag) maybe the normal multipart request handling was
> broken by the extensions done in this area the best bet is to file a
> bugreport in the myfaces bugtracker https://issues.apache.org/
> jira/browse/MYFACES
>
> Werner
>
>
> +1 thanks Leonardo for informing the user list about this issue. I am
using MyFaces 2.2 (and/via TomEE 1.6.1 snapshot) with my JSF web
application, and I confirmed this bug/issue too in my app. PrimeFaces 4.x
(simple) fileUpload is no longer working. :(

maybe, it can/should be confirmed if MyFaces 2.2 (basic/simple) fileUpload
works as designed/expected. i have not tested that though/yet.


Re: Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE

2014-02-13 Thread Howard W. Smith, Jr.
do you have a screen capture or some type of demo of the Select component?



On Thu, Feb 13, 2014 at 8:39 AM, Rene Perschon  wrote:

> I don't think a TagHandler or a custom component can do what that code
> does. It's used to display a Select in a very specific way.
>
>
>
> Gesendet: Donnerstag, 13. Februar 2014 um 14:29 Uhr
> Von: "Karl Kildén" 
> An: "MyFaces Discussion" 
> Betreff: Re: Problems with a custom component when migrating from
> Glassfish(mojarra) to TomEE
> Have you considered a custom tagHandler / composite component instead?
>
> I took a quick look but I don't recognize much sorry.
>
>
> On 13 February 2014 14:09, Howard W. Smith, Jr.  >wrote:
>
> > I think Leonardo, Gerhard, or one of the other committers may provide her
> > some good help, just to get another MyFaces user, especially when one is
> > migrating from Mojarra to MyFaces.
> >
> > @Renee, +1 your goal/request.
> >
> > I migrated from Mojarra to MyFaces, first, and then 2 months later, I
> > migrated from Glassfish to tomee (and JSF managed beans to CDI managed
> > beans at same time). Thomas, Romain, Mark Struberg, and others provided
> > great help and motivation. Apache tomee, MyFaces, tomcat user mail lists
> > are definitely the place to be.
> >
> > But I didn't have code dependent on the Mojarra library like you do.
> Still,
> > it took me about a week to migrate from Mojarra to MyFaces. Thomas and
> > Leonardo motivated me to start the migration after reading about the
> > performance comparison between Mojarra and MyFaces. Mark Struberg blog,
> why
> > is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-)
> >
> > I love high performance, that's why I opted to use MyFaces, tomee,
> > OpenWebBeans, and JUEL.
> >
> > Wishing you much success.
> > On Feb 13, 2014 7:23 AM, "Thomas Andraschko" <
> andraschko.tho...@gmail.com>
> > wrote:
> >
> > > I don't think that anyone will port your complete code and give you a
> > > complete solution ;)
> > >
> > > The biggest problem is AFAIR that the renderer implementations are not
> in
> > > the API packages. So you have to rebuild all this functionality without
> > > dependencies to the Impl.
> > >
> > > e.g.
> > > Attribute,AttributeManager -> String[] with attribute namens
> > > Move all the utils functions to your own code
> (Util.componentIsDisabled,
> > > RenderKitUtils.getSelectItems. etc.)
> > >
> > > The most code doesn't really depent on the IMPL code.
> > >
> > >
> > > 2014-02-13 12:44 GMT+01:00 Rene Perschon :
> > >
> > > > Hi everyone!
> > > >
> > > > I'm currently migrating an application from Glassfish 3.1.1 to TomEE.
> > Now
> > > > the problem is that this application contains a custom component
> which
> > > was
> > > > unfortunately coded with hard dependencies on com.sun.faces classes
> > > (maven
> > > > dependency jsf-impl).
> > > >
> > > > Now my question is how can i port this component in such a way that
> it
> > is
> > > > independent from any concrete JSF implementation (or at least in
> such a
> > > way
> > > > that it works with MyFaces).
> > > >
> > > > Here's the component:
> > > >
> > > > import java.io.IOException;
> > > > import java.util.Iterator;
> > > > import java.util.Map;
> > > >
> > > > import javax.faces.component.UIComponent;
> > > > import javax.faces.component.UINamingContainer;
> > > > import javax.faces.component.ValueHolder;
> > > > import javax.faces.context.FacesContext;
> > > > import javax.faces.context.ResponseWriter;
> > > > import javax.faces.convert.Converter;
> > > > import javax.faces.model.SelectItem;
> > > > import javax.faces.model.SelectItemGroup;
> > > >
> > > > import com.sun.faces.renderkit.Attribute;
> > > > import com.sun.faces.renderkit.AttributeManager;
> > > > import com.sun.faces.renderkit.RenderKitUtils;
> > > > import com.sun.faces.renderkit.html_basic.MenuRenderer;
> > > > import com.sun.faces.util.RequestStateManager;
> > > > import com.sun.faces.util.Util;
> > > >
> > > > /**
> > > > * {@inheritDoc}.
> > > > */
> > > > public class CustomSelectManyCheckbox

Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?

2014-02-13 Thread Howard W. Smith, Jr.
Very interesting, Karl, and thanks for the clarification!

+1 at the responses on this thread. They interested me, because for
security implementation in my app is

- 15 minutes session expiration (web.xml)
- meta refresh tag in  tag that redirects page to view expired 'page'
(got that concept/code from BalusC on stackoverflow.com)

but some months ago, an enduser requested a 'keep-alive session'
requirement on a page that will 'not' end his session while he using the
'payroll' page to do his work. He did not want to have to keep logging in,
and having to make filter selection via p:calendar begin/end dates of
payroll period, and then scroll down to job/employee that was last marked
as paid. So, i found some keep-alive-session code (by BalusC on
stackoverflow.com) and refactored app/page a bit to keep the session alive
until he logs out of the app or until he navigates to another page.

well, now that you all are talking about this, this reminds me of a recent
discussion on tomcat list about (re)designing webapp to allow enduser to
login and resume his work. I like that concept, and that might be the best
approach to address 'security concerns'. There would be no need to p:poll,
p:push, etc... just to keep the session alive or to push a message to
client to 'end' the session and logout user (sometime ago, i developed some
p:push + java bean code that did that, but not using that implementation in
the app).

polling to keep session alive seems to be the easiest way to 'satisfy' the
enduser, but definitely not the most-secure, as you said earlier. this
discussion may motivate me to refactor my app a bit, accordingly. thank you
all!



On Thu, Feb 13, 2014 at 7:07 AM, Karl Kildén  wrote:

> It's just that if you just do p:poll every five minutes they are never
> logged out from activity. This has actually caused us to fail a security
> screening in the past.
>
> 1. Users use security system before leaving office, forgets to logout and
> the PC does not lock from inactivity either
> 2. In the middle of the night a burglar breaks in and has direct access to
> system because p:poll has kept stuff warm for him
> 3. Lose Customer
>
> To clarify our users might just leave with computer logged on and system
> logged on so session timeout is essential. In general they actually want
> really short session timeouts but the tricky part is that for some pages
> they want 1H or similar. When they work on those pages they can't just lose
> the session so we warn them in advance. Might be enough to just use
> p:idleMonitor. Our solution is homemade because we don't have primefaces in
> that product so I was brainstorming when I mentioned it.
>
> For us it's DWR that keeps the session alive but in the future it will be
> p:push.
>
> TLDR:
> If you use p:poll don't forget that users may forget to logout and p:poll
> will disable session timeout.
>
> On 13 February 2014 12:52, Howard W. Smith, Jr.  >wrote:
>
> > Karl, p:poll introduces security concerns? Please elaborate/clarify.
> > Thanks.
> > On Feb 13, 2014 3:39 AM, "Karl Kildén"  wrote:
> >
> > > Good suggestion Thomas,
> > >
> > > For myself I would need this:
> > >
> > > < 1 Hour: Keep session alive with p:poll
> > > > 1 Hour: Render p:idleMonitor instead and warn for activity and
> session
> > > destroy in x minutes.
> > >
> > > The switch to a idleMonitor would require that you  check the submitted
> > > request parameters and this way know if poll component triggered the
> > > request or the user.
> > >
> > > A plain p:poll is unacceptable for our system for security reasons.
> > >
> > >
> > > On 13 February 2014 09:26, Thomas Andraschko <
> > andraschko.tho...@gmail.com
> > > >wrote:
> > >
> > > > >> I dont know why & how this is so implemented but It is very normal
> > > that
> > > > the
> > > > >> user may be busy reading some section of website or be away for 20
> > > > minutes,
> > > > >> & as he comes back & interacts with opened pages, how would I make
> > > that
> > > > >> work without the state ?
> > > > >> I think this is a common requirement for any public websites.
> > > >
> > > > You could just add an ajax poll components and ping the server all 5
> > > > minutes - so the session will only be destroyed if all tabs from your
> > > > application are closed.
> > > >
> > >
> >
>


Re: Problems with a custom component when migrating from Glassfish(mojarra) to TomEE

2014-02-13 Thread Howard W. Smith, Jr.
I think Leonardo, Gerhard, or one of the other committers may provide her
some good help, just to get another MyFaces user, especially when one is
migrating from Mojarra to MyFaces.

@Renee, +1 your goal/request.

I migrated from Mojarra to MyFaces, first, and then 2 months later, I
migrated from Glassfish to tomee (and JSF managed beans to CDI managed
beans at same time). Thomas, Romain, Mark Struberg, and others provided
great help and motivation. Apache tomee, MyFaces, tomcat user mail lists
are definitely the place to be.

But I didn't have code dependent on the Mojarra library like you do. Still,
it took me about a week to migrate from Mojarra to MyFaces. Thomas and
Leonardo motivated me to start the migration after reading about the
performance comparison between Mojarra and MyFaces. Mark Struberg blog, why
is OpenWebBeans so fast, motivated me to migrate to CDI and tomee. :-)

I love high performance, that's why I opted to use MyFaces, tomee,
OpenWebBeans, and JUEL.

Wishing you much success.
On Feb 13, 2014 7:23 AM, "Thomas Andraschko" 
wrote:

> I don't think that anyone will port your complete code and give you a
> complete solution ;)
>
> The biggest problem is AFAIR that the renderer implementations are not in
> the API packages. So you have to rebuild all this functionality without
> dependencies to the Impl.
>
> e.g.
> Attribute,AttributeManager -> String[] with attribute namens
> Move all the utils functions to your own code (Util.componentIsDisabled,
> RenderKitUtils.getSelectItems. etc.)
>
> The most code doesn't really depent on the IMPL code.
>
>
> 2014-02-13 12:44 GMT+01:00 Rene Perschon :
>
> > Hi everyone!
> >
> > I'm currently migrating an application from Glassfish 3.1.1 to TomEE. Now
> > the problem is that this application contains a custom component which
> was
> > unfortunately coded with hard dependencies on com.sun.faces classes
> (maven
> > dependency jsf-impl).
> >
> > Now my question is how can i port this component in such a way that it is
> > independent from any concrete JSF implementation (or at least in such a
> way
> > that it works with MyFaces).
> >
> > Here's the component:
> >
> > import java.io.IOException;
> > import java.util.Iterator;
> > import java.util.Map;
> >
> > import javax.faces.component.UIComponent;
> > import javax.faces.component.UINamingContainer;
> > import javax.faces.component.ValueHolder;
> > import javax.faces.context.FacesContext;
> > import javax.faces.context.ResponseWriter;
> > import javax.faces.convert.Converter;
> > import javax.faces.model.SelectItem;
> > import javax.faces.model.SelectItemGroup;
> >
> > import com.sun.faces.renderkit.Attribute;
> > import com.sun.faces.renderkit.AttributeManager;
> > import com.sun.faces.renderkit.RenderKitUtils;
> > import com.sun.faces.renderkit.html_basic.MenuRenderer;
> > import com.sun.faces.util.RequestStateManager;
> > import com.sun.faces.util.Util;
> >
> > /**
> >  * {@inheritDoc}.
> >  */
> > public class CustomSelectManyCheckboxListRenderer extends MenuRenderer
> > {
> > /** {@inheritDoc}. */
> > private static final Attribute[] ATTRIBUTES =
> > AttributeManager.getAttributes(AttributeManager.Key.SELECTMANYCHECKBOX);
> > /** Representing the border string. */
> > private static final String BORDER = "border";
> > /** Representing the tr string. */
> > private static final String TR = "tr";
> > /** Representing the td string. */
> > private static final String TD = "td";
> > /** Representing the label string. */
> > private static final String LABEL = "label";
> > /** Representing the newline string. */
> > private static final String NEWLINE = "\n";
> > /** Representing the tab string. */
> > private static final String TAB = "\t";
> > /** Representing the class string. */
> > private static final String CLASS = "class";
> > /** Representing the style string. */
> > private static final String STYLE = "style";
> > /** Representing the valign string. */
> > private static final String VALIGN = "valign";
> >
> >
> > // -- Public
> > Methods
> >
> >
> > @Override
> > public void encodeEnd(FacesContext context, UIComponent component)
> > throws IOException
> > {
> >
> > rendererParamsNotNull(context, component);
> >
> > if (!shouldEncode(component))
> > {
> > return;
> > }
> >
> > ResponseWriter writer = context.getResponseWriter();
> > assert (writer != null);
> >
> > String alignStr;
> > Object borderObj;
> > boolean alignVertical = false;
> > int border = 0;
> >
> >
> >
> > if (null != component.getAttributes().get("layout"))
> > {
> > alignStr = (String) component.getAttributes().get("layout");
> > alignVertical = alignStr.equalsIgnoreCase("pageDirection");
> > }
> >
> > if (null != component.ge

Re: How to survive viewscoped beans/viewmap after session destroy (using client side saving)?

2014-02-13 Thread Howard W. Smith, Jr.
Karl, p:poll introduces security concerns? Please elaborate/clarify.
Thanks.
On Feb 13, 2014 3:39 AM, "Karl Kildén"  wrote:

> Good suggestion Thomas,
>
> For myself I would need this:
>
> < 1 Hour: Keep session alive with p:poll
> > 1 Hour: Render p:idleMonitor instead and warn for activity and session
> destroy in x minutes.
>
> The switch to a idleMonitor would require that you  check the submitted
> request parameters and this way know if poll component triggered the
> request or the user.
>
> A plain p:poll is unacceptable for our system for security reasons.
>
>
> On 13 February 2014 09:26, Thomas Andraschko  >wrote:
>
> > >> I dont know why & how this is so implemented but It is very normal
> that
> > the
> > >> user may be busy reading some section of website or be away for 20
> > minutes,
> > >> & as he comes back & interacts with opened pages, how would I make
> that
> > >> work without the state ?
> > >> I think this is a common requirement for any public websites.
> >
> > You could just add an ajax poll components and ping the server all 5
> > minutes - so the session will only be destroyed if all tabs from your
> > application are closed.
> >
>


Re: myfaces 2.2 foe replace myfaces 2.1 into tomee

2014-02-12 Thread Howard W. Smith, Jr.
On Wed, Feb 12, 2014 at 11:21 AM, maurojava wrote:

> hi . i have tried but not work!
>
> o have substitute the jars but when i deploy not start into tomee.
>
> It can possible because i have jse1.7 ?
>
>
> the source of project
>

list steps, more details like following

1. i have JDK 7.0.45 (or whatever version)
2. tomee 1.6.0
3. myfaces 2.2 api and impl JARS, copied to tomee/lib
4. removed myfaces 2.1 api and impl JARs from tomee/lib
5. NOT using CODI in WAR or tomee/lib


Re: myfaces 2.2 foe replace myfaces 2.1 into tomee

2014-02-12 Thread Howard W. Smith, Jr.
On Wed, Feb 12, 2014 at 9:12 AM, Karl Kildén  wrote:

> myfaces-impl
> myfaces-api
>
> Remove old jars in /lib and place replacements there
>

yep/agreed!

+1 glad to see you using tomee + myfaces 2.2


Re: @FlowScoped, @Named and @ManagedBean

2014-02-12 Thread Howard W. Smith, Jr.
+1 thanks Karl. That is all good to know and good to hear from one of the
users. :)

And for the record, if Thomas recommends it, I know it's a good
recommendation.


On Wed, Feb 12, 2014 at 5:48 AM, Karl Kildén  wrote:

> This question has been raised on the mailing list several times. The answer
> is always the same:
> Released functionality is mature and stable. 0.X indicates that the API
> might change but so far this has happened like 1-2 times I think and
> probably took 2 minutes to fix for depending projects. The actual impl is
> stable though.
>
> By following the discussion on the mailing list it's quite clear that they
> put effort into not only porting CODI but to enhance it as well. I have
> Deltaspike in production for many, many months with no issues (all though
> not 0.6-SNAPSHOT). And you can assume it's going to be more tested then
> code you include yourself to do something similar.
>
> The parts regarding JSF is stable for 0.6 so getting the support from a
> SNAPSHOT right now and replace with stable release later is not a very
> adventurous.
>
> These are the docs for getting started:
> http://deltaspike.apache.org/jsf.html
>
> cheers
>
>
> On 12 February 2014 11:33, Howard W. Smith, Jr.  >wrote:
>
> > On Feb 12, 2014 1:40 AM, "Karl Kildén"  wrote:
> > >
> > > Deltaspike modules have consistently been usable off the shelf and
> would
> > be
> > > a far better solution then doing tricks to make CODI work.
> >
> > +1
> >
> > >
> > > However using JSF stuff would require you to use 0.6-SNAPSHOT. I would
> > > actually just use @SessionScoped, write a TODO and wait for 0.6 release
> > if
> > > I could. Otherwise I would use SNAPSHOT since the JSF stuff is all
> fixed
> > > for 0.6 afaik.
> >
> > When I experimented with CODI, I used 1.0.6 snapshot and had the same
> thing
> > in mind and then i heard that CODI was dead project, and most likely
> 1.0.6
> > would not be released. And I did hear and recognize that deltaspike is
> > recommended instead of CODI. Someone, please confirm.
> >
> > >
> > >
> > > On 12 February 2014 02:44, Kito Mann  wrote:
> > >
> > > > How mature is DeltaSpike? It's only at 0.05.
> >
> > +1 good question.
> >
> > > >
> > > > On Tuesday, February 11, 2014, Thomas Andraschko <
> > > > andraschko.tho...@gmail.com> wrote:
> > > >
> > > > > Can't you just switch to DS?
> > > > >
> > > > >
> > > > > 2014-02-11 18:46 GMT+01:00 Leonardo Uribe  > 
> > > > > >:
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > CDI implementations does not require to provide anything to JSF
> in
> > > > > > order to make @FlowScoped to work. The code has been tested
> against
> > > > > > OWB and Weld and it works in both cases.
> > > > > >
> > > > > > But the flow stuff relies on the new ClientWindow API, and that
> > could
> > > > > > cause a conflict with CODI, because CODI provides a solution for
> > this
> > > > > > part too. In fact, the solution introduced in the standard comes
> > from
> > > > > > CODI.
> > > > > >
> > > > > > In your particular case, the best option is provide a custom
> > > > > > ClientWindowFactory / ClientWindow that implements
> > > > > > ClientWindow.getId() method and grab the value generated by CODI.
> > > > > > Theorically there is no need of the custom PhaseListener, because
> > the
> > > > > > "attachWindow" step is done in CODI. I haven't tried it but I
> > suppose
> > > > > > a custom ClientWindow will work.
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Leonardo Uribe
> > > > > >
> > > > > > 2014-02-11 11:56 GMT-05:00 l.pe...@senat.fr :
> > > > > > > On 11/02/2014 14:51, l.pe...@senat.fr wrote:
> > > > > > >>
> > > > > > >> On 11/02/2014 10:28, l.pe...@senat.fr wrote:
> > > > > > >>>
> > > > > > >>> On 11/02/2014 03:30, Leonardo Uribe wrote:
> > > > > > >>
> > > > > > >>
> > > > > > >> [...]
> > > > &g

Re: @FlowScoped, @Named and @ManagedBean

2014-02-12 Thread Howard W. Smith, Jr.
On Wed, Feb 12, 2014 at 5:40 AM, Gerhard Petracek <
gerhard.petra...@gmail.com> wrote:

> @howard:
> (as announced back then) codi is in maintenance-mode, because new features
> will be added to deltaspike.
> you might have seen the latest updates for using it with ee7.
>

+1 thanks Gerhard


Re: @FlowScoped, @Named and @ManagedBean

2014-02-12 Thread Howard W. Smith, Jr.
On Feb 12, 2014 1:40 AM, "Karl Kildén"  wrote:
>
> Deltaspike modules have consistently been usable off the shelf and would
be
> a far better solution then doing tricks to make CODI work.

+1

>
> However using JSF stuff would require you to use 0.6-SNAPSHOT. I would
> actually just use @SessionScoped, write a TODO and wait for 0.6 release if
> I could. Otherwise I would use SNAPSHOT since the JSF stuff is all fixed
> for 0.6 afaik.

When I experimented with CODI, I used 1.0.6 snapshot and had the same thing
in mind and then i heard that CODI was dead project, and most likely 1.0.6
would not be released. And I did hear and recognize that deltaspike is
recommended instead of CODI. Someone, please confirm.

>
>
> On 12 February 2014 02:44, Kito Mann  wrote:
>
> > How mature is DeltaSpike? It's only at 0.05.

+1 good question.

> >
> > On Tuesday, February 11, 2014, Thomas Andraschko <
> > andraschko.tho...@gmail.com> wrote:
> >
> > > Can't you just switch to DS?
> > >
> > >
> > > 2014-02-11 18:46 GMT+01:00 Leonardo Uribe 
> > > >:
> > >
> > > > Hi
> > > >
> > > > CDI implementations does not require to provide anything to JSF in
> > > > order to make @FlowScoped to work. The code has been tested against
> > > > OWB and Weld and it works in both cases.
> > > >
> > > > But the flow stuff relies on the new ClientWindow API, and that
could
> > > > cause a conflict with CODI, because CODI provides a solution for
this
> > > > part too. In fact, the solution introduced in the standard comes
from
> > > > CODI.
> > > >
> > > > In your particular case, the best option is provide a custom
> > > > ClientWindowFactory / ClientWindow that implements
> > > > ClientWindow.getId() method and grab the value generated by CODI.
> > > > Theorically there is no need of the custom PhaseListener, because
the
> > > > "attachWindow" step is done in CODI. I haven't tried it but I
suppose
> > > > a custom ClientWindow will work.
> > > >
> > > > regards,
> > > >
> > > > Leonardo Uribe
> > > >
> > > > 2014-02-11 11:56 GMT-05:00 l.pe...@senat.fr :
> > > > > On 11/02/2014 14:51, l.pe...@senat.fr wrote:
> > > > >>
> > > > >> On 11/02/2014 10:28, l.pe...@senat.fr wrote:
> > > > >>>
> > > > >>> On 11/02/2014 03:30, Leonardo Uribe wrote:
> > > > >>
> > > > >>
> > > > >> [...]
> > > > 
> > > >  @FlowScoped annotation is for CDI only, so it will not work for
> > JSF
> > > >  managed beans. In your case, I believe the bean is instantiated
> > but
> > > it
> > > >  is not stored in any context, so once is created is discarded,
> > > giving
> > > >  the impression that the bean is working but it is not.
> > > > 
> > > >  In MyFaces it is possible to create a custom flow scope
annotation
> > > for
> > > >  other containers that works just like @FlowScoped, implementing
> > > >  org.apache.myfaces.spi.FacesFlowProvider SPI interface. You are
> > > >  already in CDI, so you don't need to bother about that.
> > > > 
> > > >  I have seen @Named annotation working with Spring, so it is not
> > > >  something specific for CDI, but @FlowScoped depends of CDI API.
> > > > >>>
> > > > >>> I am using CODI 1.0.5 (I heavily use its @ViewAccessScoped
> > > annotation)
> > > > >>> with OpenWebBeans 1.2.1.
> > > > >>>
> > > > >>> So, I thought  was ok on the CDI side...
> > > > >>>
> > > > >>> ...but after reading your mail, it seems to me that this CDI
> > > > >>> implementation was provided before JSF 2.2 release, and so that
it
> > > > must not
> > > > >>> include proper @FacesFlow support.
> > > > >>>
> > > > >>> Should I switch to another implementation, like DeltaSpike ?
> > > > >>>
> > > > >>> I must have misunderstood your mail from Sep 26 2013 (
> > > > >>>
> > > >
> > >
> >
http://myfaces.10567.n7.nabble.com/JSF-2-2-status-amp-snapshot-usage-td115852.html
> > > > >>> ) inviting us to try Faces Flows in MyFaces 2.2.
> > > > >>
> > > > >> After some debugging, I found that :
> > > > >> * beans are discovered and processed ok by
> > > > >> org.apache.myfaces.flow.cdi.FlowScopeCDIExtension
> > > > >> * -flow.xml is detected and processed with no errors ;
> > > > >> * if I use an empty -flow.xml file, an exception is raised line
716
> > of
> > > > >> org.apache.myfaces.config.DefaultFacesConfigurationProvider (on
> > > > >> facesConfig.getFacesFlowDefinitions().add(flow); )
> > > > >> * if I add a breakpoint in
> > > > >> org.apache.myfaces.flow.FlowHandlerImpl#clientWindowTransition, I
> > can
> > > > see :
> > > > >> ** my flow registered in _flowMapById (with "flow1" key)
> > > > >> ** my flow registered in _flowMapByDocumentId (with an empty key)
> > > > >> ** that _facesFlowProvider is null
> > > > >
> > > > >
> > > > > ok, I think I got it. And, as I feared, it seems to be CODI
related.
> > > > >
> > > > > In JSF2.2, a call to
> > > > >
> > > > > //JSF 2.2: attach window
> > > > > _lifecy
> >
> >
> >
> > --
> > ___
> >
> > Kito D. Mann | @kito99 | Author, JSF in Action
>

Re: StackOverflowError with MyFaces 2.2.0

2014-01-22 Thread Howard W. Smith, Jr.
On Wed, Jan 22, 2014 at 1:50 PM, Mike Calmus  wrote:

> I tried updating an existing application to MyFaces 2.2.0 (from 2.1.11) by
> simply replacing the library.


Interesting. I'm sure that I could have migrated my app from MyFaces 2.1.11
to myFaces 2.2.0, but I'm using TomEE, which has a nice home for MyFaces
2.1.x (and MyFaces 2.2.x).

Library = api and impl JAR

or

library = bundle JAR ?



> When I try to deploy the app, I get a StackOverflowError (below).


Might be good for you to copy/paste your (entire) server log (on startup of
server/app) to pastebin website or provide that in your next reply.


Re: JSF / MyFaces 2.2

2014-01-19 Thread Howard W. Smith, Jr.
On Sat, Jan 18, 2014 at 3:14 AM, Michael Kurz  wrote:

> You can have a look at my blog http://jsflive.wordpress.com/. I wrote
> some articles about JSF 2.2 features.
>
> Regards
> Michael
>

+1 wow, Michael, so many blog posts related to JSF 2.2. Thanks!

While scrolling through the list of your blogs, JSF 2.2 view actions caught
my attention. :)


Re: JSF 2.2 Exit Flow

2014-01-16 Thread Howard W. Smith, Jr.
On Thu, Jan 16, 2014 at 8:10 PM, Geoffrey Longo  wrote:

> I have an application that consists of a dropdown menu bar with many menu
> items.  Each menu item will initiate a new faces flow.  This is working
> correctly, however, once I am inside a flow, I would like any click on a
> menu item to exit the current flow, and then start a new one.  There are
> dozens of menu items in the application, so I was wondering if there is any
> way to have the current flow automatically exit when a menu item is clicked
> without having to define a flow-return for each menu item?
>
> Thanks,
> Geoff


I was wondering how your code looked. Now I know via your post[1] in
PrimeFaces forum. :)

i'm not using Faces Flow yet, so I'm just listening/reading. :)


[1] http://forum.primefaces.org/viewtopic.php?f=3&t=35881


Re: JSF / MyFaces 2.2

2014-01-16 Thread Howard W. Smith, Jr.
i would go with those 2 URLs that I provided, and just last night, while
reading Leonardo's blog about MyFaces 2.2 (what's new), he said that there
was a previous blog about view pooling, so i looked at his list of blogs on
the right hand side (the menu/navigator/tree), and found the following:

http://lu4242.blogspot.com/2013/12/view-pooling-in-jsf-22-using-apache.html

which is on my to-do list. i want to see if i can or have need to add that
to my app.




On Thu, Jan 16, 2014 at 1:07 PM, Ludovic Pénet  wrote:

> Well, you know what, I already googled (thanks) and read release notes
> (thanks again)...
>
> Best regards,
>
>
>
> "Howard W. Smith, Jr."  a écrit :
>
>> On Thu, Jan 16, 2014 at 4:56 AM, l.pe...@senat.fr  wrote:
>>
>>
>> what documents do you suggest to read to get an idea of what's new in JSF
>>> 2.2
>>
>>
>>
>> i just searched google.com for jsf 2.2 and below was first in 'my' (google)
>> search results (since I been there before)
>>
>> http://jdevelopment.nl/jsf-22/
>>
>> What's new in JSF 2.2? | J-Development
>> jdevelopment.nl/jsf-22/?
>>
>> You've visited this page 5 times. Last visit: 10/22/13
>>
>>
>>
>>
>> and in our favourite JSF implementation, MyFaces ?
>>
>>
>>
>> Leonardo sent an email (a few days ago) about the following:
>>
>> [core] What's new in MyFaces 2.2
>>
>> where he referenced the following blog:
>>
>> http://lu4242.blogspot.com/2014/01/whats-new-in-myfaces-22.html
>>
>> also, you can check release notes for MyFaces 2.2, and that should list
>> everything in MyFaces 2.2. I think the announcement emails sent to user
>> list, about MyFaces 2.2 (beta and final releases) also mentioned the
>> release notes.
>>
>>
> --
> Envoyé de mon téléphone Android avec K-9 Mail. Excusez la brièveté.
>
> |
> | AVANT D'IMPRIMER, PENSEZ A L'ENVIRONNEMENT.
> |
>
>


Re: JSF / MyFaces 2.2

2014-01-16 Thread Howard W. Smith, Jr.
On Thu, Jan 16, 2014 at 4:56 AM, l.pe...@senat.fr  wrote:

>
> what documents do you suggest to read to get an idea of what's new in JSF
> 2.2


i just searched google.com for jsf 2.2 and below was first in 'my' (google)
search results (since I been there before)

http://jdevelopment.nl/jsf-22/

What's new in JSF 2.2? | J-Development
jdevelopment.nl/jsf-22/?

You've visited this page 5 times. Last visit: 10/22/13




> and in our favourite JSF implementation, MyFaces ?
>
>
Leonardo sent an email (a few days ago) about the following:

[core] What's new in MyFaces 2.2

where he referenced the following blog:

http://lu4242.blogspot.com/2014/01/whats-new-in-myfaces-22.html

also, you can check release notes for MyFaces 2.2, and that should list
everything in MyFaces 2.2. I think the announcement emails sent to user
list, about MyFaces 2.2 (beta and final releases) also mentioned the
release notes.


Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-01-15 Thread Howard W. Smith, Jr.
if you are not able to use MyFaces 2.2 @ViewScoped, you may need to keep
OmniFaces CDI @ViewScoped until someone helps you with your issue.

Some months ago, I tested MyFaces 2.2 with OmniFaces CDI @ViewScoped; all
of my @ViewScoped beans were still OmniFaces CDI @ViewScoped, and I
experienced no issues. My app is not packaged as an EAR.

today, i am using MyFaces 2.2 @ViewScoped beans even though I still have
OmniFAces 1.6.3 JAR/dependency (not using OmniFaces CDI @ViewScoped).

For the first day, running MyFaces 2.2, I am quite pleased. No issues to
report, no exceptions in tomee/tomcat log files.



On Wed, Jan 15, 2014 at 5:57 PM, José Luis Cetina wrote:

> I removed CODI and my app is package as ear. maybe i need to try tomee
> 1.6.1-snapshot
>
>
> 2014/1/15 Howard W. Smith, Jr. 
>
> > On Wed, Jan 15, 2014 at 4:40 PM, José Luis Cetina  > >wrote:
> >
> > > I removed my faces 2.1.13 jars (api and imp) from tomee lib and add
> > myfaces
> > > api and impl 2.2.0
> > >
> >
> > that's exactly what I did and I don't get the error.
> >
> > Jose, are you still using MyFaces CODI (1.5 or 1.6.x) and EAR, too?
> >
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>


Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-01-15 Thread Howard W. Smith, Jr.
On Wed, Jan 15, 2014 at 4:40 PM, José Luis Cetina wrote:

> I removed my faces 2.1.13 jars (api and imp) from tomee lib and add myfaces
> api and impl 2.2.0
>

that's exactly what I did and I don't get the error.

Jose, are you still using MyFaces CODI (1.5 or 1.6.x) and EAR, too?


Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-01-15 Thread Howard W. Smith, Jr.
Leonardo,

Jose uses/deploys EARs. Maybe that is the issue. Has MyFaces 2.2
@ViewScoped been tested in an EAR.

Jose,

You need to provide more of your configuration and share that you usually
deploy your app via EAR(s). right?



On Wed, Jan 15, 2014 at 5:48 PM, Leonardo Uribe  wrote:

> Hi
>
> It looks like something not directly related to MyFaces, it is like if
> the classpath is scanned twice, or like the bean is subscribed twice.
> I suppose it is a bug in OWB or in TomEE. Maybe you should report it
> in:
>
> https://issues.apache.org/jira/browse/TOMEE
>
> regards,
>
> Leonardo Uribe
>
> 2014/1/15 José Luis Cetina :
> > Hi. I use TomEE 1.6.0 Final release with myfaces 2.1.13 and jdk 1.7 with
> > this i was using the org.omnifaces.cdi.ViewScoped annotation with any
> > problem, with the new release of myfaces 2.2.0 i decide to change from
> > org.omnifaces.cdi.ViewScoped to javax.faces.view.ViewScoped then im
> gettin
> > this AmbiguousResolutionException.
> >
> >
> > This error only happend in Linux environment, if i run the same project
> in
> > Windows this error never appears.
> >
> >
> > I removed my faces 2.1.13 jars (api and imp) from tomee lib and add
> myfaces
> > api and impl 2.2.0
> >
> >
> > What could be wrong?
> >
> > Log:
> >
> > javax.enterprise.inject.AmbiguousResolutionException: Ambiguous
> resolution
> > found beans:
> > ViewScopeBeanHolder, Name:null, WebBeans Type:MANAGED, API
> >
> Types:[java.io.Serializable,java.lang.Object,org.apache.myfaces.cdi.view.ViewScopeBeanHolder],
> > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]
> > from
> jar:file:/home/broncos/apache/tomee/apache-tomee-jaxrs-1.6.0/lib/myfaces-impl-2.2.0.jar!/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.class
> > ViewScopeBeanHolder, Name:null, WebBeans Type:MANAGED, API
> >
> Types:[java.io.Serializable,java.lang.Object,org.apache.myfaces.cdi.view.ViewScopeBeanHolder],
> > Qualifiers:[javax.enterprise.inject.Any,javax.enterprise.inject.Default]
> > from
> jar:file:/home/broncos/apache/tomee/apache-tomee-jaxrs-1.6.0/lib/myfaces-impl-2.2.0.jar!/org/apache/myfaces/cdi/view/ViewScopeBeanHolder.class
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionExceptionForBeans(InjectionExceptionUtil.java:104)
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionException(InjectionExceptionUtil.java:94)
> >
> org.apache.webbeans.util.InjectionExceptionUtil.throwAmbiguousResolutionException(InjectionExceptionUtil.java:71)
> >
> org.apache.webbeans.container.InjectionResolver.resolve(InjectionResolver.java:699)
> >
> org.apache.webbeans.container.BeanManagerImpl.resolve(BeanManagerImpl.java:925)
> >
> org.apache.webbeans.container.InjectableBeanManager.resolve(InjectableBeanManager.java:201)
> >
> org.apache.myfaces.cdi.util.BeanProvider.getContextualReference(BeanProvider.java:413)
> >
> org.apache.myfaces.cdi.util.BeanProvider.getContextualReference(BeanProvider.java:144)
> >
> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.getViewScopeBeanHolder(CDIManagedBeanHandlerImpl.java:64)
> >
> org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.generateViewScopeId(CDIManagedBeanHandlerImpl.java:92)
> >
> org.apache.myfaces.view.ViewScopeProxyMap.getWrapped(ViewScopeProxyMap.java:76)
> >
> org.apache.myfaces.view.ViewScopeProxyMap.size(ViewScopeProxyMap.java:89)
> > javax.faces.component.UIViewRoot.saveState(UIViewRoot.java:1498)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter._writeComponent(ErrorPageWriter.java:846)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter.debugHtml(ErrorPageWriter.java:351)
> >
> org.apache.myfaces.renderkit.ErrorPageWriter.handle(ErrorPageWriter.java:470)
> >
> org.apache.myfaces.context.MyFacesExceptionHandlerWrapperImpl.handle(MyFacesExceptionHandlerWrapperImpl.java:301)
> >
> javax.faces.context.ExceptionHandlerWrapper.handle(ExceptionHandlerWrapper.java:61)
> >
> org.omnifaces.exceptionhandler.FullAjaxExceptionHandler.handle(FullAjaxExceptionHandler.java:162)
> >
> org.apache.myfaces.lifecycle.LifecycleImpl.render(LifecycleImpl.java:287)
> > javax.faces.webapp.FacesServlet.service(FacesServlet.java:198)
>


Re: MyFaces 2.2.0 ViewScoped

2014-01-15 Thread Howard W. Smith, Jr.
Hey, Jose. you should have used NetBeans 'Fix imports' option after
removing Omnifaces package.

i think you are using NetBeans (but I might be wrong).

Fix imports would have gave you a dialog showing you the MyFaces 2.2
@ViewScoped package to import.



On Wed, Jan 15, 2014 at 3:34 PM, José Luis Cetina wrote:

> Hi im currently using org.omnifaces.cdi.ViewScoped for my @Named beans, now
> with MyFaces 2.2.0 which package do i have to use for @ViewScoped and
> @Named for work togheter.
>
> Thanks
>


Re: MyFaces 2.2.0 (yesterday's release) CDI @ViewScoped @PreDestroy

2014-01-15 Thread Howard W. Smith, Jr.
On Wed, Jan 15, 2014 at 2:27 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> FYI, I 'want' to migrate to MyFaces 2.2.0 in production, and I think I
> will do it anyway, but please answer my question above about this
> behavior/implementation/test-results-of-mine.
>

well, I'm running MyFaces 2.2.0 in production now, and GC is the same as
when I was running MyFaces 2.1.3 (and when I was using OmniFaces CDI
@ViewScoped). this is my jvisualvm graph[1], today (this morning).

Still a satisfied/happy MyFaces user, and happy to be 'now' using MyFaces
2.2.0. Maybe I can ask TomEE users/committers to add MyFaces 2.2.0 to the
stack! :)

[1] http://postimg.org/image/u2y6j11tt/


Re: [core] What's new in MyFaces 2.2

2014-01-15 Thread Howard W. Smith, Jr.
MyFaces 2.2.0 is working just as good as MyFaces 2.1.13 (has been working
over the last few months).

So, i guess MyFaces 2.2.0 is here to stay in my app. Thank you!


On Wed, Jan 15, 2014 at 2:54 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Done (deployed MyFaces 2.2.0 with my app in production).
>
> On Tue, Jan 14, 2014 at 12:54 PM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
>> i am really going to have to make the step to migrate to JSF 2.2.
>> hopefully will do it, ASAP. thanks again.
>
>
>
>


Re: [core] What's new in MyFaces 2.2

2014-01-14 Thread Howard W. Smith, Jr.
Done (deployed MyFaces 2.2.0 with my app in production).

On Tue, Jan 14, 2014 at 12:54 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> i am really going to have to make the step to migrate to JSF 2.2.
> hopefully will do it, ASAP. thanks again.


MyFaces 2.2.0 (yesterday's release) CDI @ViewScoped @PreDestroy

2014-01-14 Thread Howard W. Smith, Jr.
Okay, I downloaded MyFaces 2.2.0 (yesterday's release), and added it to my
TomEE 1.6.1 SNAPSHOT (downloaded 2 or 3 days ago), and I decided to test
CDI @ViewScoped @PreDestroy.

Below, you will see that I logged in, and opened a few pages that reference
a few different instances of CDI @ViewScoped beans, @PreDestroy
releaseResources() method was executed as i navigated to different views,
but then here is the thing that concerns me, the @PreDestroy of
pre-existing-and-thought-to-be-already-destroyed bean 'instances' were
executed after logout, where logout = session.invalidate. See below, please.

Is this behavior per the spec?

Jan 15, 2014 2:16:45 AM pf.ApplicationScopeBean login
INFO: sessionId = administrator5AD906CC2D25991567A047780BBBF561
Jan 15, 2014 2:16:45 AM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 01/15/2014 02:16 AM

Jan 15, 2014 2:17:01 AM jsf.orders.EditDriverVehicles init
INFO: jsf.orders.EditDriverVehicles@5fe1cb9b
Jan 15, 2014 2:17:03 AM jsf.orders.EditDriverVehicles releaseResources
INFO: jsf.orders.EditDriverVehicles@5fe1cb9b
Jan 15, 2014 2:17:06 AM jsf.orders.EditDriverVehicles init
INFO: jsf.orders.EditDriverVehicles@7133db9
Jan 15, 2014 2:17:07 AM jsf.orders.EditDriverVehicles releaseResources
INFO: jsf.orders.EditDriverVehicles@7133db9
Jan 15, 2014 2:17:10 AM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@41d7a36a
Jan 15, 2014 2:17:12 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@41d7a36a
Jan 15, 2014 2:17:14 AM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@486ae85a
Jan 15, 2014 2:17:17 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@486ae85a
Jan 15, 2014 2:17:21 AM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@6ff554c9
Jan 15, 2014 2:17:23 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@6ff554c9

Jan 15, 2014 2:17:29 AM jsf.users.pf_UsersController logout
INFO: administrator logged out at 01/15/2014 02:17 AM

Jan 15, 2014 2:17:29 AM jsf.orders.EditDriverVehicles releaseResources
INFO: jsf.orders.EditDriverVehicles@7133db9
Jan 15, 2014 2:17:29 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@486ae85a
Jan 15, 2014 2:17:29 AM jsf.orders.EditDriverVehicles releaseResources
INFO: jsf.orders.EditDriverVehicles@5fe1cb9b
Jan 15, 2014 2:17:29 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@6ff554c9
Jan 15, 2014 2:17:29 AM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@41d7a36a


FYI, I 'want' to migrate to MyFaces 2.2.0 in production, and I think I will
do it anyway, but please answer my question above about this
behavior/implementation/test-results-of-mine.

Thanks,
Howard


Re: MyFaces 2.2: another release, soon?

2014-01-14 Thread Howard W. Smith, Jr.
wow, thanks Mike. (Late) last night, when I was replying to an ANNOUNCE
MyFaces 2.2.0 email, I thought it was the 'beta release'.

I just now recognized that I replied to the (latest) MyFaces 2.2.0 release.

thanks!



On Tue, Jan 14, 2014 at 5:20 PM, Mike Kienenberger wrote:

> 2.0, 2.1, and 2.2 were all released at the same time.
>
> On Tue, Jan 14, 2014 at 5:17 PM, Howard W. Smith, Jr.
>  wrote:
> > Will there be another release of MyFaces 2.2, since MyFaces Core 2.1.14
> and
> > 2.0.20 were released?
> >
> > I would assume that MyFaces 2.1.14 release fixes would be included in
> > MyFaces 2.2, too.
> >
> > right?
>


MyFaces 2.2: another release, soon?

2014-01-14 Thread Howard W. Smith, Jr.
Will there be another release of MyFaces 2.2, since MyFaces Core 2.1.14 and
2.0.20 were released?

I would assume that MyFaces 2.1.14 release fixes would be included in
MyFaces 2.2, too.

right?


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2014-01-14 Thread Howard W. Smith, Jr.
FOLLOWUP:

org.apache.myfaces.application.ResourceHandlerImpl.level = OFF


is working great, thanks again.



On Tue, Jan 7, 2014 at 11:03 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Thanks Leonardo for the response. Per javadoc[1], OFF is available as you
> stated. I will give that a try.
>
> [1]
> http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#OFF
>
>
>
> On Tue, Jan 7, 2014 at 10:54 PM, Leonardo Uribe  wrote:
>
>> Hi Howard
>>
>> I think it should work with:
>>
>> org.apache.myfaces.application.ResourceHandlerImpl.level = OFF
>>
>> regards,
>>
>> Leonardo
>>
>> 2014/1/7 Howard W. Smith, Jr. :
>> > Leonardo,
>> >
>> > On Tue, Nov 12, 2013 at 10:45 PM, Leonardo Uribe 
>> wrote:
>> >
>> >> The exception
>> >> was added in the log on:
>> >>
>> >> https://issues.apache.org/jira/browse/MYFACES-3736
>> >>
>> >> I have checked it and there is no evidence of an error from MyFaces
>> side.
>> >>
>> >> Maybe we can do something to hide the exception, printing it only if
>> >> Level.FINE is set.
>> >>
>> >
>> > In the meanwhile, what is the best way to prevent this exception from
>> > appearing in my (tomee+) log file? can i disable it via
>> logging.properties
>> > via the following?
>> >
>> > org.apache.myfaces.application.ResourceHandlerImpl.level = WARNING
>>
>
>


Re: [ANNOUNCE] MyFaces Core v2.2.0 Release

2014-01-14 Thread Howard W. Smith, Jr.
Understood. thanks again for the response, Leonardo.



On Tue, Jan 14, 2014 at 9:30 AM, Leonardo Uribe  wrote:

> Hi Howard
>
> 2014/1/13 Howard W. Smith, Jr. :
> > Leonardo,
> >
> > Some questions for you:
> >
> > 1. How has MyFaces 2.2 (beta) release been performing and/or accepted by
> > MyFaces user community?
> >
>
> We have received some good feedback that has helped a lot to get the new
> release.
>
> > 2. Any big corporation/names start using MyFaces 2.2 (beta) release yet?
> >
>
> If things goes like it was in 2.0, it still will take a couple of
> releases so more
> people start using fully the new artifacts, but since we are 2.2 I hope the
> adoption will be faster.
>
> > 3. Does MyFaces 2.2 perform better than MyFaces 2.1.x (latest release)?
> >
>
> Yes, there are some improvements in session size / state management that
> will help. From speed perspective, with the same flags enabled both perform
> more or less the same.
>
> > 4. Do you think you will create 2 or 3 blog posts about MyFaces 2.2
> > performance against Mojarra, Wicket, and Spring...like you did for
> MyFaces
> > 2.1.7?
> >
>
> Probably, but more as an update to keep track what has happened.
>
> regards,
>
> Leonardo Uribe
>
> > Thanks,
> > Howard
> >
> >
> > On Mon, Jan 13, 2014 at 11:29 PM, Leonardo Uribe 
> wrote:
> >
> >> The Apache MyFaces team is pleased to announce the release of MyFaces
> >> Core 2.2.0.
> >>
>


Re: [core] What's new in MyFaces 2.2

2014-01-14 Thread Howard W. Smith, Jr.
Understood, thanks Leonardo. i am really going to have to make the step to
migrate to JSF 2.2. hopefully will do it, ASAP. thanks again.



On Tue, Jan 14, 2014 at 9:40 AM, Leonardo Uribe  wrote:

> Hi
>
> 2014/1/13 Howard W. Smith, Jr. :
> > Wow, interesting that you sent this email as I was writing my email,
> asking
> > a few questions bout MyFaces 2.2.
> >
> > Your other posts about MyFaces 2.1.14 (and 2.0.20) inspired/motivated me
> to
> > think about MyFaces 2.2. I am considering migrating my app from MyFaces
> > 2.1.x to 2.2. I think I tested/ran my app already with MyFaces 2.2, and
> > since the last time that I tested/used myFaces 2.2, I have no
> > issues/defects to report. Just have not pushed MyFaces 2.2 to my
> production
> > environment yet.
> >
>
> The changes included in JSF 2.2 does not make any conflict with 2.0 / 2.1
> code.
> The migration step from 2.1 to 2.2 is very simple, just replace the
> jars and that's
> it. There are some differences like for example the view scope beans are
> now
> stored in session and if CDI is enabled, view scope is managed by CDI.
>
> Additionally, there wasn't any change that affect the behavior
> significantly in
> JSF 2.2, so the code looks very stable. It were also included a lot of
> junit tests
> for the new features to ensure everything works as expected, which reduces
> in the long term the occurrence of bugs and provides a better code quality.
>
> > I wanted to wait and hear a bit more from the community about it, but
> (LOL)
> > that's the thing, there are not many questions at all on MyFaces user
> list.
> > Evidently, it just works! :)
> >
> >
> >
> > On Mon, Jan 13, 2014 at 11:42 PM, Leonardo Uribe 
> wrote:
> >
> >> Hi
> >>
> >> For the people who want to know quickly what's new in MyFaces 2.2, I
> >> have written a summary of the new features here:
> >>
> >> http://lu4242.blogspot.com/2014/01/whats-new-in-myfaces-22.html
> >>
> >> regards,
> >>
> >> Leonardo Uribe
> >>
>


Re: JSF 2.3

2014-01-14 Thread Howard W. Smith, Jr.
On Tue, Jan 14, 2014 at 10:40 AM, Mike Kienenberger wrote:

> Hope this helps.


+1 Mike and thanks for sharing.

it's good to hear/know this about struts. when i learned java ee 6 via java
ee 6 tutorial, of course, JSF is mentioned there; i don't remember struts
being mentioned there at all. so, my java web application development
experience/world has been JSF, and that is where my preference is today,
still.


Re: [core] What's new in MyFaces 2.2

2014-01-13 Thread Howard W. Smith, Jr.
Wow, interesting that you sent this email as I was writing my email, asking
a few questions bout MyFaces 2.2.

Your other posts about MyFaces 2.1.14 (and 2.0.20) inspired/motivated me to
think about MyFaces 2.2. I am considering migrating my app from MyFaces
2.1.x to 2.2. I think I tested/ran my app already with MyFaces 2.2, and
since the last time that I tested/used myFaces 2.2, I have no
issues/defects to report. Just have not pushed MyFaces 2.2 to my production
environment yet.

I wanted to wait and hear a bit more from the community about it, but (LOL)
that's the thing, there are not many questions at all on MyFaces user list.
Evidently, it just works! :)



On Mon, Jan 13, 2014 at 11:42 PM, Leonardo Uribe  wrote:

> Hi
>
> For the people who want to know quickly what's new in MyFaces 2.2, I
> have written a summary of the new features here:
>
> http://lu4242.blogspot.com/2014/01/whats-new-in-myfaces-22.html
>
> regards,
>
> Leonardo Uribe
>


Re: [ANNOUNCE] MyFaces Core v2.2.0 Release

2014-01-13 Thread Howard W. Smith, Jr.
Leonardo,

Some questions for you:

1. How has MyFaces 2.2 (beta) release been performing and/or accepted by
MyFaces user community?

2. Any big corporation/names start using MyFaces 2.2 (beta) release yet?

3. Does MyFaces 2.2 perform better than MyFaces 2.1.x (latest release)?

4. Do you think you will create 2 or 3 blog posts about MyFaces 2.2
performance against Mojarra, Wicket, and Spring...like you did for MyFaces
2.1.7?

Thanks,
Howard


On Mon, Jan 13, 2014 at 11:29 PM, Leonardo Uribe  wrote:

> The Apache MyFaces team is pleased to announce the release of MyFaces
> Core 2.2.0.
>


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2014-01-07 Thread Howard W. Smith, Jr.
Thanks Leonardo for the response. Per javadoc[1], OFF is available as you
stated. I will give that a try.

[1]
http://docs.oracle.com/javase/6/docs/api/java/util/logging/Level.html#OFF



On Tue, Jan 7, 2014 at 10:54 PM, Leonardo Uribe  wrote:

> Hi Howard
>
> I think it should work with:
>
> org.apache.myfaces.application.ResourceHandlerImpl.level = OFF
>
> regards,
>
> Leonardo
>
> 2014/1/7 Howard W. Smith, Jr. :
> > Leonardo,
> >
> > On Tue, Nov 12, 2013 at 10:45 PM, Leonardo Uribe 
> wrote:
> >
> >> The exception
> >> was added in the log on:
> >>
> >> https://issues.apache.org/jira/browse/MYFACES-3736
> >>
> >> I have checked it and there is no evidence of an error from MyFaces
> side.
> >>
> >> Maybe we can do something to hide the exception, printing it only if
> >> Level.FINE is set.
> >>
> >
> > In the meanwhile, what is the best way to prevent this exception from
> > appearing in my (tomee+) log file? can i disable it via
> logging.properties
> > via the following?
> >
> > org.apache.myfaces.application.ResourceHandlerImpl.level = WARNING
>


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2014-01-07 Thread Howard W. Smith, Jr.
Leonardo,

On Tue, Nov 12, 2013 at 10:45 PM, Leonardo Uribe  wrote:

> The exception
> was added in the log on:
>
> https://issues.apache.org/jira/browse/MYFACES-3736
>
> I have checked it and there is no evidence of an error from MyFaces side.
>
> Maybe we can do something to hide the exception, printing it only if
> Level.FINE is set.
>

In the meanwhile, what is the best way to prevent this exception from
appearing in my (tomee+) log file? can i disable it via logging.properties
via the following?

org.apache.myfaces.application.ResourceHandlerImpl.level = WARNING


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2013-11-14 Thread Howard W. Smith, Jr.
Correct. Not a MyFaces or Tomcat/TomEE issue, but hiding the exception...
sounds good to me. :)



On Tue, Nov 12, 2013 at 10:45 PM, Leonardo Uribe  wrote:

> Hi
>
> Thanks to provide the link of the discussion in tomcat list. The exception
> was added in the log on:
>
> https://issues.apache.org/jira/browse/MYFACES-3736
>
> I have checked it and there is no evidence of an error from MyFaces side.
>
> Maybe we can do something to hide the exception, printing it only if
> Level.FINE is set.
>
> regards,
>
> Leonardo Uribe
>
>
>
> 2013/11/11 Howard W. Smith, Jr. 
>
> > FYI,
> >
> > On Sun, Nov 10, 2013 at 8:29 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> > > more on this topic...
> >
> >
> > Discussed on the tomcat list:
> >
> > Avoiding/Handling SocketTimeoutException(s) when web application serving
> > resources to mobile clients[1]
> >
> >
> > [1]
> >
> >
> http://tomcat.10.x6.nabble.com/Avoiding-Handling-SocketTimeoutException-s-when-web-application-serving-resources-to-mobile-clients-td5007700.html
> >
>


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2013-11-11 Thread Howard W. Smith, Jr.
FYI,

On Sun, Nov 10, 2013 at 8:29 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> more on this topic...


Discussed on the tomcat list:

Avoiding/Handling SocketTimeoutException(s) when web application serving
resources to mobile clients[1]


[1]
http://tomcat.10.x6.nabble.com/Avoiding-Handling-SocketTimeoutException-s-when-web-application-serving-resources-to-mobile-clients-td5007700.html


Re: [TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2013-11-10 Thread Howard W. Smith, Jr.
more on this topic...

On Fri, Nov 8, 2013 at 9:28 PM, Howard W. Smith, Jr.  wrote:

> Today (this evening), the exception below occurred twice for the same
> (mobile) enduser within 1 to 2 hours' time. In the past, while using
> previous releases of MyFaces 2.1.8+, I have seen the handleResourceRequest
> error, but the stacktrace was not in the log file.
>
> Can the stacktrace be eliminated as in previous versions of MyFaces? was
> this added, recently, to log the stracktrace of this exception or
> certain/selected exceptions? Or should I catch this exception in my Filter
> when chain.doFilter(req, res) is executed?
>

this morning, I recognized more occurrences of this exception in log files,
and it is still related to connection between server and 'mobile client'.
User was attempting to login from mobile iPad via an internal wireless
phone connection. please see all below and advise if MyFaces can do
anything about this, or if I should approach tomcat user list about socket
timeout exception(s), or the best way I should approach this type of
scenario-and-exception. I updated gist[1], too.


localhost_access_log shows the follow (please note the filenames and time
difference between the 1, 2, and 3rd lines below)

x.x.x.x - - [09/Nov/2013:13:08:25 -0500] "GET
/webapp/javax.faces.resource/primefaces.css.jsf?ln=primefaces&v=4.0.3
HTTP/1.1" 200 10036

x.x.x.x - - [09/Nov/2013:13:09:00 -0500] "GET
/webapp/javax.faces.resource/jquery/jquery.js.jsf?ln=primefaces&v=4.0.3
HTTP/1.1" 200 -

x.x.x.x - - [09/Nov/2013:13:09:00 -0500] "GET
/webapp/javax.faces.resource/jquery/jquery-plugins.js.jsf?ln=primefaces&v=4.0.3
HTTP/1.1" 200 -



tomcat7-stderr

Nov 09, 2013 1:09:00 PM
org.apache.myfaces.application.ResourceHandlerImpl
handleResourceRequest
SEVERE: Error trying to load resource jquery/jquery.js with library
primefaces :null
ClientAbortException:  java.net.SocketTimeoutException
at 
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:413)

Caused by: java.net.SocketTimeoutException
at 
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:127)
at 
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:174)
at 
org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:163)

Nov 09, 2013 1:09:00 PM
org.apache.myfaces.application.ResourceHandlerImpl
handleResourceRequest
SEVERE: Error trying to load resource jquery/jquery-plugins.js with
library primefaces :null
ClientAbortException:  java.net.SocketTimeoutException

Caused by: java.net.SocketTimeoutException
at 
org.apache.tomcat.util.net.NioBlockingSelector.write(NioBlockingSelector.java:127)
at 
org.apache.tomcat.util.net.NioSelectorPool.write(NioSelectorPool.java:174)
at 
org.apache.coyote.http11.InternalNioOutputBuffer.writeToSocket(InternalNioOutputBuffer.java:163)


[1] https://gist.github.com/smithh032772/7380812


[TomEE/MyFaces 2.1.13] SocketTimeoutException thrown by ResourceHandlerImpl handleResourceRequest

2013-11-08 Thread Howard W. Smith, Jr.
Today (this evening), the exception below occurred twice for the same
(mobile) enduser within 1 to 2 hours' time. In the past, while using
previous releases of MyFaces 2.1.8+, I have seen the handleResourceRequest
error, but the stacktrace was not in the log file.

Can the stacktrace be eliminated as in previous versions of MyFaces? was
this added, recently, to log the stracktrace of this exception or
certain/selected exceptions? Or should I catch this exception in my Filter
when chain.doFilter(req, res) is executed?

gist[1] has the two occurrences of the stacktrace in the log file.


Nov 08, 2013 4:06:05 PM org.apache.myfaces.application.ResourceHandlerImpl
handleResourceRequest
SEVERE: Error trying to load resource jquery/jquery-plugins.js with library
primefaces :null
ClientAbortException:  java.net.SocketTimeoutException
at
org.apache.catalina.connector.OutputBuffer.realWriteBytes(OutputBuffer.java:413)
at org.apache.tomcat.util.buf.ByteChunk.flushBuffer(ByteChunk.java:480)
at org.apache.catalina.connector.OutputBuffer.doFlush(OutputBuffer.java:359)
at org.apache.catalina.connector.OutputBuffer.close(OutputBuffer.java:309)
at
org.apache.catalina.connector.CoyoteOutputStream.close(CoyoteOutputStream.java:108)
at java.util.zip.DeflaterOutputStream.close(Unknown Source)
at
org.omnifaces.servlet.GzipHttpServletResponse$GzipThresholdOutputStream.close(GzipHttpServletResponse.java:229)
at
org.omnifaces.io.ResettableBufferedOutputStream.close(ResettableBufferedOutputStream.java:101)
at
org.omnifaces.servlet.HttpServletResponseOutputWrapper$1.close(HttpServletResponseOutputWrapper.java:100)
at
org.apache.myfaces.application.ResourceHandlerImpl.handleResourceRequest(ResourceHandlerImpl.java:421)
at
javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:62)
at
org.primefaces.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:132)
at
javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:62)
at
org.primefaces.mobile.application.PrimeResourceHandler.handleResourceRequest(PrimeResourceHandler.java:119)
at
javax.faces.application.ResourceHandlerWrapper.handleResourceRequest(ResourceHandlerWrapper.java:62)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:191)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.primefaces.webapp.filter.FileUploadFilter.doFilter(FileUploadFilter.java:98)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.omnifaces.filter.GzipResponseFilter.doFilter(GzipResponseFilter.java:149)
at org.omnifaces.filter.HttpFilter.doFilter(HttpFilter.java:75)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at org.apache.tomcat.websocket.server.WsFilter.doFilter(WsFilter.java:51)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)


at pf.LoginFilter.doFilter(LoginFilter.java:241)


at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:100)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1041)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:603)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.doRun(NioEndpoint.java:1721)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1679)
at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source)
at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source)
at java.lang.Thread.run(Unknown Source)
Caused by: java.net.SocketTimeoutException
at
org.apache.tomcat.util.net.Nio

Re: Performance params

2013-11-01 Thread Howard W. Smith, Jr.
and with that said, an answer[1] to a question on stackoverflow,


org.apache.myfaces.EXPRESSION_FACTORY
com.sun.el.ExpressionFactoryImpl
  
com.sun.faces.expressionFactory
com.sun.el.ExpressionFactoryImpl
  



[1] http://stackoverflow.com/a/5538539/933054


On Fri, Nov 1, 2013 at 7:13 PM, Thomas Andraschko <
andraschko.tho...@gmail.com> wrote:

> http://lmgtfy.com/?q=tomcat+ExpressionFactoryImpl
>
>
> 2013/11/1 José Luis Cetina 
>
> > I use tomee with the "default" EL
> >
> >
> > 2013/11/1 Thomas Andraschko 
> >
> > > It depends on your AS or EL Implementation.
> > > If you use JUEL, its: de.odysseus.el.ExpressionFactoryImpl
> > >
> > >
> > > 2013/11/1 José Luis Cetina 
> > >
> > > > And what is the value of org.apache.myfaces.EXPRESSION_FACTORY ?
> > > >
> > > >
> > > > 2013/11/1 Thomas Andraschko 
> > > >
> > > > > AFAIR you must set "org.apache.myfaces.EXPRESSION_FACTORY" because
> > the
> > > EL
> > > > > Factory can't be extraced from JSP anymore.
> > > > >
> > > > >
> > > > > 2013/11/1 José Luis Cetina 
> > > > >
> > > > > > I didnt have any of this performance parameters in my webapps,
> now
> > im
> > > > > > trying to use them (i have any other params), im trying one by
> one
> > > and
> > > > > when
> > > > > > i set
> > > > > >
> > > > > > 
> > > > > >
> > > > > >
> > org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
> > > > > > false
> > > > > > 
> > > > > >
> > > > > > and try to access to my app i get an
> > > > > >
> > > > > > SEVERE - StandardWrapper.Throwable
> > > > > > java.lang.IllegalStateException: No Factories configured for this
> > > > > > Application. This happens if the faces-initialization does not
> work
> > > at
> > > > > all
> > > > > > - make sure that you properly include all configuration settings
> > > > > necessary
> > > > > > for a basic faces application and that all the necessary libs are
> > > > > included.
> > > > > > Also check the logging output of your web application and your
> > > > container
> > > > > > for any exceptions!
> > > > > > If you did that and find nothing, the mistake might be due to the
> > > fact
> > > > > that
> > > > > > you use some special web-containers which do not support
> > registering
> > > > > > context-listeners via TLD files and a context listener is not
> setup
> > > in
> > > > > your
> > > > > > web.xml.
> > > > > > A typical config looks like this;
> > > > > > 
> > > > > >
> > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.StartupServletContextListener
> > > > > > 
> > > > > >
> > > > > > I dont have the
> > > org.apache.myfaces.webapp.StartupServletContextListener
> > > > > > listener in my web.xml, im using an ear, what im doing wrong?
> > > > > >
> > > > > >
> > > > > > 2013/11/1 Kito Mann 
> > > > > >
> > > > > > > Thanks for the link, Howard. Mark is definitely an "outstanding
> > > > Apache
> > > > > > > Committer" ;-).
> > > > > > >
> > > > > > > At any rate, this client isn't using CDI, so that isn't an
> > option.
> > > I
> > > > > > would
> > > > > > > definitely consider it for clients that are using CDI, though.
> I
> > > > always
> > > > > > > felt like OpenWebBeans was more stable than Weld.
> > > > > > >
> > > > > > > ___
> > > > > > >
> > > > > > > Kito D. Mann | @kito99 | Author, JSF in Action
> > > > > > > Virtua, Inc. | http://www.virtua.com | JSF/Java EE training
> and
> > > > > > consulting
> > > > > > > http://www.JSFCentral.com | @jsfcentral
> > > >

Re: Performance params

2013-11-01 Thread Howard W. Smith, Jr.
Kito,

On Thu, Oct 31, 2013 at 7:46 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> See comments, and the URLs provided below as well. One of the outstanding
> Apache/PrimeFaces committers wrote the blog, and I am always happy to share
> and/or pass along. Hope it helps.


Also, I couldn't help myself in saying this, another outstanding Apache
committer wrote this blog with the following question,

Why is OpenWebBeans so fast?[1]

I hope your client is willing to use OpenWebBeans + JUEL + MyFaces. that is
a happy stack which will make for happy campers/endusers/etc...


[1] http://struberg.wordpress.com/2012/03/20/why-is-openwebbeans-so-fast/


Re: Performance params

2013-10-31 Thread Howard W. Smith, Jr.
Kito,

Since Leonardo answered your question, and since subject/title =
performance params, I will go ahead and pass on performance params that are
in my web.xml.

See comments, and the URLs provided below as well. One of the outstanding
Apache/PrimeFaces committers wrote the blog, and I am always happy to share
and/or pass along. Hope it helps.

When you read the context params below, you will see that I'm using high
performance JUEL, OpenWebBeans, and MyFaces...of course. :)



org.apache.myfaces.EXPRESSION_FACTORY
de.odysseus.el.ExpressionFactoryImpl


org.apache.myfaces.EL_RESOLVER_COMPARATOR

org.apache.myfaces.el.unified.OpenWebBeansELResolverComparator



org.apache.myfaces.COMPRESS_STATE_IN_SESSION
false



org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION
10



org.apache.myfaces.SERIALIZE_STATE_IN_SESSION
false


org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
false



javax.faces.FACELETS_REFRESH_PERIOD
-1


org.apache.myfaces.CHECK_ID_PRODUCTION_MODE
false



org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED
true



org.apache.myfaces.SAVE_STATE_WITH_VISIT_TREE_ON_PSS
false



org.apache.myfaces.CACHE_EL_EXPRESSIONS
always






On Thu, Oct 31, 2013 at 6:25 PM, Kito Mann  wrote:

> Hello everyone,
>
> I have a couple of questions about performance parameters:
>
> · org.apache.myfaces.SUPPORT_JSP_AND_FACES_EL
>
> How significant is the performance improvement for a Facelet page if this
> is turned off?
>
> · org.apache.myfaces.VIEW_UNIQUE_IDS_CACHE_ENABLED
>
> If I understand this correctly, this is only useful after a specific user
> has already reached the maximum number of views stored in the session, or
> am I missing something?
>
> ___
>
> Kito D. Mann | @kito99 | Author, JSF in Action
> Virtua, Inc. | http://www.virtua.com | JSF/Java EE training and consulting
> http://www.JSFCentral.com | @jsfcentral
> +1 203-998-0403
>
> * Listen to the Enterprise Java Newscast:
> *http://w
> ww.enterprisejavanews.com*
> * JSFCentral Interviews Podcast:
> http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
>


Re: Apache CODI x JEE7 Glassfish4

2013-10-31 Thread Howard W. Smith, Jr.
okay, understood, thanks Karl.

i have learned how to avoid the stackoverflow error caused by circular
injection, but just recently, I made a change in my software/project, and i
experienced the stackoverflow error, and at first, i did not know what
caused the exception, but then I ran a local test, and read the
stacktrace...in netbeans error/output console...on my development server.
the stacktrace (on the production server) was a bit too long for me to
decipher; evidently, tomee/tomcat localhost log and/or stderr/catalina logs
are easier to read in netbeans output/error console for tomee server. :)




On Thu, Oct 31, 2013 at 10:31 AM, Karl Kildén  wrote:

>  In some clear cases it's not supported and this has not changed in CDI
> 1.1. However it's never been a limiting factor for me at least since i
> normally don't really use dependent beans or any other non normalscoped.
> From the CDI 1.1 spec:
>
> the container is required to support circularities in the bean dependency
> graph where at least one bean participating in every circular chain of
> dependencies has a normal scope, as defined in [normal_scope]. The
> container is not required to support circular chains of dependencies where
> every bean participating in the chain has a pseudo-scope.
>
>
>
>
> On 31 October 2013 15:01, Howard W. Smith, Jr.  >wrote:
>
> > which can result in inifinite loop and stackoverflow error. long time
> ago,
> > i think I heard that CDI 1.1 would solve the stackoverflow error when
> > developer does circular injection, incorrectly, or maybe I did not read
> > something correctly, when i first started using CDI, and trying to avoid
> > the stackoverflow error caused by circular reference.
> >
> >
> > On Thu, Oct 31, 2013 at 9:53 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> > > I think you called it 'circular injection'[1] and I've seen others call
> > it
> > > circular reference, and for whatever reason, I was under the assumption
> > > that it was called cyclic reference (ever since i started using CDI).
> > >
> > > Circular Injection A->B->A
> > >
> > > [1] Page 26,
> > > http://people.apache.org/~struberg/inso2013/INSO_webdev-cdi-2013.pdf
> > >
> > >
> > > On Thu, Oct 31, 2013 at 9:00 AM, Mark Struberg 
> > wrote:
> > >
> > >>
> > >>
> > >> what do you mean with cyclic reference issue?
> > >>
> > >> there is no such thing for @NormalScoped beans, and for @Dependent it
> > >> will never work.
> > >>
> > >> LieGrue,
> > >> strub
> > >>
> > >>
> > >>
> > >>
> > >>
> > >> >
> > >> > From: "Howard W. Smith, Jr." 
> > >> >To: MyFaces Discussion ; Mark Struberg <
> > >> strub...@yahoo.de>
> > >> >Sent: Thursday, 31 October 2013, 0:12
> > >> >Subject: Re: Apache CODI x JEE7 Glassfish4
> > >> >
> > >> >
> > >> >
> > >> >Mark,
> > >> >
> > >> >
> > >> >
> > >> >On Wed, Oct 30, 2013 at 7:05 PM, Mark Struberg 
> > >> wrote:
> > >> >
> > >> >
> > >> >>The main changes in CDI-1.1 have been clarifications. But most of
> them
> > >> are already implemented in OWB and Weld, even in the CDI-1.0
> targetting
> > >> versions.
> > >> >>There have been a few good Extensions in the Extension area,
> scanning,
> > >> etc  in CDI-1.1.
> > >> >>
> > >> >>
> > >> >
> > >> >
> > >> >Hmmm, I thought I heard that CDI-1.1 would address the cyclic
> reference
> > >> issue that occurs when using CDI. I have been using
> tomee/openwebbeans,
> > and
> > >> I made a change in my software/app that exposed that the cyclic
> > reference
> > >> issue still occurs.
> > >> >
> > >> >
> > >> >will OWB or CDI 1.1 (or future versions) address the cyclic reference
> > >> issue, or is this up to the developer to ensure their software avoids
> > the
> > >> issue?
> > >> >
> > >> >
> > >> >
> > >> >
> > >>
> > >
> > >
> >
>


Re: Apache CODI x JEE7 Glassfish4

2013-10-31 Thread Howard W. Smith, Jr.
which can result in inifinite loop and stackoverflow error. long time ago,
i think I heard that CDI 1.1 would solve the stackoverflow error when
developer does circular injection, incorrectly, or maybe I did not read
something correctly, when i first started using CDI, and trying to avoid
the stackoverflow error caused by circular reference.


On Thu, Oct 31, 2013 at 9:53 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> I think you called it 'circular injection'[1] and I've seen others call it
> circular reference, and for whatever reason, I was under the assumption
> that it was called cyclic reference (ever since i started using CDI).
>
> Circular Injection A->B->A
>
> [1] Page 26,
> http://people.apache.org/~struberg/inso2013/INSO_webdev-cdi-2013.pdf
>
>
> On Thu, Oct 31, 2013 at 9:00 AM, Mark Struberg  wrote:
>
>>
>>
>> what do you mean with cyclic reference issue?
>>
>> there is no such thing for @NormalScoped beans, and for @Dependent it
>> will never work.
>>
>> LieGrue,
>> strub
>>
>>
>>
>>
>>
>> >
>> > From: "Howard W. Smith, Jr." 
>> >To: MyFaces Discussion ; Mark Struberg <
>> strub...@yahoo.de>
>> >Sent: Thursday, 31 October 2013, 0:12
>> >Subject: Re: Apache CODI x JEE7 Glassfish4
>> >
>> >
>> >
>> >Mark,
>> >
>> >
>> >
>> >On Wed, Oct 30, 2013 at 7:05 PM, Mark Struberg 
>> wrote:
>> >
>> >
>> >>The main changes in CDI-1.1 have been clarifications. But most of them
>> are already implemented in OWB and Weld, even in the CDI-1.0 targetting
>> versions.
>> >>There have been a few good Extensions in the Extension area, scanning,
>> etc  in CDI-1.1.
>> >>
>> >>
>> >
>> >
>> >Hmmm, I thought I heard that CDI-1.1 would address the cyclic reference
>> issue that occurs when using CDI. I have been using tomee/openwebbeans, and
>> I made a change in my software/app that exposed that the cyclic reference
>> issue still occurs.
>> >
>> >
>> >will OWB or CDI 1.1 (or future versions) address the cyclic reference
>> issue, or is this up to the developer to ensure their software avoids the
>> issue?
>> >
>> >
>> >
>> >
>>
>
>


Re: Apache CODI x JEE7 Glassfish4

2013-10-31 Thread Howard W. Smith, Jr.
I think you called it 'circular injection'[1] and I've seen others call it
circular reference, and for whatever reason, I was under the assumption
that it was called cyclic reference (ever since i started using CDI).

Circular Injection A->B->A

[1] Page 26,
http://people.apache.org/~struberg/inso2013/INSO_webdev-cdi-2013.pdf


On Thu, Oct 31, 2013 at 9:00 AM, Mark Struberg  wrote:

>
>
> what do you mean with cyclic reference issue?
>
> there is no such thing for @NormalScoped beans, and for @Dependent it will
> never work.
>
> LieGrue,
> strub
>
>
>
>
>
> >
> > From: "Howard W. Smith, Jr." 
> >To: MyFaces Discussion ; Mark Struberg <
> strub...@yahoo.de>
> >Sent: Thursday, 31 October 2013, 0:12
> >Subject: Re: Apache CODI x JEE7 Glassfish4
> >
> >
> >
> >Mark,
> >
> >
> >
> >On Wed, Oct 30, 2013 at 7:05 PM, Mark Struberg  wrote:
> >
> >
> >>The main changes in CDI-1.1 have been clarifications. But most of them
> are already implemented in OWB and Weld, even in the CDI-1.0 targetting
> versions.
> >>There have been a few good Extensions in the Extension area, scanning,
> etc  in CDI-1.1.
> >>
> >>
> >
> >
> >Hmmm, I thought I heard that CDI-1.1 would address the cyclic reference
> issue that occurs when using CDI. I have been using tomee/openwebbeans, and
> I made a change in my software/app that exposed that the cyclic reference
> issue still occurs.
> >
> >
> >will OWB or CDI 1.1 (or future versions) address the cyclic reference
> issue, or is this up to the developer to ensure their software avoids the
> issue?
> >
> >
> >
> >
>


Re: Apache CODI x JEE7 Glassfish4

2013-10-30 Thread Howard W. Smith, Jr.
Mark,

On Wed, Oct 30, 2013 at 7:05 PM, Mark Struberg  wrote:

>
> The main changes in CDI-1.1 have been clarifications. But most of them are
> already implemented in OWB and Weld, even in the CDI-1.0 targetting
> versions.
> There have been a few good Extensions in the Extension area, scanning,
> etc  in CDI-1.1.
>
>
Hmmm, I thought I heard that CDI-1.1 would address the cyclic reference
issue that occurs when using CDI. I have been using tomee/openwebbeans, and
I made a change in my software/app that exposed that the cyclic reference
issue still occurs.

will OWB or CDI 1.1 (or future versions) address the cyclic reference
issue, or is this up to the developer to ensure their software avoids the
issue?


Re: Apache CODI x JEE7 Glassfish4

2013-10-30 Thread Howard W. Smith, Jr.
ll JSF 2.2 support is planned for
> >>>>> RichFaces 5. I had some of the same issues with PrimeFaces 3.5 which
> >>>>> was
> >>>>> incompatible with JSF 2.2 and I had to wait for PrimeFaces 4.0 to
> come
> >>>>>
> >>>> out.
> >>>
> >>>>
> >>>>> On 10/30/2013 03:17 PM, Kay Wrobel wrote:
> >>>>>
> >>>>>  I'm looking at CDI 1.1 spec <http://docs.jboss.org/cdi/**
> >>>>>> spec/1.1/cdi-spec.html<
> >>>>>>
> >>>>> http://docs.jboss.org/cdi/**spec/1.1/cdi-spec.html<
> http://docs.jboss.org/cdi/spec/1.1/cdi-spec.html>
> >>> >>
> >>>
> >>>>  and ot looks like @ConversationScope is already part of CDI 1.1, no
> >>>>>>
> >>>>> CODI
> >>>
> >>>>  needed for that.
> >>>>>>
> >>>>>> GlassFish 4 includes CDI 1.1 by way of Weld API 2.0 <
> >>>>>> http://www.cdi-spec.org/download/<
> http://www.cdi-spec.org/**download/><
> >>>>>> http://www.cdi-spec.org/**download/<
> http://www.cdi-spec.org/download/>
> >>>>>> which is bundled inside the weld-osgi-bundle.jar.
> >>>>>>
> >>>>>> On 10/30/2013 02:55 PM, Edilmar Alves wrote:
> >>>>>>
> >>>>>>  Hi friends,
> >>>>>>>
> >>>>>>> Thanks for help!
> >>>>>>> Look at these situations...
> >>>>>>> 1) Glassfish 3.1.1 and 3.1.2.2 has the same behaviour. But I use in
> >>>>>>> production 3.1.1 because there are many servers using my webapp
> with
> >>>>>>> this
> >>>>>>> version, and it is not simple to upgrade.
> >>>>>>> 2) I am testing Glassfish 4/JEE7 because Glassfish is the oficial
> >>>>>>>
> >>>>>> server
> >>>
> >>>>  approved by the enterprise, I can't change for other server. Then, I
> >>>>>>> test
> >>>>>>> version 4 because there are some other functionalities I would like
> >>>>>>> to
> >>>>>>> use
> >>>>>>> from JEE7 in my webapp, but with CODI it is not possible to deploy.
> >>>>>>> 3) I didn't understand the suggestion to use Myfaces 2.2. Has it a
> >>>>>>> replacement for the CODI ConversationScoped, for example? Because
> >>>>>>> this
> >>>>>>> scope is used in many pages of my webapp, the main resource from
> CODI
> >>>>>>> that
> >>>>>>> I use and need an alternative. I can't use Myfaces, for example, to
> >>>>>>> change
> >>>>>>> Richfaces.
> >>>>>>>
> >>>>>>>
> >>>>>>> 2013/10/30 Kay Wrobel 
> >>>>>>>
> >>>>>>>   Or he can stick with Glassfish 3.1.2.2, which is GlassFish' last
> >>>>>>>
> >>>>>> final
> >>>
> >>>>  release targeting Java EE 6. Unless he wants to incorporated new
> >>>>>>>> features
> >>>>>>>> that only Java EE 7 can provide, I'd say, stick with what
> currently
> >>>>>>>> works.
> >>>>>>>> Or try alternatives, such as TomEE 1.5.2 or TomEE 1.6 which still
> >>>>>>>> targets
> >>>>>>>> Java EE 6, or JBoss AS 7 which also targets Java EE 6.
> >>>>>>>>
> >>>>>>>>
> >>>>>>>> On 10/30/2013 02:08 PM, Howard W. Smith, Jr. wrote:
> >>>>>>>>
> >>>>>>>>   Also, MyFaces 2.2 (beta, which has JavaEE7 JSF2.2 features) was
> >>>>>>>>
> >>>>>>>>> just/recently released (yesterday, I think). Feel free to give
> that
> >>>>>>>>>
> >>>>>>>> a
> >>>
> >>>>  try.
> >>>>>>>>>
> >>>>>>>>> TomEE and tomcat8 is and/or will be targeting JEE7.
> >>>>>>>>>
> >>>>&g

Re: Apache CODI x JEE7 Glassfish4

2013-10-30 Thread Howard W. Smith, Jr.
Also, MyFaces 2.2 (beta, which has JavaEE7 JSF2.2 features) was
just/recently released (yesterday, I think). Feel free to give that a try.

TomEE and tomcat8 is and/or will be targeting JEE7.

is it a requirement to deploy to Glassfish 4, or you just want to deploy to
your local machine for testing purposes only?

if for testing purposes only, download latest tomee 1.6 snapshot and
Myfaces 2.2 (beta), drop MyFaces 2.2 api + impl JARs in tomee/lib folder,
and give them a try. and if you have any tomee-related questions, please
subscribe to tomee user list and ask questions there. they are 'apache',
too, and just as helpful there, 'too'. :)



On Wed, Oct 30, 2013 at 2:59 PM, Kay Wrobel  wrote:

> Hi Edilmar.
>
> I had the same issues. There are incompatibilities apparently with JSF 2.2
> that ships with GlassFish 4. And JSF 2.2 has some much improved CDI
> features, such as proper @ViewScope.
>
> Kay
>
>
> On 10/30/2013 01:03 PM, Edilmar Alves wrote:
>
>> Hi,
>>
>> I have an webapp that runs fine in GF3.1.1 using Weld1.1 + CODI + JPA2 +
>> Hibernate4.2.6 + JSF2 + RichFaces4.3.4.
>> Then, when I try to deploy in GF4, server.log arises this error, and
>> searching on Internet, some people said this is a
>> problem with CODI, that is not compatible with JEE7 projects. Is this
>> true?
>> If it is not compatible, is there some alternative
>> that makes the same as CODI ConversationScoped for example, that I use in
>> many places in my webapp?
>>
>>   [2013-07-29T10:44:42.206-0400] [glassfish 4.0] [SEVERE]
>> [NCLS-CORE-00026]
>> [javax.enterprise.system.core] [tid: _ThreadID=36
>> _ThreadName=admin-listener(5)] [timeMillis: 1375109082206] [levelValue:
>> 1000] [[
>>
>>Exception during lifecycle processing
>>
>> org.glassfish.deployment.**common.DeploymentException: CDI deployment
>> failure:WELD-001408 Unsatisfied dependencies for type [Validator] with
>> qualifiers [@Default] at injection point [[UnbackedAnnotatedField] @Inject
>> private
>> org.hibernate.validator.**internal.cdi.interceptor.**
>> ValidationInterceptor.**validator]
>>
>>  at org.glassfish.weld.**WeldDeployer.event(**WeldDeployer.java:225)
>>
>>  at org.glassfish.kernel.event.**EventsImpl.send(EventsImpl.**
>> java:131)
>>
>>  at
>> org.glassfish.internal.data.**ApplicationInfo.load(**
>> ApplicationInfo.java:328)
>>
>>  at
>> com.sun.enterprise.v3.server.**ApplicationLifecycle.deploy(**
>> ApplicationLifecycle.java:493)
>>
>>  at
>> com.sun.enterprise.v3.server.**ApplicationLifecycle.deploy(**
>> ApplicationLifecycle.java:219)
>>
>>  at
>> org.glassfish.deployment.**admin.DeployCommand.execute(**
>> DeployCommand.java:491)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl$2$1.run(**
>> CommandRunnerImpl.java:527)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl$2$1.run(**
>> CommandRunnerImpl.java:523)
>>
>>  at java.security.**AccessController.doPrivileged(**Native Method)
>>
>>  at javax.security.auth.Subject.**doAs(Subject.java:356)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl$2.execute(**
>> CommandRunnerImpl.java:522)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl.doCommand(**
>> CommandRunnerImpl.java:546)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl.doCommand(**
>> CommandRunnerImpl.java:1423)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl.access$1500(**
>> CommandRunnerImpl.java:108)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl$**
>> ExecutionContext.execute(**CommandRunnerImpl.java:1762)
>>
>>  at
>> com.sun.enterprise.v3.admin.**CommandRunnerImpl$**
>> ExecutionContext.execute(**CommandRunnerImpl.java:1674)
>>
>>  at
>> org.glassfish.admin.rest.**resources.admin.**CommandResource.**
>> executeCommand(**CommandResource.java:396)
>>
>>  at
>> org.glassfish.admin.rest.**resources.admin.**CommandResource.**
>> execCommandSimpInMultOut(**CommandResource.java:234)
>>
>>  at sun.reflect.**NativeMethodAccessorImpl.**invoke0(Native Method)
>>
>>  at
>> sun.reflect.**NativeMethodAccessorImpl.**invoke(**
>> NativeMethodAccessorImpl.java:**57)
>>
>>  at
>> sun.reflect.**DelegatingMethodAccessorImpl.**invoke(**
>> DelegatingMethodAccessorImpl.**java:43)
>>
>>  at java.lang.reflect.Method.**invoke(Method.java:601)
>>
>>  at
>> org.glassfish.jersey.server.**model.internal.**
>> ResourceMethodInvocationHandle**rFactory$1.invoke(**
>> ResourceMethodInvocationHandle**rFactory.java:81)
>>
>>  at
>> org.glassfish.jersey.server.**model.internal.**
>> AbstractJavaResourceMethodDisp**atcher.invoke(**
>> AbstractJavaResourceMethodDisp**atcher.java:125)
>>
>>  at
>> org.glassfish.jersey.server.**model.internal.**
>> JavaResourceMethodDispatcherPr**ovider$ResponseOutInvoker.**doDispatch(**
>> JavaResourceMethodDispatcherPr**ovider.java:152)
>>
>>  at
>> org.glassfish.jersey.server.**model.internal.**
>> AbstractJavaResourceMethodDisp**atcher.dispatch(**
>>

Re: JSF 2.2 status & snapshot usage

2013-10-27 Thread Howard W. Smith, Jr.
Nice response, Leonardo.

Chris, it might be best to post your question on tomee's user list.



On Sun, Oct 27, 2013 at 4:44 PM, Leonardo Uribe  wrote:

> Hi
>
> I tried the test provided with the latest snapshot of myfaces 2.2.x and
> with a snapshot of tomee and it is working. There is no any relationship
> between CDI and passthrough elements. From this fragment:
>
> 
> 
>  pt:placeholder="Enter name"
> jsf:value="#{helloBean.name}"/>
> Welcome Me
> 
> 
>
> Here is the output:
>
> 
>  action="/tomee-test-1.0.0-SNAPSHOT/hello.jsf
> http://localhost:8080/tomee-test-1.0.0-SNAPSHOT/hello.jsf>"
> enctype="application/x-www-form-urlencoded">
>  placeholder="Enter name" />
> Welcome
> Me
> 
>  id="j_id__v_0:javax.faces.ViewState:1"
> value="KGflqkLizy6aeiWE+tznW4f+m6KKaOQ3GYAzpEGWPUMmMmaR" />
> 
> 
>
>
> regards,
>
> Leonardo Uribe
>
>
> 2013/10/27 ChrisHarris 
>
> > Hi, Howard.
> >
> > I'm trying to get MyFaces 2.2's Passthrough Elements and CDI working
> with a
> > TomEE Snapshot from 2-3 days ago.  When I don't use Passthrough Elements,
> > my
> > CDI bean is acknowledge.  When I do use Passthrough Elements, my CDI bean
> > is
> > ignored.
> >
> > I've posted a simple web app to GitHub:
> > https://github.com/MungTheWicked/tomee-test.git
> >
> > Can you help me pinpoint what the problem is?
> >
> >
> >
> > --
> > View this message in context:
> >
> http://myfaces.10567.n7.nabble.com/JSF-2-2-status-snapshot-usage-tp115852p116323.html
> > Sent from the MyFaces - Users mailing list archive at Nabble.com.
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
how many concurrent users is your app servingnormally or at peak times?

earlier, i think you mentioned response time is quite fast. did you throw
fast/high-performance hardware at db server, so db server responds fasts to
queries/updates?

do you have any expensive queries or updates...that may cause other
endusers to wait for a few seconds (or more)...if multiple users are using
your app, concurrently?

any (other db) performance issues that you'd like to share or you know
can/should be optimized to improve response time since one database is
serving 2 tomee/jsf/ear layer?




On Sun, Oct 20, 2013 at 9:03 PM, José Luis Cetina wrote:

> El 20/10/2013 19:34, "Howard W. Smith, Jr." 
> escribió:
> >
> > so, db server is on a separate machine/server on the network, and each
> EAR
> > is referencing the (one) db server via IP address?
> >
>
> Yes 2 tomee instances each in separete server point to a third server that
> only serve as db server. Thats why y have clustering only in webapps and
> not in db.
>
> > also, do you have an embedded db server (running inside of tomee and
> using
> > tomcat jdbc pooling) or network db server/engine?
> >
> >
>
> I use tomcat jdbc pooling (tomee with defined connections in tomee.xml)
>
> > On Sun, Oct 20, 2013 at 5:32 PM, José Luis Cetina  >wrote:
> >
> > > Ear with all my apps in each server (2 server each with their own ear)
> then
> > > each server insert/read in another unique db server.
> > > El 20/10/2013 16:09, "Howard W. Smith, Jr." 
> > > escribió:
> > >
> > > > Hmmm, i thought you said that you have EAR on one server and database
> on
> > > > separate server. are you running 2 tomee on same server; one tomee =
> EAR,
> > > > another tomee = database?
> > > >
> > > >
> > > >
> > > > On Sun, Oct 20, 2013 at 11:52 AM, José Luis Cetina <
> maxtorz...@gmail.com
> > > > >wrote:
> > > >
> > > > > By the way im not using remote calls. All my apps are in the same
> ear
> > > > with
> > > > > this i can inject my ejb local interface for calling methods in
> ejb.
> > > > > El 20/10/2013 07:49, "Howard W. Smith, Jr." <
> smithh032...@gmail.com>
> > > > > escribió:
> > > > >
> > > > > > just remembered-and-revised 2nd question, below...
> > > > > >
> > > > > > On Sun, Oct 20, 2013 at 8:35 AM, Howard W. Smith, Jr. <
> > > > > > smithh032...@gmail.com> wrote:
> > > > > >
> > > > > > >
> > > > > > > On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg <
> strub...@yahoo.de>
> > > > > > wrote:
> > > > > > >
> > > > > > >> This can also be very helpful to 'scale out' in case you need
> > > > > > performance:
> > > > > > >>
> > > > > > >> All write stuff is only performed on the master node, but
> > > expensive
> > > > > > >> queries/searches might be performed on the n replication
> nodes. Of
> > > > > > course
> > > > > > >> this needs a special handling in your app, but allows to move
> the
> > > > > > expensive
> > > > > > >> queries away from your primary node.
> > > > > > >>
> > > > > > >
> > > > > > > hmmm, had a question or two, or seeking clarification (or a bit
> > > more
> > > > > > > details or even a reference to a blog/article/document).
> > > > > > >
> > > > > > > 1. scale-out usually mean different physical servers? scaling
> out
> > > > > > multiple
> > > > > > > databases on one physical server, usually (or I would assume)
> means
> > > > > that
> > > > > > > the hard drive becomes the bottleneck, if hard drive contain
> > > multiple
> > > > > > > databases. right?
> > > > > > >
> > > > > > > 2. this needs special handling in your app? can you please
> clarify?
> > > > > > >
> > > > > > >
> > > > > > thanks!
> > > > > >
> > > > >
> > > >
> > >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
interesting. thanks Jose'


On Sun, Oct 20, 2013 at 9:03 PM, José Luis Cetina wrote:

> El 20/10/2013 19:34, "Howard W. Smith, Jr." 
> escribió:
> >
> > so, db server is on a separate machine/server on the network, and each
> EAR
> > is referencing the (one) db server via IP address?
> >
>
> Yes 2 tomee instances each in separete server point to a third server that
> only serve as db server. Thats why y have clustering only in webapps and
> not in db.
>
> > also, do you have an embedded db server (running inside of tomee and
> using
> > tomcat jdbc pooling) or network db server/engine?
> >
> >
>
> I use tomcat jdbc pooling (tomee with defined connections in tomee.xml)
>
> > On Sun, Oct 20, 2013 at 5:32 PM, José Luis Cetina  >wrote:
> >
> > > Ear with all my apps in each server (2 server each with their own ear)
> then
> > > each server insert/read in another unique db server.
> > > El 20/10/2013 16:09, "Howard W. Smith, Jr." 
> > > escribió:
> > >
> > > > Hmmm, i thought you said that you have EAR on one server and database
> on
> > > > separate server. are you running 2 tomee on same server; one tomee =
> EAR,
> > > > another tomee = database?
> > > >
> > > >
> > > >
> > > > On Sun, Oct 20, 2013 at 11:52 AM, José Luis Cetina <
> maxtorz...@gmail.com
> > > > >wrote:
> > > >
> > > > > By the way im not using remote calls. All my apps are in the same
> ear
> > > > with
> > > > > this i can inject my ejb local interface for calling methods in
> ejb.
> > > > > El 20/10/2013 07:49, "Howard W. Smith, Jr." <
> smithh032...@gmail.com>
> > > > > escribió:
> > > > >
> > > > > > just remembered-and-revised 2nd question, below...
> > > > > >
> > > > > > On Sun, Oct 20, 2013 at 8:35 AM, Howard W. Smith, Jr. <
> > > > > > smithh032...@gmail.com> wrote:
> > > > > >
> > > > > > >
> > > > > > > On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg <
> strub...@yahoo.de>
> > > > > > wrote:
> > > > > > >
> > > > > > >> This can also be very helpful to 'scale out' in case you need
> > > > > > performance:
> > > > > > >>
> > > > > > >> All write stuff is only performed on the master node, but
> > > expensive
> > > > > > >> queries/searches might be performed on the n replication
> nodes. Of
> > > > > > course
> > > > > > >> this needs a special handling in your app, but allows to move
> the
> > > > > > expensive
> > > > > > >> queries away from your primary node.
> > > > > > >>
> > > > > > >
> > > > > > > hmmm, had a question or two, or seeking clarification (or a bit
> > > more
> > > > > > > details or even a reference to a blog/article/document).
> > > > > > >
> > > > > > > 1. scale-out usually mean different physical servers? scaling
> out
> > > > > > multiple
> > > > > > > databases on one physical server, usually (or I would assume)
> means
> > > > > that
> > > > > > > the hard drive becomes the bottleneck, if hard drive contain
> > > multiple
> > > > > > > databases. right?
> > > > > > >
> > > > > > > 2. this needs special handling in your app? can you please
> clarify?
> > > > > > >
> > > > > > >
> > > > > > thanks!
> > > > > >
> > > > >
> > > >
> > >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
so, db server is on a separate machine/server on the network, and each EAR
is referencing the (one) db server via IP address?

also, do you have an embedded db server (running inside of tomee and using
tomcat jdbc pooling) or network db server/engine?


On Sun, Oct 20, 2013 at 5:32 PM, José Luis Cetina wrote:

> Ear with all my apps in each server (2 server each with their own ear) then
> each server insert/read in another unique db server.
> El 20/10/2013 16:09, "Howard W. Smith, Jr." 
> escribió:
>
> > Hmmm, i thought you said that you have EAR on one server and database on
> > separate server. are you running 2 tomee on same server; one tomee = EAR,
> > another tomee = database?
> >
> >
> >
> > On Sun, Oct 20, 2013 at 11:52 AM, José Luis Cetina  > >wrote:
> >
> > > By the way im not using remote calls. All my apps are in the same ear
> > with
> > > this i can inject my ejb local interface for calling methods in ejb.
> > > El 20/10/2013 07:49, "Howard W. Smith, Jr." 
> > > escribió:
> > >
> > > > just remembered-and-revised 2nd question, below...
> > > >
> > > > On Sun, Oct 20, 2013 at 8:35 AM, Howard W. Smith, Jr. <
> > > > smithh032...@gmail.com> wrote:
> > > >
> > > > >
> > > > > On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg 
> > > > wrote:
> > > > >
> > > > >> This can also be very helpful to 'scale out' in case you need
> > > > performance:
> > > > >>
> > > > >> All write stuff is only performed on the master node, but
> expensive
> > > > >> queries/searches might be performed on the n replication nodes. Of
> > > > course
> > > > >> this needs a special handling in your app, but allows to move the
> > > > expensive
> > > > >> queries away from your primary node.
> > > > >>
> > > > >
> > > > > hmmm, had a question or two, or seeking clarification (or a bit
> more
> > > > > details or even a reference to a blog/article/document).
> > > > >
> > > > > 1. scale-out usually mean different physical servers? scaling out
> > > > multiple
> > > > > databases on one physical server, usually (or I would assume) means
> > > that
> > > > > the hard drive becomes the bottleneck, if hard drive contain
> multiple
> > > > > databases. right?
> > > > >
> > > > > 2. this needs special handling in your app? can you please clarify?
> > > > >
> > > > >
> > > > thanks!
> > > >
> > >
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
Hmmm, i thought you said that you have EAR on one server and database on
separate server. are you running 2 tomee on same server; one tomee = EAR,
another tomee = database?



On Sun, Oct 20, 2013 at 11:52 AM, José Luis Cetina wrote:

> By the way im not using remote calls. All my apps are in the same ear with
> this i can inject my ejb local interface for calling methods in ejb.
> El 20/10/2013 07:49, "Howard W. Smith, Jr." 
> escribió:
>
> > just remembered-and-revised 2nd question, below...
> >
> > On Sun, Oct 20, 2013 at 8:35 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> > >
> > > On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg 
> > wrote:
> > >
> > >> This can also be very helpful to 'scale out' in case you need
> > performance:
> > >>
> > >> All write stuff is only performed on the master node, but expensive
> > >> queries/searches might be performed on the n replication nodes. Of
> > course
> > >> this needs a special handling in your app, but allows to move the
> > expensive
> > >> queries away from your primary node.
> > >>
> > >
> > > hmmm, had a question or two, or seeking clarification (or a bit more
> > > details or even a reference to a blog/article/document).
> > >
> > > 1. scale-out usually mean different physical servers? scaling out
> > multiple
> > > databases on one physical server, usually (or I would assume) means
> that
> > > the hard drive becomes the bottleneck, if hard drive contain multiple
> > > databases. right?
> > >
> > > 2. this needs special handling in your app? can you please clarify?
> > >
> > >
> > thanks!
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
just remembered-and-revised 2nd question, below...

On Sun, Oct 20, 2013 at 8:35 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

>
> On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg  wrote:
>
>> This can also be very helpful to 'scale out' in case you need performance:
>>
>> All write stuff is only performed on the master node, but expensive
>> queries/searches might be performed on the n replication nodes. Of course
>> this needs a special handling in your app, but allows to move the expensive
>> queries away from your primary node.
>>
>
> hmmm, had a question or two, or seeking clarification (or a bit more
> details or even a reference to a blog/article/document).
>
> 1. scale-out usually mean different physical servers? scaling out multiple
> databases on one physical server, usually (or I would assume) means that
> the hard drive becomes the bottleneck, if hard drive contain multiple
> databases. right?
>
> 2. this needs special handling in your app? can you please clarify?
>
>
thanks!


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
wow, good point. I don't ever create new users in app. currently, the app
is only 'for-office-use' only, but some day, i'm hoping the app will serve
the customers of the business (and endusers have already mentioned
some/different requirements where customers can login and do some stuff in
the app, specific for customers, of course).

i have already learned to cache 'static' data in @ApplicationScoped; a lot
of lists that show up in selectOneMenu, etc..., are instantiated-and-cached
on startup of the app (and inside the @ApplicationScoped bean).

based on your response, I can definitely cache the user data and some of
the 'static' data in the database. hmmm, i think I am doing that too, on a
few of the tables, but I will have to check that.

of course, omnifaces came up with a way for selectOneMenu to avoid the need
to use @EJB to verify elements in the list (via selectone converter, or
something like that)... i am not using that (yet). your idea, to cache the
'static' lists in database is definitely a better (performance) option than
the omnifaces feature.

evidently, i need to cache more data from my database in my
@ApplicationScoped bean. i love that (CDI) @ApplicationScoped bean!



On Sun, Oct 20, 2013 at 8:30 AM, Mark Struberg  wrote:

> With Caching I meant stuff like all the things which do not change often.
>
> There is a big difference between 'almost static' data and between 'living
> data'.
>
> E.g. the User data can surely be cached for 30 minutes. How often do you
> add or change a new user in your system?
> Same for e.g. an amazon catalogue. This can be perfectly be cached for at
> least an hour without having to hit the database again.
> Of course not all data can be cached, but lots of things which are kind of
> 'configuration like' can. And this can take away a lot of hits from the
> database which is then free to serve other more important stuff.
>
> LieGrue,
> strub
>
>
>
>
> - Original Message -
> > From: "Howard W. Smith, Jr." 
> > To: MyFaces Discussion 
> > Cc:
> > Sent: Sunday, 20 October 2013, 13:19
> > Subject: Re: [OT but still JSF]: Clustering, session replication, and
> database, too
> >
> > On Sun, Oct 20, 2013 at 7:07 AM, Howard W. Smith, Jr. <
> > smithh032...@gmail.com> wrote:
> >
> >>
> >>  hmmm, avoid database replication.
> >>
> >
> > honestly, I think HA-JDBC[1] (clustering the database) is all I really
> > need, because my app is quite fast, and only bottleneck is database
> layer.
> > I have seen David Blevins or Mark Struberg say that they reverted to
> > caching much of the data from database (in memory, on startup, I
> > guess/assume) to improve performance, but i wonder if caching the data is
> > really (really) necessary/recommended...
> >
> >
> > [1] http://ha-jdbc.github.io/
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg  wrote:

> This can also be very helpful to 'scale out' in case you need performance:
>
> All write stuff is only performed on the master node, but expensive
> queries/searches might be performed on the n replication nodes. Of course
> this needs a special handling in your app, but allows to move the expensive
> queries away from your primary node.
>

hmmm, had a question or two, or seeking clarification (or a bit more
details or even a reference to a blog/article/document).

1. scale-out usually mean different physical servers? scaling out multiple
databases on one physical server, usually (or I would assume) means that
the hard drive becomes the bottleneck, if hard drive contain multiple
databases. right?

2. hmmm, had another question, if I remember it, then I can ask it later.


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
interesting response, (and thanks) Mark!

glad you feel that way about clustering (expensive and not worth the
hassle), and scaling out the database for expensive queries/searches is
definitely what I want, because I really think the tomee+ stack is
performing very very well on my fast hardware. sadly, the (one) database
for queries+writes (performance) definitely can be improved!

will have to look into scaling out the database. thanks again!



On Sun, Oct 20, 2013 at 8:17 AM, Mark Struberg  wrote:

> DB replication basically works with the transaction log (IBM DB/2
> terminology, in Oracle it's called transfer tables). Each
> update/insert/delete statement gets written into a file and you can pick
> this file up from another node. This secondary node then does exactly the
> same like the first node. See e.g. Master/Slave setup on MySQL.
> Means after a commit, after a few ms the secondary (slave) node has
> exactly the same info as the master node. And if the master node fails,
> then you can easily fall over to the slave node.
>
> This can also be very helpful to 'scale out' in case you need performance:
>
> All write stuff is only performed on the master node, but expensive
> queries/searches might be performed on the n replication nodes. Of course
> this needs a special handling in your app, but allows to move the expensive
> queries away from your primary node.
>
> All other 'real' cluster solutions are really expensive and most of the
> times not worth the hassle imo ;)
>
>
> LieGrue,
> strub
>
> PS: usually clustering of Servlets are done by just 'pairing' up always 2
> different servlet containers (tomcat nodes A+B, C+D) and have full session
> replication on them. Means whenever a request is done it will move the
> whole session content to the paired node.
> With the msm you can get away from this.
>
>
>
> - Original Message -
> > From: "Howard W. Smith, Jr." 
> > To: MyFaces Discussion 
> > Cc:
> > Sent: Sunday, 20 October 2013, 12:56
> > Subject: Re: [OT but still JSF]: Clustering, session replication, and
> database, too
> >
> > also, i'm still wondering about how database is replicated while
> clustering
> > the app.
> >
> >
> > On Sun, Oct 20, 2013 at 5:34 AM, Thomas Andraschko <
> > andraschko.tho...@gmail.com> wrote:
> >
> >>  JFYI:
> >>  MyFaces+OWB on Tomcat with MSM is working fine.
> >>
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
On Sun, Oct 20, 2013 at 7:07 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

>
> hmmm, avoid database replication.
>

honestly, I think HA-JDBC[1] (clustering the database) is all I really
need, because my app is quite fast, and only bottleneck is database layer.
I have seen David Blevins or Mark Struberg say that they reverted to
caching much of the data from database (in memory, on startup, I
guess/assume) to improve performance, but i wonder if caching the data is
really (really) necessary/recommended...

[1] http://ha-jdbc.github.io/


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
interesting response, Jose', thanks!

for some time, I thought that it might be best to have separate server
(tomee + @EJB/DTO's + tomcat's jdbc + database) which is/becomes the
database tier. I guess I need to learn how to do/make remote calls to EJB
server from JSF web layer like you are doing.

i wonder if this is the typical/common/most-recommended-and-preferred
solution.

hmmm, avoid database replication.

i have even seen tomcat committer (mark thomas slideshow/document on
people.apache.org) mention that clustering your app should be avoided, if
possible (or only used, if necessary). :)



On Sun, Oct 20, 2013 at 1:30 AM, José Luis Cetina wrote:

> I have a early experience with a "mini cluster" 2 servers using tomee +
> memcached for session replication+ sticky session but using 1 only server
> for database (i mean i dont use db replication). My jsf apps (ear) are
> running in this mini cluster everithyng works fine except when i shutdown
> tomee for do a re deploy i always see an xhtml parser error. I could never
> configure it session replication with tomcat.
>
> In your web apps just use distributable tag in web.xml and all other are
> configuration. You can use memcached to not only session replication even
> thougth for savr information of your app and with this you can share
> information between your nodes and with this you dont persist information
> that could be "transient".
> The result is incredible.
>
> As i sayed i could never configure session replication with tomcat,  the
> only way i could do it is using memcached session replication.
>
> I dont know if anybody here have any experience with this.
>
> Regards Howard.
>  El 19/10/2013 22:49, "Howard W. Smith, Jr." 
> escribió:
>
> > I had a question or two, since I have been reading "Java Summit -
> Pitfalls
> > in EE"[1] provided by Mark Struberg while having a discussion on tomee
> user
> > list.
> >
> > The following page stated the following:
> >
> > Page 134
> > Clustering
> >
> > * We use 'asymmetric clustering'
> > * use sticky sessions
> > * backup away the session to a memcached after each
> > request
> > * do not replicate the session over to other nodes!
> > * Session-Replication always in node pairs.
> > * only restore the session from the memcached if a failover
> > happened
> > * msm can be integrated into OWB:
> > http://code.google.com/p/memcached-session-manager/
> >
> > Since it says, 'We use asymmetric clustering' and other suggestions were
> > made, I found it appropriate to direct my question(s) to MyFaces 'JSF'
> user
> > list and committers.
> >
> > is there some type of blog (or two or three) available that discuss how
> to
> > properly cluster a tomcat/tomee/openwebbeans/myfaces JSF web app? also,
> how
> > is the database replicated? I don't ever see database cluster/replication
> > discussed by JSF developers; i recently had to search for database
> cluster
> > and saw 'replication', which is something i have not had to worry about
> > since my previous work involved database teams while i was doing
> > front-end/GUI software.
> >
> > now that i am doing java ee and jsf, i would love to know how to do
> > database clustering and/or replicating database while clustering JSF
> > webapp. Of course, right now, i only have one  tomee which references
> > 'apache' derby (which is performing well, but I would love to get my feet
> > wet and cluster my web app + database). i did search derby's mail list
> > archives and i learned about sequioa and HA-JDBC (High-Availability
> JDBC).
> >
> > i was hoping to get an answer from MyFaces 'JSF' users/committers...based
> > on their experience. I think someone told me that they use mysql
> > (clustering); my preference is still 'apache' derby (smile). please
> > remember, i'm wondering if any blogs are available that discuss
> clustering
> > tomcat (preference = tomee) + JSF web app (with database) + memcached
> > session manager.
> >
> > Thomas has already started writing a blog[2] about this. I'm looking
> > forward to seeing sample config for it all (if available). :)
> >
> > [1]
> >
> >
> http://people.apache.org/~struberg/eesummit2013/Java%20EE%20Summit%20-%20pitfalls%20in%20EE.pdf
> >
> > [2]
> >
> >
> http://tandraschko.blogspot.com/2013/09/session-replication-clustering-failover.html
> >
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
romain, i have recognized and (gmail) star'red the mail list topics related
to tomee clustering. have not tried yet, but i don't see (any) mention of
how database is replicated while clustering tomee.

On Sun, Oct 20, 2013 at 2:11 AM, Romain Manni-Bucau
wrote:

> PS: if tomee clustering has issues please help us working on it on trunk
> and tomee list
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
also, i'm still wondering about how database is replicated while clustering
the app.

On Sun, Oct 20, 2013 at 5:34 AM, Thomas Andraschko <
andraschko.tho...@gmail.com> wrote:

> JFYI:
> MyFaces+OWB on Tomcat with MSM is working fine.
>


Re: [OT but still JSF]: Clustering, session replication, and database, too

2013-10-20 Thread Howard W. Smith, Jr.
smiling big... while I wrote OP (last night, my time), I did find Thomas's
long discussion[1] with memcached-session-manager's committer/developer
(Martin). and I remember Thomas said that Martin (the mail list) is 'very
helpful', I think Thomas said that on primefaces forum.

Romain, that discussion might help a bit. I did not read it yet.

Thomas, I know that you remember that discussion...that's why you
lightly-and-indirectly mentioned that in primefaces forum. :)

[1]
https://groups.google.com/forum/#!msg/memcached-session-manager/yCTsORhu_3c/noV_IvW-YF0J


On Sun, Oct 20, 2013 at 5:34 AM, Thomas Andraschko <
andraschko.tho...@gmail.com> wrote:

> JFYI:
> MyFaces+OWB on Tomcat with MSM is working fine.
>


[OT but still JSF]: Clustering, session replication, and database, too

2013-10-19 Thread Howard W. Smith, Jr.
I had a question or two, since I have been reading "Java Summit - Pitfalls
in EE"[1] provided by Mark Struberg while having a discussion on tomee user
list.

The following page stated the following:

Page 134
Clustering

* We use 'asymmetric clustering'
* use sticky sessions
* backup away the session to a memcached after each
request
* do not replicate the session over to other nodes!
* Session-Replication always in node pairs.
* only restore the session from the memcached if a failover
happened
* msm can be integrated into OWB:
http://code.google.com/p/memcached-session-manager/

Since it says, 'We use asymmetric clustering' and other suggestions were
made, I found it appropriate to direct my question(s) to MyFaces 'JSF' user
list and committers.

is there some type of blog (or two or three) available that discuss how to
properly cluster a tomcat/tomee/openwebbeans/myfaces JSF web app? also, how
is the database replicated? I don't ever see database cluster/replication
discussed by JSF developers; i recently had to search for database cluster
and saw 'replication', which is something i have not had to worry about
since my previous work involved database teams while i was doing
front-end/GUI software.

now that i am doing java ee and jsf, i would love to know how to do
database clustering and/or replicating database while clustering JSF
webapp. Of course, right now, i only have one  tomee which references
'apache' derby (which is performing well, but I would love to get my feet
wet and cluster my web app + database). i did search derby's mail list
archives and i learned about sequioa and HA-JDBC (High-Availability JDBC).

i was hoping to get an answer from MyFaces 'JSF' users/committers...based
on their experience. I think someone told me that they use mysql
(clustering); my preference is still 'apache' derby (smile). please
remember, i'm wondering if any blogs are available that discuss clustering
tomcat (preference = tomee) + JSF web app (with database) + memcached
session manager.

Thomas has already started writing a blog[2] about this. I'm looking
forward to seeing sample config for it all (if available). :)

[1]
http://people.apache.org/~struberg/eesummit2013/Java%20EE%20Summit%20-%20pitfalls%20in%20EE.pdf

[2]
http://tandraschko.blogspot.com/2013/09/session-replication-clustering-failover.html


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-19 Thread Howard W. Smith, Jr.
On Fri, Oct 18, 2013 at 6:01 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> Based on these test results, @PreDestroy of MyFaces 2.2 CDI @ViewScoped
> bean is executed via session invalidation and expiration. :)
>
> Great work and thank you, Leonardo, Gerhard, and MyFaces team! :)
>

When MyFaces 2.2.x is bundled with TomEE+ (snapshot), hopefully, I will
remember to start using MyFaces 2.2.x CDI @ViewScoped bean. Until then, I
will keep using MyFaces 2.1.12 and OmniFaces CDI @ViewScoped.

i hope to do more MyFaces 2.2 testing, if/when i have bandwidth and/or
use-case to do so. :)


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
On Fri, Oct 18, 2013 at 5:51 PM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> i will repeat my test 1 or 2 more times, just to confirm.



Test 1: session invalidation (login, reference @ViewScoped bean, logout,
which does HttpSession.invalidate())

Oct 18, 2013 5:53:45 PM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 10/18/2013 05:53 PM

Oct 18, 2013 5:55:05 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@4d807a04
Oct 18, 2013 5:55:09 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@3579149

Oct 18, 2013 5:55:15 PM jsf.users.pf_UsersController logout
INFO: administrator logged out at 10/18/2013 05:55 PM

Oct 18, 2013 5:55:15 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@3579149
Oct 18, 2013 5:55:15 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@4d807a04


Test 2: session expiration; repeated test steps mentioned in my previous
post

Oct 18, 2013 5:55:45 PM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 10/18/2013 05:55 PM

Oct 18, 2013 5:55:58 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@2340e3d5
Oct 18, 2013 5:56:01 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@3deaf302
Oct 18, 2013 5:57:01 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@3deaf302

Oct 18, 2013 5:57:01 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@2340e3d5
Oct 18, 2013 5:57:01 PM jsf.users.pf_UsersController sessionTimeout
INFO: administrator session ended at 10/18/2013 05:57 PM


Based on these test results, @PreDestroy of MyFaces 2.2 CDI @ViewScoped
bean is executed via session invalidation and expiration. :)

Great work and thank you, Leonardo, Gerhard, and MyFaces team! :)


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Good news! See (all) below, please :)

On Fri, Oct 18, 2013 at 5:06 PM, Leonardo Uribe  wrote:

> I have added the artifacts in:
>
> https://issues.apache.org/jira/browse/MYFACES-3747
>
>
> https://issues.apache.org/jira/secure/attachment/12609208/myfaces-api-2.2.0-SNAPSHOT.jar
>
> https://issues.apache.org/jira/secure/attachment/12609209/myfaces-impl-2.2.0-SNAPSHOT.jar
>
> please try these artifacts.
>

Downloaded those artifacts, dropped in tomee/lib, regenerated my WAR (just
in case), dropped WAR in tomee/webapps, started tomee, and the following
showed up in log:

Oct 18, 2013 5:28:47 PM org.apache.myfaces.config.LogMetaInfUtils
logArtifact
INFO: Artifact 'myfaces-api' was found in version '2.2.0-SNAPSHOT' from
path
'file:/C:/apache-tomee-plus-1.6.0-SNAPSHOT/lib/myfaces-api-2.2.0-SNAPSHOT.jar'
Oct 18, 2013 5:28:47 PM org.apache.myfaces.config.LogMetaInfUtils
logArtifact
INFO: Artifact 'myfaces-impl' was found in version '2.2.0-SNAPSHOT' from
path
'file:/C:/apache-tomee-plus-1.6.0-SNAPSHOT/lib/myfaces-impl-2.2.0-SNAPSHOT.jar'
Oct 18, 2013 5:28:47 PM org.apache.myfaces.util.ExternalSpecifications
isCDIAvailable
INFO: MyFaces CDI support enabled
Oct 18, 2013 5:28:47 PM
org.apache.myfaces.spi.impl.DefaultInjectionProviderFactory
getInjectionProvider
INFO: Using InjectionProvider
org.apache.myfaces.spi.impl.Tomcat7AnnotationInjectionProvider

--- logged in (web) app ---

Oct 18, 2013 5:32:24 PM jsf.users.pf_UsersController loginUser
INFO: administrator logged in at 10/18/2013 05:32 PM

--- repeated test steps that I mentioned in earlier responses in this email
thread ---

Oct 18, 2013 5:32:34 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@7db07a20
Oct 18, 2013 5:32:37 PM jsf.orders.OrderDocumentBean init
INFO: jsf.orders.OrderDocumentBean@ab9ec77

--- session expired via 1 minute session timeout, @PreDestroy of MyFaces
2.2 CDI @ViewScoped bean executed ---

Oct 18, 2013 5:33:37 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@ab9ec77
Oct 18, 2013 5:33:37 PM jsf.orders.OrderDocumentBean releaseResources
INFO: jsf.orders.OrderDocumentBean@7db07a20
Oct 18, 2013 5:33:37 PM jsf.users.pf_UsersController sessionTimeout
INFO: administrator session ended at 10/18/2013 05:33 PM

--- also, no exceptions in localhost log, when shutdown tomee ---

i will repeat my test 1 or 2 more times, just to confirm.


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Leonardo,

Okay, i will download those artifacts and test and report test results,
ASAP.

thanks,
Howard


On Fri, Oct 18, 2013 at 5:06 PM, Leonardo Uribe  wrote:

> Hi Howard
>
> It seems something failed in the build, but it was not in the code, it was
> like an interruption on jenkins.
>
> I have added the artifacts in:
>
> https://issues.apache.org/jira/browse/MYFACES-3747
>
>
> https://issues.apache.org/jira/secure/attachment/12609208/myfaces-api-2.2.0-SNAPSHOT.jar
>
> https://issues.apache.org/jira/secure/attachment/12609209/myfaces-impl-2.2.0-SNAPSHOT.jar
>
> please try these artifacts.
>
> regards,
>
> Leonardo Uribe
>
>
> 2013/10/18 Howard W. Smith, Jr. 
>
> > Leonardo,
> >
> > I see myfaces 2.2 api JAR was updated but not myfaces 2.2 impl JAR. Did
> you
> > want me to just download the following JAR and retest, or there is
> > another/later version of the JAR, which is yet to be built?
> >
> > myfaces-api-2.2.0-20131018.201520-2509.jar<
> >
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/myfaces-api/2.2.0-SNAPSHOT/myfaces-api-2.2.0-20131018.201520-2509.jar
> > >
> >
> >
> > thanks,
> > Howard
> >
> > On Fri, Oct 18, 2013 at 3:05 PM, Leonardo Uribe 
> wrote:
> >
> > > Hi
> > >
> > > I have committed a mixed solution between @PreDestroy annotation and
> > > ManagedBeanDestroyerListener. The idea is the first one in destroy the
> > > beans wins and the second one is just ignored. I have tested it with
> both
> > > configurations, so I hope it will work in your application.
> > >
> > > Let us know what happen and thanks Howard for report this. This is the
> > kind
> > > of help that is very useful for the project in general.
> > >
> > > regards,
> > >
> > > Leonardo Uribe
> > >
> > >
> > > 2013/10/18 Leonardo Uribe 
> > >
> > > > Hi
> > > >
> > > > I was able to reproduce the problem. I have been testing this issue
> > > > against jetty / weld, and this issue comes when using tomcat / owb
> > > > configuration. It seems when the session is destroyed,
> > > > CDIManagedBeanHandlerImpl try to get a reference of
> ViewScopeBeanHolder
> > > and
> > > > FlowScopeBeanHolder, but in that point of time the injection does not
> > > work
> > > > as you can expect and ViewScopeBeanHolder is recreated.
> > > >
> > > > This issue is becoming difficult ...
> > > >
> > > > regards,
> > > >
> > > > Leonardo Uribe
> > > >
> > > >
> > > >
> > > > 2013/10/18 Howard W. Smith, Jr. 
> > > >
> > > > On Thu, Oct 17, 2013 at 9:04 PM, Howard W. Smith, Jr. <
> > > >> smithh032...@gmail.com> wrote:
> > > >>
> > > >> > OmniFaces CDI @ViewScoped[1] executes @PreDestroy on
> > > >> session.invalidate()
> > > >> > and that is what I like/expect, but MyFaces 2.2 CDI @ViewScoped
> > > >> > implementation is not doing the same.
> > > >>
> > > >>
> > > >> I am not trying to do any type of cross-forum posting. My goal is to
> > > >> communicate/share my actual/expected test results.
> > > >>
> > > >> In production, I am using TomEE 1.6.0 (OWB) + MyFaces 2.1.12 +
> > OmniFaces
> > > >> 1.6(.1) CDI @ViewScoped, which invokes @PreDestroy on session
> > > invalidation
> > > >> 'and' expiration. Some minutes ago, I did a test against production
> > app,
> > > >> and just wanted to show you my 'actual test results' of production
> > > (which)
> > > >> = 'expected test results' of MyFaces 2.2 CDI @ViewScoped.
> > > >>
> > > >> In production, session timeout = 15 minutes, so I did a test against
> > > >> production server, and did the 'same' test as Test 2 (session
> > > expiration)
> > > >> in my previous post that included my latest test and test results of
> > > >> MyFaces 2.2 CDI @ViewScoped.
> > > >>
> > > >>
> > > >> Test: login user, navigate to page which references CDI @ViewScoped
> > > bean,
> > > >> F5/refresh browser to generate another CDI @ViewScoped bean, and let
> > > >> session expire via (15-minute) session timeout; @PreDestroy of
> > > (OmniFaces)
> > > >> CDI @ViewScoped bean executed. see below.
> > > >>
> > > >> Oct 18, 2013 11:20:29 AM jsf.users.pf_UsersController loginUser
> > > >> INFO: administrator logged in at 10/18/2013 11:20 AM
> > > >>
> > > >> Oct 18, 2013 11:20:39 AM jsf.orders.OrderDocumentBean init
> > > >> INFO: jsf.orders.OrderDocumentBean@650707eb
> > > >>
> > > >> Oct 18, 2013 11:20:42 AM jsf.orders.OrderDocumentBean init
> > > >> INFO: jsf.orders.OrderDocumentBean@132f168a
> > > >>
> > > >> -- session expired --
> > > >>
> > > >> Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean
> releaseResources
> > > >> INFO: jsf.orders.OrderDocumentBean@132f168a
> > > >>
> > > >> Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean
> releaseResources
> > > >> INFO: jsf.orders.OrderDocumentBean@650707eb
> > > >>
> > > >> Oct 18, 2013 11:35:43 AM jsf.users.pf_UsersController sessionTimeout
> > > >> INFO: administrator session ended at 10/18/2013 11:35 AM
> > > >>
> > > >
> > > >
> > >
> >
>


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Hmmm...

On Fri, Oct 18, 2013 at 11:56 AM, Howard W. Smith, Jr. <
smithh032...@gmail.com> wrote:

> My goal is to communicate/share my actual/expected test results.


More to share below. Earlier, when I tested via 2013-Oct-18 MyFaces 2.2
JARs, exceptions showed up in localhost log, but I just recognized them (in
NetBeans). See exceptions below (there are 3 to 5 exceptions below).


Oct 18, 2013 10:57:23 AM org.apache.catalina.session.StandardSession expire
SEVERE: Session event listener threw exception
java.lang.UnsupportedOperationException: This method is not supported
during shutdown
at
org.apache.myfaces.context.servlet.StartupServletExternalContextImpl.getSessionMap(StartupServletExternalContextImpl.java:205)
at
org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.isViewScopeBeanHolderCreated(CDIManagedBeanHandlerImpl.java:112)
at
org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:99)
at
org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:172)
at
org.apache.myfaces.webapp.StartupServletContextListener.sessionDestroyed(StartupServletContextListener.java:369)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:742)
at
org.apache.catalina.session.StandardSession.invalidate(StandardSession.java:1253)
at
org.apache.catalina.session.StandardSessionFacade.invalidate(StandardSessionFacade.java:190)
at pf.LoginFilter.doFilter(LoginFilter.java:206)
at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
at
org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:222)
at
org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:123)
at org.apache.tomee.catalina.OpenEJBValve.invoke(OpenEJBValve.java:45)
at
org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:502)
at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171)
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:99)
at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:953)
at
org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
at
org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:408)
at
org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:1023)
at
org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:589)
at
org.apache.tomcat.util.net.NioEndpoint$SocketProcessor.run(NioEndpoint.java:1686)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
at java.lang.Thread.run(Thread.java:724)

Oct 18, 2013 10:58:13 AM org.apache.catalina.session.StandardSession expire
SEVERE: Session event listener threw exception
java.lang.UnsupportedOperationException: This method is not supported
during shutdown
at
org.apache.myfaces.context.servlet.StartupServletExternalContextImpl.getSessionMap(StartupServletExternalContextImpl.java:205)
at
org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.isViewScopeBeanHolderCreated(CDIManagedBeanHandlerImpl.java:112)
at
org.apache.myfaces.cdi.impl.CDIManagedBeanHandlerImpl.onSessionDestroyed(CDIManagedBeanHandlerImpl.java:99)
at
org.apache.myfaces.webapp.ManagedBeanDestroyerListener.sessionDestroyed(ManagedBeanDestroyerListener.java:172)
at
org.apache.myfaces.webapp.StartupServletContextListener.sessionDestroyed(StartupServletContextListener.java:369)
at
org.apache.catalina.session.StandardSession.expire(StandardSession.java:806)
at
org.apache.catalina.session.StandardSession.isValid(StandardSession.java:658)
at
org.apache.catalina.session.ManagerBase.processExpires(ManagerBase.java:534)
at
org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:519)
at
org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1352)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1530)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1540)
at
org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1519)
at java.lang.Thread.run(Thread.java:724)

Oct 18, 2013 10:59:10 AM org.apache.catalina.session.StandardSession expire
SEVERE: Session event listener threw exception
java.lang.UnsupportedOperationException: This method is not supported
during shutdown
at
org.apache.myfaces.context.servlet.StartupServletExternalContextImpl.getS

Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Leonardo,

I see myfaces 2.2 api JAR was updated but not myfaces 2.2 impl JAR. Did you
want me to just download the following JAR and retest, or there is
another/later version of the JAR, which is yet to be built?

myfaces-api-2.2.0-20131018.201520-2509.jar<https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/myfaces-api/2.2.0-SNAPSHOT/myfaces-api-2.2.0-20131018.201520-2509.jar>


thanks,
Howard

On Fri, Oct 18, 2013 at 3:05 PM, Leonardo Uribe  wrote:

> Hi
>
> I have committed a mixed solution between @PreDestroy annotation and
> ManagedBeanDestroyerListener. The idea is the first one in destroy the
> beans wins and the second one is just ignored. I have tested it with both
> configurations, so I hope it will work in your application.
>
> Let us know what happen and thanks Howard for report this. This is the kind
> of help that is very useful for the project in general.
>
> regards,
>
> Leonardo Uribe
>
>
> 2013/10/18 Leonardo Uribe 
>
> > Hi
> >
> > I was able to reproduce the problem. I have been testing this issue
> > against jetty / weld, and this issue comes when using tomcat / owb
> > configuration. It seems when the session is destroyed,
> > CDIManagedBeanHandlerImpl try to get a reference of ViewScopeBeanHolder
> and
> > FlowScopeBeanHolder, but in that point of time the injection does not
> work
> > as you can expect and ViewScopeBeanHolder is recreated.
> >
> > This issue is becoming difficult ...
> >
> > regards,
> >
> > Leonardo Uribe
> >
> >
> >
> > 2013/10/18 Howard W. Smith, Jr. 
> >
> > On Thu, Oct 17, 2013 at 9:04 PM, Howard W. Smith, Jr. <
> >> smithh032...@gmail.com> wrote:
> >>
> >> > OmniFaces CDI @ViewScoped[1] executes @PreDestroy on
> >> session.invalidate()
> >> > and that is what I like/expect, but MyFaces 2.2 CDI @ViewScoped
> >> > implementation is not doing the same.
> >>
> >>
> >> I am not trying to do any type of cross-forum posting. My goal is to
> >> communicate/share my actual/expected test results.
> >>
> >> In production, I am using TomEE 1.6.0 (OWB) + MyFaces 2.1.12 + OmniFaces
> >> 1.6(.1) CDI @ViewScoped, which invokes @PreDestroy on session
> invalidation
> >> 'and' expiration. Some minutes ago, I did a test against production app,
> >> and just wanted to show you my 'actual test results' of production
> (which)
> >> = 'expected test results' of MyFaces 2.2 CDI @ViewScoped.
> >>
> >> In production, session timeout = 15 minutes, so I did a test against
> >> production server, and did the 'same' test as Test 2 (session
> expiration)
> >> in my previous post that included my latest test and test results of
> >> MyFaces 2.2 CDI @ViewScoped.
> >>
> >>
> >> Test: login user, navigate to page which references CDI @ViewScoped
> bean,
> >> F5/refresh browser to generate another CDI @ViewScoped bean, and let
> >> session expire via (15-minute) session timeout; @PreDestroy of
> (OmniFaces)
> >> CDI @ViewScoped bean executed. see below.
> >>
> >> Oct 18, 2013 11:20:29 AM jsf.users.pf_UsersController loginUser
> >> INFO: administrator logged in at 10/18/2013 11:20 AM
> >>
> >> Oct 18, 2013 11:20:39 AM jsf.orders.OrderDocumentBean init
> >> INFO: jsf.orders.OrderDocumentBean@650707eb
> >>
> >> Oct 18, 2013 11:20:42 AM jsf.orders.OrderDocumentBean init
> >> INFO: jsf.orders.OrderDocumentBean@132f168a
> >>
> >> -- session expired --
> >>
> >> Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean releaseResources
> >> INFO: jsf.orders.OrderDocumentBean@132f168a
> >>
> >> Oct 18, 2013 11:35:43 AM jsf.orders.OrderDocumentBean releaseResources
> >> INFO: jsf.orders.OrderDocumentBean@650707eb
> >>
> >> Oct 18, 2013 11:35:43 AM jsf.users.pf_UsersController sessionTimeout
> >> INFO: administrator session ended at 10/18/2013 11:35 AM
> >>
> >
> >
>


Re: [MyFaces 2.2] invoke @PreDestroy on (CDI) ViewScoped beans upon session expiration

2013-10-18 Thread Howard W. Smith, Jr.
Gerhard, sounds good to me. :)


On Fri, Oct 18, 2013 at 4:22 PM, Gerhard Petracek <
gerhard.petra...@gmail.com> wrote:

> hi howard,
>
> your test confirmed what i saw recently -> we have already what i planned
> to do (the confirmation of the issue).
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2013/10/18 Howard W. Smith, Jr. 
>
> > Cool! If your test works against Leonardo's latest changes/fixes, please
> > post/share your test results (and test steps). Thanks!
> >
> >
> > On Fri, Oct 18, 2013 at 3:45 PM, Gerhard Petracek <
> > gerhard.petra...@gmail.com> wrote:
> >
> > > hi howard,
> > >
> > > i just planned a short (re-)test for starting a discussion like this
> one.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > > 2013/10/18 Howard W. Smith, Jr. 
> > >
> > > > Gerhard, you're welcome. since i don't have bandwidth (right now),
> > > > maybe/hopefully, you can develop test case(s) per what we're
> > > > discussing/testing/reporting here...if you have bandwidth to do so.
> :)
> > > >
> > > >
> > > > On Fri, Oct 18, 2013 at 5:14 AM, Gerhard Petracek <
> > > > gerhard.petra...@gmail.com> wrote:
> > > >
> > > > > @howard:
> > > > > that's one of the issues i mentioned during the discussion for
> > > > MYFACES-3797
> > > > > and i was going to test it tomorrow.
> > > > > -> thx for testing it and starting this thread.
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > >
> > > > > 2013/10/18 Leonardo Uribe 
> > > > >
> > > > > > Hi
> > > > > >
> > > > > > You can check here:
> > > > > >
> > > > > >
> > > >
> > https://builds.apache.org/view/M-R/view/MyFaces/job/myfaces-current22-1/
> > > > > >
> > > > > > As soon as the job (#1164) is done, you can take the jars from
> that
> > > > > > location (which should be the same).
> > > > > >
> > > > > > regards,
> > > > > >
> > > > > > Leonardo Uribe
> > > > > >
> > > > > >
> > > > > > 2013/10/17 Howard W. Smith, Jr. 
> > > > > >
> > > > > > > Okay, that is great. I'm waiting for the following folders to
> be
> > > > > updated
> > > > > > > with the latest version:
> > > > > > >
> > > > > > > 1.
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/myfaces-api/2.2.0-SNAPSHOT/
> > > > > > >
> > > > > > > 2.
> > > > > > >
> > > > > > >
> > > > > >
> > > > >
> > > >
> > >
> >
> https://repository.apache.org/content/repositories/snapshots/org/apache/myfaces/core/myfaces-impl/2.2.0-SNAPSHOT/
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > >
> > > > > > > On Thu, Oct 17, 2013 at 10:47 PM, Leonardo Uribe <
> > lu4...@gmail.com
> > > >
> > > > > > wrote:
> > > > > > >
> > > > > > > > Hi
> > > > > > > >
> > > > > > >

  1   2   3   >