Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-09-04 Thread José Luis Cetina
i will try to reproduce it, the issue apparently is with ears


2014-09-04 15:12 GMT-05:00 Leonardo Uribe :

> Hi
>
> I have tested the latest snapshot from trunk and it is working with tomee
> 1.7.0. I don't see any exception from this side.
>
> regards,
>
> Leonardo Uribe
>
>
> 2014-09-03 17:23 GMT-05:00 José Luis Cetina :
>
> > Hi, i was trying to use MyFaces 2.2.4 with TomEE 1.7.0 JAX-RS, i want to
> > use myfaces 2.2.4 because i want to use the @javax.faces.view.ViewScoped
> (i
> > use the omnifaces viewscoped) and the f:viewAction.
> >
> > But again im getting
> javax.enterprise.inject.AmbiguousResolutionException:
> > Ambiguous resolution exception that i reported a few months ago,
> apparently
> > myfaces 2.2.4 is not working with ears in tomee 1.7.0.
> >
> > I already reported to tomee mailing list but @Romain sayed
> >
> > "think so but more a MF issue this time I think"
> >
> > @Leonardo
> >
> >
> >
> >
> > 2014-01-15 17:14 GMT-06:00 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 <
> maxtorz...@gmail.com
> > > >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 <
> > > maxtorz...@gmail.com
> > > > > >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*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *José Luis Cetina*
> > ---
> >
>



-- 
---
*José Luis Cetina*
---


Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-09-03 Thread José Luis Cetina
Hi, i was trying to use MyFaces 2.2.4 with TomEE 1.7.0 JAX-RS, i want to
use myfaces 2.2.4 because i want to use the @javax.faces.view.ViewScoped (i
use the omnifaces viewscoped) and the f:viewAction.

But again im getting javax.enterprise.inject.AmbiguousResolutionException:
Ambiguous resolution exception that i reported a few months ago, apparently
myfaces 2.2.4 is not working with ears in tomee 1.7.0.

I already reported to tomee mailing list but @Romain sayed

"think so but more a MF issue this time I think"

@Leonardo




2014-01-15 17:14 GMT-06:00 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 <
> maxtorz...@gmail.com
> > > >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*
> > ---
> >
>



-- 
---
*José Luis Cetina*
---


Re: MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-01-15 Thread José Luis Cetina
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

2014-01-15 Thread José Luis Cetina
I did it. But now i have problems. I reporte a AmbiguousResolutionException
in other thread.


2014/1/15 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
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


MyFaces 2.2.0 ViewScoped AmbiguousResolutionException

2014-01-15 Thread 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 José Luis Cetina
Thanks


2014/1/15 Thomas Andraschko 

> http://jsflive.wordpress.com/2013/07/17/jsf22-cdi-view-scope/
>
>
> 2014/1/15 José Luis Cetina 
>
> > 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
> >
>



-- 
-------
*SCJA. José Luis Cetina*
---


MyFaces 2.2.0 ViewScoped

2014-01-15 Thread José Luis Cetina
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: Performance params

2013-11-01 Thread 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
> > > > > +1 203-998-0403
> > > > >
> > > > > * Listen to the Enterprise Java Newscast:
> > > > > *http://w<http://blogs.jsfcentral.com/JSFNewscast/>
> > > > > ww.enterprisejavanews.com*
> > > > > * JSFCentral Interviews Podcast:
> > > > > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > > > > * Sign up for the JSFCentral Newsletter:
> > > > > http://oi.vresp.com/?fid=ac048d0e17
> > > > >
> > > > >
> > > > > On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> > > > > smithh032...@gmail.com
> > > > > > wrote:
> > > > >
> > > > > > 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/
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ---
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: Performance params

2013-11-01 Thread 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
> > > +1 203-998-0403
> > >
> > > * Listen to the Enterprise Java Newscast:
> > > *http://w<http://blogs.jsfcentral.com/JSFNewscast/>
> > > ww.enterprisejavanews.com*
> > > * JSFCentral Interviews Podcast:
> > > http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> > > * Sign up for the JSFCentral Newsletter:
> > > http://oi.vresp.com/?fid=ac048d0e17
> > >
> > >
> > > On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> > > smithh032...@gmail.com
> > > > wrote:
> > >
> > > > 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/
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: Performance params

2013-11-01 Thread 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
> +1 203-998-0403
>
> * Listen to the Enterprise Java Newscast:
> *http://w<http://blogs.jsfcentral.com/JSFNewscast/>
> ww.enterprisejavanews.com*
> * JSFCentral Interviews Podcast:
> http://www.jsfcentral.com/resources/jsfcentralpodcasts/
> * Sign up for the JSFCentral Newsletter:
> http://oi.vresp.com/?fid=ac048d0e17
>
>
> On Fri, Nov 1, 2013 at 9:48 AM, Howard W. Smith, Jr. <
> smithh032...@gmail.com
> > wrote:
>
> > 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/
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


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

2013-10-20 Thread José Luis Cetina
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." 
> > > > 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 José Luis Cetina
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 José Luis Cetina
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-19 Thread José Luis Cetina
Ok Romain. Im not sure if is tomee issue of msm issue, but i will send you
a mail with the info to the tomee mailing list.


2013/10/20 Romain Manni-Bucau 

> Hi
>
> Tomcat/tomee session replication; memcached and custom session manager
> (hazelcast) solutions are different.
>
> Typically in some of them you accept SPoF, not in others. The perf are not
> the same too. Finally guarantees (synchronous or not persistence) can be
> different too.
>
> Mark info were consistent but adapted to his apps I think. The "theorical"
> solution is sometimes not enough...
>
> Was just to give some more inputs and dont believe in IT you have a single
> solution.
>
> PS: if tomee clustering has issues please help us working on it on trunk
> and tomee list
> Le 20 oct. 2013 07:30, "José Luis Cetina"  a écrit :
>
> > 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
> > >
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


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

2013-10-19 Thread José Luis Cetina
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: unsub

2013-07-01 Thread José Luis Cetina
Saludos, Rodrigo.


El 1 de julio de 2013 11:41, Rodrigo Zenteno
escribió:

> Pensé que eras de Chile...,
> OK, Gracias
> Atte.
> Rodrigo
>
> Rodrigo Zenteno C.
> Gerente General
> Sistemas Relacionales SA.
> Teléfono (56) (2) 22327758
> Guardia Vieja 181, Oficina 506, Providencia, Santiago
> Chile
>
>
>
>
> El 1 de julio de 2013 12:33, Alonso Isidoro Roman  >escribió:
>
> > españa
> >
> > Atte.
> >
> > Alonso
> >
> > Alonso Isidoro Roman.
> >
> > Mis citas preferidas (de hoy) :
> > "Si depurar es el proceso de quitar los errores de software, entonces
> > programar debe ser el proceso de introducirlos..."
> >  -  Edsger Dijkstra
> >
> > My favorite quotes (today):
> > "If debugging is the process of removing software bugs, then programming
> > must be the process of putting ..."
> >   - Edsger Dijkstra
> >
> > "If you pay peanuts you get monkeys"
> >
> >
> >
> > El 1 de julio de 2013 17:35, Rodrigo Zenteno
> > escribió:
> >
> > > Alonso,
> > > De que país eres?
> > > Atte.
> > > Rodrigo
> > >
> > > Rodrigo Zenteno C.
> > > Gerente General
> > > Sistemas Relacionales SA.
> > > Teléfono (56) (2) 22327758
> > > Guardia Vieja 181, Oficina 506, Providencia, Santiago
> > > Chile
> > >
> > >
> > >
> > >
> > > 2013/7/1 Alonso Isidoro Roman 
> > >
> > > > please, unsubscribe me
> > > >
> > > > Alonso Isidoro Roman.
> > > >
> > > > Mis citas preferidas (de hoy) :
> > > > "Si depurar es el proceso de quitar los errores de software, entonces
> > > > programar debe ser el proceso de introducirlos..."
> > > >  -  Edsger Dijkstra
> > > >
> > > > My favorite quotes (today):
> > > > "If debugging is the process of removing software bugs, then
> > programming
> > > > must be the process of putting ..."
> > > >   - Edsger Dijkstra
> > > >
> > > > "If you pay peanuts you get monkeys"
> > > >
> > > >
> > > >
> > > > 2013/7/1 Bill Dudney 
> > > >
> > > > > unsub
> > > > >
> > > >
> > >
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: AW: Using Eclipse Juno an Tomcat 6

2013-05-21 Thread José Luis Cetina
Why you dont try apache tomee, you can use the apache stuff out of the box.
El 21/05/2013 07:24, "Владимир Мокрозуб"  escribió:

> I assume you're confused by these messages?
> INFO: MyFaces-package : tomahawk not found.
> INFO: MyFaces-package : tobago not found.
> etc.
>
> These are not errors, just info about some missing custom MyFaces
> components that are not essential.
> The set of jars you listed is quite enough.
>
> Vladimir M.
>
>
> On 21.05.2013 15:39, Kempff, Malte wrote:
>
>> Hi Vladimir,
>> well, I don't put anything to the WEB-INF Folder.
>> What is to find out, why I get those error messages that refer to
>> libraries the server obviously could not find.
>> BTW: I guess my hardcopy of the libraries that were downloaded  might be
>> washed away.
>> Here the list I got from MyFaces core( 2.0 somehing) by downloading it
>> from the market-place in Eclipse:
>> commons-beanutils-1.8.3.jar
>>   commons-codec-1.3.jar
>>   commons-collections-3.2.jar
>>   commons-digester-1.8.jar
>>   commons-discovery-0.4.jar
>>   commons-logging-1.1.1.jar
>>   myfaces-api-2.0.2.jar
>>   myfaces-impl-2.0.2.jar
>>
>> is that really  the complete list I ought to have for all stuff including
>> JSF 2.0 etc. the libraries that are missed in the startup message?
>>
>> Malte
>> -Ursprüngliche Nachricht-
>> Von: Владимир Мокрозуб [mailto:v...@itc.tambov.gov.ru]
>> Gesendet: Dienstag, 21. Mai 2013 13:08
>> An: MyFaces Discussion
>> Betreff: Re: Using Eclipse Juno an Tomcat 6
>>
>> WEB-INF folder contains meta-information about your application, you
>> shouldn't put your pages there.
>> Instead, put them into WebContent folder.
>>
>> Vladimir M.
>>
>> On 21.05.2013 14:50, Kempff, Malte wrote:
>>
>>> Hi to all,
>>>
>>> I just start with JSF and try to set up my IDE, that is Ecipse Juno
>>> for Web-Developers and Tomcat 6.
>>>
>>> Actually I was following the Hints of following page for setting the
>>> latest stuff.
>>>
>>> http://help.eclipse.org/**helios/index.jsp?topic=%2Forg.**
>>> eclipse.jst.jsf
>>> .
>>> doc.user%2Fhtml%**2Fgettingstarted%2Ftutorial%**
>>> 2FJSFTools_tutorial_JSF20.
>>> html
>>>
>>> Since I could not connect to Oacles implementation Mojarra I desiced
>>> to use Apache alternative setting the checkmark there.
>>>
>>> Obviously I get following libraries, at least I find these in the
>>> library subfolder of my Workspace:
>>>
>>> But now I am wondering that When I stat this sample web-application I
>>> get following messages:
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.core.**AprLifecycleListener init
>>>
>>> INFO: The APR based Apache Tomcat Native library which allows optimal
>>> performance in production environments was not found on the
>>> java.library.path: C:\Program Files
>>> (x86)\Java\jdk1.6.0_35\bin;C:\**Windows\Sun\Java\bin;C:\**
>>> Windows\system32
>>> ;C:\Windows;C:/Program Files (x86)/Java/jre6/bin/client;C:/**Program
>>> Files (x86)/Java/jre6/bin;C:/Program Files
>>> (x86)/Java/jre6/lib/i386;C:\**Perl64\site\bin;C:\Perl64\bin;**
>>> C:\Oracle\pr
>>> oduct\11.2.0\client_1\bin;C:\**Windows\system32;C:\Windows;C:**
>>> \Windows\Sy
>>> stem32\Wbem;C:\Windows\**System32\WindowsPowerShell\v1.**0\;C:\Program
>>> Files (x86)\Microsoft Application Virtualization Client;C:\Program
>>> Files (x86)\IBM\SQLLIB\BIN;C:\**Program Files
>>> (x86)\IBM\SQLLIB\SAMPLES\REPL;**C:\Program Files
>>> (x86)\IBM\gsk8\lib\;C:\Program Files
>>> (x86)\IBM\SQLLIB\FUNCTION;C:\**Program Files
>>> (x86)\Java\jdk1.6.0_35\bin;c:\**Temp\lib\db-derby-10.9.1.0-**
>>> bin\bin;C:\li
>>> b\javacc-5.0\bin;;C:\Program
>>> Files (x86)\eclipse-juno-32ee;;.
>>>
>>> 17.05.2013 19:32:05 org.apache.coyote.http11.**Http11Protocol init
>>>
>>> INFO: Initializing Coyote HTTP/1.1 on http-8080
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.startup.**Catalina load
>>>
>>> INFO: Initialization processed in 338 ms
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.core.**StandardService start
>>>
>>> INFO: Starting service Catalina
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.core.**StandardEngine start
>>>
>>> INFO: Starting Servlet Engine: Apache Tomcat/6.0.36
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.startup.**HostConfig
>>> deployDescriptor
>>>
>>> INFO: Deploying configuration descriptor CMK_JSF_TEST.xml
>>>
>>> 17.05.2013 19:32:05 org.apache.catalina.core.**StandardContext
>>> addApplicationListener
>>>
>>> INFO: The listener
>>> "org.apache.myfaces.webapp.**StartupServletContextListener" is already
>>> configured for this context. The duplicate definition has been ignored.
>>>
>>> 17.05.2013 19:32:05
>>> org.apache.myfaces.shared_**impl.config.MyfacesConfig
>>> getBooleanInitParameter
>>>
>>> INFO: No context init parameter
>>> 'org.apache.myfaces.RENDER_**CLEAR_JAVASCRIPT_FOR_BUTTON' found, using
>>> default value false
>>>
>>> 17.05.2013 19:32:05
>>> org.apache.myfaces.shared_**impl.config.MyfacesConfig
>>> getBooleanInitParameter
>>>
>>> INFO

Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
Yes the idea in converters if something is wrong and u wanna display some
info the idea is throw the converterexception.

Please do a request or send mail to tomee mailing list and i can help to
vote.

Regards.
El 13/04/2013 20:51, "Howard W. Smith, Jr." 
escribió:

> On Sat, Apr 13, 2013 at 9:41 PM, José Luis Cetina  >wrote:
>
> > Maybe could be a request for Rommain, i remember that tomee logs some
> info
> > about ejb but im not sure what exactly.
> >
> >
> Agreed, or even better, i'm sure Romain and TomEE committers will
> appreciate me opening a JIRA for it.  :)
>
> Below, is how TomEE logs the @Stateless EJBs. Do you see JNDI lookup path?
> :)
>
> Apr 13, 2013 8:36:09 PM org.apache.openejb.config.InitEjbDeployments deploy
> INFO: Auto-deploying ejb CustomerFacade:
> EjbDeployment(deployment-id=CustomerFacade)
>
>
> By the way i saw that you return null in your converters catch "statement".
> > Why dont throw a converterexception?
> >
>
> Hmmm, good question. Will the JNDI lookup path 'ever' be 'null'? i'm sure
> if I change the name of any of the Stateless @EJBs, then it may return
> 'null'. Right? :)
>
> Okay, I will throw the exception. of course, omnifaces will catch the error
> and display it via error page. :)
>
> Thank you and Mike for your responses and recommendations!!!
>
>
>
> > El 13/04/2013 20:37, "Howard W. Smith, Jr." 
> > escribió:
> >
> > > It would be nice if TomEE 'logs' the JNDI lookup path as the Reference
> > > Implementation (Glassfish) does! I had to say that. :)
> > >
> > >
> > > On Sat, Apr 13, 2013 at 9:34 PM, José Luis Cetina <
> maxtorz...@gmail.com
> > > >wrote:
> > >
> > > > Congrats. Howard. Just FYI tomee logs the ejb "path" of all yours
> ejbs
> > > > deployed and is not necesary to implement an interface for use jndi.
> > > >
> > > > Good to see that you got a solution.
> > > >
> > > > Regards.
> > > > El 13/04/2013 19:58, "Howard W. Smith, Jr." 
> > > > escribió:
> > > >
> > > > > On Sat, Apr 13, 2013 at 1:00 PM, José Luis Cetina <
> > > maxtorz...@gmail.com
> > > > > >wrote:
> > > > >
> > > > > > When i dont want to use codi I use jndi lookup, it is to easy to
> > use
> > > > and
> > > > > > portable. I create a simple method for retrive my ejbs without
> > using
> > > > codi
> > > > > > instead i use jndi using only the name of the ejb class.
> > > > > > El 13/04/2013 11:45, "Howard W. Smith, Jr." <
> > smithh032...@gmail.com>
> > > > > > escribió:
> > > > > >
> > > > > >
> > > > > José,
> > > > >
> > > > > JNDI works, thank you!  This was the first time I 'ever' had to use
> > > JNDI
> > > > > lookup. I had to research it (search google, look at TomEE
> examples -
> > > ejb
> > > > > reference[1][2][3], surely did not want to create an 'interface',
> > kept
> > > > > looking, looked at tomee log, as i know it lists all @EJBs at
> startup
> > > in
> > > > > the log, didn't see what i was looking for, so i looked at
> > RI/Glassfish
> > > > > log, since i 'remembered' that RI/Glassfish mentions the JNDI
> lookup
> > > path
> > > > > for all my @EJB's in the glassfish log at 'startup' of my app)...
> > > > >
> > > > > So, per an oracle blog[4][5] about JNDI lookup and what i saw in
> > > > glassfish
> > > > > log (12/9/2012 was last time i used glassfish to start my
> > > app...smile), I
> > > > > modified the @Singleton @Lock(READ) bean, accordingly (see code
> > below),
> > > > > tested it, and voila, it works :)
> > > > >
> > > > >
> > > > > /*
> > > > >  * To change this template, choose Tools | Templates
> > > > >  * and open the template in the editor.
> > > > >  */
> > > > > package converter;
> > > > >
> > > > > import java.util.concurrent.TimeUnit;
> > > > >
> > > > > import javax.ejb.AccessTimeout;
> > > > > import javax.ejb.Lock;
> > > > > import javax.ejb.Lock

Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
Maybe could be a request for Rommain, i remember that tomee logs some info
about ejb but im not sure what exactly.

By the way i saw that you return null in your converters catch "statement".
Why dont throw a converterexception?
El 13/04/2013 20:37, "Howard W. Smith, Jr." 
escribió:

> It would be nice if TomEE 'logs' the JNDI lookup path as the Reference
> Implementation (Glassfish) does! I had to say that. :)
>
>
> On Sat, Apr 13, 2013 at 9:34 PM, José Luis Cetina  >wrote:
>
> > Congrats. Howard. Just FYI tomee logs the ejb "path" of all yours ejbs
> > deployed and is not necesary to implement an interface for use jndi.
> >
> > Good to see that you got a solution.
> >
> > Regards.
> > El 13/04/2013 19:58, "Howard W. Smith, Jr." 
> > escribió:
> >
> > > On Sat, Apr 13, 2013 at 1:00 PM, José Luis Cetina <
> maxtorz...@gmail.com
> > > >wrote:
> > >
> > > > When i dont want to use codi I use jndi lookup, it is to easy to use
> > and
> > > > portable. I create a simple method for retrive my ejbs without using
> > codi
> > > > instead i use jndi using only the name of the ejb class.
> > > > El 13/04/2013 11:45, "Howard W. Smith, Jr." 
> > > > escribió:
> > > >
> > > >
> > > José,
> > >
> > > JNDI works, thank you!  This was the first time I 'ever' had to use
> JNDI
> > > lookup. I had to research it (search google, look at TomEE examples -
> ejb
> > > reference[1][2][3], surely did not want to create an 'interface', kept
> > > looking, looked at tomee log, as i know it lists all @EJBs at startup
> in
> > > the log, didn't see what i was looking for, so i looked at RI/Glassfish
> > > log, since i 'remembered' that RI/Glassfish mentions the JNDI lookup
> path
> > > for all my @EJB's in the glassfish log at 'startup' of my app)...
> > >
> > > So, per an oracle blog[4][5] about JNDI lookup and what i saw in
> > glassfish
> > > log (12/9/2012 was last time i used glassfish to start my
> app...smile), I
> > > modified the @Singleton @Lock(READ) bean, accordingly (see code below),
> > > tested it, and voila, it works :)
> > >
> > >
> > > /*
> > >  * To change this template, choose Tools | Templates
> > >  * and open the template in the editor.
> > >  */
> > > package converter;
> > >
> > > import java.util.concurrent.TimeUnit;
> > >
> > > import javax.ejb.AccessTimeout;
> > > import javax.ejb.Lock;
> > > import javax.ejb.LockType;
> > > import javax.ejb.Singleton;
> > >
> > > import javax.faces.component.UIComponent;
> > > import javax.faces.context.FacesContext;
> > > import javax.faces.convert.Converter;
> > > import javax.faces.convert.FacesConverter;
> > >
> > > import javax.naming.InitialContext;
> > >
> > > import jpa.entities.Customer;
> > > import jpa.session.CustomerFacade;
> > >
> > >
> > > @Singleton
> > > @Lock(LockType.READ)
> > > @AccessTimeout(value = 1, unit = TimeUnit.MINUTES)
> > > @FacesConverter(forClass = Customer.class)
> > > public class CustomerConverter implements Converter {
> > >
> > > public CustomerConverter() {
> > >
> > > }
> > >
> > > public Object getAsObject(FacesContext facesContext, UIComponent
> > > component, String value) {
> > > if (value == null || value.length() == 0) {
> > > return null;
> > > }
> > > /*
> > >  * 2012-07-10 when user enters invalid/incomplete value (e.g.
> > > "irene", see below) in AutoComplete
> > >  *
> > > WARNING: For input string: "irene"
> > > java.lang.NumberFormatException: For input string: "irene"
> > > at
> > >
> > >
> >
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> > > at java.lang.Integer.parseInt(Integer.java:492)
> > > at java.lang.Integer.valueOf(Integer.java:582)
> > > ...
> > > ...
> > > at
> > >
> > >
> >
> org.primefaces.component.autocomplete.AutoCompleteRenderer.getConvertedValue(AutoCompleteR

Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
Congrats. Howard. Just FYI tomee logs the ejb "path" of all yours ejbs
deployed and is not necesary to implement an interface for use jndi.

Good to see that you got a solution.

Regards.
El 13/04/2013 19:58, "Howard W. Smith, Jr." 
escribió:

> On Sat, Apr 13, 2013 at 1:00 PM, José Luis Cetina  >wrote:
>
> > When i dont want to use codi I use jndi lookup, it is to easy to use and
> > portable. I create a simple method for retrive my ejbs without using codi
> > instead i use jndi using only the name of the ejb class.
> > El 13/04/2013 11:45, "Howard W. Smith, Jr." 
> > escribió:
> >
> >
> José,
>
> JNDI works, thank you!  This was the first time I 'ever' had to use JNDI
> lookup. I had to research it (search google, look at TomEE examples - ejb
> reference[1][2][3], surely did not want to create an 'interface', kept
> looking, looked at tomee log, as i know it lists all @EJBs at startup in
> the log, didn't see what i was looking for, so i looked at RI/Glassfish
> log, since i 'remembered' that RI/Glassfish mentions the JNDI lookup path
> for all my @EJB's in the glassfish log at 'startup' of my app)...
>
> So, per an oracle blog[4][5] about JNDI lookup and what i saw in glassfish
> log (12/9/2012 was last time i used glassfish to start my app...smile), I
> modified the @Singleton @Lock(READ) bean, accordingly (see code below),
> tested it, and voila, it works :)
>
>
> /*
>  * To change this template, choose Tools | Templates
>  * and open the template in the editor.
>  */
> package converter;
>
> import java.util.concurrent.TimeUnit;
>
> import javax.ejb.AccessTimeout;
> import javax.ejb.Lock;
> import javax.ejb.LockType;
> import javax.ejb.Singleton;
>
> import javax.faces.component.UIComponent;
> import javax.faces.context.FacesContext;
> import javax.faces.convert.Converter;
> import javax.faces.convert.FacesConverter;
>
> import javax.naming.InitialContext;
>
> import jpa.entities.Customer;
> import jpa.session.CustomerFacade;
>
>
> @Singleton
> @Lock(LockType.READ)
> @AccessTimeout(value = 1, unit = TimeUnit.MINUTES)
> @FacesConverter(forClass = Customer.class)
> public class CustomerConverter implements Converter {
>
> public CustomerConverter() {
>
> }
>
> public Object getAsObject(FacesContext facesContext, UIComponent
> component, String value) {
> if (value == null || value.length() == 0) {
> return null;
> }
> /*
>  * 2012-07-10 when user enters invalid/incomplete value (e.g.
> "irene", see below) in AutoComplete
>  *
> WARNING: For input string: "irene"
> java.lang.NumberFormatException: For input string: "irene"
> at
>
> java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:492)
> at java.lang.Integer.valueOf(Integer.java:582)
> ...
> ...
> at
>
> org.primefaces.component.autocomplete.AutoCompleteRenderer.getConvertedValue(AutoCompleteRenderer.java:529)
> at
> javax.faces.component.UIInput.getConvertedValue(UIInput.java:1030)
> at javax.faces.component.UIInput.validate(UIInput.java:960)
>  *
>  */
> try {
> Integer test = getKey(value);
> } catch (java.lang.NumberFormatException e) {
> return null;
> }
> Object object = null;
> CustomerFacade ejbFacade;
> try {
> InitialContext ic = new InitialContext();
> ejbFacade = (CustomerFacade)
> ic.lookup("java:global/mcmsweb/CustomerFacade");
> if (ejbFacade == null) {
> System.err.println("CustomerConverter.getAsObject():
> ejbFacade = null)");
> return null;
> }
> } catch (Exception e) {
> System.err.println("CustomerConverter.getAsObject(): error on
> JNDI lookup of CustomerFacade");
> e.printStackTrace();
> return null;
> }
> try {
> object = ejbFacade.find(getKey(value));
> } catch (Exception e) {
> System.err.println("CustomerConverter.getAsObject(): error on
> ejbFacade.find(getKey(value))");
> e.printStackTrace();
> return null;
> }
> return object;
> }
>
> java.lang.Integer getKey(String value) {
> java.lang.Integer key;
>

Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
When i dont want to use codi I use jndi lookup, it is to easy to use and
portable. I create a simple method for retrive my ejbs without using codi
instead i use jndi using only the name of the ejb class.
El 13/04/2013 11:45, "Howard W. Smith, Jr." 
escribió:

> On Sat, Apr 13, 2013 at 12:16 PM, José Luis Cetina  >wrote:
>
> >
> > 2. The way i use the converter are in separeted classes and in each
> > converter if i need an ejb injected (limitation of jsf 2.1 this is
> "fixed"
> > in jsf 2.2 ) i use Apache CODI for get the reference of my ejb or i do a
> > lookup using jndi. Using like this way all my converters are classes
> > annotated with facesconverter that i can reuse in any jsf page using the
> > converter tag or if the component provide a converter attribute i use the
> > name of the facesconverter and with this i dont have create an instance
> of
> > the converter in any managedbean, my app have more than 40 converters in
> > this way without any problem . IMO i dont see why you want to use static
> > converter.
> >
>
> Trust me, i do 'not' want to use 'static', but it works-as-designed, right
> now. Your response/implementation is interesting. I thought that Apache
> CODI may be able to resolve this issue, but I recently removed Apache CODI
> from my project, as I didn't need it anymore, since someone else initiated
> a thread/topic about using bean manager instead of Apache CODI's bean
> manager. I'm wonder if I can use the container's bean manager instead of
> Apache CODI bean manager. I will try to implement as you mentioned above.
> Thanks Jose.
>


Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
1. About the autocomplete the "problem" that i had is that i was getting
the string value typed by the user in the converter and i was expecting to
be the id that i returned in the getasstring method of course i got an
numberformat exception because the string it wasnt the id instead it was
the string typed by the user.  But the problem was because i didnt specify
the event attritube in p:ajax after look this i just add the itemSelect
event and with this i didnt get the the string typed value in the converter
and the exception gone. As i can see, you specify the event in the ajax
tag.

2. The way i use the converter are in separeted classes and in each
converter if i need an ejb injected (limitation of jsf 2.1 this is "fixed"
in jsf 2.2 ) i use Apache CODI for get the reference of my ejb or i do a
lookup using jndi. Using like this way all my converters are classes
annotated with facesconverter that i can reuse in any jsf page using the
converter tag or if the component provide a converter attribute i use the
name of the facesconverter and with this i dont have create an instance of
the converter in any managedbean, my app have more than 40 converters in
this way without any problem . IMO i dont see why you want to use static
converter.
El 13/04/2013 10:41, "Howard W. Smith, Jr." 
escribió:

> I asked the question and answered on stackoverflow.com[1]. Conclusion, I
> decided to leave the converters defined as static and as members of the
> controller classes, since my preference is to use @FacesConverter(forClass
> = Customer.class).
>
> [1]
>
> http://stackoverflow.com/questions/15987483/singleton-lockread-to-resolve-could-not-instantiate-converter
>
>
> On Sat, Apr 13, 2013 at 10:17 AM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
> >
> > On Sat, Apr 13, 2013 at 9:58 AM, José Luis Cetina  >wrote:
> >
> >> Howard i see you have this problem using the converter with primefaces
> >> autocomplete, just for curiosity do you have a p:ajax inside of the
> >> component? If so can you paste your p:ajax tag? I comment this because i
> >> had the same problem like you but i didnt use static in my converter.
> >>
> >
> > Jose, you're right, I do get this exception when using Autocomplete with
> > p:ajax, but I also see the exception on p:inputText (for Phone #) with no
> > p:ajax, and use Save button to update/save Phone # inputText. :)
> >
> > Below, is the entire xhtml of the autocomplete component for customer.
> >
> >  > value="#{pf_ordersController.selectedCustomer}"
> > completeMethod="#{pf_customerController.complete}"
> var="c"
> > itemLabel="#{c.customerName}" itemValue="#{c}"
> > maxResults="10" queryDelay="300" size="50"
> > onblur="close()">
> >  > onstart="bui.block();" oncomplete="bui.unblock();"
> > update="@(.ui-panel) :orderEditForm:formMessages
> > :orderEditForm:_ajax_status"/>
> > 
> > 
> > 
> > 
> > 
> > 
> > 
> >
> > 
> > 
> > 
> > 
> > 
> >
> >
>


Re: @Singleton @Lock(READ) to resolve, Could not instantiate converter ...

2013-04-13 Thread José Luis Cetina
Howard i see you have this problem using the converter with primefaces
autocomplete, just for curiosity do you have a p:ajax inside of the
component? If so can you paste your p:ajax tag? I comment this because i
had the same problem like you but i didnt use static in my converter.
El 13/04/2013 08:47, "Howard W. Smith, Jr." 
escribió:

> Mike,
>
> On Sat, Apr 13, 2013 at 8:38 AM, Mike Kienenberger  >wrote:
>
> >
> > Maybe your problem is that you are missing the no-arg constructor for
> > the converter.
> > Maybe that was why it worked when it was static.
> >
>
> Interesting. I'm definitely still novice to java, especially use of
> 'static', even though i used it, primarily, for adding static strings
> throughout the app. All along, I knew that 'static' means that only one
> copy will be created/instantiated within/for the parent class.
>
> I think the static reference was added (by Netbeans, when it generated the
> code for me, back in 2011), because of the following:
>
> Below, you will see that the managed bean has a reference to a stateless
> @EJB (DAO),
>
> @ManagedBean(name = "customerController")
> @RequestScoped
> public class CustomerController implements Serializable {
>
> @EJB
> private jpa.session.CustomerFacade ejbFacade;
>
> and, the CustomerControllerConverter.getAsObject() method references the
> @EJB which is a member of the managed bean, CustomerController. See below.
>
> CustomerController controller = (CustomerController)
> facesContext.getApplication().getELResolver().
> getValue(facesContext.getELContext(), null,
> "customerController");
> return controller.ejbFacade.find(getKey(value));
>
>
>
>
> >
> > Was there additional information in java.lang.InstantiationException,
> > like a root cause?
> >
> > I'll have to take a look at that, but I see MyFaces ApplicationImpl which
> throws the exception, but haven't made my way to looking at
> java.lang.InstantiationException, just yet.
>
>
> >
> > The two things I would try are
> > 1)  move it to a separate class
> > 2) add a no-arg constructor
> >
> >
> Will try this and let you know. I think it still may be necessary to add
> the class as a 'public static' class, so there will be only one instance of
> @FacesConverter(forClass = Customer.class) during runtime.
>
>
> > I haven't really written many converters since the annotation support
> > was added, but this is what one of the few I did write looks like.
> > This was a quick proof of concept thing, so I didn't take the time to
> > debug why @FacesConverter(forClass = ) wasn't working for me but
> > instead manually specified a converter id in the one place I used the
> > converter.
> >
>
> Yeah, I really prefer not to use converter id, or I would have to go all
> throughout my xhtml and update, accordingly. Thanks.
>
> Will share any/all updates, ASAP. Thanks Mike!
>


Re: config web.xml myfaces for use with primefaces

2013-04-08 Thread José Luis Cetina
This question, is not specific of Primefaces.

If you want to use Java Server Faces, set this in your web.xml


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet

*.xhtml



2013/4/8 maurojava 

> hi all.
> Hi not understand what oaram i have to set int oweb.xml for work myfaces
> with primefaces.
>
> Please i have tried with tomee that as out.of-the box myfaces like
> implementation of JSF2 .
>
> But i have use primefaces components with it.
>
> Primefaces it use ajax for partial process of page.
>
> I have read at
> http://myfaces.apache.org/core21/myfaces-impl/webconfig.html
>
> http://myfaces.apache.org/core20/myfaces-impl/webconfig.html
>
>
> https://cwiki.apache.org/confluence/display/MYFACES/Configuration+of+special+features
>
> but i not understand what i have to set .
> I use also openwebbeans for the managedbean with cdi.
>
> Mauro
>
>
>
>
> --
> View this message in context:
> http://myfaces.10567.n7.nabble.com/config-web-xml-myfaces-for-use-with-primefaces-tp114536.html
> Sent from the MyFaces - Users mailing list archive at Nabble.com.
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: AW: Re: [CODI] CODI jar in ear/lib with a WAR = fail in WebSphere v8.5

2013-01-18 Thread José Luis Cetina
Just for test.  Try to put codi dependencies in each webapp lib and not in
ear lib.
El 18/01/2013 02:07, "Thomas Herzog"  escribió:

> Here I sent you our config:
>
> ** **
>
> **1.   **application_xml_initilaize_in_order: we faced the iisue that
> codi wont start properly when the wars are not initialized in order.
>
> **2.   **application_xml_war_order: we ha to initiliaze the new war
> first because it uses codi, jsf, cdi and so on.
>
> **3.   **deployment_xml_classloader_policy: single classloader, new
> war PARENT_LAST, rest PARENT_FIRST
>
> **4.   **ear_lib: contains all of our for all projects accessible
> used util jars.
>
> **5.   **new_war_web_inf_lib: contains all jars only the new war
> needs access to.
>
> **6.   **websphere_ear_classloader_deployed: See the classloader of
> the ear on websphere when its deployed.
>
> ** **
>
> We needed some time to get codi running because of classloading issues and
> startup of codi.
>
> Hopefully this will help you J
>
> ** **
>
> Mit freundlichen Grüßen
>
> ** **
>
> Thomas Herzog
>
> Softwareentwicklung
>
> ** **
>
> curecomp Software Services GmbH
>
> Hafenstrasse 47-51
>
> 4020 Linz
>
> ** **
>
> web: www.curecomp.com
>
> e-Mail: t.her...@curecomp.com
>
> tel: +43 (0)732 9015-5563
>
> mobile: +43 (0)664 8867 9829
>
> ** **
>
> ** **
>
> ** **
>
> ** **
>
> -Ursprüngliche Nachricht-
> Von: titou10 titou10 [mailto:titou10.tito...@gmail.com]
> Gesendet: Donnerstag, 17. Jänner 2013 22:51
> An: MyFaces Discussion
> Betreff: Re: Re: [CODI] CODI jar in ear/lib with a WAR = fail in WebSphere
> v8.5
>
> ** **
>
> I was copied  in my previous mail...
>
> ** **
>
> "Avoid trouble: CDI is only supported with the default WebSphere
> Application Server class loader policy, Class loader for each WAR file in
> application, and not with the alternative, single class loader for
> application setting."
>
> ** **
>
>
> http://pic.dhe.ibm.com/infocenter/wasinfo/v8r5/index.jsp?topic=%2Fcom.ibm.websphere.nd.multiplatform.doc%2Fae%2Fcweb_cdi.html
> 
>
> ** **
>
> 2013/1/17 Thomas Herzog :
>
> >** **
>
> > I have read the doc in the link you have added but i dot not see your
> problem clear. Please copy paste the part you mean it says only classloader
> policy module is supportet by cdi.
>
> >** **
>
> >** **
>
> >** **
>
> > Send via Samsung Galaxy S2titou10 titou10  **
> **
>
> > hat geschrieben:-  PARENT_FIRST on all classloaders: same here
>
> > - In the very simple ear described before, we just have 1 war module ***
> *
>
> > and the codi jar in ear/lib. The application does not start. There is **
> **
>
> > no CNF or unsatisfied link exceptions. Just the NPE in 
>
> > JsfRequestLifecycleBroadcaster due to "this.phaseEvent" being null.
>
> > Using "WAR classloader policy" to "application" make it to start but ***
> *
>
> > it is not supported by "CDI in WebSphere". Sorry for my previous 
>
> > statement that was not clear, on the page in the WAS infocenter given **
> **
>
> > previously. The is not supported by "CDI in WebSphere" as stated in 
>
> > the link given previsouly, this is what I meant in my first post 
>
> > (sorry for my previous statement that was not clear) . Only "WAR 
>
> > classloader policy = module" is supported: (Quote from infocenter) 
>
> > "Avoid trouble: CDI is only supported with the default WebSphere 
>
> > Application Server class loader policy, Class loader for each WAR file *
> ***
>
> > in application, and not with the alternative, single class loader for **
> **
>
> > application setting."
>
> > - in this scenario, no need to change the WAR/manifest.mf file as the **
> **
>
> > codi jar file is in ear/lib and there is no other dependent jar at the *
> ***
>
> > "root" level of the ear
>
> >** **
>
> > I'm very interested in seeing the way your app is packaged. I can also *
> ***
>
> > send you our very simple ear file
>
> >** **
>
> > Q: In your your apps, do you use "WAR classloader policy =application"**
> **
>
> > (=1 classloader) or "=Module" (2 classloaders).
>
> >** **
>
> > The exception:
>
> > Caused by: java.lang.NullPointerException
>
> > at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.JsfRequestLifecycleBroadcaster.broadcastBeforeEvent(JsfRequestLifecycleBroadcaster.java:58)
> 
>
> > at
> org.apache.myfaces.extensions.cdi.jsf.impl.listener.phase.JsfRequestLifecyclePhaseListener.beforePhase(JsfRequestLifecyclePhaseListener.java:56)
> 
>
> > at
> org.apache.myfaces.lifecycle.PhaseListenerManager.informPhaseListenersBefore(PhaseListenerManager.java:76)
> 
>
> > at
> org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:159)
> 
>
> > ... 29 more
>
> >** **
>
> > 2013/1/17 Thomas Herzog :
>
> >>** **
>
> >> We are working on was 8.0.0.1 and are using codi and deltaspike a

Re: Migrating to CDI: @Asynchronous

2012-11-21 Thread José Luis Cetina
In my webapp i have the same issue. I need the beans.xml file in both
folders too.
Im using netbeans too.
El nov 20, 2012 1:52 PM, "Howard W. Smith, Jr." 
escribió:

> Doh, NetBeans is probably not following the specification, because NetBeans
> has squiggly line under the bean class name, and has the following as a
> tip:
>
> CDI artifact is found but there is no beans.xml file.
>
> So, to avoid this, I need to have beans.xml in WEB-INF instead of META-INF.
>
> Per what I read in Java EE 6 tutorial (CDI) and other articles online, it
> seems as though beans.xml is supposed to be placed in META-INF, if you have
> JARs that you've developed that is referenced by the app. I could be saying
> this incorrectly. :)
>
>
> On Tue, Nov 20, 2012 at 1:57 PM, Howard W. Smith, Jr. <
> smithh032...@gmail.com> wrote:
>
> > Mark,
> >
> > I confirmed and 'opted' to do the same as what you mentioned below, and
> > web app is working fine. I 'moved' beans.xml from WEB-INF to META-INF,
> and
> > app is running well, and running same as when beans.xml was in WEB-INF.
> > I'll keep beans.xml in META-INF as per your recommendation.
> >
> > *2.) I'm not using NetBeans, but it's basically the same scenario. In my
> > project I opted for only using META-INF/beans.xml and completely dropping
> > WEB-INF/beans.xml. This is perfectly fine as per the CDI spec [1].*
> >
> > Please note, (temporarily) commenting out @Asynchronous method calls in
> my
> > app most likely resolved the issue in OP.
> >
> > Thanks,
> > Howard
> >
> >
> > On Tue, Nov 20, 2012 at 10:18 AM, Mark Struberg 
> wrote:
> >
> >> Dropping OpenEJB as we are now back to core JSF and related. I don't
> want
> >> to spam them ;)
> >>
> >> 1.): each container has pros and cons. And each of them needs different
> >> workarounds in edge cases :)
> >>
> >>
> >> 2.) I'm not using NetBeans, but it's basically the same scenario. In my
> >> project I opted for only using META-INF/beans.xml and completely
> dropping
> >> WEB-INF/beans.xml. This is perfectly fine as per the CDI spec [1].
> >>
> >>
> >> >What is a good example or use case for using CDI events?
> >>
> >> Oh there are plenty! You just need to understand that CDI events !=
> >> messages. CDI events are _always_ synchronous and only get delivered to
> >> beans in currently active contexts.
> >>
> >>
> >> E.g. if you fire a CDI event and have a public @SessionScoped class User
> >> then only the contextual instance 'User' from the current session will
> >> receive the event.
> >>
> >> You can think about CDI events as a method invocation where you do not
> >> know on which (and how many) instances you invoke it.
> >>
> >>
> >> A practical use case. In our application we have a big fat menu. The
> menu
> >> content is depending on the language of the user and his privileges.
> Since
> >> this can change on a language change or if the user logs in/out, etc
> most
> >> apps always re-calculate the whole MenuItem tree from the database.
> >>
> >>
> >> What we did in our application is the following: Menu is a
> @SessionScoped
> >> cdi bean and we do NOT re-calculate the items for every request.
> Instead we
> >> fire a UserSettingsChangedEvent on each language change and
> login/logout.
> >> In the Menu bean (and a lot other places) we @Observes
> >> UserSettingsChangedEvent and reload the menu in that case.
> >>
> >>
> >> This performs vastly better and allows us to radically cache lots of
> >> things.
> >>
> >>
> >>
> >> LieGrue,
> >> strub
> >>
> >> [1] https://issues.jboss.org/browse/CDI-218
> >>
> >> >
> >> > From: "Howard W. Smith, Jr." 
> >> >To: MyFaces Discussion ; Mark Struberg <
> >> strub...@yahoo.de>
> >> >Cc: "us...@openejb.apache.org" 
> >> >Sent: Tuesday, November 20, 2012 3:56 PM
> >> >Subject: Re: Migrating to CDI: @Asynchronous
> >> >
> >> >
> >> >Mark,
> >> >
> >> >
> >> >Cool beans and agreed about @Asynchronous! Since I read about
> >> @Asynchronous on Stackoverflow.com (a post by David Blevins), I decided
> to
> >> give it a try, but I think I did read that 'asynchronous' (runnable,
> >> etc...) tasks are not all that good in web application.
> >> >
> >> >
> >> >So, while you were writing your reply, I was already commenting out the
> >> call to the @Asynchronous method, and I reverted to the synchronous
> version
> >> of the method to update Google Calendar. After adding @Asynchronous, I
> >> added some logic that works better than @Asynchronous, it will not do a
> >> google calendar update on 'every' database update; I have some strategic
> >> processing in place that brought the # of google calendar requests down
> by
> >> hundreds and even thousands on a daily average.
> >> >
> >> >
> >> >You know what? I attempted to add to META-INF as well as WEB-INF (some
> >> days ago), and I already reported (in an earlier post) that that didn't
> >> allow my web app to start in TomEE (or Glassfish, if I was still using
> >> Glassfish when I reported that earlier...smile).
> >>

Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI Managed Beans

2012-11-17 Thread José Luis Cetina
Howard please the best place for ask TomEE stuff is to suscribe:
us...@openejb.apache.org
El 17/11/2012 11:49, "Howard W. Smith, Jr." 
escribió:

> Done. I removed JUEL (and MyFaces CODI), for now, from classpath as well as
> web.xml.
>
> FYI, with respect to writeup, how to use Juel with TomEE/OpenWebBeans, I
> used instructions at the following URL:
>
> http://tandraschko.blogspot.de/2012/08/increase-your-jsf-application.html
>
>
> Before and after removing JUEL (and MyFaces CODI), I have been getting the
> following exception in the server log:
>
> Nov 17, 2012 12:35:49 PM org.apache.tomee.catalina.OpenEJBContextConfig
> processAnnotationsFile
> SEVERE: OpenEJBContextConfig.processAnnotationsFile: failed.
> java.util.regex.PatternSyntaxException: Illegal/unsupported escape sequence
> near index 3
> C:\Users\Public\NetBeansProjects\mcms\build\web\WEB-INF\classes
>^
>
> Does this mean that I should do as Jose recommended to me earlier...add
> any/all JARs to tomee /lib folder? I am deploying via NetBeans 7.2's Deploy
> option against TomEE. Should I deploy the generated WAR file, manually, by
> dropping WAR file in tomee webapps folder instead?
>
>
> On Sat, Nov 17, 2012 at 12:31 PM, Mark Struberg  wrote:
>
> > Hi Howard!
> >
> > cross-posting to openejb-dev which is the community behind TomEE.
> >
> > Juel is an Expression Language library which parses the EL expressions
> and
> > invokes the various registered ELResolvers until one of them feels
> > responsible.
> >
> > TomEE (like glassfish) contains plain tomcat which has an own EL library
> > in jasper-el.
> > Please remove juel for now. We will add it back later. also comment out
> > the expression factory context-param in your web.xml.
> >
> > I'm not sure if that helps, but via remote I can only to give you tips
> > until we found the problem.
> >
> >
> > PS: TODO we gonna write up a documentation about how to use JUEL with
> > TomEE.
> >
> >
> >
> > - Original Message -
> > > From: "Howard W. Smith, Jr." 
> > > To: MyFaces Discussion 
> > > Cc:
> > > Sent: Saturday, November 17, 2012 5:49 PM
> > > Subject: Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI
> > Managed Beans
> > >
> > > Okay, I downloaded TomEE 1.5 plus, and trying to start the app.
> > >
> > > I have the following in my web.xml:
> > >
> > > 
> > >
> > > org.apache.myfaces.EXPRESSION_FACTORY
> > >
> > > de.odysseus.el.ExpressionFactoryImpl
> > > 
> > >
> > > The error(s) below leads me to believe that I may need to remove JUEL
> > 2.2.5
> > > from my web app. Please confirm/advise.
> > >
> > > Nov 17, 2012 11:37:24 AM org.apache.catalina.loader.WebappClassLoader
> > > validateJarFile
> > > INFO:
> > >
> >
> validateJarFile(C:\Users\Public\NetBeansProjects\mcms\build\web\WEB-INF\lib\juel-2.2.5.jar)
> > > - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> > > javax/el/Expression.class
> > > Nov 17, 2012 11:37:24 AM
> > org.apache.tomee.catalina.TomEEClassLoaderEnricher
> > > validateJarFile
> > > WARNING: jar
> > >
> >
> 'C:\Users\Public\NetBeansProjects\mcms\build\web\WEB-INF\lib\transaction-api-1.1.jar'
> > > contains offending class: javax.transaction.Transaction. It will be
> > ignored.
> > >
> > >
> > > Nov 17, 2012 11:37:33 AM org.apache.openejb.cdi.CdiAppContextsService
> > > lazyStartSessionContext
> > > WARNING: Could NOT lazily initialize session context because of null
> > > RequestContext
> > > Nov 17, 2012 11:37:33 AM
> > org.apache.myfaces.webapp.AbstractFacesInitializer
> > > initFaces
> > > SEVERE: An error occured while initializing MyFaces: No
> > > javax.el.ExpressionFactory found. Please provide  in
> > > web.xml: org.apache.myfaces.EXPRESSION_FACTORY
> > > javax.faces.FacesException: No javax.el.ExpressionFactory found. Please
> > > provide  in web.xml:
> org.apache.myfaces.EXPRESSION_FACTORY
> > > at
> > >
> >
> org.apache.myfaces.webapp.FaceletsInitilializer.initContainerIntegration(FaceletsInitilializer.java:42)
> > >
> > >
> > >
> > >
> > > On Sat, Nov 17, 2012 at 11:22 AM, Gerhard Petracek <
> > > gerhard.petra...@gmail.com> wrote:
> > >
> > >>  hi jose,
> > >>
> > >> 

Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI Managed Beans

2012-11-17 Thread José Luis Cetina
Gerhard,it was a mistake i try to say Open Web Beans not WELD sorry about
that, and like you say is out of the box.


2012/11/17 Howard W. Smith, Jr. 

> Okay, I downloaded TomEE 1.5 plus, and trying to start the app.
>
> I have the following in my web.xml:
>
> 
> org.apache.myfaces.EXPRESSION_FACTORY
> de.odysseus.el.ExpressionFactoryImpl
> 
>
> The error(s) below leads me to believe that I may need to remove JUEL 2.2.5
> from my web app. Please confirm/advise.
>
> Nov 17, 2012 11:37:24 AM org.apache.catalina.loader.WebappClassLoader
> validateJarFile
> INFO:
>
> validateJarFile(C:\Users\Public\NetBeansProjects\mcms\build\web\WEB-INF\lib\juel-2.2.5.jar)
> - jar not loaded. See Servlet Spec 2.3, section 9.7.2. Offending class:
> javax/el/Expression.class
> Nov 17, 2012 11:37:24 AM org.apache.tomee.catalina.TomEEClassLoaderEnricher
> validateJarFile
> WARNING: jar
>
> 'C:\Users\Public\NetBeansProjects\mcms\build\web\WEB-INF\lib\transaction-api-1.1.jar'
> contains offending class: javax.transaction.Transaction. It will be
> ignored.
>
>
> Nov 17, 2012 11:37:33 AM org.apache.openejb.cdi.CdiAppContextsService
> lazyStartSessionContext
> WARNING: Could NOT lazily initialize session context because of null
> RequestContext
> Nov 17, 2012 11:37:33 AM org.apache.myfaces.webapp.AbstractFacesInitializer
> initFaces
> SEVERE: An error occured while initializing MyFaces: No
> javax.el.ExpressionFactory found. Please provide  in
> web.xml: org.apache.myfaces.EXPRESSION_FACTORY
> javax.faces.FacesException: No javax.el.ExpressionFactory found. Please
> provide  in web.xml: org.apache.myfaces.EXPRESSION_FACTORY
> at
>
> org.apache.myfaces.webapp.FaceletsInitilializer.initContainerIntegration(FaceletsInitilializer.java:42)
>
>
>
>
> On Sat, Nov 17, 2012 at 11:22 AM, Gerhard Petracek <
> gerhard.petra...@gmail.com> wrote:
>
> > hi jose,
> >
> > just fyi:
> > with tomee you don't need weld, because you get openwebbeans
> > out-of-the-box.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/11/17 José Luis Cetina 
> >
> > > Hi let me tell you my experience.
> > > I migrate from managedbeans + mojarra + glassfish to myfaces + WELD +
> > TomEE
> > > and now I'm so happy to did so.
> > >
> > > Now my app use:
> > > -Apache TomEE 1.5
> > > -Apache MyFaces
> > > -Apache CODI
> > > -Primefaces 3.4.2
> > > -Primefaces Mobile
> > > -Primefaces Extensions 0.6.1
> > > -PrettyFaces  3.3.3
> > > -OpenJPA 2.2
> > > -EJB
> > > -JdbcRealm for login (my own query for login using any tables in my
> mysql
> > > database).
> > > -WELD
> > > -And all the excellent Apache stuff
> > > Etc...
> > >
> > > And I'm so happy with this change, the this are more easy to config,
> use
> > > more standards, is very very fast, use myfaces and with this you can
> > forget
> > > speed issues.
> > >
> > > This project is a maven project, in netbeans 7.2.
> > >
> > > If you need some example project I can send you a simple example.
> > >
> > > I enhance my jpa entities so easy with maven plugin, run in every IDE
> and
> > > other stuff that are excellents
> > >
> > > Seriously if have the opportunity and time to migrate do it now you
> will
> > be
> > > happy.
> > >
> > > And one tip maybe you don't need CODI at the beginning. CODI can help
> in
> > > many things like type-safe navigations, security, validations,
> >  prerenders
> > > events and so on.
> > >
> > > Al most forget to tell you the easy Way for drop your jars in lib
> folder
> > > and with this decrease your war size, I remember in glassfish sometimes
> > it
> > > wasn't easy.
> > >
> > > I recommend you to be alert for changes and fixes in TomEE, because
> they
> > > fix issues and update in they trunk svn everyday.
> > >
> > > Please suscribe to TomEE mailing lists. Rommain is a great commiter guy
> > who
> > > help immediately with other people.
> > >
> > > I hope this experience can help you.
> > >
> > > SCJA. Jose Luis Cetina
> > > maxtorzito
> > >

Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI Managed Beans

2012-11-17 Thread José Luis Cetina
Hi let me tell you my experience.
I migrate from managedbeans + mojarra + glassfish to myfaces + WELD + TomEE
and now I'm so happy to did so.

Now my app use:
-Apache TomEE 1.5
-Apache MyFaces
-Apache CODI
-Primefaces 3.4.2
-Primefaces Mobile
-Primefaces Extensions 0.6.1
-PrettyFaces  3.3.3
-OpenJPA 2.2
-EJB
-JdbcRealm for login (my own query for login using any tables in my mysql
database).
-WELD
-And all the excellent Apache stuff
Etc...

And I'm so happy with this change, the this are more easy to config, use
more standards, is very very fast, use myfaces and with this you can forget
speed issues.

This project is a maven project, in netbeans 7.2.

If you need some example project I can send you a simple example.

I enhance my jpa entities so easy with maven plugin, run in every IDE and
other stuff that are excellents

Seriously if have the opportunity and time to migrate do it now you will be
happy.

And one tip maybe you don't need CODI at the beginning. CODI can help in
many things like type-safe navigations, security, validations,  prerenders
events and so on.

Al most forget to tell you the easy Way for drop your jars in lib folder
and with this decrease your war size, I remember in glassfish sometimes it
wasn't easy.

I recommend you to be alert for changes and fixes in TomEE, because they
fix issues and update in they trunk svn everyday.

Please suscribe to TomEE mailing lists. Rommain is a great commiter guy who
help immediately with other people.

I hope this experience can help you.

SCJA. Jose Luis Cetina
maxtorzito
 El 17/11/2012 06:06, "Mark Struberg"  escribió:

> Hi!
>
> If you look for docs, here they are:
>
> http://tomee.apache.org/documentation.html
>
> LieGrue,
> strub
>
>
>
>
>
>
>
> >
> > From: "Howard W. Smith, Jr." 
> >To: Mark Struberg 
> >Cc: MyFaces Discussion 
> >Sent: Saturday, November 17, 2012 1:02 PM
> >Subject: Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI Managed
> Beans
> >
> >
> >Great, thanks Mark. I did download TomEE, and looking at examples
> (referenced on same page as TomEE downloads) and I'm looking at this guide
> below to ensure I am injecting beans correctly.
> >
> >
> >http://docs.jboss.org/weld/reference/1.0.0/en-US/html/injection.html
> >
> >
> >
> >On Sat, Nov 17, 2012 at 6:50 AM, Mark Struberg  wrote:
> >
> >If you have troubles starting tomee then don't hesitate to ping us via
> IRC on irc.freenode.net in channel #openejb (tomee s hosted there).
> >>
> >>LieGrue,
> >>strub
> >>
> >>
> >>
> >>>
> >>
> >>> From: "Howard W. Smith, Jr." 
> >>>To: MyFaces Discussion ; Mark Struberg <
> strub...@yahoo.de>
> >>>Sent: Saturday, November 17, 2012 12:06 PM
> >>>Subject: Re: MyFaces 2.1.9 / Glassfish 3.1.2.2: Migrating to CDI
> Managed Beans
> >>
> >>>
> >>>
> >>>Mark,
> >>>
> >>>
> >>>Thank you for the response.
> >>>
> >>>
> >>>1. Yes, I did add an 'empty' beans.xml to WEB-INF as advised by many
> places on the internet, and the app starts up successfully. I did 'not'
> have beans.xml added to META-INF, since all of my code is in the web app (I
> created no JARs of my own). I just added beans.xml to META-INF (while
> beans.xhtml already exists in WEB-INF), attempted to start glassfish, and I
> get the following error:
> >>>
> >>>
> >>>INFO: WELD-000900 1.1.8 (Final)
> >>>SEVERE: Exception while invoking class org.glassfish.weld.WeldDeployer
> load method
> >>>java.lang.NullPointerException
> >>>at
> org.glassfish.weld.BeanDeploymentArchiveImpl.handleEntry(BeanDeploymentArchiveImpl.java:504)
> >>>at
> org.glassfish.weld.BeanDeploymentArchiveImpl.collectJarInfo(BeanDeploymentArchiveImpl.java:482)
> >>>at
> org.glassfish.weld.BeanDeploymentArchiveImpl.populate(BeanDeploymentArchiveImpl.java:422)
> >>>
> >>>
> >>>I'm sure the error above means that my web app does not need 'empty'
> beans.xml in META-INF (and WEB-INF), so I will remove beans.xml from
> META-INF.
> >>>
> >>>
> >>>2. Yes, all CDI beans (accessed via EL) have @Named annotation, and I
> am using @Inject along with Qualifiers (for classes that extend ancestor
> classes). Below are notes from what I did/completed yesterday for this
> migration:
> >>>
> >>>
> >>>Migrate from JSF Managed Beans to CDI Managed Beans
> >>>
> >>>
> >>>Replace
> >>>javax.faces.bean.ManagedBean
> >>>with
> >>>javax.inject.Named
> >>>
> >>>
> >>>replace
> >>>javax.faces.bean.ManagedProperty
> >>>with
> >>>javax.inject.Inject
> >>>
> >>>
> >>>replace
> >>>javax.faces.bean.SessionScoped
> >>>with
> >>>javax.enterprise.context.SessionScoped
> >>>
> >>>
> >>>replace
> >>>javax.faces.bean.ApplicationScoped
> >>>with
> >>>javax.enterprise.context.ApplicationScoped
> >>>
> >>>
> >>>replace
> >>>@ManagedBean(name =
> >>>with
> >>>@Named(
> >>>
> >>>
> >>>replace
> >>>@ManagedProperty("#{.*}")
> >>>with
> >>>@Inject
> >>>
> >>>
> >>>Migrated applicationScopeBean from JSF ApplicationScoped managed bean
> to EJB @Singleton with @Startup (please disregard this, since t

Re: [ANNOUNCE] MyFaces Core v2.1.9 Release

2012-09-26 Thread José Luis Cetina
Your welcome, remember when you need the same behaviour of ViewScoped with
Named beans you can try Apache CODI they both works great!!
El 26/09/2012 20:54, "Howard W. Smith, Jr." 
escribió:

> Thanks for the suggestion. Migration from Mojarra to MyFaces was completed
> weeks ago, and SessionScoped is meeting the requirement for now. Also, at
> the present, I'm not a user of Apache CODI.
>
> Thanks,
> Howard
>
> On Wed, Sep 26, 2012 at 9:51 PM, José Luis Cetina  >wrote:
>
> > Why you don't use ViewAcessScoped of Apache CODI? I use it and works well
> > with @EJB and you have your beans like viewscoped.
> > El 26/09/2012 14:16, "Howard W. Smith, Jr." 
> > escribió:
> >
> > > Leonardo,
> > >
> > > I'm glad I recently joined this user group and joined the MyFaces
> (Core)
> > > user family/group. I recently migrated from *Mojarra* 2.1.7 to
> > > *MyFaces*2.1.8, and have been pleased with the migration (and
> > > performance, most of
> > > all). A PrimeFaces user, zoigl/Thomas recommended it, and I saw some
> > blogs
> > > recommending MyFaces 2.1.7 over Mojarra 2.1.5+ for performance reasons,
> > so
> > > I jumped on it, and I have already updated my JSF/PrimeFaces/MyFaces
> app
> > > from MyFaces 2.1.8 to MyFaces 2.1.9, and all is working great and as
> > > expected/designed. :)
> > >
> > > I found the following MyFaces issue interesting when i read this
> email. I
> > > think I experienced this issue when I migrated from Mojarra 2.1.7 to
> > > MyFaces 2.1.8. Most of my beans were ViewScoped beans, but I was NOT
> > really
> > > using them as ViewScoped beans, since I was NOT using JSF navigation to
> > > navigate to different page. I have only ONE index.xhtml which contains
> > > ui:include, and pageNavigationController (bean) updates ui:include on
> > > index.xhtml all throughout the app... so my ViewScoped beans were
> really
> > > acting like or being implemented like SessionScoped beans, so when I
> > > migrated to MyFaces 2.1.8, this MyFaces 3581 defect/issue
> > caused/motivated
> > > me to change all ViewScoped beans to SessionScoped. I also had to
> define
> > > @EJB bean attributes/members in descendant classes, and that solved the
> > > problem for me. I have no regrets doing all all what I mentioned
> > > above/earlier. I'm a happy MyFaces 2.1.x  user/camper!!! I have less
> than
> > > 10 endusers (currently) accessing my JSF/PrimeFaces/MyFaces web app.
> > >
> > >  * [MYFACES-3581] - @EJB injection into a @ViewScoped bean causes CNFE
> > >
> > > Thanks,
> > > Howard
> > >
> > >
> > > On Tue, Sep 25, 2012 at 3:19 PM, Leonardo Uribe 
> > wrote:
> > >
> > > > The Apache MyFaces team is pleased to announce the release of MyFaces
> > > > Core 2.1.9.
> > > >
> > > > MyFaces Core is a JavaServer(tm) Faces 2.1 implementation as
> specified
> > > > by JSR-314. MyFaces Core has passed Sun's JSR-314 TCK and is 100%
> > > > compliant with the JSR-314 specification.
> > > >
> > > > MyFaces Core 2.1.9 is available in both binary and source
> > distributions.
> > > >
> > > > * http://myfaces.apache.org/download.html
> > > >
> > > > MyFaces Core is also available in the central Maven repository under
> > > > Group ID "org.apache.myfaces.core".
> > > >
> > > > Release Notes - MyFaces Core - Version 2.1.9
> > > >
> > > > Sub-task
> > > >
> > > > * [MYFACES-3564] - [perf] remove viewId sent inside token in
> > > > HtmlResponseStateManager
> > > > * [MYFACES-3565] - Add client side timestamp for view state
> > > expiration
> > > > * [MYFACES-3566] - Add random token option for server side state
> > > saving
> > > > * [MYFACES-3567] - [perf] do not include empty delta state array
> > > > in both client side and server side state saving
> > > > * [MYFACES-3568] - [perf] use viewId hashCode() instead full
> > > > viewId on server side state saving SerializedViewKey
> > > >
> > > > Bug
> > > >
> > > > * [MYFACES-3383] - Self nested Composite Component leads to EL
> > > > Stack Overflow
> > > > * [MYFACES-3520] - False evaluation of variables/params with the
> > > > same name (c:forEach "

Re: [ANNOUNCE] MyFaces Core v2.1.9 Release

2012-09-26 Thread José Luis Cetina
Why you don't use ViewAcessScoped of Apache CODI? I use it and works well
with @EJB and you have your beans like viewscoped.
El 26/09/2012 14:16, "Howard W. Smith, Jr." 
escribió:

> Leonardo,
>
> I'm glad I recently joined this user group and joined the MyFaces (Core)
> user family/group. I recently migrated from *Mojarra* 2.1.7 to
> *MyFaces*2.1.8, and have been pleased with the migration (and
> performance, most of
> all). A PrimeFaces user, zoigl/Thomas recommended it, and I saw some blogs
> recommending MyFaces 2.1.7 over Mojarra 2.1.5+ for performance reasons, so
> I jumped on it, and I have already updated my JSF/PrimeFaces/MyFaces app
> from MyFaces 2.1.8 to MyFaces 2.1.9, and all is working great and as
> expected/designed. :)
>
> I found the following MyFaces issue interesting when i read this email. I
> think I experienced this issue when I migrated from Mojarra 2.1.7 to
> MyFaces 2.1.8. Most of my beans were ViewScoped beans, but I was NOT really
> using them as ViewScoped beans, since I was NOT using JSF navigation to
> navigate to different page. I have only ONE index.xhtml which contains
> ui:include, and pageNavigationController (bean) updates ui:include on
> index.xhtml all throughout the app... so my ViewScoped beans were really
> acting like or being implemented like SessionScoped beans, so when I
> migrated to MyFaces 2.1.8, this MyFaces 3581 defect/issue caused/motivated
> me to change all ViewScoped beans to SessionScoped. I also had to define
> @EJB bean attributes/members in descendant classes, and that solved the
> problem for me. I have no regrets doing all all what I mentioned
> above/earlier. I'm a happy MyFaces 2.1.x  user/camper!!! I have less than
> 10 endusers (currently) accessing my JSF/PrimeFaces/MyFaces web app.
>
>  * [MYFACES-3581] - @EJB injection into a @ViewScoped bean causes CNFE
>
> Thanks,
> Howard
>
>
> On Tue, Sep 25, 2012 at 3:19 PM, Leonardo Uribe  wrote:
>
> > The Apache MyFaces team is pleased to announce the release of MyFaces
> > Core 2.1.9.
> >
> > MyFaces Core is a JavaServer(tm) Faces 2.1 implementation as specified
> > by JSR-314. MyFaces Core has passed Sun's JSR-314 TCK and is 100%
> > compliant with the JSR-314 specification.
> >
> > MyFaces Core 2.1.9 is available in both binary and source distributions.
> >
> > * http://myfaces.apache.org/download.html
> >
> > MyFaces Core is also available in the central Maven repository under
> > Group ID "org.apache.myfaces.core".
> >
> > Release Notes - MyFaces Core - Version 2.1.9
> >
> > Sub-task
> >
> > * [MYFACES-3564] - [perf] remove viewId sent inside token in
> > HtmlResponseStateManager
> > * [MYFACES-3565] - Add client side timestamp for view state
> expiration
> > * [MYFACES-3566] - Add random token option for server side state
> saving
> > * [MYFACES-3567] - [perf] do not include empty delta state array
> > in both client side and server side state saving
> > * [MYFACES-3568] - [perf] use viewId hashCode() instead full
> > viewId on server side state saving SerializedViewKey
> >
> > Bug
> >
> > * [MYFACES-3383] - Self nested Composite Component leads to EL
> > Stack Overflow
> > * [MYFACES-3520] - False evaluation of variables/params with the
> > same name (c:forEach "var" and "varStatus" should be page scoped)
> > * [MYFACES-3574] - Update of 'javax.faces.ViewState' input elements
> > fails
> > * [MYFACES-3579] - Inconsistent message order in h:messages
> > * [MYFACES-3580] - Searching for JAR in RAR by facelets Claspath
> > util causes FileNotFoundException
> > * [MYFACES-3581] - @EJB injection into a @ViewScoped bean causes CNFE
> > * [MYFACES-3583] - h:outputFormat renders unneccessary  tag
> > * [MYFACES-3584] - h:commandLink renders onclick JavaScript
> > referencing a non-existent HTML id
> > * [MYFACES-3585] - FacesContextFactoryImpl is not released in
> > FacesContextImpl.release()
> > * [MYFACES-3589] - Allow multiple resolutions of cc into the same
> > EL expression
> > * [MYFACES-3590] - AccessControlException occurs in
> > Classpath._searchDir
> > * [MYFACES-3591] - Labels with EL expressions are not shown in
> > messages if partial state saving is disabled
> > * [MYFACES-3594] - ClassCastException after application restart
> > due to UIViewParameter Renderer Cacheing
> > * [MYFACES-3597] - Wrong message indicating ri or myfaces in the
> > classpath
> > * [MYFACES-3598] - ViewExpiredException during logout after the 3rd
> > login
> > * [MYFACES-3605] - Expression ClassCastException
> >
> > Improvement
> >
> > * [MYFACES-3562] - [perf] Optimize UIOutput.saveState(FacesContext)
> > * [MYFACES-3563] - Improvements in State Saving Algorithm
> > * [MYFACES-3572] - [perf] remember initial state for properties
> > changed in normal JSF lifecycle
> > * [MYFACES-3573] - Log only once unified EL / bean validation
> presence
> > * [MYFACES-3576] - [perf] use get() over eval() for
> > UIView

Save component state

2012-08-30 Thread José Luis Cetina
Hi. I have a problem using myfaces 2.1.8 + openjpa 2.2.0 + primefaces
3.4-SNAPSHOT.

I dont know if asked this in openjpa list or here, anyway, i hope somebody
can help me.

I have 2 SelectOneMenu in a composite component(cc), this cc has a
componentType in a facescomponent class.

The first selectonemenu have a change event in the cc, when this event is
fired the second selectonemenu load data from the database.

In the facescomponent class i use statehelper to save the state of the 2
selectonemenu's, but i have a problem:

This is the scenario:

I have this in my database:

Table country:
id name
1  Spain
2  Mexico
3  USA

Table cities:
id fk name
1  3  New York
2  3  LA

When my page load the country selectonemenu show all the countries without
problem (i retrive them using openjpa),  in the cities selectonemenu's show
nothing because Spain doesnt have cities, well then if i select Mexico my
valuechangelistener method execute and load all the cities, but Mexico
doesnt have nothing in the database then again nothing showed  as expected,
then if a select USA the cities are retrived OK and they are shown in the
cities selectonemenu although if i select another city like Spain i can see
this error (my valuechangelistener never get called again):

java.lang.InstantiationException:
org.apache.openjpa.kernel.DelegatingResultList
java.lang.InstantiationException:
org.apache.openjpa.kernel.DelegatingResultList  at
java.lang.Class.newInstance0(Class.java:357)at
java.lang.Class.newInstance(Class.java:325) at
javax.faces.component.UIComponentBase.restoreAttachedState(UIComponentBase.java:1842)
   at
javax.faces.component._DeltaStateHelper.restoreState(_DeltaStateHelper.java:616)
at
javax.faces.component.UIComponentBase.restoreState(UIComponentBase.java:2021)   
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:661)
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreStateFromMap(DefaultFaceletsStateManagementStrategy.java:680)
at
org.apache.myfaces.view.facelets.DefaultFaceletsStateManagementStrategy.restoreView(DefaultFaceletsStateManagementStrategy.java:330)
at
org.apache.myfaces.application.StateManagerImpl.restoreView(StateManagerImpl.java:130)
  at
org.apache.myfaces.shared.view.ViewDeclarationLanguageBase.restoreView(ViewDeclarationLanguageBase.java:106)
at
org.apache.myfaces.view.facelets.FaceletViewDeclarationLanguage.restoreView(FaceletViewDeclarationLanguage.java:2109)
   at
org.apache.myfaces.application.ViewHandlerImpl.restoreView(ViewHandlerImpl.java:300)
at
com.ocpsoft.pretty.faces.application.PrettyViewHandler.restoreView(PrettyViewHandler.java:109)
  at
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.WindowContextAwareViewHandler.restoreView(WindowContextAwareViewHandler.java:122)
 at
org.apache.myfaces.extensions.cdi.jsf.impl.CodiViewHandler.restoreView(CodiViewHandler.java:99)
 at
javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
  at
javax.faces.application.ViewHandlerWrapper.restoreView(ViewHandlerWrapper.java:83)
  at
org.apache.myfaces.lifecycle.RestoreViewExecutor.execute(RestoreViewExecutor.java:127)
  at
org.apache.myfaces.lifecycle.LifecycleImpl.executePhase(LifecycleImpl.java:170) 
at
org.apache.myfaces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:117)  
at
org.apache.myfaces.extensions.cdi.jsf2.impl.listener.phase.CodiLifecycleWrapper.execute(CodiLifecycleWrapper.java:95)
   at
javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)  at
org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:305)
   at
org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
   at
com.ocpsoft.pretty.PrettyFilter.doFilter(PrettyFilter.java:145) 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:225)
 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:472)
  at
org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)   
at
org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
at
org.apache.catalina.valves.AccessLogValve.invoke(AccessL

JSF Facescomponent change reference value

2012-07-25 Thread José Luis Cetina
I pass a string reference to my composite component with the value =
ORIGINAL VALUE, then my composite component have a button, this button
change the original value to = HERE IM SETTING A NEW VALUE, then when
i press my button in my "normal page: page.xhtml for review it",the
value still without any change (ORIGINAL VALUE), why this happend, if
my string is pass as a reference because is an object, what im doing
wrong?

Resume:

1. I pass a String (as attribute to my composite component) with the
value: ORIGINAL VALUE
2. Then in the composite component i get this attribute and change it
to =HERE IM SETTING A NEW VALUE
3. When i review the value in page.xhtml i see again ORIGINAL VALUE
(not expected)
4. If i review my value in my composite component i have:HERE IM
SETTING A NEW VALUE

I try to set my Bean to RequestScoped, ViewAccessScoped and
SessionScoped and the problem is the same.

Here is an example:

My composite component: myComponent.xhtml

 http://www.w3.org/1999/xhtml";
  xmlns:p="http://primefaces.org/ui";
  xmlns:cc="http://java.sun.com/jsf/composite";
  xmlns:ui="http://java.sun.com/jsf/facelets";
  xmlns:h="http://java.sun.com/jsf/html";>










My FacesComponent Class:

@FacesComponent(value="myComponent")
 public class MyComponent extends UINamingContainer  {
   public void changeStringValue(ActionEvent e){
 String originalValue = (String) getAttributes().get("myString");
 //Here i change the value
 originalValue = "HERE IM SETTING A NEW VALUE";
   }
 }
My page.xhtml


 
 


ManagedBean:

@Named
@ViewAccessScoped
public void MyBean implements Serializable{
   public String myString = "ORIGINAL VALUE";

   public void showValue(ActionEvent e){
//why here i see ORIGINAL VALUE if my component change the reference value??
 System.out.println("Value: "+myString);
   }

  //setters and getters...
}



What im doing wrong???


Re: Re: Custom tag

2012-07-13 Thread José Luis Cetina
Well i think is a problem with Netbeans, because although netbeans
display: The attribute targetAttributeName is not defined in the
component attribute, it works.

Thanks

2012/7/13 José Luis Cetina :
> Here is what i have:
>
> http://www.w3.org/1999/xhtml";
>   xmlns:h="http://java.sun.com/jsf/html";
>   xmlns:f="http://java.sun.com/jsf/core";
>   xmlns:p="http://primefaces.org/ui";
>   xmlns:kx="http://java.sun.com/jsf/composite/componentes";
>   xmlns:cc="http://java.sun.com/jsf/composite";>
>
> 
> 
>   
> 
> ..
>
> I see this:  "The component library Composite Components does not
> contain component targetAttributeName"
>
> As i can see i dont have the targetAttributeName and clientBehaviour
> attributes, why?
>
> pom.xml:
>
>  
> org.apache.myfaces.core
> myfaces-bundle
> 2.1.8
> provided
> 
>
>
> Using Netbeans 7.1
>
> 2012/7/6 José Luis Cetina :
>> Here is what i have:
>>
>> http://www.w3.org/1999/xhtml";
>>   xmlns:h="http://java.sun.com/jsf/html";
>>   xmlns:f="http://java.sun.com/jsf/core";
>>   xmlns:p="http://primefaces.org/ui";
>>   xmlns:kx="http://java.sun.com/jsf/composite/componentes";
>>   xmlns:cc="http://java.sun.com/jsf/composite";>
>>
>> 
>> 
>>   
>> 
>> ..
>>
>> I see this:  "The component library Composite Components does not
>> contain component targetAttributeName"
>>
>> As i can see i dont have the targetAttributeName and clientBehaviour
>> attributes, why?
>>
>> pom.xml:
>>
>>  
>> org.apache.myfaces.core
>> myfaces-bundle
>> 2.1.8
>> provided
>> 
>>
>>
>> Using Netbeans 7.1
>>
>>
>> 2012/7/6 José Luis Cetina :
>>> I saw you example before, but i get confused when i try yo use the
>>> targetAttributeName, in my xhtml says:
>>> "The attribute targetAttributeName is not defined in the component 
>>> attribute"
>>>
>>> Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version).
>>>
>>>
>>> Why targetAttributeName is not defined? what im doing wrong?
>>>
>>> 2012/7/6 Leonardo Uribe :
>>>> Hi
>>>>
>>>> For that case, in JSF 2.1 a new attribute for cc:attribute was added
>>>> called targetAttributeName. For example:
>>>>
>>>> >>> submitAction2="testActionMethodTypeSubmit"
>>>> cancelAction="#{bean.cancelAction}">
>>>> >>> binding="#{bean.submitActionListener}"/>
>>>> >>> binding="#{bean.cancelActionListener}"/>
>>>> 
>>>>
>>>> testComposite:compositeActionTargetAttributeName.xhtml
>>>>
>>>> 
>>>>   >>> targetAttributeName="submitAction" method-signature="java.lang.Object
>>>> action()"/>
>>>>   >>> method-signature="java.lang.Object action()"/>
>>>>   
>>>>   
>>>> 
>>>> 
>>>>   
>>>> 
>>>>
>>>> actionTargetAttributeName.xhtml
>>>>
>>>> 
>>>>   >>> targetAttributeName="action" method-signature="java.lang.Object
>>>> action()"/>
>>>>   >>> method-signature="java.lang.Object action()"/>
>>>>   
>>>>   
>>>> 
>>>> 
>>>>   
>>>>   
>>>> 
>>>>
>>>> This is an example using two composite components from the test case.
>>>> I think it is enough to put targetAttributeName="action", there is no
>>>> need to add the method signature, I don't remember well, but I hope
>>>> you get the idea.
>>>>
>>>> The problem described with clientBehavior sounds something different.
>>>> Maybe one client behavior overrides the other one, but it doesn't
>>>> sound like a bug. I don't know the details behind primefaces to say
>>>> something about it, my first guess could be check if  primefaces ajax
>>>> is a "real" ClientBehavior, or its renderers do 

Re: Re: Custom tag

2012-07-13 Thread José Luis Cetina
Here is what i have:

http://www.w3.org/1999/xhtml";
  xmlns:h="http://java.sun.com/jsf/html";
  xmlns:f="http://java.sun.com/jsf/core";
  xmlns:p="http://primefaces.org/ui";
  xmlns:kx="http://java.sun.com/jsf/composite/componentes";
  xmlns:cc="http://java.sun.com/jsf/composite";>



  

..

I see this:  "The component library Composite Components does not
contain component targetAttributeName"

As i can see i dont have the targetAttributeName and clientBehaviour
attributes, why?

pom.xml:

 
org.apache.myfaces.core
myfaces-bundle
    2.1.8
        provided



Using Netbeans 7.1

2012/7/6 José Luis Cetina :
> Here is what i have:
>
> http://www.w3.org/1999/xhtml";
>   xmlns:h="http://java.sun.com/jsf/html";
>   xmlns:f="http://java.sun.com/jsf/core";
>   xmlns:p="http://primefaces.org/ui";
>   xmlns:kx="http://java.sun.com/jsf/composite/componentes";
>   xmlns:cc="http://java.sun.com/jsf/composite";>
>
> 
> 
>   
> 
> ..
>
> I see this:  "The component library Composite Components does not
> contain component targetAttributeName"
>
> As i can see i dont have the targetAttributeName and clientBehaviour
> attributes, why?
>
> pom.xml:
>
>  
> org.apache.myfaces.core
> myfaces-bundle
> 2.1.8
> provided
> 
>
>
> Using Netbeans 7.1
>
>
> 2012/7/6 José Luis Cetina :
>> I saw you example before, but i get confused when i try yo use the
>> targetAttributeName, in my xhtml says:
>> "The attribute targetAttributeName is not defined in the component attribute"
>>
>> Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version).
>>
>>
>> Why targetAttributeName is not defined? what im doing wrong?
>>
>> 2012/7/6 Leonardo Uribe :
>>> Hi
>>>
>>> For that case, in JSF 2.1 a new attribute for cc:attribute was added
>>> called targetAttributeName. For example:
>>>
>>> >> submitAction2="testActionMethodTypeSubmit"
>>> cancelAction="#{bean.cancelAction}">
>>> >> binding="#{bean.submitActionListener}"/>
>>> >> binding="#{bean.cancelActionListener}"/>
>>> 
>>>
>>> testComposite:compositeActionTargetAttributeName.xhtml
>>>
>>> 
>>>   >> targetAttributeName="submitAction" method-signature="java.lang.Object
>>> action()"/>
>>>   >> method-signature="java.lang.Object action()"/>
>>>   
>>>   
>>> 
>>> 
>>>   
>>> 
>>>
>>> actionTargetAttributeName.xhtml
>>>
>>> 
>>>   >> targetAttributeName="action" method-signature="java.lang.Object
>>> action()"/>
>>>   >> method-signature="java.lang.Object action()"/>
>>>   
>>>   
>>> 
>>> 
>>>   
>>>   
>>> 
>>>
>>> This is an example using two composite components from the test case.
>>> I think it is enough to put targetAttributeName="action", there is no
>>> need to add the method signature, I don't remember well, but I hope
>>> you get the idea.
>>>
>>> The problem described with clientBehavior sounds something different.
>>> Maybe one client behavior overrides the other one, but it doesn't
>>> sound like a bug. I don't know the details behind primefaces to say
>>> something about it, my first guess could be check if  primefaces ajax
>>> is a "real" ClientBehavior, or its renderers do something under
>>> curtains, which is possible because after all, in that library you can
>>> add effects using component properties, and that's not possible
>>> without tweak p:ajax and the component renderers somehow. Note I'm
>>> speculating here.
>>>
>>> regards,
>>>
>>> Leonardo Uribe
>>>
>>> 2012/7/5 Thomas Herzog :
>>>>
>>>> I do have a simular problem with clientBehavor and primefaces ajax tag.
>>>> When a clientBehavor is defined in the composite component and in the view
>>>> the composite component is use

Re: Re: Custom tag

2012-07-06 Thread José Luis Cetina
Here is what i have:

http://www.w3.org/1999/xhtml";
  xmlns:h="http://java.sun.com/jsf/html";
  xmlns:f="http://java.sun.com/jsf/core";
  xmlns:p="http://primefaces.org/ui";
  xmlns:kx="http://java.sun.com/jsf/composite/componentes";
  xmlns:cc="http://java.sun.com/jsf/composite";>



  

..

I see this:  "The component library Composite Components does not
contain component targetAttributeName"

As i can see i dont have the targetAttributeName and clientBehaviour
attributes, why?

pom.xml:

 
org.apache.myfaces.core
myfaces-bundle
2.1.8
        provided



Using Netbeans 7.1


2012/7/6 José Luis Cetina :
> I saw you example before, but i get confused when i try yo use the
> targetAttributeName, in my xhtml says:
> "The attribute targetAttributeName is not defined in the component attribute"
>
> Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version).
>
>
> Why targetAttributeName is not defined? what im doing wrong?
>
> 2012/7/6 Leonardo Uribe :
>> Hi
>>
>> For that case, in JSF 2.1 a new attribute for cc:attribute was added
>> called targetAttributeName. For example:
>>
>> > submitAction2="testActionMethodTypeSubmit"
>> cancelAction="#{bean.cancelAction}">
>> > binding="#{bean.submitActionListener}"/>
>> > binding="#{bean.cancelActionListener}"/>
>> 
>>
>> testComposite:compositeActionTargetAttributeName.xhtml
>>
>> 
>>   > targetAttributeName="submitAction" method-signature="java.lang.Object
>> action()"/>
>>   > method-signature="java.lang.Object action()"/>
>>   
>>   
>> 
>> 
>>   
>> 
>>
>> actionTargetAttributeName.xhtml
>>
>> 
>>   > targetAttributeName="action" method-signature="java.lang.Object
>> action()"/>
>>   > method-signature="java.lang.Object action()"/>
>>   
>>   
>> 
>> 
>>   
>>   
>> 
>>
>> This is an example using two composite components from the test case.
>> I think it is enough to put targetAttributeName="action", there is no
>> need to add the method signature, I don't remember well, but I hope
>> you get the idea.
>>
>> The problem described with clientBehavior sounds something different.
>> Maybe one client behavior overrides the other one, but it doesn't
>> sound like a bug. I don't know the details behind primefaces to say
>> something about it, my first guess could be check if  primefaces ajax
>> is a "real" ClientBehavior, or its renderers do something under
>> curtains, which is possible because after all, in that library you can
>> add effects using component properties, and that's not possible
>> without tweak p:ajax and the component renderers somehow. Note I'm
>> speculating here.
>>
>> regards,
>>
>> Leonardo Uribe
>>
>> 2012/7/5 Thomas Herzog :
>>>
>>> I do have a simular problem with clientBehavor and primefaces ajax tag.
>>> When a clientBehavor is defined in the composite component and in the view
>>> the composite component is used with primefaces ajax then the clientBehavior
>>> is not added to the component but will added with faclet ajax.
>>> Did anyone face this ?
>>> Is there anything to be aware of maybe naming convention of the
>>> clienBehavior name ?
>>> I tried this with an trivial example with nothing defined but clientBehavior
>>> and i cannot get this work. We need the callback parameter provided by
>>> primefaces ajax tag.
>>> Is that an myfaces issue or primefaces related ?
>>>
>>> Websphere 8.0.0.1
>>> Myfaces 2.1.1 (i guess )
>>> Primefaces 3.1
>>>
>>>
>>>
>>> Send via Samsung Galaxy S2
>>>
>>>
>>>
>>>  Ursprüngliche Nachricht 
>>> Betreff: Re: Custom tag
>>> Von: José Luis Cetina 
>>> An: MyFaces Discussion ,Rafael Pestano
>>> 
>>> CC:
>>>
>>>
>
>
>
> --
> ---
> SCJA. José Luis Cetina
> ---



-- 
---
SCJA. José Luis Cetina
---


Re: Re: Custom tag

2012-07-06 Thread José Luis Cetina
I saw you example before, but i get confused when i try yo use the
targetAttributeName, in my xhtml says:
"The attribute targetAttributeName is not defined in the component attribute"

Im using MyFaces 2.1.8 with TomEE 1.0.0 (trunk updated version).


Why targetAttributeName is not defined? what im doing wrong?

2012/7/6 Leonardo Uribe :
> Hi
>
> For that case, in JSF 2.1 a new attribute for cc:attribute was added
> called targetAttributeName. For example:
>
>  submitAction2="testActionMethodTypeSubmit"
> cancelAction="#{bean.cancelAction}">
>  binding="#{bean.submitActionListener}"/>
>  binding="#{bean.cancelActionListener}"/>
> 
>
> testComposite:compositeActionTargetAttributeName.xhtml
>
> 
>targetAttributeName="submitAction" method-signature="java.lang.Object
> action()"/>
>method-signature="java.lang.Object action()"/>
>   
>   
> 
> 
>   
> 
>
> actionTargetAttributeName.xhtml
>
> 
>targetAttributeName="action" method-signature="java.lang.Object
> action()"/>
>method-signature="java.lang.Object action()"/>
>   
>   
> 
> 
>   
>   
> 
>
> This is an example using two composite components from the test case.
> I think it is enough to put targetAttributeName="action", there is no
> need to add the method signature, I don't remember well, but I hope
> you get the idea.
>
> The problem described with clientBehavior sounds something different.
> Maybe one client behavior overrides the other one, but it doesn't
> sound like a bug. I don't know the details behind primefaces to say
> something about it, my first guess could be check if  primefaces ajax
> is a "real" ClientBehavior, or its renderers do something under
> curtains, which is possible because after all, in that library you can
> add effects using component properties, and that's not possible
> without tweak p:ajax and the component renderers somehow. Note I'm
> speculating here.
>
> regards,
>
> Leonardo Uribe
>
> 2012/7/5 Thomas Herzog :
>>
>> I do have a simular problem with clientBehavor and primefaces ajax tag.
>> When a clientBehavor is defined in the composite component and in the view
>> the composite component is used with primefaces ajax then the clientBehavior
>> is not added to the component but will added with faclet ajax.
>> Did anyone face this ?
>> Is there anything to be aware of maybe naming convention of the
>> clienBehavior name ?
>> I tried this with an trivial example with nothing defined but clientBehavior
>> and i cannot get this work. We need the callback parameter provided by
>> primefaces ajax tag.
>> Is that an myfaces issue or primefaces related ?
>>
>> Websphere 8.0.0.1
>> Myfaces 2.1.1 (i guess )
>> Primefaces 3.1
>>
>>
>>
>> Send via Samsung Galaxy S2
>>
>>
>>
>>  Ursprüngliche Nachricht 
>> Betreff: Re: Custom tag
>> Von: José Luis Cetina 
>> An: MyFaces Discussion ,Rafael Pestano
>> 
>> CC:
>>
>>



-- 
---
SCJA. José Luis Cetina
---


Re: Custom tag

2012-07-05 Thread José Luis Cetina
Hi leonardo, this example works:

You can try the alternate syntax using "targets". For example:








but what about whit this:










Im triying to use the the action attribute




this doesnt work (myaction2 never been invoke) i guess because the
name of attribute is action2 an not action, but i already use action
attribute for my first button, how can i resolve this?

I want to have 2 buttons in my composite component, then my 2 buttons
can have action method (using the attributes).

Thanks



2012/6/29 Rafael Pestano :
> you're welcome. Leonardo's approach is the solution, what i proposed was more 
> like a workaround ;)
>
>
>
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> http://code.google.com/p/jsf-conventions-framework/
> http://rpestano.wordpress.com
> http://twitter.com/realpestano
>
>
>
> 
> De: José Luis Cetina 
> Para: MyFaces Discussion 
> Enviadas: Sexta-feira, 29 de Junho de 2012 12:02
> Assunto: Re: Custom tag
>
> Thanks Rafael and Leonardo.
>
> Its very easy with target, this solution is best in my opinion.
>
> Works.
>
> Thanks again
>
> 2012/6/29 Leonardo Uribe :
>> Hi
>>
>> You can try the alternate syntax using "targets". For example:
>>
>> 
>>
>> 
>> 
>>
>> 
>>
>> Instead use EL, you can use the id hierarchy to locate the component.
>> In this case, there will not be NullPointerException, because only if
>> the property is set, the value is assigned. I have tested both syntax
>> in MyFaces with tons of tests:
>>
>> http://svn.apache.org/repos/asf/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/
>>
>> and it works without problem.
>>
>> regards,
>>
>> Leonardo Uribe
>>
>> 2012/6/29 Rafael Pestano :
>>> again,
>>>
>>> 
>>>
>>> >> value="Ok" rendered="#{not empty cc.attrs.action and empty 
>>> cc.attrs.actionListener}"
>>> action="#{cc.attrs.action}"
>>> />
>>>
>>>
>>>   >> value="Ok" rendered="#{not empty cc.attrs.actionListener 
>>> and empty cc.attrs.action}"
>>> actionListener="#{cc.attrs.actionListener}"
>>> />
>>>
>>>   >> value="Ok" rendered="#{not empty cc.attrs.actionListener 
>>> and not empty cc.attrs.action}"
>>> actionListener="#{cc.attrs.actionListener}"
>>>  action="#{cc.attrs.action}"
>>> />
>>>
>>> 
>>>
>>>
>>> Att,
>>> Rafael M. Pestano
>>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>>> Graduando em Ciência da Computação UFRGS
>>> http://code.google.com/p/jsf-conventions-framework/
>>> http://rpestano.wordpress.com
>>> http://twitter.com/realpestano
>>>
>>>
>>>
>>> - Mensagem original -
>>> De: Rafael Pestano 
>>> Para: MyFaces Discussion 
>>> Cc:
>>> Enviadas: Quinta-feira, 28 de Junho de 2012 23:12
>>> Assunto: Re: Custom tag
>>>
>>> you can try:
>>>
>>> 
>>>
>>> >> value="Ok" rendered="#{not empty cc.attrs.action and empty 
>>> cc.attrs.actionListener}"
>>> action="#{cc.attrs.action}"
>>> />
>>>
>>>
>>>   >> value="Ok" rendered="#{not empty cc.attrs.actionListener 
>>> and empty cc.attrs.action}"
>>> actionListener="#{cc.attrs.actionListener}"
>>> action="#{cc.attrs.action}"
>>> />
>>>
>>>   >> value="Ok" rendered="#{not empty cc.attrs.actionListener 
>>> and not empty cc.attrs.action}"
>>> actionListener="#{cc.attrs.actionListener}"
>>> />
>>>
>>> 
>>>
>>>
>>>
>>> maybe it helps.
>>>
>>> Att,
>>>
>>> Rafael M. Pestano
>>>
>>> Desenvolvedor

Re: Custom tag

2012-06-29 Thread José Luis Cetina
Thanks Rafael and Leonardo.

Its very easy with target, this solution is best in my opinion.

Works.

Thanks again

2012/6/29 Leonardo Uribe :
> Hi
>
> You can try the alternate syntax using "targets". For example:
>
> 
>    
> 
> 
>    
> 
>
> Instead use EL, you can use the id hierarchy to locate the component.
> In this case, there will not be NullPointerException, because only if
> the property is set, the value is assigned. I have tested both syntax
> in MyFaces with tons of tests:
>
> http://svn.apache.org/repos/asf/myfaces/core/trunk/impl/src/test/resources/org/apache/myfaces/view/facelets/tag/composite/
>
> and it works without problem.
>
> regards,
>
> Leonardo Uribe
>
> 2012/6/29 Rafael Pestano :
>> again,
>>
>> 
>>
>>     >                 value="Ok" rendered="#{not empty cc.attrs.action and 
>> empty cc.attrs.actionListener}"
>>                 action="#{cc.attrs.action}"
>>     />
>>
>>
>>   >                 value="Ok" rendered="#{not empty cc.attrs.actionListener and 
>> empty cc.attrs.action}"
>>                 actionListener="#{cc.attrs.actionListener}"
>>     />
>>
>>   >                 value="Ok" rendered="#{not empty cc.attrs.actionListener and 
>> not empty cc.attrs.action}"
>>                 actionListener="#{cc.attrs.actionListener}"
>>                  action="#{cc.attrs.action}"
>>     />
>>
>> 
>>
>>
>> Att,
>> Rafael M. Pestano
>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>> Graduando em Ciência da Computação UFRGS
>> http://code.google.com/p/jsf-conventions-framework/
>> http://rpestano.wordpress.com
>> http://twitter.com/realpestano
>>
>>
>>
>> - Mensagem original -
>> De: Rafael Pestano 
>> Para: MyFaces Discussion 
>> Cc:
>> Enviadas: Quinta-feira, 28 de Junho de 2012 23:12
>> Assunto: Re: Custom tag
>>
>> you can try:
>>
>> 
>>
>>     >                 value="Ok" rendered="#{not empty cc.attrs.action and 
>> empty cc.attrs.actionListener}"
>>                 action="#{cc.attrs.action}"
>>     />
>>
>>
>>   >                 value="Ok" rendered="#{not empty cc.attrs.actionListener and 
>> empty cc.attrs.action}"
>>                 actionListener="#{cc.attrs.actionListener}"
>>                 action="#{cc.attrs.action}"
>>     />
>>
>>   >                 value="Ok" rendered="#{not empty cc.attrs.actionListener and 
>> not empty cc.attrs.action}"
>>                 actionListener="#{cc.attrs.actionListener}"
>>     />
>>
>> 
>>
>>
>>
>> maybe it helps.
>>
>> Att,
>>
>> Rafael M. Pestano
>>
>> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
>> Graduando em Ciência da Computação UFRGS
>> http://code.google.com/p/jsf-conventions-framework/
>> http://rpestano.wordpress.com
>> http://twitter.com/realpestano
>>
>>
>>
>> 
>> De: José Luis Cetina 
>> Para: MyFaces Discussion 
>> Enviadas: Quinta-feira, 28 de Junho de 2012 18:28
>> Assunto: Custom tag
>>
>> Hi i have this:
>>
>> Simple custom tag:
>>
>> 
>>   
>>   
>> 
>>
>> 
>>     >                 value="Ok"
>>                 action="#{cc.attrs.action}"
>>                 actionListener="#{cc.attrs.actionListener}"
>>      />
>> 
>>
>> Then in my page i do:
>>
>> 
>>
>> But i get a NullPointerException, this is because im not setting the
>> actionListener attribute, but the thing is that sometimes i need or
>> only action or actionlistener not both, but i have to provided both if
>> not i get the nullpointer.
>>
>>
>> I have to do this, but the listener method is empty in my managedbean,
>> i only do this for avoid the nullpointer.
>> > actionListener="#{myBean.actionListenerMethod}"/>
>>
>> how can i avoid this?
>>
>> Thanks
>>
>> ---
>> SCJA. José Luis Cetina
>> ---
>>



-- 
---
SCJA. José Luis Cetina
---


Custom tag

2012-06-28 Thread José Luis Cetina
Hi i have this:

Simple custom tag:


  
  






Then in my page i do:



But i get a NullPointerException, this is because im not setting the
actionListener attribute, but the thing is that sometimes i need or
only action or actionlistener not both, but i have to provided both if
not i get the nullpointer.


I have to do this, but the listener method is empty in my managedbean,
i only do this for avoid the nullpointer.


how can i avoid this?

Thanks

---
SCJA. José Luis Cetina
---


Re: DefaultErrorView

2012-06-26 Thread José Luis Cetina
Ok, thanks, i did with ViewMetaData.

2012/6/26 Gerhard Petracek 

> hi jose,
>
> that's a different topic (and we talked about it already).
>
> @ view-configs:
> you just use @Secured + a separated (custom) annotation e.g.
> @CustomMetaData (meta-annotated with @ViewMetaData)
>
> e.g.:
> @Page
> @Secured(CustomAccessDecisionVoter.class)
> @CustomMetaData(...)
> public final class MySecuredPage implements ViewConfig
> {
> }
>
> -> your AccessDecisionVoter queries the custom meta-data for the current
> view:
>
> //...
> @Inject
> private ViewConfigResolver viewConfigResolver;
> //...
> String currentViewId =
> FacesContext.getCurrentInstance().getViewRoot().getViewId();
>
> viewConfigResolver.getViewConfigDescriptor(currentViewId).getMetaData();
> or
>
> viewConfigResolver.getViewConfigDescriptor(currentViewId).getMetaData(CustomMetaData.class);
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/26 José Luis Cetina 
>
> > Ok, but when i use my own annottation as interpcetor and my
> checkPermission
> > method add a SecurityViolation my page never redirect to my
> > DefaultErrorView, i always get:
> >
> > PM org.apache.myfaces.context.servlet.ServletExternalContextImpl
> > setResponseContentType
> > SEVERE: Cannot set content type. Response already committed
> >
> > My Managedbean:
> >
> > @Named
> > @ViewAccessScoped
> > @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
> > public class CursosMBean implements Serializable{
> > }
> >
> > its possible to use an interceptor (CODI Security) win a
> DefaultErrorView,
> > if yes why i alway's get Response already committed?
> >
> > Thanks
> >
> >
> > 2012/6/26 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > yes - in a view-config @Secured is a simple annotation and not an
> > > interceptor (because there is nothing to intercept)
> > > -> currently no @Stereotype support.
> > >
> > > @ custom (additional) meta-data:
> > > see [1].
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-Customviewmetadata
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/6/26 José Luis Cetina 
> > >
> > > > If i use my own annotation
> > > >
> > > > @Stereotype
> > > > @Target(value = {ElementType.TYPE})
> > > > @Retention(value = RetentionPolicy.RUNTIME)
> > > > @Secured(value=PermissionAccessDecisionVoter.class)
> > > > public @interface SecurityModule {
> > > >ModuloPantallaEnum codigoModulo();
> > > > }
> > > >
> > > > and then
> > > >
> > > > @Page(navigation = Page.NavigationMode.REDIRECT)
> > > > public interface Pages extends ViewConfig {
> > > >
> > > >  public @Page class MyError extends DefaultErrorView implements Pages
> > {}
> > > >
> > > >  @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS) //doesnt
> > work
> > > >  public @Page class Private implements Pages{}
> > > >
> > > > }
> > > >
> > > >
> > > > @javax.enterprise.context.ApplicationScoped
> > > > public class PermissionAccessDecisionVoter implements
> > > AccessDecisionVoter {
> > > > .
> > > > }
> > > >
> > > > If i use my @SecurityModule in ViewConfig my checkPermission never
> been
> > > > called, but if i use my @SecurityModule as interceptor (in my
> > > managedbean)
> > > > it works, this is normal?
> > > >
> > > > 2012/6/26 Gerhard Petracek 
> > > >
> > > > > hi jose,
> > > > >
> > > > > exceptions during the rendering process are always special.
> > > > > -> everything which could lead to an exception should be done
> before
> > > the
> > > > >

Re: DefaultErrorView

2012-06-26 Thread José Luis Cetina
Ok, but when i use my own annottation as interpcetor and my checkPermission
method add a SecurityViolation my page never redirect to my
DefaultErrorView, i always get:

PM org.apache.myfaces.context.servlet.ServletExternalContextImpl
setResponseContentType
SEVERE: Cannot set content type. Response already committed

My Managedbean:

@Named
@ViewAccessScoped
@SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
public class CursosMBean implements Serializable{
}

its possible to use an interceptor (CODI Security) win a DefaultErrorView,
if yes why i alway's get Response already committed?

Thanks


2012/6/26 Gerhard Petracek 

> hi jose,
>
> yes - in a view-config @Secured is a simple annotation and not an
> interceptor (because there is nothing to intercept)
> -> currently no @Stereotype support.
>
> @ custom (additional) meta-data:
> see [1].
>
> regards,
> gerhard
>
> [1]
>
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-Customviewmetadata
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/26 José Luis Cetina 
>
> > If i use my own annotation
> >
> > @Stereotype
> > @Target(value = {ElementType.TYPE})
> > @Retention(value = RetentionPolicy.RUNTIME)
> > @Secured(value=PermissionAccessDecisionVoter.class)
> > public @interface SecurityModule {
> >ModuloPantallaEnum codigoModulo();
> > }
> >
> > and then
> >
> > @Page(navigation = Page.NavigationMode.REDIRECT)
> > public interface Pages extends ViewConfig {
> >
> >  public @Page class MyError extends DefaultErrorView implements Pages {}
> >
> >  @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS) //doesnt work
> >  public @Page class Private implements Pages{}
> >
> > }
> >
> >
> > @javax.enterprise.context.ApplicationScoped
> > public class PermissionAccessDecisionVoter implements
> AccessDecisionVoter {
> > .
> > }
> >
> > If i use my @SecurityModule in ViewConfig my checkPermission never been
> > called, but if i use my @SecurityModule as interceptor (in my
> managedbean)
> > it works, this is normal?
> >
> > 2012/6/26 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > exceptions during the rendering process are always special.
> > > -> everything which could lead to an exception should be done before
> the
> > > rendering process.
> > > in this case you can't switch to an error-view, if you are in the
> middle
> > of
> > > the rendering process of a page.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/6/26 José Luis Cetina 
> > >
> > > > Sorry, but i dont understand, i only set my @Secured in my managed
> > bean.
> > > >
> > > > Do you mean with: "your secured bean should always get accessed
> before
> > > the
> > > > rendering starts" that i have to call the checkPermission method in a
> > > > PreRenderView method in my managedbean?
> > > >
> > > > like this:
> > > >
> > > > @Named
> > > > @ViewAccessScoped
> > > > @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
> > > > public class CursosMBean implements Serializable{
> > > >
> > > > }
> > > >
> > > >
> > > >
> > > > 2012/6/25 Gerhard Petracek 
> > > >
> > > > > hi jose,
> > > > >
> > > > > your secured bean should always get accessed before the rendering
> > > starts
> > > > > (e.g. via a PreRenderView callback).
> > > > > otherwise you get the exception during the rendering process.
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > &

Re: DefaultErrorView

2012-06-26 Thread José Luis Cetina
If i use my own annotation

@Stereotype
@Target(value = {ElementType.TYPE})
@Retention(value = RetentionPolicy.RUNTIME)
@Secured(value=PermissionAccessDecisionVoter.class)
public @interface SecurityModule {
ModuloPantallaEnum codigoModulo();
}

and then

@Page(navigation = Page.NavigationMode.REDIRECT)
public interface Pages extends ViewConfig {

 public @Page class MyError extends DefaultErrorView implements Pages {}

 @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS) //doesnt work
 public @Page class Private implements Pages{}

}


@javax.enterprise.context.ApplicationScoped
public class PermissionAccessDecisionVoter implements AccessDecisionVoter {
.
}

If i use my @SecurityModule in ViewConfig my checkPermission never been
called, but if i use my @SecurityModule as interceptor (in my managedbean)
it works, this is normal?

2012/6/26 Gerhard Petracek 

> hi jose,
>
> exceptions during the rendering process are always special.
> -> everything which could lead to an exception should be done before the
> rendering process.
> in this case you can't switch to an error-view, if you are in the middle of
> the rendering process of a page.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/26 José Luis Cetina 
>
> > Sorry, but i dont understand, i only set my @Secured in my managed bean.
> >
> > Do you mean with: "your secured bean should always get accessed before
> the
> > rendering starts" that i have to call the checkPermission method in a
> > PreRenderView method in my managedbean?
> >
> > like this:
> >
> > @Named
> > @ViewAccessScoped
> > @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
> > public class CursosMBean implements Serializable{
> >
> > }
> >
> >
> >
> > 2012/6/25 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > your secured bean should always get accessed before the rendering
> starts
> > > (e.g. via a PreRenderView callback).
> > > otherwise you get the exception during the rendering process.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/6/25 José Luis Cetina 
> > >
> > > > My denied page never shown, i always get Cannot set content type.
> > > Response
> > > > already committed.
> > > >
> > > >
> > > > I have this:
> > > >
> > > > @Page
> > > > public class Denegado extends DefaultErrorView{
> > > >
> > > > }
> > > >
> > > > @Stereotype
> > > > @Target(value = {ElementType.TYPE})
> > > > @Retention(value = RetentionPolicy.RUNTIME)
> > > >
> > > >
> > >
> >
> @Secured(value=PermissionAccessDecisionVoter.class,errorView=Denegado.class)
> > > > public @interface SecurityModule {
> > > >ModuloPantallaEnum codigoModulo();
> > > > }
> > > >
> > > > my bean:
> > > > @Named
> > > > @ViewAccessScoped
> > > > @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
> > > > public class CursosMBean implements Serializable{
> > > > }
> > > >
> > > > THEN I ADD SecurityViolation
> > > > @Override
> > > >protected void checkPermission(InvocationContext ic,
> > > > Set violations) {
> > > >  violations.add(newSecurityViolation("DENIED."));
> > > > }
> > > >
> > > > But i always see in my page this:
> > > >
> > > > An Error Occurred:
> > > >
> > > >
> > org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
> > > >
> > > > viewId=/web/portal_academico/control_escolar/cursos.xhtml
> > > >
> > > >
> > >
> >
> location=/home/maxtorzito/repositorio/grupo_kx/project-rhino/trunk/project-rhino/target/project-rhino-0.9-SNAPSHOT/web/portal_academico/control_escolar/cursos.xhtml
> > > > phaseId=RENDER_RESPONSE(6)
> > > >
> > > > Caused by:
> > > >
> > org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.extensions.cdi.core.impl.util.SecurityUtils.invokeVoters(SecurityUtils.java:95)
> > > >
> > > >
> > > >
> > > > And in the log:
> > > >
> > > > org.apache.myfaces.context.servlet.ServletExternalContextImpl
> > > > setResponseContentType
> > > > SEVERE: Cannot set content type. Response already committed
> > > >
> > > > What is wrong?
> > > >
> > > > --
> > > > ---
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: DefaultErrorView

2012-06-25 Thread José Luis Cetina
Sorry, but i dont understand, i only set my @Secured in my managed bean.

Do you mean with: "your secured bean should always get accessed before the
rendering starts" that i have to call the checkPermission method in a
PreRenderView method in my managedbean?

like this:

@Named
@ViewAccessScoped
@SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
public class CursosMBean implements Serializable{

}



2012/6/25 Gerhard Petracek 

> hi jose,
>
> your secured bean should always get accessed before the rendering starts
> (e.g. via a PreRenderView callback).
> otherwise you get the exception during the rendering process.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/25 José Luis Cetina 
>
> > My denied page never shown, i always get Cannot set content type.
> Response
> > already committed.
> >
> >
> > I have this:
> >
> > @Page
> > public class Denegado extends DefaultErrorView{
> >
> > }
> >
> > @Stereotype
> > @Target(value = {ElementType.TYPE})
> > @Retention(value = RetentionPolicy.RUNTIME)
> >
> >
> @Secured(value=PermissionAccessDecisionVoter.class,errorView=Denegado.class)
> > public @interface SecurityModule {
> >ModuloPantallaEnum codigoModulo();
> > }
> >
> > my bean:
> > @Named
> > @ViewAccessScoped
> > @SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
> > public class CursosMBean implements Serializable{
> > }
> >
> > THEN I ADD SecurityViolation
> > @Override
> >protected void checkPermission(InvocationContext ic,
> > Set violations) {
> >  violations.add(newSecurityViolation("DENIED."));
> > }
> >
> > But i always see in my page this:
> >
> > An Error Occurred:
> >
> > org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
> >
> > viewId=/web/portal_academico/control_escolar/cursos.xhtml
> >
> >
> location=/home/maxtorzito/repositorio/grupo_kx/project-rhino/trunk/project-rhino/target/project-rhino-0.9-SNAPSHOT/web/portal_academico/control_escolar/cursos.xhtml
> > phaseId=RENDER_RESPONSE(6)
> >
> > Caused by:
> > org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
> > at
> >
> >
> org.apache.myfaces.extensions.cdi.core.impl.util.SecurityUtils.invokeVoters(SecurityUtils.java:95)
> >
> >
> >
> > And in the log:
> >
> > org.apache.myfaces.context.servlet.ServletExternalContextImpl
> > setResponseContentType
> > SEVERE: Cannot set content type. Response already committed
> >
> > What is wrong?
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


DefaultErrorView

2012-06-25 Thread José Luis Cetina
My denied page never shown, i always get Cannot set content type. Response
already committed.


I have this:

@Page
public class Denegado extends DefaultErrorView{

}

@Stereotype
@Target(value = {ElementType.TYPE})
@Retention(value = RetentionPolicy.RUNTIME)
@Secured(value=PermissionAccessDecisionVoter.class,errorView=Denegado.class)
public @interface SecurityModule {
ModuloPantallaEnum codigoModulo();
}

my bean:
@Named
@ViewAccessScoped
@SecurityModule(codigoModulo = ModuloPantallaEnum.CURSOS)
public class CursosMBean implements Serializable{
}

THEN I ADD SecurityViolation
@Override
protected void checkPermission(InvocationContext ic,
Set violations) {
  violations.add(newSecurityViolation("DENIED."));
}

But i always see in my page this:

An Error Occurred:

org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException

viewId=/web/portal_academico/control_escolar/cursos.xhtml
location=/home/maxtorzito/repositorio/grupo_kx/project-rhino/trunk/project-rhino/target/project-rhino-0.9-SNAPSHOT/web/portal_academico/control_escolar/cursos.xhtml
phaseId=RENDER_RESPONSE(6)

Caused by:
org.apache.myfaces.extensions.cdi.core.api.security.AccessDeniedException
at
org.apache.myfaces.extensions.cdi.core.impl.util.SecurityUtils.invokeVoters(SecurityUtils.java:95)



And in the log:

org.apache.myfaces.context.servlet.ServletExternalContextImpl
setResponseContentType
SEVERE: Cannot set content type. Response already committed

What is wrong?

-- 
---
*SCJA. José Luis Cetina*
---


@Secured CODI

2012-06-25 Thread José Luis Cetina
In the CODI Wiki page says:
https://cwiki.apache.org/confluence/display/EXTCDI/Core+Usage#CoreUsage-SecurityViolation

The rest is done by CODI. Please note that there is a natural overhead if
the @Secured annotation is used as interceptor. In combination with the JSF
module, we recommend to us it for the ViewConfig instead of beans because
the performance overhead is minimal compared to an interceptor.

But if i set the @Secured annotation in ViewConfig and i enter directly to
the URL (without a navigation link, of course i dont use CODI if i access
in this way) the checkPermission method was never invoked, as i can see the
only way you can use @Secured annotation in a viewconfig is when you never
expected the user can access to your page with the URL in a  directly way,
am i right?


-- 
---
*SCJA. José Luis Cetina*
---


Re: Trinidad is dead -- what do you use instead?

2012-06-18 Thread José Luis Cetina
I use:
PrimeFaces (UI library for JSF, excellent)
MyFaces Core
Apache TomEE
Apache CODI
Apache OpenJPA
EJB
PrettyFaces
iReport
MySQL
Etc...
El 18/06/2012 19:28, "Joachim Schrod"  escribió:

> Hi all,
>
> Looking at the past few months, it's quite clear that the Trinidad
> project is dead for all practical purposes. Almost all emails on
> this mailing list concerning it are not answered. New releases are
> tagged in SVN, but nobody finds the time to actually do them. I.e.,
> there is neither an active user community nor an active developer
> community behind it. If one wants to use Trinidad, effectively, one
> has to become a major developer in that project.
>
> Well, shit happens; I'm active in open source development since 30
> years, and know how this happens. Luckily, it's better than its
> proprietary counterparts that close down the shop completely, when
> development interest fades.
>
> So, to the readers of this mailing list, how do you use JSF nowadays?
>  -- Do you cope with the basic JSF components, that are made
>available by MyFaces? Without trees, scrollable data tables,
>and such?
>  -- Do you use another component library (RichFaces, ICEFaces --
>what else is available)?
>  -- Have you skipped ship and moved to Wicket or other component
>libraries / frameworks?
>
> I would be very much interested to hear how you do modern Web app
> development nowadays, with a full-fledged component library, not on
> the very basic HTML/JSF-level. Is JSF still the way to go?
>
> Thanks a lot for your input and your patience in discussing that issue.
>
>Joachim
>
> --
> =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
> Joachim Schrod, Roedermark, Germany
> Email: jsch...@acm.org
>
>


Re: CODI Page

2012-06-15 Thread José Luis Cetina
Ok no problem for that, it was only a suggestion.
Thanks and CODI has an very important role in my webapp.
El 15/06/2012 02:04, "Mark Struberg"  escribió:

> Hi José!
>
>
> Well, interface and class naming is a topic which gets discussed since 25
> years now (starting with Smalltalk) and I can tell you that there is _no_
> common view about a naming schema ;)
>
> Anyway, glad it worked out for you and hope you find CODI useful!
>
> LieGrue,
> strub
>
>
>
> - Original Message -
> > From: José Luis Cetina 
> > To: MyFaces Discussion 
> > Cc:
> > Sent: Thursday, June 14, 2012 1:51 PM
> > Subject: Re: CODI Page
> >
> > I didn't see it, Thanks a lot, i will remove the I prefix.
> > Can be a good idea  that CODI support  (with base path) the use of the
> > "I"
> > prefix or the "able" postfix for interfaces, as you know this is the
> > rigth
> > way to name an interface.
> > For now ill remove the I prefix and name ny interface as my page using
> the
> > naming convention.
> >
> > Thanks
> > El 14/06/2012 04:01, "Gerhard Petracek"
> > 
> > escribió:
> >
> >>  hi jose,
> >>
> >>  the link [1] i provided shows it already:
> >>  e.g. Pages.Vip.VipContent.class leads to /pages/vip/vipContent.xhtml
> >>
> >>  (if you have to keep the 'I' prefix for interfaces, you have to
> > provide the
> >>  full base-path (with the current implementation))
> >>
> >>  regards,
> >>  gerhard
> >>
> >>  [1] http://s.apache.org/SBP
> >>
> >>  http://www.irian.at
> >>
> >>  Your JSF/JavaEE powerhouse -
> >>  JavaEE Consulting, Development and
> >>  Courses in English and German
> >>
> >>  Professional Support for Apache MyFaces
> >>
> >>
> >>
> >>  2012/6/14 José Luis Cetina 
> >>
> >>  > Is there a way to do it without basepath? I mean, its possible to use
> >>  type
> >>  > safe navigation in  CODI with more than one level folder structure?
> >>  > El 13/06/2012 21:35, "Gerhard Petracek"
> > 
> >>  > escribió:
> >>  >
> >>  > > hi jose,
> >>  > >
> >>  > > right now it isn't supported (it doesn't get aggregated),
> > because
> >>  > basePath
> >>  > > is more for exceptional/special cases.
> >>  > > typically the used style is more like [1] (as you can see
> > it's a
> >>  simpler
> >>  > > style - e.g. you don't need an explicit usage of
> >>  > > @Page(name="myPageClassName") due to the default naming
> > convention).
> >>  > >
> >>  > > regards,
> >>  > > gerhard
> >>  > >
> >>  > > [1] http://s.apache.org/SBP
> >>  > >
> >>  > > http://www.irian.at
> >>  > >
> >>  > > Your JSF/JavaEE powerhouse -
> >>  > > JavaEE Consulting, Development and
> >>  > > Courses in English and German
> >>  > >
> >>  > > Professional Support for Apache MyFaces
> >>  > >
> >>  > >
> >>  > >
> >>  > > 2012/6/13 José Luis Cetina 
> >>  > >
> >>  > > > Hi i have this folder structure
> >>  > > >
> >>  > > > web/
> >>  > > > public/
> >>  > > > index.xhtml
> >>  > > >
> >>  > > > then i use this:
> >>  > > >
> >>  > > > @Page(navigation = Page.NavigationMode.REDIRECT,
> >>  basePath="web/public")
> >>  > > > public interface IPublic extends ViewConfig{
> >>  > > >  public @Page(name="index") class Index
> > implements IPublic{}
> >>  > > > }
> >>  > > >
> >>  > > > this works great.
> >>  > > >
> >>  > > > But i dont like to use the basePath="web/public",
> > how can i separate?
> >>  > > > What i did, was create an interface like this:
> >>  > > >
> >>  > > > my root folder:
> >>  > > > @Page(navigation = Page.NavigationMode.REDIRECT,
> > basePath="web")
> >>  > > > public interfaces IWeb extends ViewConfig{
> >>  > > > }
> >>  > > >
> >>  > > > my folder under root (like web/public)
> >>  > > > @Page(navigation = Page.NavigationMode.REDIRECT,
> > basePath="public")
> >>  > > > public interfaces IPublic extends IWeb{
> >>  > > >   //then the page
> >>  > > >   public @Page(name="index") class Index
> > implements IPublic{}
> >>  > > > }
> >>  > > >
> >>  > > > but this doesnt work.
> >>  > > >
> >>  > > > What is the best way to do it?. Im using CODI 1.0.5
> >>  > > >
> >>  > > >
> >>  > > >
> >>  > > > Thanks
> >>  > > > --
> >>  > > >
> > ---
> >>  > > > *SCJA. José Luis Cetina*
> >>  > > >
> > ---
> >>  > > >
> >>  > >
> >>  >
> >>
> >
>


Re: CODI Page

2012-06-14 Thread José Luis Cetina
I didn't see it, Thanks a lot, i will remove the I prefix.
Can be a good idea  that CODI support  (with base path) the use of the "I"
prefix or the "able" postfix for interfaces, as you know this is the rigth
way to name an interface.
For now ill remove the I prefix and name ny interface as my page using the
naming convention.

Thanks
El 14/06/2012 04:01, "Gerhard Petracek" 
escribió:

> hi jose,
>
> the link [1] i provided shows it already:
> e.g. Pages.Vip.VipContent.class leads to /pages/vip/vipContent.xhtml
>
> (if you have to keep the 'I' prefix for interfaces, you have to provide the
> full base-path (with the current implementation))
>
> regards,
> gerhard
>
> [1] http://s.apache.org/SBP
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/14 José Luis Cetina 
>
> > Is there a way to do it without basepath? I mean, its possible to use
> type
> > safe navigation in  CODI with more than one level folder structure?
> > El 13/06/2012 21:35, "Gerhard Petracek" 
> > escribió:
> >
> > > hi jose,
> > >
> > > right now it isn't supported (it doesn't get aggregated), because
> > basePath
> > > is more for exceptional/special cases.
> > > typically the used style is more like [1] (as you can see it's a
> simpler
> > > style - e.g. you don't need an explicit usage of
> > > @Page(name="myPageClassName") due to the default naming convention).
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] http://s.apache.org/SBP
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/6/13 José Luis Cetina 
> > >
> > > > Hi i have this folder structure
> > > >
> > > > web/
> > > > public/
> > > > index.xhtml
> > > >
> > > > then i use this:
> > > >
> > > > @Page(navigation = Page.NavigationMode.REDIRECT,
> basePath="web/public")
> > > > public interface IPublic extends ViewConfig{
> > > >  public @Page(name="index") class Index implements IPublic{}
> > > > }
> > > >
> > > > this works great.
> > > >
> > > > But i dont like to use the basePath="web/public", how can i separate?
> > > > What i did, was create an interface like this:
> > > >
> > > > my root folder:
> > > > @Page(navigation = Page.NavigationMode.REDIRECT, basePath="web")
> > > > public interfaces IWeb extends ViewConfig{
> > > > }
> > > >
> > > > my folder under root (like web/public)
> > > > @Page(navigation = Page.NavigationMode.REDIRECT, basePath="public")
> > > > public interfaces IPublic extends IWeb{
> > > >   //then the page
> > > >   public @Page(name="index") class Index implements IPublic{}
> > > > }
> > > >
> > > > but this doesnt work.
> > > >
> > > > What is the best way to do it?. Im using CODI 1.0.5
> > > >
> > > >
> > > >
> > > > Thanks
> > > > --
> > > > ---
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
>


Re: CODI Page

2012-06-13 Thread José Luis Cetina
Is there a way to do it without basepath? I mean, its possible to use type
safe navigation in  CODI with more than one level folder structure?
El 13/06/2012 21:35, "Gerhard Petracek" 
escribió:

> hi jose,
>
> right now it isn't supported (it doesn't get aggregated), because basePath
> is more for exceptional/special cases.
> typically the used style is more like [1] (as you can see it's a simpler
> style - e.g. you don't need an explicit usage of
> @Page(name="myPageClassName") due to the default naming convention).
>
> regards,
> gerhard
>
> [1] http://s.apache.org/SBP
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/6/13 José Luis Cetina 
>
> > Hi i have this folder structure
> >
> > web/
> > public/
> > index.xhtml
> >
> > then i use this:
> >
> > @Page(navigation = Page.NavigationMode.REDIRECT, basePath="web/public")
> > public interface IPublic extends ViewConfig{
> >  public @Page(name="index") class Index implements IPublic{}
> > }
> >
> > this works great.
> >
> > But i dont like to use the basePath="web/public", how can i separate?
> > What i did, was create an interface like this:
> >
> > my root folder:
> > @Page(navigation = Page.NavigationMode.REDIRECT, basePath="web")
> > public interfaces IWeb extends ViewConfig{
> > }
> >
> > my folder under root (like web/public)
> > @Page(navigation = Page.NavigationMode.REDIRECT, basePath="public")
> > public interfaces IPublic extends IWeb{
> >   //then the page
> >   public @Page(name="index") class Index implements IPublic{}
> > }
> >
> > but this doesnt work.
> >
> > What is the best way to do it?. Im using CODI 1.0.5
> >
> >
> >
> > Thanks
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>


CODI Page

2012-06-13 Thread José Luis Cetina
Hi i have this folder structure

web/
public/
index.xhtml

then i use this:

@Page(navigation = Page.NavigationMode.REDIRECT, basePath="web/public")
public interface IPublic extends ViewConfig{
  public @Page(name="index") class Index implements IPublic{}
}

this works great.

But i dont like to use the basePath="web/public", how can i separate?
What i did, was create an interface like this:

my root folder:
@Page(navigation = Page.NavigationMode.REDIRECT, basePath="web")
public interfaces IWeb extends ViewConfig{
}

my folder under root (like web/public)
@Page(navigation = Page.NavigationMode.REDIRECT, basePath="public")
public interfaces IPublic extends IWeb{
   //then the page
   public @Page(name="index") class Index implements IPublic{}
}

but this doesnt work.

What is the best way to do it?. Im using CODI 1.0.5



Thanks
-- 
-------
*SCJA. José Luis Cetina*
---


Re: h:outputStylesheet

2012-06-13 Thread José Luis Cetina
Ok, thanks

2012/6/13 Leonardo Uribe 

> Hi
>
> Older versions of MyFaces (Core 2.0.1 to 2.0.11 and 2.1.0 to 2.1.5)
> has the problem. Update to 2.1.6/2.0.12 or upper version fixes the
> problem. See CVE-2011-4367 for details.
>
> regards,
>
> Leonardo Uribe
>
> 2012/6/13 José Luis Cetina :
> > And What about the mentioned security hole? This applied for older
> versions
> > of myfaces?
> > El 13/06/2012 02:41, "Leonardo Uribe"  escribió:
> >
> >> Hi
> >>
> >> The param was introduced because according to the spec, "/" is not
> >> allowed in libraryName. Enable it does not cause any problem. No need
> >> to worry about it.
> >>
> >> regards,
> >>
> >> Leonardo Uribe
> >>
> >> 2012/6/12 Mike Kienenberger :
> >> > See issue https://issues.apache.org/jira/browse/MYFACES-3454
> >> >
> >> > It's not a good idea to change the behavior back.   It introduces a
> >> > security hole.
> >> >
> >> >
> >>
> http://mail-archives.apache.org/mod_mbox/www-announce/201202.mbox/%3c4f33ed1f.4070...@apache.org%3E
> >> >
> >> >
> >> > On Tue, Jun 12, 2012 at 4:06 PM, Martin Koci
> >> >  wrote:
> >> >> Hi,
> >> >>
> >> >> it is not possible to use / in library name. Try
> >> >>
> >> >> 1) outputStylesheet library="css" name="test/my.css"
> >> >>
> >> >> 2) or set context param
> >> >>
> >> >> org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
> >> >>
> >> >> to
> >> >>
> >> >> true
> >> >>
> >> >>
> >> >>
> >> >>
> >> >> José Luis Cetina píše v Út 12. 06. 2012 v 15:00 -0500:
> >> >>> If i use
> >> >>> outputStylesheet library="css" name="my.css"  (in my h:head tag)
> works
> >> ok
> >> >>> with this structure folder
> >> >>> resources/
> >> >>> css/
> >> >>> my.css
> >> >>>
> >> >>>
> >> >>> But if i create an other folder into css this stop to work
> >> >>> resources/
> >> >>> css/
> >> >>> test/
> >> >>> my.css
> >> >>>
> >> >>> outputStylesheet library="css/test" name="my.css"  (in my h:head
> tag)
> >> this
> >> >>> doesnt work in myfaces 2.1.7 but in mojarra 2.1.7 yes.
> >> >>>
> >> >>> Is this a bug??
> >> >>
> >> >>
> >>
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: h:outputStylesheet

2012-06-13 Thread José Luis Cetina
And What about the mentioned security hole? This applied for older versions
of myfaces?
El 13/06/2012 02:41, "Leonardo Uribe"  escribió:

> Hi
>
> The param was introduced because according to the spec, "/" is not
> allowed in libraryName. Enable it does not cause any problem. No need
> to worry about it.
>
> regards,
>
> Leonardo Uribe
>
> 2012/6/12 Mike Kienenberger :
> > See issue https://issues.apache.org/jira/browse/MYFACES-3454
> >
> > It's not a good idea to change the behavior back.   It introduces a
> > security hole.
> >
> >
> http://mail-archives.apache.org/mod_mbox/www-announce/201202.mbox/%3c4f33ed1f.4070...@apache.org%3E
> >
> >
> > On Tue, Jun 12, 2012 at 4:06 PM, Martin Koci
> >  wrote:
> >> Hi,
> >>
> >> it is not possible to use / in library name. Try
> >>
> >> 1) outputStylesheet library="css" name="test/my.css"
> >>
> >> 2) or set context param
> >>
> >> org.apache.myfaces.STRICT_JSF_2_ALLOW_SLASH_LIBRARY_NAME
> >>
> >> to
> >>
> >> true
> >>
> >>
> >>
> >>
> >> José Luis Cetina píše v Út 12. 06. 2012 v 15:00 -0500:
> >>> If i use
> >>> outputStylesheet library="css" name="my.css"  (in my h:head tag) works
> ok
> >>> with this structure folder
> >>> resources/
> >>> css/
> >>> my.css
> >>>
> >>>
> >>> But if i create an other folder into css this stop to work
> >>> resources/
> >>> css/
> >>> test/
> >>> my.css
> >>>
> >>> outputStylesheet library="css/test" name="my.css"  (in my h:head tag)
> this
> >>> doesnt work in myfaces 2.1.7 but in mojarra 2.1.7 yes.
> >>>
> >>> Is this a bug??
> >>
> >>
>


h:outputStylesheet

2012-06-12 Thread José Luis Cetina
If i use
outputStylesheet library="css" name="my.css"  (in my h:head tag) works ok
with this structure folder
resources/
css/
my.css


But if i create an other folder into css this stop to work
resources/
css/
test/
my.css

outputStylesheet library="css/test" name="my.css"  (in my h:head tag) this
doesnt work in myfaces 2.1.7 but in mojarra 2.1.7 yes.

Is this a bug??


Re: CODI No bean found for type

2012-05-17 Thread José Luis Cetina
fixed in TomEE 1.0?? im using it and the problem still

2012/5/17 Gerhard Petracek 

> yes - they fixed the issue, added test-cases which should ensure the
> compatibility and we deployed several demos successfully.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/5/18 José Luis Cetina 
>
> > Gerhard, in my old post you told me this was a bug:
> >
> > [1] http://os890.blogspot.com/2012/01/codi-meets-tomee.html
> > [2]
> https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Servers
> >
> >
> > http://old.nabble.com/CODI-%2B-TomEE-td33754910.html
> >
> >
> > This is fixed in TomEE 1.0??
> >
> >
> >
> > 2012/5/17 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > it looks like myfaces-core gets started before owb in your case.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/5/18 José Luis Cetina 
> > >
> > > > Im chanching my web app from glassfish to TomEE 1.0 (i want to use
> all
> > > the
> > > > Apache Stuff).
> > > >
> > > > I have problem when i add CODI to my pom.xml
> > > >
> > > >
> > > > Im getting this error:
> > > > Caused by: java.lang.IllegalStateException: No bean found for type:
> > > > org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig
> > > >
> > > >
> > > > pom.xml
> > > > .
> > > > .
> > > > 
> > > >
> > > >
>  org.apache.myfaces.extensions.cdi.bundles
> > > >myfaces-extcdi-bundle-jsf20
> > > >${apache.myfaces.codi.version}
> > > >compile
> > > >
> > > > .
> > > > .
> > > >
> > > > Here is my log:
> > > >
> > > > may 17, 2012 5:23:58 PM org.apache.myfaces.shared.util.ClassUtils
> > > > buildApplicationObject
> > > > Grave: null
> > > > java.lang.reflect.InvocationTargetException
> > > > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native
> > Method)
> > > > at
> > > >
> > > >
> > >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > > > at
> > > >
> > > >
> > >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > > > at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:561)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:532)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:419)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:355)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:142)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
> > > > at
> > > >
> > > >
> > >
> >
> org.apache.catalina.core.StandardContext.startInternal(Stand

Re: CODI + TomEE

2012-05-17 Thread José Luis Cetina
Thanks for your time.

I will contact with them

2012/5/17 Gerhard Petracek 

> please contact [1] the tomee community.
>
> regards,
> gerhard
>
> [1] http://openejb.apache.org/support.html
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/5/18 maxtorzito 
>
> >
> >
> > Using TomEE 1.0.0 and the problem still!!!
> >
> > What is the status of this?
> >
> >
> >
> > maxtorzito wrote:
> > >
> > > Thanks, i renamed the jars and add it into my WEB-INF/lib folder
> > >
> > > CODI-myfaces-extcdi-core-api-1.0.5.jar
> > > CODI-myfaces-extcdi-core-impl-1.0.5.jar
> > > CODI-myfaces-extcdi-jsf20-module-api-1.0.5.jar
> > > CODI-myfaces-extcdi-jsf20-module-impl-1.0.5.jar
> > > CODI-myfaces-extcdi-message-module-api-1.0.5.jar
> > > CODI-myfaces-extcdi-message-module-impl-1.0.5.jar
> > >
> > > Thanks again
> > >
> > >
> > > 2012/4/26 Gerhard Petracek 
> > >
> > >> hi jose,
> > >>
> > >> that's a known (and fixed) issue in tomee - details are available at
> > [1].
> > >> (it's also mentioned in our wiki at [2]).
> > >>
> > >> regards,
> > >> gerhard
> > >>
> > >> [1] http://os890.blogspot.com/2012/01/codi-meets-tomee.html
> > >> [2]
> > >>
> https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Servers
> > >>
> > >> http://www.irian.at
> > >>
> > >> Your JSF/JavaEE powerhouse -
> > >> JavaEE Consulting, Development and
> > >> Courses in English and German
> > >>
> > >> Professional Support for Apache MyFaces
> > >>
> > >>
> > >> 2012/4/26 José Luis Cetina 
> > >>
> > >> > Im trying to configure a new web app with TomEE+ beta2 with CODI
> (need
> > >> > messages,security, navigation) but when i add the dependencies in my
> > >> > pom.xml i get this error:
> > >> >
> > >> > log file:
> > >> >
> > >> > Using CATALINA_BASE:   "C:\Program Files\Apache Software
> > >> > Foundation\apache-tomee-plus-1.0.0-beta-2"
> > >> > Using CATALINA_HOME:   "C:\Program Files\Apache Software
> > >> > Foundation\apache-tomee-plus-1.0.0-beta-2"
> > >> > Using CATALINA_TMPDIR: "C:\Program Files\Apache Software
> > >> > Foundation\apache-tomee-plus-1.0.0-beta-2\temp"
> > >> > Using JRE_HOME:"C:\Program Files\Java\jdk1.7.0_03"
> > >> > Using CLASSPATH:   "C:\Program Files\Apache Software
> > >> >
> Foundation\apache-tomee-plus-1.0.0-beta-2\bin\bootstrap.jar;C:\Program
> > >> > Files\Apache Software
> > >> > Foundation\apache-tomee-plus-1.0.0-beta-2\bin\tomcat-juli.jar"
> > >> > abr 26, 2012 1:37:13 PM
> org.apache.catalina.core.AprLifecycleListener
> > >> init
> > >> > Información: La biblioteca nativa de Apache Tomcat basada en ARP que
> > >> > permite un rendimiento óptimo en entornos de desarrollo no ha sido
> > >> hallada
> > >> > en java.library.path: C:\Program
> > >> >
> > >> >
> > >>
> >
> Files\Java\jdk1.7.0_03\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
> > >> > Files\Intel\WiFi\bin\;C:\Program Files\Common
> > >> > Files\Intel\WirelessCommon\;C:\Program Files\MySQL\MySQL Server
> > >> > 5.5\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\IVI
> > >> > Foundation\VISA\WinNT\Bin;C:\Program
> Files\Intel\WiFi\bin\;C:\Program
> > >> > Files\Common Files\Intel\WirelessCommon\;C:\Program
> > >> > Files\Java\jdk1.7.0_03;C:\Program Files\Java\jdk1.7.0_03\bin;.
> > >> > ERROR: OpenEJB webapp was not found
> > >> > abr 26, 2012 1:37:13 PM org.apache.coyote.AbstractProtocol init
> > >> > Información: Initializing ProtocolHandler ["http-bio-8080"]
> > >> > abr 26, 2012 1:37:13 PM org.apache.coyote.AbstractProtocol init
> > >> > Información: Initializing ProtocolHandler ["ajp-bio-8009&

Re: CODI No bean found for type

2012-05-17 Thread José Luis Cetina
Gerhard, in my old post you told me this was a bug:

[1] http://os890.blogspot.com/2012/01/codi-meets-tomee.html
[2] https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Servers


http://old.nabble.com/CODI-%2B-TomEE-td33754910.html


This is fixed in TomEE 1.0??



2012/5/17 Gerhard Petracek 

> hi jose,
>
> it looks like myfaces-core gets started before owb in your case.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/5/18 José Luis Cetina 
>
> > Im chanching my web app from glassfish to TomEE 1.0 (i want to use all
> the
> > Apache Stuff).
> >
> > I have problem when i add CODI to my pom.xml
> >
> >
> > Im getting this error:
> > Caused by: java.lang.IllegalStateException: No bean found for type:
> > org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig
> >
> >
> > pom.xml
> > .
> > .
> > 
> >
> >org.apache.myfaces.extensions.cdi.bundles
> >myfaces-extcdi-bundle-jsf20
> >${apache.myfaces.codi.version}
> >compile
> >
> > .
> > .
> >
> > Here is my log:
> >
> > may 17, 2012 5:23:58 PM org.apache.myfaces.shared.util.ClassUtils
> > buildApplicationObject
> > Grave: null
> > java.lang.reflect.InvocationTargetException
> > at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
> > at
> >
> >
> sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
> > at
> >
> >
> sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
> > at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
> > at
> >
> >
> org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:561)
> > at
> >
> >
> org.apache.myfaces.config.FacesConfigurator.configureApplication(FacesConfigurator.java:532)
> > at
> >
> >
> org.apache.myfaces.config.FacesConfigurator.configure(FacesConfigurator.java:419)
> > at
> >
> >
> org.apache.myfaces.webapp.AbstractFacesInitializer.buildConfiguration(AbstractFacesInitializer.java:355)
> > at
> >
> >
> org.apache.myfaces.webapp.Jsp21FacesInitializer.initContainerIntegration(Jsp21FacesInitializer.java:73)
> > at
> >
> >
> org.apache.myfaces.webapp.AbstractFacesInitializer.initFaces(AbstractFacesInitializer.java:142)
> > at
> >
> >
> org.apache.myfaces.webapp.StartupServletContextListener.contextInitialized(StartupServletContextListener.java:119)
> > at
> >
> >
> org.apache.catalina.core.StandardContext.listenerStart(StandardContext.java:4779)
> > at
> >
> >
> org.apache.catalina.core.StandardContext.startInternal(StandardContext.java:5273)
> > at org.apache.catalina.util.LifecycleBase.start(LifecycleBase.java:150)
> > at
> >
> >
> org.apache.catalina.core.ContainerBase.addChildInternal(ContainerBase.java:895)
> > at
> org.apache.catalina.core.ContainerBase.addChild(ContainerBase.java:871)
> > at org.apache.catalina.core.StandardHost.addChild(StandardHost.java:615)
> > at
> >
> >
> org.apache.catalina.startup.HostConfig.deployDescriptor(HostConfig.java:649)
> > at org.apache.catalina.startup.HostConfig.deployApps(HostConfig.java:530)
> > at org.apache.catalina.startup.HostConfig.check(HostConfig.java:1471)
> > 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.apache.tomcat.util.modeler.BaseModelMBean.invoke(BaseModelMBean.java:301)
> > at
> >
> >
> com.sun.jmx.interceptor.DefaultMBeanServerInterceptor.invoke(DefaultMBeanServerInterceptor.java:819)
> > at com.sun.jmx.mbeanserver.JmxMBeanServer.invoke(JmxMBeanServer.java:791)
> > at
> >
> org.apache.catalina.manager.ManagerServlet.check(ManagerServlet.java:1436)
> > at
> >
> org.apache.catalina.manager.ManagerServlet.deploy(ManagerServlet.java:856)
> > at
> > org.apache.catalina.manager.ManagerServlet.doGet(ManagerServlet.java:353)
> > at javax.servlet.http.HttpServlet.service(HttpServlet.java:621)
> > at javax.se

CODI No bean found for type

2012-05-17 Thread José Luis Cetina
(ThreadPoolExecutor.java:1110)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603)
at java.lang.Thread.run(Thread.java:722)
Caused by: java.lang.reflect.InvocationTargetException
at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
at
sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:57)
at
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
at java.lang.reflect.Constructor.newInstance(Constructor.java:525)
at
org.apache.myfaces.shared.util.ClassUtils.buildApplicationObject(ClassUtils.java:561)
... 47 more
Caused by: java.lang.IllegalStateException: No bean found for type:
org.apache.myfaces.extensions.cdi.jsf.api.config.JsfModuleConfig
at
org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getOrCreateBeanByClass(CodiUtils.java:198)
at
org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:174)
at
org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:139)
at
org.apache.myfaces.extensions.cdi.core.impl.util.CodiUtils.getContextualReferenceByClass(CodiUtils.java:124)
at
org.apache.myfaces.extensions.cdi.jsf2.impl.navigation.CodiNavigationHandler.isAddViewConfigsAsNavigationCaseActivated(CodiNavigationHandler.java:200)
at
org.apache.myfaces.extensions.cdi.jsf2.impl.navigation.CodiNavigationHandler.(CodiNavigationHandler.java:65)
... 52 more

may 17, 2012 5:23:58 PM org.apache.tomee.catalina.TomcatWebAppBuilder
safeBind
Grave: Error in safeBind method

Using TomEE 1.0 / JDK 7u3 / Windows / MyFaces 2.1.7 / OWB (From TomEE)

-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI + TomEE

2012-04-26 Thread José Luis Cetina
Thanks, i renamed the jars and add it into my WEB-INF/lib folder

CODI-myfaces-extcdi-core-api-1.0.5.jar
CODI-myfaces-extcdi-core-impl-1.0.5.jar
CODI-myfaces-extcdi-jsf20-module-api-1.0.5.jar
CODI-myfaces-extcdi-jsf20-module-impl-1.0.5.jar
CODI-myfaces-extcdi-message-module-api-1.0.5.jar
CODI-myfaces-extcdi-message-module-impl-1.0.5.jar

Thanks again


2012/4/26 Gerhard Petracek 

> hi jose,
>
> that's a known (and fixed) issue in tomee - details are available at [1].
> (it's also mentioned in our wiki at [2]).
>
> regards,
> gerhard
>
> [1] http://os890.blogspot.com/2012/01/codi-meets-tomee.html
> [2] https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Servers
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/4/26 José Luis Cetina 
>
> > Im trying to configure a new web app with TomEE+ beta2 with CODI (need
> > messages,security, navigation) but when i add the dependencies in my
> > pom.xml i get this error:
> >
> > log file:
> >
> > Using CATALINA_BASE:   "C:\Program Files\Apache Software
> > Foundation\apache-tomee-plus-1.0.0-beta-2"
> > Using CATALINA_HOME:   "C:\Program Files\Apache Software
> > Foundation\apache-tomee-plus-1.0.0-beta-2"
> > Using CATALINA_TMPDIR: "C:\Program Files\Apache Software
> > Foundation\apache-tomee-plus-1.0.0-beta-2\temp"
> > Using JRE_HOME:"C:\Program Files\Java\jdk1.7.0_03"
> > Using CLASSPATH:   "C:\Program Files\Apache Software
> > Foundation\apache-tomee-plus-1.0.0-beta-2\bin\bootstrap.jar;C:\Program
> > Files\Apache Software
> > Foundation\apache-tomee-plus-1.0.0-beta-2\bin\tomcat-juli.jar"
> > abr 26, 2012 1:37:13 PM org.apache.catalina.core.AprLifecycleListener
> init
> > Información: La biblioteca nativa de Apache Tomcat basada en ARP que
> > permite un rendimiento óptimo en entornos de desarrollo no ha sido
> hallada
> > en java.library.path: C:\Program
> >
> >
> Files\Java\jdk1.7.0_03\bin;C:\Windows\Sun\Java\bin;C:\Windows\system32;C:\Windows;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program
> > Files\Intel\WiFi\bin\;C:\Program Files\Common
> > Files\Intel\WirelessCommon\;C:\Program Files\MySQL\MySQL Server
> > 5.5\bin;C:\Program Files\TortoiseSVN\bin;C:\Program Files (x86)\IVI
> > Foundation\VISA\WinNT\Bin;C:\Program Files\Intel\WiFi\bin\;C:\Program
> > Files\Common Files\Intel\WirelessCommon\;C:\Program
> > Files\Java\jdk1.7.0_03;C:\Program Files\Java\jdk1.7.0_03\bin;.
> > ERROR: OpenEJB webapp was not found
> > abr 26, 2012 1:37:13 PM org.apache.coyote.AbstractProtocol init
> > Información: Initializing ProtocolHandler ["http-bio-8080"]
> > abr 26, 2012 1:37:13 PM org.apache.coyote.AbstractProtocol init
> > Información: Initializing ProtocolHandler ["ajp-bio-8009"]
> > abr 26, 2012 1:37:14 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
> > Información: Created new singletonService
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl@d14b190
> > abr 26, 2012 1:37:14 PM org.apache.openejb.cdi.CdiBuilder initializeOWB
> > Información: succeeded in installing singleton service
> > Apache OpenEJB 4.0.0-beta-2build: 20120115-08:26
> > http://openejb.apache.org/
> > abr 26, 2012 1:37:18 PM org.apache.openejb.cdi.CdiBuilder build
> > Información: existing thread singleton service in SystemInstance()
> > org.apache.openejb.cdi.ThreadSingletonServiceImpl@d14b190
> > abr 26, 2012 1:37:18 PM org.apache.openejb.cdi.OpenEJBLifecycle
> > startApplication
> > Información: OpenWebBeans Container is starting...
> > abr 26, 2012 1:37:18 PM org.apache.webbeans.plugins.PluginLoader startUp
> > Información: Adding OpenWebBeansPlugin : [CdiPlugin]
> > abr 26, 2012 1:37:18 PM org.apache.webbeans.plugins.PluginLoader startUp
> > Información: Adding OpenWebBeansPlugin : [OpenWebBeansJsfPlugin]
> > abr 26, 2012 1:37:18 PM org.apache.openejb.cdi.BeansDeployer
> > validateInjectionPoints
> > Información: All injection points were validated successfully.
> > abr 26, 2012 1:37:18 PM org.apache.openejb.cdi.OpenEJBLifecycle
> > startApplication
> > Información: OpenWebBeans Container has started, it took [134] ms.
> > abr 26, 2012 1:37:18 PM org.apache.catalina.startup.Catalina load
> > Información: Initialization processed in 5459 ms
> > abr 26, 2012 1:37:18 PM org.apache.catalina.core.StandardService
> > startInternal
> >

CODI + TomEE

2012-04-26 Thread José Luis Cetina
t() had already been called. The second call will be ignored.


pom.xml:
.
.
.

1.0.5
.
.
.

  


org.apache.myfaces.extensions.cdi.core
myfaces-extcdi-core-api
${myfaces.codi.version}


org.apache.myfaces.extensions.cdi.core
myfaces-extcdi-core-impl
${myfaces.codi.version}
runtime




org.apache.myfaces.extensions.cdi.modules
myfaces-extcdi-jsf20-module-api
${myfaces.codi.version}


org.apache.myfaces.extensions.cdi.modules
myfaces-extcdi-jsf20-module-impl
${myfaces.codi.version}
runtime




org.apache.myfaces.extensions.cdi.modules
myfaces-extcdi-message-module-api
    ${myfaces.codi.version}
compile


org.apache.myfaces.extensions.cdi.modules
myfaces-extcdi-message-module-impl
${myfaces.codi.version}
jar

.
.
.
.



Thanks



-- 
---
*SCJA. José Luis Cetina*
---


Re: OWB

2012-04-24 Thread José Luis Cetina
Sorry i had  ${project.version} and was:  ${apache.openwebbeans.version}
Thanks

2012/4/24 Thomas Andraschko 

> Check your dependencies. project.version isn't the right version for the
> web module.
>
>   
>   org.apache.openwebbeans
>   openwebbeans-web
>   ${project.version}
>   
>
>
> 2012/4/24 José Luis Cetina 
>
> > I add these lines to my pom.xml:
> >
> > .
> > .
> > .
> > 1.1.4
> > .
> > .
> > .
> > 
> >
> >org.apache.openwebbeans
> >openwebbeans-impl
> >${apache.openwebbeans.version}
> >
> >
> >org.apache.openwebbeans
> >openwebbeans-resource
> >${apache.openwebbeans.version}
> >
> >
> >
> >org.apache.openwebbeans
> >openwebbeans-jsf
> >${apache.openwebbeans.version}
> >
> >
> >
> >org.apache.openwebbeans
> >openwebbeans-web
> >${project.version}
> >
> >
> >
> >org.apache.openwebbeans
> >openwebbeans-spi
> >${apache.openwebbeans.version}
> >
> >
> >
> >
> > but i get this Warning:
> > The POM for org.apache.openwebbeans:openwebbeans-web:jar:1.0-SNAPSHOT is
> > missing, no dependency information available.
> >
> > [Help 1]
> >
> >
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> >
> >
> >
> >
> >
> > El 24 de abril de 2012 12:12, José Luis Cetina  > >escribió:
> >
> > > is there a way to add OWB with maven?
> > >
> > > El 24 de abril de 2012 12:11, José Luis Cetina  > >escribió:
> > >
> > > Correct, i was confusing, trying to understand OWB as CODI but CODI its
> > an
> > >> extension!!!
> > >>
> > >> Thanks
> > >>
> > >>
> > >> 2012/4/24 Thomas Andraschko 
> > >>
> > >>> You use it like WELD. You can use all the stuff from the
> > >>> "javax.enterprise.context" package.
> > >>> CDI is an API and WELD or OWB is an implementation :)
> > >>>
> > >>> 2012/4/24 José Luis Cetina 
> > >>>
> > >>> > Ok, but:
> > >>> >  how do i use?
> > >>> >  what do i have to do for use it?
> > >>> >  thats the question,
> > >>> > do i have to use annotations???
> > >>> > do you know what i mean???
> > >>> >
> > >>> > Works with the same annotations from WELD? that's the point i cant
> > find
> > >>> > basic information anywhere
> > >>> >
> > >>> > 2012/4/24 Thomas Andraschko 
> > >>> >
> > >>> > > Hi,
> > >>> > >
> > >>> > > it's very easy.
> > >>> > > Just add the dependencies (impl,resource,jsf,web,spi) and
> configure
> > >>> this
> > >>> > > listener in your web.xml:
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> >
> > >>>
> >
>  
> org.apache.webbeans.servlet.WebBeansConfigurationListener
> > >>> > >
> > >>> > >
> > >>> > > Regards,
> > >>> > > Thomas
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > >
> > >>> > > 2012/4/24 José Luis Cetina 
> > >>> > >
> > >>> > > > Im starting a project (JSF (Mojarra or MyFaces),JPA,
> > >>> EJB,Primefaces)
> > >>> > and
> > >>> > > i
> > >>> > > > want to use "Apache Open Web Beans" but the information is so
> > >>> poor, i
> > >>> > > can't
> > >>> > > > find enough information for work with it.
> > >>> > > > Can somebody know where i can find example and how to use OWB
> > >>> please!!
> > >>> > > >
> > >>> > > > I had the same problem(not enough informat

Re: OWB

2012-04-24 Thread José Luis Cetina
I add these lines to my pom.xml:

.
.
.
1.1.4
.
.
.


org.apache.openwebbeans
openwebbeans-impl
${apache.openwebbeans.version}


org.apache.openwebbeans
openwebbeans-resource
${apache.openwebbeans.version}



org.apache.openwebbeans
openwebbeans-jsf
${apache.openwebbeans.version}



org.apache.openwebbeans
openwebbeans-web
${project.version}



org.apache.openwebbeans
openwebbeans-spi
${apache.openwebbeans.version}




but i get this Warning:
The POM for org.apache.openwebbeans:openwebbeans-web:jar:1.0-SNAPSHOT is
missing, no dependency information available.

[Help 1]
http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException





El 24 de abril de 2012 12:12, José Luis Cetina escribió:

> is there a way to add OWB with maven?
>
> El 24 de abril de 2012 12:11, José Luis Cetina escribió:
>
> Correct, i was confusing, trying to understand OWB as CODI but CODI its an
>> extension!!!
>>
>> Thanks
>>
>>
>> 2012/4/24 Thomas Andraschko 
>>
>>> You use it like WELD. You can use all the stuff from the
>>> "javax.enterprise.context" package.
>>> CDI is an API and WELD or OWB is an implementation :)
>>>
>>> 2012/4/24 José Luis Cetina 
>>>
>>> > Ok, but:
>>> >  how do i use?
>>> >  what do i have to do for use it?
>>> >  thats the question,
>>> > do i have to use annotations???
>>> > do you know what i mean???
>>> >
>>> > Works with the same annotations from WELD? that's the point i cant find
>>> > basic information anywhere
>>> >
>>> > 2012/4/24 Thomas Andraschko 
>>> >
>>> > > Hi,
>>> > >
>>> > > it's very easy.
>>> > > Just add the dependencies (impl,resource,jsf,web,spi) and configure
>>> this
>>> > > listener in your web.xml:
>>> > >
>>> > >
>>> > >
>>> > >
>>> >
>>>  
>>> org.apache.webbeans.servlet.WebBeansConfigurationListener
>>> > >
>>> > >
>>> > > Regards,
>>> > > Thomas
>>> > >
>>> > >
>>> > >
>>> > >
>>> > > 2012/4/24 José Luis Cetina 
>>> > >
>>> > > > Im starting a project (JSF (Mojarra or MyFaces),JPA,
>>> EJB,Primefaces)
>>> > and
>>> > > i
>>> > > > want to use "Apache Open Web Beans" but the information is so
>>> poor, i
>>> > > can't
>>> > > > find enough information for work with it.
>>> > > > Can somebody know where i can find example and how to use OWB
>>> please!!
>>> > > >
>>> > > > I had the same problem(not enough information) with MyFaces CODI
>>> > > > (Navigation,Messages and Security) and  with some effort
>>> (questions in
>>> > > > mailing list's, reading from a few pages) i could use Apache CODI,
>>> now
>>> > im
>>> > > > trying to implement it in the same project OWB, but i really feel
>>> so
>>> > > > frustated to see excellent frameworks and extensions from Apache,
>>> but i
>>> > > > consider that the information its very but very very POOR!!
>>> > > >
>>> > > > The only thing i now to OWB its a "replacement" for WELD and works
>>> > great
>>> > > > with all Apache Products.
>>> > > >
>>> > > >
>>> > > > The user guide still in TODO lines...
>>> > > >
>>> http://openwebbeans.apache.org/1.0.0-SNAPSHOT/documents/userguide.pdf
>>> > > >
>>> > > >
>>> > > > Sorry 4 my english
>>> > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > ---
>>> > > > *SCJA. José Luis Cetina*
>>> > > > ---
>>> > > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > ---
>>> > *SCJA. José Luis Cetina*
>>> > ---
>>> >
>>>
>>
>>
>>
>> --
>> ---
>> *SCJA. José Luis Cetina*
>> ---
>>
>>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: OWB

2012-04-24 Thread José Luis Cetina
is there a way to add OWB with maven?

El 24 de abril de 2012 12:11, José Luis Cetina escribió:

> Correct, i was confusing, trying to understand OWB as CODI but CODI its an
> extension!!!
>
> Thanks
>
>
> 2012/4/24 Thomas Andraschko 
>
>> You use it like WELD. You can use all the stuff from the
>> "javax.enterprise.context" package.
>> CDI is an API and WELD or OWB is an implementation :)
>>
>> 2012/4/24 José Luis Cetina 
>>
>> > Ok, but:
>> >  how do i use?
>> >  what do i have to do for use it?
>> >  thats the question,
>> > do i have to use annotations???
>> > do you know what i mean???
>> >
>> > Works with the same annotations from WELD? that's the point i cant find
>> > basic information anywhere
>> >
>> > 2012/4/24 Thomas Andraschko 
>> >
>> > > Hi,
>> > >
>> > > it's very easy.
>> > > Just add the dependencies (impl,resource,jsf,web,spi) and configure
>> this
>> > > listener in your web.xml:
>> > >
>> > >
>> > >
>> > >
>> >
>>  
>> org.apache.webbeans.servlet.WebBeansConfigurationListener
>> > >
>> > >
>> > > Regards,
>> > > Thomas
>> > >
>> > >
>> > >
>> > >
>> > > 2012/4/24 José Luis Cetina 
>> > >
>> > > > Im starting a project (JSF (Mojarra or MyFaces),JPA, EJB,Primefaces)
>> > and
>> > > i
>> > > > want to use "Apache Open Web Beans" but the information is so poor,
>> i
>> > > can't
>> > > > find enough information for work with it.
>> > > > Can somebody know where i can find example and how to use OWB
>> please!!
>> > > >
>> > > > I had the same problem(not enough information) with MyFaces CODI
>> > > > (Navigation,Messages and Security) and  with some effort (questions
>> in
>> > > > mailing list's, reading from a few pages) i could use Apache CODI,
>> now
>> > im
>> > > > trying to implement it in the same project OWB, but i really feel so
>> > > > frustated to see excellent frameworks and extensions from Apache,
>> but i
>> > > > consider that the information its very but very very POOR!!
>> > > >
>> > > > The only thing i now to OWB its a "replacement" for WELD and works
>> > great
>> > > > with all Apache Products.
>> > > >
>> > > >
>> > > > The user guide still in TODO lines...
>> > > >
>> http://openwebbeans.apache.org/1.0.0-SNAPSHOT/documents/userguide.pdf
>> > > >
>> > > >
>> > > > Sorry 4 my english
>> > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > ---
>> > > > *SCJA. José Luis Cetina*
>> > > > ---
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > ---
>> > *SCJA. José Luis Cetina*
>> > ---
>> >
>>
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: OWB

2012-04-24 Thread José Luis Cetina
Correct, i was confusing, trying to understand OWB as CODI but CODI its an
extension!!!

Thanks


2012/4/24 Thomas Andraschko 

> You use it like WELD. You can use all the stuff from the
> "javax.enterprise.context" package.
> CDI is an API and WELD or OWB is an implementation :)
>
> 2012/4/24 José Luis Cetina 
>
> > Ok, but:
> >  how do i use?
> >  what do i have to do for use it?
> >  thats the question,
> > do i have to use annotations???
> > do you know what i mean???
> >
> > Works with the same annotations from WELD? that's the point i cant find
> > basic information anywhere
> >
> > 2012/4/24 Thomas Andraschko 
> >
> > > Hi,
> > >
> > > it's very easy.
> > > Just add the dependencies (impl,resource,jsf,web,spi) and configure
> this
> > > listener in your web.xml:
> > >
> > >    
> > >
> > >
> >
>  
> org.apache.webbeans.servlet.WebBeansConfigurationListener
> > >
> > >
> > > Regards,
> > > Thomas
> > >
> > >
> > >
> > >
> > > 2012/4/24 José Luis Cetina 
> > >
> > > > Im starting a project (JSF (Mojarra or MyFaces),JPA, EJB,Primefaces)
> > and
> > > i
> > > > want to use "Apache Open Web Beans" but the information is so poor, i
> > > can't
> > > > find enough information for work with it.
> > > > Can somebody know where i can find example and how to use OWB
> please!!
> > > >
> > > > I had the same problem(not enough information) with MyFaces CODI
> > > > (Navigation,Messages and Security) and  with some effort (questions
> in
> > > > mailing list's, reading from a few pages) i could use Apache CODI,
> now
> > im
> > > > trying to implement it in the same project OWB, but i really feel so
> > > > frustated to see excellent frameworks and extensions from Apache,
> but i
> > > > consider that the information its very but very very POOR!!
> > > >
> > > > The only thing i now to OWB its a "replacement" for WELD and works
> > great
> > > > with all Apache Products.
> > > >
> > > >
> > > > The user guide still in TODO lines...
> > > >
> http://openwebbeans.apache.org/1.0.0-SNAPSHOT/documents/userguide.pdf
> > > >
> > > >
> > > > Sorry 4 my english
> > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ---
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: OWB

2012-04-24 Thread José Luis Cetina
Ok, but:
 how do i use?
 what do i have to do for use it?
 thats the question,
do i have to use annotations???
do you know what i mean???

Works with the same annotations from WELD? that's the point i cant find
basic information anywhere

2012/4/24 Thomas Andraschko 

> Hi,
>
> it's very easy.
> Just add the dependencies (impl,resource,jsf,web,spi) and configure this
> listener in your web.xml:
>
>
>
>  
> org.apache.webbeans.servlet.WebBeansConfigurationListener
>
>
> Regards,
> Thomas
>
>
>
>
> 2012/4/24 José Luis Cetina 
>
> > Im starting a project (JSF (Mojarra or MyFaces),JPA, EJB,Primefaces) and
> i
> > want to use "Apache Open Web Beans" but the information is so poor, i
> can't
> > find enough information for work with it.
> > Can somebody know where i can find example and how to use OWB please!!
> >
> > I had the same problem(not enough information) with MyFaces CODI
> > (Navigation,Messages and Security) and  with some effort (questions in
> > mailing list's, reading from a few pages) i could use Apache CODI, now im
> > trying to implement it in the same project OWB, but i really feel so
> > frustated to see excellent frameworks and extensions from Apache, but i
> > consider that the information its very but very very POOR!!
> >
> > The only thing i now to OWB its a "replacement" for WELD and works great
> > with all Apache Products.
> >
> >
> > The user guide still in TODO lines...
> > http://openwebbeans.apache.org/1.0.0-SNAPSHOT/documents/userguide.pdf
> >
> >
> > Sorry 4 my english
> >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


OWB

2012-04-24 Thread José Luis Cetina
Im starting a project (JSF (Mojarra or MyFaces),JPA, EJB,Primefaces) and i
want to use "Apache Open Web Beans" but the information is so poor, i can't
find enough information for work with it.
Can somebody know where i can find example and how to use OWB please!!

I had the same problem(not enough information) with MyFaces CODI
(Navigation,Messages and Security) and  with some effort (questions in
mailing list's, reading from a few pages) i could use Apache CODI, now im
trying to implement it in the same project OWB, but i really feel so
frustated to see excellent frameworks and extensions from Apache, but i
consider that the information its very but very very POOR!!

The only thing i now to OWB its a "replacement" for WELD and works great
with all Apache Products.


The user guide still in TODO lines...
http://openwebbeans.apache.org/1.0.0-SNAPSHOT/documents/userguide.pdf


Sorry 4 my english




-- 
-------
*SCJA. José Luis Cetina*
---


Re: @Secured and Stereotypes

2012-04-24 Thread José Luis Cetina
Thanks  Gerhard Petracek, i forgot to add the interceptor tag in beans.xml.
It works now.

2012/4/21 Gerhard Petracek 

> hi jose,
>
> i tested it with weld (via glassfish 3.1.2 and as7) and it works without an
> issue.
>
> since you haven't listed it:
> with weld you have to configure the security-interceptor in your
> application explicitly.
> -> within the beans-tag in your beans.xml you have to add:
>
> 
>
>
> org.apache.myfaces.extensions.cdi.jsf.impl.security.SecurityInterceptor
> 
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/4/20 Gerhard Petracek 
>
> > hi jose,
> >
> > i've tested it with owb. i'll test if there is a bug in weld which blocks
> > this feature.
> >
> > regards,
> > gerhard
> >
> > http://www.irian.at
> >
> > Your JSF/JavaEE powerhouse -
> > JavaEE Consulting, Development and
> > Courses in English and German
> >
> > Professional Support for Apache MyFaces
> >
> >
> >
> > 2012/4/20 José Luis Cetina 
> >
> >> This example doesnt work for me too:
> >>
> >>  https://issues.apache.org/jira/browse/EXTCDI-262
> >>
> >>
> >>
> >> El 20 de abril de 2012 09:57, José Luis Cetina  >> >escribió:
> >>
> >> > This dont work for me, here are my small test:
> >> >
> >> > *//DECISION VOTER*
> >> > import java.util.Set;
> >> > import javax.interceptor.InvocationContext;
> >> > import
> >> >
> >>
> org.apache.myfaces.extensions.cdi.core.api.security.AbstractAccessDecisionVoter;
> >> > import
> >> >
> org.apache.myfaces.extensions.cdi.core.api.security.AccessDecisionVoter;
> >> > import
> >> > org.apache.myfaces.extensions.cdi.core.api.security.SecurityViolation;
> >> >
> >> > @javax.enterprise.context.ApplicationScoped
> >> > public class PermissionAccessDecisionVoter extends
> >> > AbstractAccessDecisionVoter implements AccessDecisionVoter{
> >> >
> >> > @Override
> >> > protected void checkPermission(InvocationContext ic,
> >> > Set violations) {
> >> > System.out.println("verifying ..");
> >> > }
> >> > }
> >> >
> >>
> ---
> >> >
> >> > *//Interface for annotation*
> >> >
> >> > import java.lang.annotation.ElementType;
> >> > import java.lang.annotation.Retention;
> >> > import java.lang.annotation.RetentionPolicy;
> >> > import java.lang.annotation.Target;
> >> > import javax.enterprise.inject.Stereotype;
> >> > import org.apache.myfaces.extensions.cdi.core.api.security.Secured;
> >> >
> >> > @Stereotype
> >> > @Target(value = {ElementType.METHOD, ElementType.FIELD,
> >> ElementType.TYPE})
> >> > @Retention(value = RetentionPolicy.RUNTIME)
> >> > @Secured(PermissionAccessDecisionVoter.class)
> >> > public @interface ModuloPantallaBinding {
> >> >
> >> > }
> >> >
> >> >
> >>
> ---
> >> > *//ViewConfig*
> >> > import
> >> org.apache.myfaces.extensions.cdi.core.api.config.view.ViewConfig;
> >> > import org.apache.myfaces.extensions.cdi.jsf.api.config.view.Page;
> >> >
> >> > @Page(navigation = Page.NavigationMode.REDIRECT)
> >> > public class Index implements ViewConfig{
> >> >
> >> > }
> >> >
> >>
> ---
> >> >
> >> > *//BEAN*
> >> > import java.io.Serializable;
> >> > import javax.faces.application.FacesMessage;
> >> > import javax.faces.context.FacesContext;
> >> > import javax.faces.event.Action

Re: @Secured and Stereotypes

2012-04-20 Thread José Luis Cetina
This example doesnt work for me too:

 https://issues.apache.org/jira/browse/EXTCDI-262



El 20 de abril de 2012 09:57, José Luis Cetina escribió:

> This dont work for me, here are my small test:
>
> *//DECISION VOTER*
> import java.util.Set;
> import javax.interceptor.InvocationContext;
> import
> org.apache.myfaces.extensions.cdi.core.api.security.AbstractAccessDecisionVoter;
> import
> org.apache.myfaces.extensions.cdi.core.api.security.AccessDecisionVoter;
> import
> org.apache.myfaces.extensions.cdi.core.api.security.SecurityViolation;
>
> @javax.enterprise.context.ApplicationScoped
> public class PermissionAccessDecisionVoter extends
> AbstractAccessDecisionVoter implements AccessDecisionVoter{
>
> @Override
> protected void checkPermission(InvocationContext ic,
> Set violations) {
> System.out.println("verifying ..");
> }
> }
> ---
>
> *//Interface for annotation*
>
> import java.lang.annotation.ElementType;
> import java.lang.annotation.Retention;
> import java.lang.annotation.RetentionPolicy;
> import java.lang.annotation.Target;
> import javax.enterprise.inject.Stereotype;
> import org.apache.myfaces.extensions.cdi.core.api.security.Secured;
>
> @Stereotype
> @Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
> @Retention(value = RetentionPolicy.RUNTIME)
> @Secured(PermissionAccessDecisionVoter.class)
> public @interface ModuloPantallaBinding {
>
> }
>
> ---
> *//ViewConfig*
> import org.apache.myfaces.extensions.cdi.core.api.config.view.ViewConfig;
> import org.apache.myfaces.extensions.cdi.jsf.api.config.view.Page;
>
> @Page(navigation = Page.NavigationMode.REDIRECT)
> public class Index implements ViewConfig{
>
> }
> ---
>
> *//BEAN*
> import java.io.Serializable;
> import javax.faces.application.FacesMessage;
> import javax.faces.context.FacesContext;
> import javax.faces.event.ActionEvent;
> import javax.inject.Named;
> import org.apache.myfaces.extensions.cdi.core.api.config.view.View;
> import
> org.apache.myfaces.extensions.cdi.core.api.scope.conversation.ViewAccessScoped;
> import org.apache.myfaces.extensions.cdi.jsf.api.config.view.InitView;
>
> @Named
> @View(Index.class)
> @ViewAccessScoped
> @ModuloPantallaBinding
> public class MyBean implements Serializable{
>
> @InitView
> public void init(){
> System.out.println("init method");
> }
>
> public void test(ActionEvent e){
> FacesContext.getCurrentInstance().addMessage(null, new
> FacesMessage(FacesMessage.SEVERITY_INFO, "msg", "msg detail"));
> }
> }
>
> ---
>
>
> *//XHTML*
> I Have only a commandbutton in a form:
>
>  actionListener="#{myBean.test}" />
>
>
>
> ---
>
> *//LOG*
> Información:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProvider
> installed successfully.
> Información:
> org.apache.myfaces.extensions.cdi.core.impl.provider.DefaultServiceProviderContext
> installed successfully.
> Información: Computed the following CODI ProjectStage: Production
> Información: abc.Index will be used as page-definition.
> Información: abc.MyBean will be used as page-bean.
> Información: Initializing Mojarra 2.1.6 (SNAPSHOT 20111206) for context
> '/WebApplication2'
> Información: [Started] MyFaces CODI (Extensions CDI) alternative config
> org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig
> is active (v1.0.4)
>
> Información: [Started] MyFaces CODI (Extensions CDI) alternative config
> org.apache.myfaces.extensions.cdi.jsf.alternative.config.AlternativeJsfModuleConfig
> is active (v1.0.4)
>
> Información: Running on PrimeFaces 3.2
> Información: WEB0671: Loading application [WebApplication2] at
> [/WebApplication2]
> Información: WebApplication2 was successfully deployed in 11,853
> milliseconds.
> Información: WEB0169: Created HTTP listen

Re: @Secured and Stereotypes

2012-04-20 Thread José Luis Cetina
.impl.message.FacesMessageInterpolator
   MessageResolver class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareApplicationMessagesMessageResolver
   MessageHandler class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageHandler
   LocaleResolver class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareLocaleResolver
   FormatterFactory class: class
org.apache.myfaces.extensions.cdi.message.impl.DefaultFormatterFactory

Información: [Started] MyFaces CODI JPA-Module v1.0.4

Información: [Started] MyFaces CODI (Extensions CDI) Core v1.0.4
Used CDI implementation: Weld v2022-2001
project-stage: Production
project-stage class:
org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage$Production
application-parameters:
   name: com.sun.faces.forceLoadConfiguration
   value: true
   name: com.sun.faces.validateXml
   value: true
   name: javax.faces.PROJECT_STAGE
   value: Development
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig$Proxy$_$$_WeldClientProxy
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig
config implementation:
org.apache.myfaces.extensions.cdi.core.api.config.CodiCoreConfig
   method: isAdvancedQualifierRequiredForDependencyInjection
   value: true
   method: isConfigurationLoggingEnabled
   value: true
   method: isInvalidBeanCreationEventEnabled
   value: false

Advertencia: The value of the JSF 2 project stage (Development) is
different from the CODI project stage (Production)
Información: [Started] MyFaces CODI Scripting-Module v1.0.4

Información: [Started] MyFaces CODI Bean-Validation-Module v1.0.4
*Información: verifying ..*
*Información: verifying ..*
*Información: init method*
*Información: verifying ..*
*Información: verifying ..*
*
*
*
*
*
*
*
*
*
*
---

*
*
*
*
*Why? Thanks*
*
*

2012/4/19 Gerhard Petracek 

> hi jose,
>
> here it works without an issue -> please provide the codi startup-log about
> the configuration you are using.
>
> @ package:
> please use: javax.enterprise.context
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/4/19 José Luis Cetina 
>
> > Thanks Gerhard, but i have a problem.
> > My checkpermision method never get called, i dont know why, i have this:
> >
> > *//ANOTATION*
> > @Stereotype
> > @Target(value = {ElementType.METHOD, ElementType.FIELD,
> ElementType.TYPE})
> > @Retention(value = RetentionPolicy.RUNTIME)
> > @Secured(PermissionAccessDecisionVoter.class)
> > public @interface ModuloPantallaBinding {
> >ModulosPantallasEnum codigoModulo();
> > }
> >
> > *//MANAGED BEAN*
> > @Named
> > @ViewAccessScoped
> > @View(IInicio.SeleccionRoles.class)
> >
> >
> @ModuloPantallaBinding(codigoModulo=ModulosPantallasEnum.SELECCION_ROLES_INICIO)
> > public class SeleccionRolesMBean implements Serializable {
> > .
> > .
> > .
> > }
> >
> > *//Secure class*
> > import javax.faces.bean.ApplicationScoped;
> > @ApplicationScoped
> > public class PermissionAccessDecisionVoter extends
> > AbstractAccessDecisionVoter implements AccessDecisionVoter{
> > .
> >
> > protected void checkPermission(InvocationContext ic,
> Set
> > violations) {
> >  *ModuloPantallaBinding obj*=
> > voterContext.getMetaDataFor(ModuloPantallaBinding.class.getName(),
> > ModuloPantallaBinding.class);
> >
> >
> > }
> > .
> > }
> >
> >
> > is correct the package javax.faces.bean.ApplicationScoped
> > for @ApplicationScoped or have to be:
> > javax.enterprise.context.ApplicationScoped;???
> >
> > My checkPermission method never get called, but if i use the anottation
> > @Secure in my:
> >@Secured(PermissionAccessDecisionVoter.class)
> >public @Page(name="seleccion_roles") class SeleccionRoles implements
> > IInicio{}
> >
> > it works but the obj  always is null.
> >
> > Thanks
> >
> >
> > 2012/4/19 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > see the description at [1] - it will be added to the wiki soon.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1] https://issues.apache.org/jira/browse/EXTCDI-262
> &g

Re: @Secured and Stereotypes

2012-04-19 Thread José Luis Cetina
Thanks Gerhard, but i have a problem.
My checkpermision method never get called, i dont know why, i have this:

*//ANOTATION*
@Stereotype
@Target(value = {ElementType.METHOD, ElementType.FIELD, ElementType.TYPE})
@Retention(value = RetentionPolicy.RUNTIME)
@Secured(PermissionAccessDecisionVoter.class)
public @interface ModuloPantallaBinding {
ModulosPantallasEnum codigoModulo();
}

*//MANAGED BEAN*
@Named
@ViewAccessScoped
@View(IInicio.SeleccionRoles.class)
@ModuloPantallaBinding(codigoModulo=ModulosPantallasEnum.SELECCION_ROLES_INICIO)
public class SeleccionRolesMBean implements Serializable {
.
.
.
}

*//Secure class*
import javax.faces.bean.ApplicationScoped;
@ApplicationScoped
public class PermissionAccessDecisionVoter extends
AbstractAccessDecisionVoter implements AccessDecisionVoter{
.

protected void checkPermission(InvocationContext ic, Set
violations) {
 *ModuloPantallaBinding obj*=
voterContext.getMetaDataFor(ModuloPantallaBinding.class.getName(),
ModuloPantallaBinding.class);


}
.
}


is correct the package javax.faces.bean.ApplicationScoped
for @ApplicationScoped or have to be:
javax.enterprise.context.ApplicationScoped;???

My checkPermission method never get called, but if i use the anottation
@Secure in my:
@Secured(PermissionAccessDecisionVoter.class)
public @Page(name="seleccion_roles") class SeleccionRoles implements
IInicio{}

it works but the obj  always is null.

Thanks


2012/4/19 Gerhard Petracek 

> hi jose,
>
> see the description at [1] - it will be added to the wiki soon.
>
> regards,
> gerhard
>
> [1] https://issues.apache.org/jira/browse/EXTCDI-262
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/4/19 José Luis Cetina 
>
> > Hello somebody know where i can find an example of
> > @Secured and Stereotypes
> >
> > Im triying to work with @Secured and Stereotypes with metadata but i have
> > some doubts
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > -------
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


@Secured and Stereotypes

2012-04-19 Thread José Luis Cetina
Hello somebody know where i can find an example of
@Secured and Stereotypes

Im triying to work with @Secured and Stereotypes with metadata but i have
some doubts


-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
Great!! Thanks, i can do it with my own CDI Producer Method and works!!

Thanks

2012/4/4 Gerhard Petracek 

> hi jose,
>
> if you really need it for advanced use-cases, you can create your own cdi
> producer-method - e.g.:
>
>@Produces
>@Enhanced
>@Dependent
>protected MessageContext createCustomMessageContext(@Jsf MessageContext
> jsfMessageContext)
>{
>return  jsfMessageContext.config().use().messageResolver(new
> CustomMessageResolver()).create();
>}
> ->
>@Inject
>@Enhanced
>private MessageContext messageContext;
>
> (instead of @Enhanced you can create your own cdi-qualifier)
>
> regards,
> gerhard
>
>
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/4/4 José Luis Cetina 
>
> > Is there a way to override MessageContext for set the messageResolver
> > always to my own resolver?
> >
> >
> > Beacuse in each managed bean i have to do this after use it:
> >
> > @Inject
> >@Jsf
> >private MessageContext messageContext;
> >
> > //some method
> > *   messageContext.config().change().messageResolver(new
> > MyOwnMessageResolver());*
> > *
> > *
> > *
> > *
> > *Thanks*
> >
> >
> > 2012/4/4 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > i said: "std. jsf application message bundle."
> > >
> > > ->
> > >
> > > 
> > >...
> > > 
> > >
> > > see e.g. [1]
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > >
> > >
> >
> https://svn.apache.org/repos/asf/myfaces/extensions/cdi/tags/extcdi-1.0.4/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/faces-config.xml
> > >
> > >
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > > 2012/4/4 José Luis Cetina 
> > >
> > > > I found a solution, creating my own MessageResolver, thanks, i will
> > share
> > > > later.
> > > >
> > > > El 4 de abril de 2012 10:57, José Luis Cetina  > > > >escribió:
> > > >
> > > > > I have 2 resource bundle:
> > > > >
> > > > > 
> > > > > my.package.i18n.messages
> > > > > prop_general
> > > > >  
> > > > >
> > > > > 
> > > > >  my.package2.i18n.messages
> > > > > prop_users
> > > > > 
> > > > >
> > > > >
> > > > > and in my class:
> > > > > @Inject
> > > > > private MessageContext messageContext;
> > > > >
> > > > > String messageText =
> > messageContext.message().text("msgKey").toText();
> > > > >
> > > > > How CODI know where resource-bundle has to use?
> > > > >
> > > > >
> > > > >
> > > > > El 4 de abril de 2012 10:27, José Luis Cetina <
> maxtorz...@gmail.com
> > > > >escribió:
> > > > >
> > > > > My JSF app use this:
> > > > >>
> > > > >> 
> > > > >> my.package.i18n.messages
> > > > >> prop_general
> > > > >>  
> > > > >>
> > > > >> In my xhtml page i use
> > > > >>
> > > > >> #{prop_general.mykey}
> > > > >>
> > > > >>
> > > > >> but i dont know how i can use this with CODI Messages,
> > > > >>
> > > > >> I see this example:
> > > > >>
> > > > >> String messageText =
> > messageContext.message().text("msgKey").toText();
> > > > >>
> > > > >> but how CODI get my property file? and where i get the
> > > > >> object messageContext ??
> > > > >> i think the tutorial is not specific about this
> > > > >>
> > > > >>

Re: CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
Is there a way to override MessageContext for set the messageResolver
always to my own resolver?


Beacuse in each managed bean i have to do this after use it:

@Inject
@Jsf
private MessageContext messageContext;

//some method
 *   messageContext.config().change().messageResolver(new
MyOwnMessageResolver());*
*
*
*
*
*Thanks*


2012/4/4 Gerhard Petracek 

> hi jose,
>
> i said: "std. jsf application message bundle."
>
> ->
>
> 
>...
> 
>
> see e.g. [1]
>
> regards,
> gerhard
>
> [1]
>
> https://svn.apache.org/repos/asf/myfaces/extensions/cdi/tags/extcdi-1.0.4/examples/jsf-examples/hello_myfaces-codi_jsf20/src/main/webapp/WEB-INF/faces-config.xml
>
>
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/4/4 José Luis Cetina 
>
> > I found a solution, creating my own MessageResolver, thanks, i will share
> > later.
> >
> > El 4 de abril de 2012 10:57, José Luis Cetina  > >escribió:
> >
> > > I have 2 resource bundle:
> > >
> > > 
> > > my.package.i18n.messages
> > > prop_general
> > >  
> > >
> > > 
> > >  my.package2.i18n.messages
> > > prop_users
> > > 
> > >
> > >
> > > and in my class:
> > > @Inject
> > > private MessageContext messageContext;
> > >
> > > String messageText = messageContext.message().text("msgKey").toText();
> > >
> > > How CODI know where resource-bundle has to use?
> > >
> > >
> > >
> > > El 4 de abril de 2012 10:27, José Luis Cetina  > >escribió:
> > >
> > > My JSF app use this:
> > >>
> > >> 
> > >> my.package.i18n.messages
> > >> prop_general
> > >>  
> > >>
> > >> In my xhtml page i use
> > >>
> > >> #{prop_general.mykey}
> > >>
> > >>
> > >> but i dont know how i can use this with CODI Messages,
> > >>
> > >> I see this example:
> > >>
> > >> String messageText = messageContext.message().text("msgKey").toText();
> > >>
> > >> but how CODI get my property file? and where i get the
> > >> object messageContext ??
> > >> i think the tutorial is not specific about this
> > >>
> > >>
> > >> 2012/4/4 Gerhard Petracek 
> > >>
> > >>> hi jose,
> > >>>
> > >>> in a jsf application:
> > >>> just configure your std. jsf application message bundle.
> > >>>
> > >>> regards,
> > >>> gerhard
> > >>>
> > >>>
> > >>>
> > >>> http://www.irian.at
> > >>>
> > >>> Your JSF/JavaEE powerhouse -
> > >>> JavaEE Consulting, Development and
> > >>> Courses in English and German
> > >>>
> > >>> Professional Support for Apache MyFaces
> > >>>
> > >>>
> > >>> 2012/4/4 José Luis Cetina 
> > >>>
> > >>> > Hi im new with CODI Messages Module, im reading this page:
> > >>> > https://cwiki.apache.org/EXTCDI/message-usage.html
> > >>> >
> > >>> > but i cant find a way to use codi msgs with properties file, it is
> > >>> > possible?.
> > >>> >
> > >>> > Normally i use properties file where the use can change their msgs
> > but
> > >>> here
> > >>> > in CODI.
> > >>> >
> > >>> >
> > >>> >
> > >>> >
> > >>> > --
> > >>> > ---
> > >>> > *SCJA. José Luis Cetina*
> > >>> > ---
> > >>> >
> > >>>
> > >>
> > >>
> > >>
> > >> --
> > >> ---
> > >> *SCJA. José Luis Cetina*
> > >> ---
> > >>
> > >>
> > >
> > >
> > > --
> > > ---
> > > *SCJA. José Luis Cetina*
> > > ---
> > >
> > >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
I found a solution, creating my own MessageResolver, thanks, i will share
later.

El 4 de abril de 2012 10:57, José Luis Cetina escribió:

> I have 2 resource bundle:
>
> 
> my.package.i18n.messages
> prop_general
>  
>
> 
>  my.package2.i18n.messages
> prop_users
> 
>
>
> and in my class:
> @Inject
> private MessageContext messageContext;
>
> String messageText = messageContext.message().text("msgKey").toText();
>
> How CODI know where resource-bundle has to use?
>
>
>
> El 4 de abril de 2012 10:27, José Luis Cetina escribió:
>
> My JSF app use this:
>>
>> 
>> my.package.i18n.messages
>> prop_general
>>  
>>
>> In my xhtml page i use
>>
>> #{prop_general.mykey}
>>
>>
>> but i dont know how i can use this with CODI Messages,
>>
>> I see this example:
>>
>> String messageText = messageContext.message().text("msgKey").toText();
>>
>> but how CODI get my property file? and where i get the
>> object messageContext ??
>> i think the tutorial is not specific about this
>>
>>
>> 2012/4/4 Gerhard Petracek 
>>
>>> hi jose,
>>>
>>> in a jsf application:
>>> just configure your std. jsf application message bundle.
>>>
>>> regards,
>>> gerhard
>>>
>>>
>>>
>>> http://www.irian.at
>>>
>>> Your JSF/JavaEE powerhouse -
>>> JavaEE Consulting, Development and
>>> Courses in English and German
>>>
>>> Professional Support for Apache MyFaces
>>>
>>>
>>> 2012/4/4 José Luis Cetina 
>>>
>>> > Hi im new with CODI Messages Module, im reading this page:
>>> > https://cwiki.apache.org/EXTCDI/message-usage.html
>>> >
>>> > but i cant find a way to use codi msgs with properties file, it is
>>> > possible?.
>>> >
>>> > Normally i use properties file where the use can change their msgs but
>>> here
>>> > in CODI.
>>> >
>>> >
>>> >
>>> >
>>> > --
>>> > -------
>>> > *SCJA. José Luis Cetina*
>>> > ---
>>> >
>>>
>>
>>
>>
>> --
>> ---
>> *SCJA. José Luis Cetina*
>> ---
>>
>>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
I have 2 resource bundle:


my.package.i18n.messages
prop_general
 


 my.package2.i18n.messages
prop_users



and in my class:
@Inject
private MessageContext messageContext;

String messageText = messageContext.message().text("msgKey").toText();

How CODI know where resource-bundle has to use?



El 4 de abril de 2012 10:27, José Luis Cetina escribió:

> My JSF app use this:
>
> 
> my.package.i18n.messages
> prop_general
>  
>
> In my xhtml page i use
>
> #{prop_general.mykey}
>
>
> but i dont know how i can use this with CODI Messages,
>
> I see this example:
>
> String messageText = messageContext.message().text("msgKey").toText();
>
> but how CODI get my property file? and where i get the
> object messageContext ??
> i think the tutorial is not specific about this
>
>
> 2012/4/4 Gerhard Petracek 
>
>> hi jose,
>>
>> in a jsf application:
>> just configure your std. jsf application message bundle.
>>
>> regards,
>> gerhard
>>
>>
>>
>> http://www.irian.at
>>
>> Your JSF/JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>> 2012/4/4 José Luis Cetina 
>>
>> > Hi im new with CODI Messages Module, im reading this page:
>> > https://cwiki.apache.org/EXTCDI/message-usage.html
>> >
>> > but i cant find a way to use codi msgs with properties file, it is
>> > possible?.
>> >
>> > Normally i use properties file where the use can change their msgs but
>> here
>> > in CODI.
>> >
>> >
>> >
>> >
>> > --
>> > ---
>> > *SCJA. José Luis Cetina*
>> > ---
>> >
>>
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
My JSF app use this:


my.package.i18n.messages
prop_general
 

In my xhtml page i use

#{prop_general.mykey}


but i dont know how i can use this with CODI Messages,

I see this example:

String messageText = messageContext.message().text("msgKey").toText();

but how CODI get my property file? and where i get the
object messageContext ??
i think the tutorial is not specific about this


2012/4/4 Gerhard Petracek 

> hi jose,
>
> in a jsf application:
> just configure your std. jsf application message bundle.
>
> regards,
> gerhard
>
>
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/4/4 José Luis Cetina 
>
> > Hi im new with CODI Messages Module, im reading this page:
> > https://cwiki.apache.org/EXTCDI/message-usage.html
> >
> > but i cant find a way to use codi msgs with properties file, it is
> > possible?.
> >
> > Normally i use properties file where the use can change their msgs but
> here
> > in CODI.
> >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


CODI Messages + properties file

2012-04-04 Thread José Luis Cetina
Hi im new with CODI Messages Module, im reading this page:
https://cwiki.apache.org/EXTCDI/message-usage.html

but i cant find a way to use codi msgs with properties file, it is
possible?.

Normally i use properties file where the use can change their msgs but here
in CODI.




-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI

2012-04-02 Thread José Luis Cetina
So strange i remove the @ViewAccesScoped and @View and then added again and
works... extrange!!

El 2 de abril de 2012 14:41, José Luis Cetina escribió:

> Hi Gerhard i use your suggestion, extends from a base clase but im getting
> this error:
>
> Severe: Exception while loading the app : WELD-47 Specializing bean
> must extend another bean:  Managed Bean [class
> org.apache.myfaces.extensions.cdi.jsf2.impl.request.DefaultRequestTypeResolver]
> with qualifiers [@Any @Default]
>
> @Named
> @ViewAccessScoped
> @View(Home.LoginMobile.class)
> public class LoginMobileMBean extends LoginMBean implements Serializable{
> }
>
>
> @Named
> @ViewAccessScoped
> @View(Home.Login.class)
> public class LoginDesktopMBean extends LoginMBean implements Serializable{
>
> }
>
> //HERE I DONT HAVE @NAMED and nothing else, only a class
> public class LoginMBean implements Serializable{
> }
>
>
> El 2 de abril de 2012 13:29, José Luis Cetina escribió:
>
> Ok, thanks a lot!!!
>>
>>
>> 2012/4/2 Gerhard Petracek 
>>
>>> hi jose,
>>>
>>> if you would like to use the same name, you can use:
>>>
>>> //...
>>> @Named
>>> @View( {Page1.class, Page2.class} )
>>> public class CustomPageBean
>>> {
>>>//...
>>> }
>>>
>>> that works as well.
>>>
>>> regards,
>>> gerhard
>>>
>>> http://www.irian.at
>>>
>>> Your JSF/JavaEE powerhouse -
>>> JavaEE Consulting, Development and
>>> Courses in English and German
>>>
>>> Professional Support for Apache MyFaces
>>>
>>>
>>>
>>> 2012/4/2 José Luis Cetina 
>>>
>>> > OK, Gerhard thanks, if its possible to add this as a new feature,
>>> something
>>> > like:
>>> >
>>> > @View(DesktopPage.class,MobilePage.class)
>>> >
>>> > Thanks.
>>> >
>>> > 2012/4/2 Gerhard Petracek 
>>> >
>>> > > hi jose,
>>> > >
>>> > > right now you just can create a base class and in the 2 concrete
>>> > page-beans
>>> > > you just provide different names.
>>> > >
>>> > > regards,
>>> > > gerhard
>>> > >
>>> > > http://www.irian.at
>>> > >
>>> > > Your JSF/JavaEE powerhouse -
>>> > > JavaEE Consulting, Development and
>>> > > Courses in English and German
>>> > >
>>> > > Professional Support for Apache MyFaces
>>> > >
>>> > >
>>> > >
>>> > > 2012/4/2 José Luis Cetina 
>>> > >
>>> > > > Thanks Gerhard, but is there a way to do this but with: @View ??
>>> > > >
>>> > > > I like more use @View
>>> > > >
>>> > > >
>>> > > > 2012/4/2 Gerhard Petracek 
>>> > > >
>>> > > > > hi jose,
>>> > > > >
>>> > > > > just use @PageBean [1] and ref. the same page-bean at both
>>> > > view-configs.
>>> > > > >
>>> > > > > regards,
>>> > > > > gerhard
>>> > > > >
>>> > > > > [1]
>>> > > > >
>>> > > > >
>>> > > >
>>> > >
>>> >
>>> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > >
>>> > > > > http://www.irian.at
>>> > > > >
>>> > > > > Your JSF/JavaEE powerhouse -
>>> > > > > JavaEE Consulting, Development and
>>> > > > > Courses in English and German
>>> > > > >
>>> > > > > Professional Support for Apache MyFaces
>>> > > > >
>>> > > > >
>>> > > > > 2012/4/2 José Luis Cetina 
>>> > > > >
>>> > > > > > Hello, someone who can guide me?
>>> > > > > > I want to use the same managed bean with 2 different pages,
>>> since a
>>> > > > page
>>> > > > > is
>>> > > > > > for mobile and other "normal" but both use the same managed
>>> bean.
>>> > > > > >
>>> > > > > > I used the  TYPE-SAFE  navigation  but managed bean per page
>>> > > > > >
>>> > > > > >
>>> > > > > >
>>> ---
>>> > > > > > *SCJA. José Luis Cetina*
>>> > > > > >
>>> ---
>>> > > > > >
>>> > > > >
>>> > > >
>>> > > >
>>> > > >
>>> > > > --
>>> > > > ---
>>> > > > *SCJA. José Luis Cetina*
>>> > > > ---
>>> > > >
>>> > >
>>> >
>>> >
>>> >
>>> > --
>>> > ---
>>> > *SCJA. José Luis Cetina*
>>> > ---
>>> >
>>>
>>
>>
>>
>> --
>> ---
>> *SCJA. José Luis Cetina*
>> ---
>>
>>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI

2012-04-02 Thread José Luis Cetina
Hi Gerhard i use your suggestion, extends from a base clase but im getting
this error:

Severe: Exception while loading the app : WELD-47 Specializing bean
must extend another bean:  Managed Bean [class
org.apache.myfaces.extensions.cdi.jsf2.impl.request.DefaultRequestTypeResolver]
with qualifiers [@Any @Default]

@Named
@ViewAccessScoped
@View(Home.LoginMobile.class)
public class LoginMobileMBean extends LoginMBean implements Serializable{
}


@Named
@ViewAccessScoped
@View(Home.Login.class)
public class LoginDesktopMBean extends LoginMBean implements Serializable{

}

//HERE I DONT HAVE @NAMED and nothing else, only a class
public class LoginMBean implements Serializable{
}


El 2 de abril de 2012 13:29, José Luis Cetina escribió:

> Ok, thanks a lot!!!
>
>
> 2012/4/2 Gerhard Petracek 
>
>> hi jose,
>>
>> if you would like to use the same name, you can use:
>>
>> //...
>> @Named
>> @View( {Page1.class, Page2.class} )
>> public class CustomPageBean
>> {
>>//...
>> }
>>
>> that works as well.
>>
>> regards,
>> gerhard
>>
>> http://www.irian.at
>>
>> Your JSF/JavaEE powerhouse -
>> JavaEE Consulting, Development and
>> Courses in English and German
>>
>> Professional Support for Apache MyFaces
>>
>>
>>
>> 2012/4/2 José Luis Cetina 
>>
>> > OK, Gerhard thanks, if its possible to add this as a new feature,
>> something
>> > like:
>> >
>> > @View(DesktopPage.class,MobilePage.class)
>> >
>> > Thanks.
>> >
>> > 2012/4/2 Gerhard Petracek 
>> >
>> > > hi jose,
>> > >
>> > > right now you just can create a base class and in the 2 concrete
>> > page-beans
>> > > you just provide different names.
>> > >
>> > > regards,
>> > > gerhard
>> > >
>> > > http://www.irian.at
>> > >
>> > > Your JSF/JavaEE powerhouse -
>> > > JavaEE Consulting, Development and
>> > > Courses in English and German
>> > >
>> > > Professional Support for Apache MyFaces
>> > >
>> > >
>> > >
>> > > 2012/4/2 José Luis Cetina 
>> > >
>> > > > Thanks Gerhard, but is there a way to do this but with: @View ??
>> > > >
>> > > > I like more use @View
>> > > >
>> > > >
>> > > > 2012/4/2 Gerhard Petracek 
>> > > >
>> > > > > hi jose,
>> > > > >
>> > > > > just use @PageBean [1] and ref. the same page-bean at both
>> > > view-configs.
>> > > > >
>> > > > > regards,
>> > > > > gerhard
>> > > > >
>> > > > > [1]
>> > > > >
>> > > > >
>> > > >
>> > >
>> >
>> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
>> > > > >
>> > > > >
>> > > > >
>> > > > >
>> > > > > http://www.irian.at
>> > > > >
>> > > > > Your JSF/JavaEE powerhouse -
>> > > > > JavaEE Consulting, Development and
>> > > > > Courses in English and German
>> > > > >
>> > > > > Professional Support for Apache MyFaces
>> > > > >
>> > > > >
>> > > > > 2012/4/2 José Luis Cetina 
>> > > > >
>> > > > > > Hello, someone who can guide me?
>> > > > > > I want to use the same managed bean with 2 different pages,
>> since a
>> > > > page
>> > > > > is
>> > > > > > for mobile and other "normal" but both use the same managed
>> bean.
>> > > > > >
>> > > > > > I used the  TYPE-SAFE  navigation  but managed bean per page
>> > > > > >
>> > > > > >
>> > > > > >
>> ---
>> > > > > > *SCJA. José Luis Cetina*
>> > > > > >
>> ---
>> > > > > >
>> > > > >
>> > > >
>> > > >
>> > > >
>> > > > --
>> > > > ---
>> > > > *SCJA. José Luis Cetina*
>> > > > ---
>> > > >
>> > >
>> >
>> >
>> >
>> > --
>> > ---
>> > *SCJA. José Luis Cetina*
>> > ---
>> >
>>
>
>
>
> --
> ---
> *SCJA. José Luis Cetina*
> ---
>
>


-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI

2012-04-02 Thread José Luis Cetina
Ok, thanks a lot!!!

2012/4/2 Gerhard Petracek 

> hi jose,
>
> if you would like to use the same name, you can use:
>
> //...
> @Named
> @View( {Page1.class, Page2.class} )
> public class CustomPageBean
> {
>//...
> }
>
> that works as well.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/4/2 José Luis Cetina 
>
> > OK, Gerhard thanks, if its possible to add this as a new feature,
> something
> > like:
> >
> > @View(DesktopPage.class,MobilePage.class)
> >
> > Thanks.
> >
> > 2012/4/2 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > right now you just can create a base class and in the 2 concrete
> > page-beans
> > > you just provide different names.
> > >
> > > regards,
> > > gerhard
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > >
> > > 2012/4/2 José Luis Cetina 
> > >
> > > > Thanks Gerhard, but is there a way to do this but with: @View ??
> > > >
> > > > I like more use @View
> > > >
> > > >
> > > > 2012/4/2 Gerhard Petracek 
> > > >
> > > > > hi jose,
> > > > >
> > > > > just use @PageBean [1] and ref. the same page-bean at both
> > > view-configs.
> > > > >
> > > > > regards,
> > > > > gerhard
> > > > >
> > > > > [1]
> > > > >
> > > > >
> > > >
> > >
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
> > > > >
> > > > >
> > > > >
> > > > >
> > > > > http://www.irian.at
> > > > >
> > > > > Your JSF/JavaEE powerhouse -
> > > > > JavaEE Consulting, Development and
> > > > > Courses in English and German
> > > > >
> > > > > Professional Support for Apache MyFaces
> > > > >
> > > > >
> > > > > 2012/4/2 José Luis Cetina 
> > > > >
> > > > > > Hello, someone who can guide me?
> > > > > > I want to use the same managed bean with 2 different pages,
> since a
> > > > page
> > > > > is
> > > > > > for mobile and other "normal" but both use the same managed bean.
> > > > > >
> > > > > > I used the  TYPE-SAFE  navigation  but managed bean per page
> > > > > >
> > > > > >
> > > > > >
> ---
> > > > > > *SCJA. José Luis Cetina*
> > > > > >
> ---
> > > > > >
> > > > >
> > > >
> > > >
> > > >
> > > > --
> > > > ---
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI

2012-04-02 Thread José Luis Cetina
OK, Gerhard thanks, if its possible to add this as a new feature, something
like:

@View(DesktopPage.class,MobilePage.class)

Thanks.

2012/4/2 Gerhard Petracek 

> hi jose,
>
> right now you just can create a base class and in the 2 concrete page-beans
> you just provide different names.
>
> regards,
> gerhard
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/4/2 José Luis Cetina 
>
> > Thanks Gerhard, but is there a way to do this but with: @View ??
> >
> > I like more use @View
> >
> >
> > 2012/4/2 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > just use @PageBean [1] and ref. the same page-bean at both
> view-configs.
> > >
> > > regards,
> > > gerhard
> > >
> > > [1]
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
> > >
> > >
> > >
> > >
> > > http://www.irian.at
> > >
> > > Your JSF/JavaEE powerhouse -
> > > JavaEE Consulting, Development and
> > > Courses in English and German
> > >
> > > Professional Support for Apache MyFaces
> > >
> > >
> > > 2012/4/2 José Luis Cetina 
> > >
> > > > Hello, someone who can guide me?
> > > > I want to use the same managed bean with 2 different pages, since a
> > page
> > > is
> > > > for mobile and other "normal" but both use the same managed bean.
> > > >
> > > > I used the  TYPE-SAFE  navigation  but managed bean per page
> > > >
> > > >
> > > > -------
> > > > *SCJA. José Luis Cetina*
> > > > ---
> > > >
> > >
> >
> >
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI

2012-04-02 Thread José Luis Cetina
Thanks Gerhard, but is there a way to do this but with: @View ??

I like more use @View


2012/4/2 Gerhard Petracek 

> hi jose,
>
> just use @PageBean [1] and ref. the same page-bean at both view-configs.
>
> regards,
> gerhard
>
> [1]
>
> https://cwiki.apache.org/confluence/display/EXTCDI/JSF+Usage#JSFUsage-PageBeans
>
>
>
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
> 2012/4/2 José Luis Cetina 
>
> > Hello, someone who can guide me?
> > I want to use the same managed bean with 2 different pages, since a page
> is
> > for mobile and other "normal" but both use the same managed bean.
> >
> > I used the  TYPE-SAFE  navigation  but managed bean per page
> >
> >
> > ---
> > *SCJA. José Luis Cetina*
> > -------
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


CODI

2012-04-02 Thread José Luis Cetina
Hello, someone who can guide me?
I want to use the same managed bean with 2 different pages, since a page is
for mobile and other "normal" but both use the same managed bean.

I used the  TYPE-SAFE  navigation  but managed bean per page


---
*SCJA. José Luis Cetina*
---


CODI + Weld Error

2012-03-30 Thread José Luis Cetina
Im developing my JSF APP, when i change something in my classes and run
again to test i always get this message in the log, but the app is "normal"

Severe: WELD-19 Error destroying an instance Managed Bean [class
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ViewAccessConversationExpirationEvaluatorRegistry]
with qualifiers [@Any @Default] of
org.apache.myfaces.extensions.cdi.jsf.impl.scope.conversation.ViewAccessConversationExpirationEvaluatorRegistry@2060020b

CODI 1.04 , Mojarra 2.1.7, Glassfish 3.1.2

-- 
---
*SCJA. José Luis Cetina*
---


Re: CODI Redirect when page load

2012-03-30 Thread José Luis Cetina
Ouch, do you have a guide how can i do this?

2012/3/30 Gerhard Petracek 

> hi jose,
>
> please try the patch you can find at [1].
> (it applies on the current trunk.)
>
> regards,
> gerhard
>
> [1] http://people.apache.org/~gpetracek/myfaces/codi/patches/
> [2] https://svn.apache.org/repos/asf/myfaces/extensions/cdi/trunk/
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/30 José Luis Cetina 
>
> > CODI 1.0.4
> >
> > Hi i want to redirect from one page from other page when the first page
> > load.
> >
> > Example:
> > I have to pages pageA and pageB
> >
> > If i do this in @Named (pageA)
> >
> > @PreRenderView
> >public void init(){
> >   vnh.navigateTo(Pageb.class);
> >}
> >
> > i get this message:
> >
> >   -  Unable to find matching navigation case from view ID '/pageb.xhtml'
> >   for outcome 'Pageb''
> >
> >
> > But if i use the same method vnh.navigateTo(Pageb.class) in a action of a
> > button it works, how can i redirect from pageA to pageB before pageA get
> > rendered?
> >
> > I try whit:
> > @InitView
> > @PreRenderView
> > @PostRenderView
> >
> > whit InitView and PostRenderView i dont get any message but the redirect
> > never occurs.
> >
> > --
> > ---
> > *SCJA. José Luis Cetina*
> > ---
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


CODI Redirect when page load

2012-03-30 Thread José Luis Cetina
CODI 1.0.4

Hi i want to redirect from one page from other page when the first page
load.

Example:
I have to pages pageA and pageB

If i do this in @Named (pageA)

@PreRenderView
public void init(){
   vnh.navigateTo(Pageb.class);
}

i get this message:

   -  Unable to find matching navigation case from view ID '/pageb.xhtml'
   for outcome 'Pageb''


But if i use the same method vnh.navigateTo(Pageb.class) in a action of a
button it works, how can i redirect from pageA to pageB before pageA get
rendered?

I try whit:
@InitView
@PreRenderView
@PostRenderView

whit InitView and PostRenderView i dont get any message but the redirect
never occurs.

-- 
-------
*SCJA. José Luis Cetina*
---


Re: how to build a JSF 2.0 (MyFaces/Facelets) Project

2012-03-14 Thread José Luis Cetina
Helo ayouB im using Netbeans an is so easy to create a JSF Faceletes
proyect, why you dont test with netbeans?

2012/3/14 Mark Struberg 

> Best is to use Maven.
>
>
> $> mvn archetype:generate -DarchetypeGroupId=org.apache.myfaces.buildtools
> -DarchetypeArtifactId=myfaces-archetype-helloworld20-owb
>
> LieGrue,
> strub
>
>
>
> - Original Message -
> > From: ayouB __ 
> > To: users@myfaces.apache.org
> > Cc:
> > Sent: Wednesday, March 14, 2012 5:47 PM
> > Subject: how to build a JSF 2.0 (MyFaces/Facelets) Project
> >
> >
> > Hello every one,
> >
> > I have sent a mail before that one where i explained problems i faced
> while
> > configuring the developpement environnement, unfortunately that let me
> no where
> > i spent a lot of time trying to find a solution but i didn't anyway thank
> > you all for your replies and your collaboration :)
> > The problem now is how to create and configure a jsf project under
> eclipse
> > helios IDE, what JARs i need, how to dowload them and where can i find
> them,
> > what version, and where should i put them (in my class path, in my web
> app ...).
> > I'm really confused and i don't know what to do ! Please Help ^_^
> >
> > Thanks.
> >
> > AYOUB
> >
>



-- 
---
*SCJA. José Luis Cetina*
---


Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
What application server do u use?
El 13/03/2012 17:36, "Gerhard Petracek" 
escribió:

> hi leo,
>
> some months ago we tested myfaces-core + owb on glassfish (within the same
> application) and the config needed for myfaces-core broke owb.
>
> regards,
> gerhard
>
>
>
> 2012/3/13 Leonardo Uribe 
>
> > Hi
> >
> > I almost forgot to say:
> >
> >
> >
> org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
> > cannot be cast to javassist.util.proxy.ProxyObject*
> > *java.lang.ClassCastException:
> >
> >
> org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
> > cannot be cast to javassist.util.proxy.ProxyObject*
> >
> > It looks like some issue with the classloader.
> >
> > And the issue with @Model,@Named and @ViewAccessScoped could be caused
> > because it is necessary a LifecycleProvider2 implementation for
> > Glassfish, so the container can resolve such annotations when the bean
> > is constructed and destroyed. Since Glassfish is CDDL+GPL licensed,
> > there is no default LifecycleProvider bundled with MyFaces.
> >
> > regards,
> >
> > Leonardo Uribe
> >
> > 2012/3/13 Leonardo Uribe :
> > > Hi
> > >
> > > First of all, the problem is related to glassfish. This container does
> > > not provide a clear way to change of jsf implementation.
> > >
> > > It is not that myfaces cannot run with glassfish, instead glassfish is
> > > not kind with any other alternate jsf implementation.
> > >
> > > The classloader flag is just a workaround in my opinion, but it works.
> > > The message:
> > >
> > > *Both MyFaces and the RI are on your classpath. Please make sure to use
> > > only one of the two JSF-implementations.*
> > >
> > > Just ignore it. Glassfish classloader will find myfaces jars first
> > > than mojarra ones.
> > >
> > > The other problem you are experiencing is related to the same
> > > classloader flag. Since myfaces jars should be on WEB-INF/lib, those
> > > jars cannot be found by weld, so to make it work, you need to use
> > > another library like OpenWebBeans and put the related jar files on
> > > WEB-INF/lib folder too. That will work but it is not ideal. Anyway,
> > > most of the people will not care about this.
> > >
> > > The right way to do it should be done from glassfish side, removing
> > > mojarra jars and including myfaces ones in the container (not
> > > including myfaces into the webapp). But that's not easy, because I
> > > suppose it is necessary to check if glassfish internals will still
> > > work, and it should exists an integration code between mojarra and
> > > glassfish somewhere. Basically, glassfish does not provide a clean
> > > extension point to do this.
> > >
> > > Other containers like JBoss do things right, they provide a deployer
> > > that uses myfaces integration code. See:
> > >
> > >
> >
> https://cwiki.apache.org/confluence/display/MYFACES/Integration+with+application+and+web+servers
> > >
> > > regards,
> > >
> > > Leonardo Uribe
> > >
> > >
> > > 2012/3/13 Gerhard Petracek :
> > >> hi mike,
> > >>
> > >> right now geronimo3 isn't in the list [1] of the supported servers.
> > >>
> > >> regards,
> > >> gerhard
> > >>
> > >> [1]
> > >>
> >
> https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Compatibility
> > >>
> > >>
> > >> http://www.irian.at
> > >>
> > >> Your JSF/JavaEE powerhouse -
> > >> JavaEE Consulting, Development and
> > >> Courses in English and German
> > >>
> > >> Professional Support for Apache MyFaces
> > >>
> > >>
> > >>
> > >> 2012/3/13 Mike Kienenberger 
> > >>
> > >>> I don't have much experience with them, but Apache Geronimo and, to a
> > >>> lesser degree, Apache Tomcat would be alternatives to Glassfish.
> > >>> There may be others.
> > >>>
> > >>> 2012/3/13 José Luis Cetina :
> > >>> > Let me tell you that the example deploy and RAN without any problem
> > and i
> > >>> > dont move any line of code, i only deploy in tomcat without any
> > problem,
> > >>&g

Fwd: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
I forgot to add  *WELD:*

Thanks for your time Gerhard, just for resume:

 *MyFaces 2.1.6 +CODI 1.0.4+ WELD +Glassfish 3.1.2 = failed*
* Mojarra  2.1.6 + CODI+1.0.4+ **WELD +**Glassfish 3.1.2 = OK*
* MyFaces 2.1.6+ CODI 1.0.4+ **WELD +**Tomcat 7.0.22 = OK*




2012/3/13 Gerhard Petracek 

> hi jose,
>
> for myfaces codi the answer is pretty simple and you can see it at [1].
>
> in case of myfaces-core it depends on the application-server.
> maybe leo made some tests with glassfish 3.1.x + myfaces-core 2.x.
>
> however, most glassfish users i know (who are also using myfaces codi) use
> it as it is (and just add myfaces codi to their project/s).
>
> regards,
> gerhard
>
> [1]
>
> https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Compatibility
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/13 José Luis Cetina 
>
> > Let me tell you that the example deploy and RAN without any problem and i
> > dont move any line of code, i only deploy in tomcat without any problem,
> i
> > want to use apache  product's like myfaces, CODI, etc, i want to know if
> > you can give me an objective suggestion with what Application Server i
> can
> > use with your products, i have the opportunity for choose.
> >
> > Thanks
> >
> >
> > 2012/3/13 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > you can run the generated demos with a servlet container like jetty
> (see
> > > the comment in the generated pom.xml file), tomcat,... .
> > > by default the myfaces-core profile is activated.
> > >
> > > we just need to know if your implementation works with such a generated
> > > application.
> > > esp. because glassfish adds further complexity with the mentioned
> > > classloader-config (e.g. with this config-entries you can't use
> > > myfaces-core and owb in parallel - that's a known classloading issue
> > > of glassfish).
> > >
> > > regards,
> > > gerhard
> > >
> > >
> > >
> > > 2012/3/13 José Luis Cetina 
> > >
> > > > I downloaded the example number 11 and i run the project without any
> > > > problem, but i can see that the project is using Mojarra "Profile" as
> > JSF
> > > > Impl (the log sayed to me Mojarra...). Then if i change to use
> MyFaces
> > > > chossing the myfaces profile and adding these lines to my
> > > > g*lassfish-web.xml
> > > > *:
> > > >
> > > > 
> > > > 
> > > >
> > > > then i got an *exception *and i CANT run the project:
> > > >
> > > > Here is the *glassfish log:*
> > > > -
> > > >
> > > > Launching GlassFish on Felix platform
> > > > Información: Running GlassFish Version: GlassFish Server Open Source
> > > > Edition 3.1.2 (build 23)
> > > > Información: Grizzly Framework 1.9.46 started in: 78ms - bound to [
> > > > 0.0.0.0:8080]
> > > > Información: Grizzly Framework 1.9.46 started in: 56ms - bound to [
> > > > 0.0.0.0:8181]
> > > > Información: Grizzly Framework 1.9.46 started in: 106ms - bound to [
> > > > 0.0.0.0:3700]
> > > > Información: Grizzly Framework 1.9.46 started in: 120ms - bound to [
> > > > 0.0.0.0:4848]
> > > > Información: Grizzly Framework 1.9.46 started in: 146ms - bound to [
> > > > 0.0.0.0:7676]
> > > > Información: The Admin Console is already installed, but not yet
> > loaded.
> > > > Información: Registered
> > > > org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
> > > > persistence-type = replicated in BackingStoreFactoryRegistry
> > > > Información: GlassFish Server Open Source Edition 3.1.2 (23) tiempo
> de
> > > > inicio: Felix (2,441ms), servicios de inicio(1,240ms), total(3,681ms)
> > > > Información: JMX005: JMXStartupService had Started JMXConnector on
> > > > JMXService URL service:jmx:rmi://
> > > > 192.168.1.209:8686/jndi/rmi://192.168.1.209:8686/jmxrmi
> > > > Información: Hibernate Validator 4.2.0.Final
> > > > Información: Grizzly Framework 1.9.46 started in: 49ms - bound to [
> > > > 0.0.0.0:8080]
> > > > Información: SEC1002: Security Manager is OFF.
> > > > Información: SEC101

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
Thanks for your time Gerhard, just for resume:

 *MyFaces 2.1.6 +CODI 1.0.4+Glassfish 3.1.2 = failed*
* Mojarra  2.1.6 + CODI+1.0.4+Glassfish 3.1.2 = OK*
* MyFaces 2.1.6+ CODI 1.0.4+ Tomcat 7.0.22 = OK*


I think is strange that i can deploy mojarra+codi with glassfish and not
myfaces+codi with glassfish.




2012/3/13 Gerhard Petracek 

> hi jose,
>
> for myfaces codi the answer is pretty simple and you can see it at [1].
>
> in case of myfaces-core it depends on the application-server.
> maybe leo made some tests with glassfish 3.1.x + myfaces-core 2.x.
>
> however, most glassfish users i know (who are also using myfaces codi) use
> it as it is (and just add myfaces codi to their project/s).
>
> regards,
> gerhard
>
> [1]
>
> https://cwiki.apache.org/confluence/display/EXTCDI/Intro#Intro-Compatibility
>
> http://www.irian.at
>
> Your JSF/JavaEE powerhouse -
> JavaEE Consulting, Development and
> Courses in English and German
>
> Professional Support for Apache MyFaces
>
>
>
> 2012/3/13 José Luis Cetina 
>
> > Let me tell you that the example deploy and RAN without any problem and i
> > dont move any line of code, i only deploy in tomcat without any problem,
> i
> > want to use apache  product's like myfaces, CODI, etc, i want to know if
> > you can give me an objective suggestion with what Application Server i
> can
> > use with your products, i have the opportunity for choose.
> >
> > Thanks
> >
> >
> > 2012/3/13 Gerhard Petracek 
> >
> > > hi jose,
> > >
> > > you can run the generated demos with a servlet container like jetty
> (see
> > > the comment in the generated pom.xml file), tomcat,... .
> > > by default the myfaces-core profile is activated.
> > >
> > > we just need to know if your implementation works with such a generated
> > > application.
> > > esp. because glassfish adds further complexity with the mentioned
> > > classloader-config (e.g. with this config-entries you can't use
> > > myfaces-core and owb in parallel - that's a known classloading issue
> > > of glassfish).
> > >
> > > regards,
> > > gerhard
> > >
> > >
> > >
> > > 2012/3/13 José Luis Cetina 
> > >
> > > > I downloaded the example number 11 and i run the project without any
> > > > problem, but i can see that the project is using Mojarra "Profile" as
> > JSF
> > > > Impl (the log sayed to me Mojarra...). Then if i change to use
> MyFaces
> > > > chossing the myfaces profile and adding these lines to my
> > > > g*lassfish-web.xml
> > > > *:
> > > >
> > > > 
> > > > 
> > > >
> > > > then i got an *exception *and i CANT run the project:
> > > >
> > > > Here is the *glassfish log:*
> > > > -
> > > >
> > > > Launching GlassFish on Felix platform
> > > > Información: Running GlassFish Version: GlassFish Server Open Source
> > > > Edition 3.1.2 (build 23)
> > > > Información: Grizzly Framework 1.9.46 started in: 78ms - bound to [
> > > > 0.0.0.0:8080]
> > > > Información: Grizzly Framework 1.9.46 started in: 56ms - bound to [
> > > > 0.0.0.0:8181]
> > > > Información: Grizzly Framework 1.9.46 started in: 106ms - bound to [
> > > > 0.0.0.0:3700]
> > > > Información: Grizzly Framework 1.9.46 started in: 120ms - bound to [
> > > > 0.0.0.0:4848]
> > > > Información: Grizzly Framework 1.9.46 started in: 146ms - bound to [
> > > > 0.0.0.0:7676]
> > > > Información: The Admin Console is already installed, but not yet
> > loaded.
> > > > Información: Registered
> > > > org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
> > > > persistence-type = replicated in BackingStoreFactoryRegistry
> > > > Información: GlassFish Server Open Source Edition 3.1.2 (23) tiempo
> de
> > > > inicio: Felix (2,441ms), servicios de inicio(1,240ms), total(3,681ms)
> > > > Información: JMX005: JMXStartupService had Started JMXConnector on
> > > > JMXService URL service:jmx:rmi://
> > > > 192.168.1.209:8686/jndi/rmi://192.168.1.209:8686/jmxrmi
> > > > Información: Hibernate Validator 4.2.0.Final
> > > > Información: Grizzly Framework 1.9.46 started in: 49ms - bound to [
> > > > 0.0.0.0:8080]
> > > > Información: SEC1002: Security Manage

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
Let me tell you that the example deploy and RAN without any problem and i
dont move any line of code, i only deploy in tomcat without any problem, i
want to use apache  product's like myfaces, CODI, etc, i want to know if
you can give me an objective suggestion with what Application Server i can
use with your products, i have the opportunity for choose.

Thanks


2012/3/13 Gerhard Petracek 

> hi jose,
>
> you can run the generated demos with a servlet container like jetty (see
> the comment in the generated pom.xml file), tomcat,... .
> by default the myfaces-core profile is activated.
>
> we just need to know if your implementation works with such a generated
> application.
> esp. because glassfish adds further complexity with the mentioned
> classloader-config (e.g. with this config-entries you can't use
> myfaces-core and owb in parallel - that's a known classloading issue
> of glassfish).
>
> regards,
> gerhard
>
>
>
> 2012/3/13 José Luis Cetina 
>
> > I downloaded the example number 11 and i run the project without any
> > problem, but i can see that the project is using Mojarra "Profile" as JSF
> > Impl (the log sayed to me Mojarra...). Then if i change to use MyFaces
> > chossing the myfaces profile and adding these lines to my
> > g*lassfish-web.xml
> > *:
> >
> > 
> > 
> >
> > then i got an *exception *and i CANT run the project:
> >
> > Here is the *glassfish log:*
> > -
> >
> > Launching GlassFish on Felix platform
> > Información: Running GlassFish Version: GlassFish Server Open Source
> > Edition 3.1.2 (build 23)
> > Información: Grizzly Framework 1.9.46 started in: 78ms - bound to [
> > 0.0.0.0:8080]
> > Información: Grizzly Framework 1.9.46 started in: 56ms - bound to [
> > 0.0.0.0:8181]
> > Información: Grizzly Framework 1.9.46 started in: 106ms - bound to [
> > 0.0.0.0:3700]
> > Información: Grizzly Framework 1.9.46 started in: 120ms - bound to [
> > 0.0.0.0:4848]
> > Información: Grizzly Framework 1.9.46 started in: 146ms - bound to [
> > 0.0.0.0:7676]
> > Información: The Admin Console is already installed, but not yet loaded.
> > Información: Registered
> > org.glassfish.ha.store.adapter.cache.ShoalBackingStoreProxy for
> > persistence-type = replicated in BackingStoreFactoryRegistry
> > Información: GlassFish Server Open Source Edition 3.1.2 (23) tiempo de
> > inicio: Felix (2,441ms), servicios de inicio(1,240ms), total(3,681ms)
> > Información: JMX005: JMXStartupService had Started JMXConnector on
> > JMXService URL service:jmx:rmi://
> > 192.168.1.209:8686/jndi/rmi://192.168.1.209:8686/jmxrmi
> > Información: Hibernate Validator 4.2.0.Final
> > Información: Grizzly Framework 1.9.46 started in: 49ms - bound to [
> > 0.0.0.0:8080]
> > Información: SEC1002: Security Manager is OFF.
> > Información: SEC1010: Entering Security Startup Service
> > Información: SEC1143: Loading policy provider
> > com.sun.enterprise.security.provider.PolicyWrapper.
> > Información: SEC1115: Realm [admin-realm] of classtype
> > [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
> > created.
> > Información: SEC1115: Realm [file] of classtype
> > [com.sun.enterprise.security.auth.realm.file.FileRealm] successfully
> > created.
> > Información: SEC1115: Realm [certificate] of classtype
> > [com.sun.enterprise.security.auth.realm.certificate.CertificateRealm]
> > successfully created.
> > Información: SEC1011: Security Service(s) Started Successfully
> > Información: WEB0169: Created HTTP listener [http-listener-1] on
> host/port
> > [
> > 0.0.0.0:8080]
> > Información: WEB0169: Created HTTP listener [http-listener-2] on
> host/port
> > [
> > 0.0.0.0:8181]
> > Información: WEB0169: Created HTTP listener [admin-listener] on
> host/port [
> > 0.0.0.0:4848]
> > Información: WEB0171: Created virtual server [server]
> > Información: WEB0171: Created virtual server [__asadmin]
> > Información: WEB0172: Virtual server [server] loaded default web module
> []
> > Información: WELD-000900 1.1.4 (Final)
> > Grave: Exception while loading the app
> > *Grave: Exception while loading the app :
> >
> >
> org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
> > cannot be cast to javassist.util.proxy.ProxyObject*
> > *java.lang.ClassCastException:
> >
> >
> org.jboss.weldx.transaction.UserTransaction$1513261869$Proxy$_$$_Weld$Proxy$
> > cannot be cast to

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
r.java:354)
at
com.sun.enterprise.v3.services.impl.ContainerMapper.service(ContainerMapper.java:195)
at com.sun.grizzly.http.ProcessorTask.invokeAdapter(ProcessorTask.java:849)
at com.sun.grizzly.http.ProcessorTask.doProcess(ProcessorTask.java:746)
at com.sun.grizzly.http.ProcessorTask.process(ProcessorTask.java:1045)
at
com.sun.grizzly.http.DefaultProtocolFilter.execute(DefaultProtocolFilter.java:228)
at
com.sun.grizzly.DefaultProtocolChain.executeProtocolFilter(DefaultProtocolChain.java:137)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:104)
at
com.sun.grizzly.DefaultProtocolChain.execute(DefaultProtocolChain.java:90)
at com.sun.grizzly.http.HttpProtocolChain.execute(HttpProtocolChain.java:79)
at
com.sun.grizzly.ProtocolChainContextTask.doCall(ProtocolChainContextTask.java:54)
at
com.sun.grizzly.SelectionKeyContextTask.call(SelectionKeyContextTask.java:59)
at com.sun.grizzly.ContextTask.run(ContextTask.java:71)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.doWork(AbstractThreadPool.java:532)
at
com.sun.grizzly.util.AbstractThreadPool$Worker.run(AbstractThreadPool.java:513)
at java.lang.Thread.run(Thread.java:722)

Información: WEB0169: Created HTTP listener [http-listener-2] on host/port [
0.0.0.0:8181]
Información: Grizzly Framework 1.9.46 started in: 45ms - bound to [
0.0.0.0:8181]


-

2012/3/13 Gerhard Petracek 

> hi jose,
>
> you can use the myfaces-archetype to generate the correct config for
> myfaces-core (as well as mojarra) + owb (+ myfaces codi):
>
> mvn archetype:generate -DarchetypeCatalog=http://myfaces.apache.org
> -> e.g. select #11 (afterwards you just have to update the versions in the
> generated pom.xml file.)
>
> if it still doesn't work with the generated example, you can provide the
> example and we can have a look at it.
>
> regards,
> gerhard
>
>
>
> 2012/3/13 José Luis Cetina 
>
> > I see, i erase and only put @Named and @ ViewAccessScoped and get the
> same
> > error, but i try with only @Named and @RequestScoped (java) and still the
> > error, i think the problem is the @Named is not injecting my bean, not
> > MyFaces, because if i use @ManagedBean this works ok, but i dont
> understand
> > why if i chagen from MyFaces to Mojarra the @Named and @ViewAccessScoped
> > works ok!!
> >
> > :(
> >
> >
> > 2012/3/13 Rafael Pestano 
> >
> > > just a question, why do you have @Model,@Named and @ViewAccessScoped in
> > > the same bean?
> > >
> > > i think you need @model OR @Named and @ViewAccessScoped
> > >
> > > or im wrong?
> > >
> > > Att,
> > > Rafael M. Pestano
> > > Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> > > Graduando em Ciência da Computação UFRGS
> > > @realpestano
> > > http://code.google.com/p/jsf-conventions-framework/
> > >
> > >
> > >
> > > - Mensagem original -
> > > De: José Luis Cetina 
> > > Para: MyFaces Discussion 
> > > Cc:
> > > Enviadas: Terça-feira, 13 de Março de 2012 12:28
> > > Assunto: Re: Both MyFaces and the RI are on your classpath. Please make
> > > sure to use only one of the two JSF-implementations.
> > >
> > > I see now im using MyFaces instead of Mojarra, the "ERROR" Message
> still
> > > there, but the application can deploy. My second problem persist:
> > >
> > > javax.el.PropertyNotFoundException: Target Unreachable, identifier
> > 'myBean'
> > > resolved to null
> > > viewId=/index.xhtml
> > >
> > >
> >
> location=C:\Users\user\Documents\NetBeansProjects\testweb\build\web\index.xhtml
> > > phaseId=INVOKE_APPLICATION(5)
> > >
> > >
> > > i have the my beans.xml under WEB-INF folder:
> > > beans.xml:
> > >
> > > 
> > > 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/beans_1_0.xsd";>
> > > 
> > >
> > >
> > > And my bean its ok:
> > >
> > > @Named
> > > @ViewAccessScoped
> > > @Model
> > > @View(Index.class)
> > > public class MyBean implements Serializable{
> > > }
> > >
> > > If i change from MyFaces to Mojarra this work ok!!!   :(
> > >
> > > Somebody know what can i do?
> > >
> > > *Im using: Netbeans 7.1, Glassfi

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
I see, i erase and only put @Named and @ ViewAccessScoped and get the same
error, but i try with only @Named and @RequestScoped (java) and still the
error, i think the problem is the @Named is not injecting my bean, not
MyFaces, because if i use @ManagedBean this works ok, but i dont understand
why if i chagen from MyFaces to Mojarra the @Named and @ViewAccessScoped
works ok!!

:(


2012/3/13 Rafael Pestano 

> just a question, why do you have @Model,@Named and @ViewAccessScoped in
> the same bean?
>
> i think you need @model OR @Named and @ViewAccessScoped
>
> or im wrong?
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> - Mensagem original -
> De: José Luis Cetina 
> Para: MyFaces Discussion 
> Cc:
> Enviadas: Terça-feira, 13 de Março de 2012 12:28
> Assunto: Re: Both MyFaces and the RI are on your classpath. Please make
> sure to use only one of the two JSF-implementations.
>
> I see now im using MyFaces instead of Mojarra, the "ERROR" Message still
> there, but the application can deploy. My second problem persist:
>
> javax.el.PropertyNotFoundException: Target Unreachable, identifier 'myBean'
> resolved to null
> viewId=/index.xhtml
>
> location=C:\Users\user\Documents\NetBeansProjects\testweb\build\web\index.xhtml
> phaseId=INVOKE_APPLICATION(5)
>
>
> i have the my beans.xml under WEB-INF folder:
> beans.xml:
>
> 
> 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/beans_1_0.xsd";>
> 
>
>
> And my bean its ok:
>
> @Named
> @ViewAccessScoped
> @Model
> @View(Index.class)
> public class MyBean implements Serializable{
> }
>
> If i change from MyFaces to Mojarra this work ok!!!   :(
>
> Somebody know what can i do?
>
> *Im using: Netbeans 7.1, Glassfish 3.1.2.1, JDK 7u3, MyFaces 2.1.6,
> CODI 1.0.4, Windows 7. *
> *
> *
> *Thanks.*
> *
> *
> *-*
>
>
> 2012/3/13 Werner Punz 
>
> > Mhh this looks like a bug in Glassfish to me, the entries  in the
> > glassfish-web.xml look correct to me. Problem is generally that glassfish
> > is not to keen on overrides of its system libs in my experience. Even
> while
> > myfaces runs, try to replace Weld for instance and you run into a mess.
> > Glassfish as good as it is is an all or nothing pack in many cases.
> > But it has been some time since I last touched Glassfish, things might
> > have changed.
> >
> >
> >
> > Werner
> >
> >
> > Am 12.03.12 17:40, schrieb José Luis Cetina:
> >
> >> Im triying to start a new project for first time with myfaces, i always
> >> used Mojarra but know i want to change but im having problems at the
> >> start:
> >>
> >> My only requierement is use Glassfish 3.1.2.1.
> >>
> >> Hi i have this WARNING:
> >>
> >> *Both MyFaces and the RI are on your classpath. Please make sure to use
> >> only one of the two JSF-implementations.*
> >>
> >>
> >> Why this happend if im using only jars from myfaces?? maybe for
> glassfish
> >> i
> >> think, i have these in my *glassfish-web.xml* file, under WEB-INF
> folder:
> >>
> >>
> >> 
> >>  >> Application Server 3.1 Servlet 3.0//EN" "
> >> http://glassfish.org/dtds/**glassfish-web-app_3_0-1.dtd<
> http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd>
> >> ">
> >> 
> >> 
> >> 
> >> **
> >> **
> >>
> >> 
> >> 
> >> 
> >> Keep a copy of the generated servlet class'
> java
> >> code.
> >> 
> >> 
> >> 
> >>
> >>     
> >>
> >> This is my web.xml
> >>
> >> 
> >> http://java.sun.com/**xml/ns/javaee<
> http://java.sun.com/xml/ns/javaee>"
> >> xmlns:xsi="
> >> http://www.w3.org/2001/**XMLSchema-instance<
> http://www.w3.org/2001/XMLSchema-instance>"
> >> xsi:schemaLocation="
> >> http://java.sun.com/xml/ns/**javaee <http://java.sun.com/xml/ns/javaee>
> >> htt

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-13 Thread José Luis Cetina
I see now im using MyFaces instead of Mojarra, the "ERROR" Message still
there, but the application can deploy. My second problem persist:

javax.el.PropertyNotFoundException: Target Unreachable, identifier 'myBean'
resolved to null
viewId=/index.xhtml
location=C:\Users\user\Documents\NetBeansProjects\testweb\build\web\index.xhtml
phaseId=INVOKE_APPLICATION(5)


i have the my beans.xml under WEB-INF folder:
beans.xml:


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/beans_1_0.xsd";>



And my bean its ok:

@Named
@ViewAccessScoped
@Model
@View(Index.class)
public class MyBean implements Serializable{
}

If i change from MyFaces to Mojarra this work ok!!!   :(

Somebody know what can i do?

*Im using: Netbeans 7.1, Glassfish 3.1.2.1, JDK 7u3, MyFaces 2.1.6,
CODI 1.0.4, Windows 7. *
*
*
*Thanks.*
*
*
*-*


2012/3/13 Werner Punz 

> Mhh this looks like a bug in Glassfish to me, the entries  in the
> glassfish-web.xml look correct to me. Problem is generally that glassfish
> is not to keen on overrides of its system libs in my experience. Even while
> myfaces runs, try to replace Weld for instance and you run into a mess.
> Glassfish as good as it is is an all or nothing pack in many cases.
> But it has been some time since I last touched Glassfish, things might
> have changed.
>
>
>
> Werner
>
>
> Am 12.03.12 17:40, schrieb José Luis Cetina:
>
>> Im triying to start a new project for first time with myfaces, i always
>> used Mojarra but know i want to change but im having problems at the
>> start:
>>
>> My only requierement is use Glassfish 3.1.2.1.
>>
>> Hi i have this WARNING:
>>
>> *Both MyFaces and the RI are on your classpath. Please make sure to use
>> only one of the two JSF-implementations.*
>>
>>
>> Why this happend if im using only jars from myfaces?? maybe for glassfish
>> i
>> think, i have these in my *glassfish-web.xml* file, under WEB-INF folder:
>>
>>
>> 
>> > Application Server 3.1 Servlet 3.0//EN" "
>> http://glassfish.org/dtds/**glassfish-web-app_3_0-1.dtd<http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd>
>> ">
>> 
>> 
>> 
>> **
>> **
>>
>> 
>> 
>> 
>> Keep a copy of the generated servlet class' java
>> code.
>> 
>> 
>> 
>>
>>     
>>
>> This is my web.xml
>>
>> 
>> > xmlns="http://java.sun.com/**xml/ns/javaee<http://java.sun.com/xml/ns/javaee>"
>> xmlns:xsi="
>> http://www.w3.org/2001/**XMLSchema-instance<http://www.w3.org/2001/XMLSchema-instance>"
>> xsi:schemaLocation="
>> http://java.sun.com/xml/ns/**javaee <http://java.sun.com/xml/ns/javaee>
>> http://java.sun.com/xml/ns/**javaee/web-app_3_0.xsd<http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd>
>> ">
>> 
>> javax.faces.**PROJECT_STAGE
>> Development
>> 
>> 
>> com.ocpsoft.**pretty.DEVELOPMENT
>> true
>> 
>> 
>> javax.faces.STATE_**SAVING_METHOD
>> server
>> 
>> 
>> 
>> javax.faces.DATETIMECONVERTER_**DEFAULT_TIMEZONE_IS_SYSTEM_**
>> TIMEZONE
>> true
>> 
>>  
>> javax.faces.**FACELETS_SKIP_COMMENTS
>> true
>> 
>> 
>>
>> com.sun.faces.**enableMissingResourceLibraryDe**
>> tection
>> true
>> 
>> 
>> *
>> org.apache.**myfaces.webapp.**
>> StartupServletContextListener<**/listener-class>
>> *
>> 
>> 
>> Faces Servlet
>> javax.faces.**webapp.FacesServlet> class>
>> 1
>> 
>> 
>> Faces Servlet
>> /faces/*
>> 
>> 
>> 
>> 30
>> 
>> 
>> 
>> faces/index.**xhtml
>> 
>> 
>>
>>     
>>
>> Here are my libraries:
>>
>> --MYFACES
>> myfaces-api-2.1.6.jar
>> myfaces-impl-2.1.6.jar
>> commons-beanutils-1.8.3.jar
>> commons-digester-1.8.jar
>> commons-logging-1.8.jar
>> commons

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread José Luis Cetina
rue
   method: isInvalidValueAwareMessageInterpolatorEnabled
   value: true
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeWindowContextConfig$Proxy$_$$_WeldClientProxy
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeWindowContextConfig
config implementation:
org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.WindowContextConfig
   method: isUrlParameterSupported
   value: true
   method: isUnknownWindowIdsAllowed
   value: false
   method: getMaxWindowContextCount
   value: 64
   method: isAddWindowIdToActionUrlsEnabled
   value: false
   method: getWindowContextTimeoutInMinutes
   value: 60
   method: isCloseEmptyWindowContextsEnabled
   value: false
   method: isEagerWindowContextDetectionEnabled
   value: true
   method: isCreateWindowContextEventEnabled
   value: false
   method: isCloseWindowContextEventEnabled
   value: false
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeConversationConfig$Proxy$_$$_WeldClientProxy
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.scope.conversation.config.AlternativeConversationConfig
config implementation:
org.apache.myfaces.extensions.cdi.core.api.scope.conversation.config.ConversationConfig
   method: isScopeBeanEventEnabled
   value: false
   method: isAccessBeanEventEnabled
   value: false
   method: isUnscopeBeanEventEnabled
   value: false
   method: isConversationRequiredEnabled
   value: true
   method: isRestartConversationEventEnabled
   value: false
   method: isCloseConversationEventEnabled
   value: false
   method: isStartConversationEventEnabled
   value: false
   method: getConversationTimeoutInMinutes
   value: 30
MessageContextConfig class:
org.apache.myfaces.extensions.cdi.message.impl.DefaultMessageContextConfig
   MessageInterpolator class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.FacesMessageInterpolator
   MessageResolver class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareApplicationMessagesMessageResolver
   MessageHandler class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareMessageHandler
   LocaleResolver class: class
org.apache.myfaces.extensions.cdi.jsf.impl.message.JsfAwareLocaleResolver
   FormatterFactory class: class
org.apache.myfaces.extensions.cdi.message.impl.DefaultFormatterFactory

Información: [Started] MyFaces CODI JPA-Module v1.0.4

Información: [Started] MyFaces CODI (Extensions CDI) Core v1.0.4
Used CDI implementation: Weld v2022-2001
project-stage: Production
project-stage class:
org.apache.myfaces.extensions.cdi.core.api.projectstage.ProjectStage$Production
application-parameters:
   name: com.ocpsoft.pretty.DEVELOPMENT
   value: true
   name: com.sun.faces.forceLoadConfiguration
   value: true
   name: javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
   value: true
   name: com.sun.faces.validateXml
   value: true
   name: com.sun.faces.enableMissingResourceLibraryDetection
   value: true
   name: javax.faces.PROJECT_STAGE
   value: Development
   name: javax.faces.FACELETS_SKIP_COMMENTS
   value: true
   name: javax.faces.STATE_SAVING_METHOD
   value: server
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig$Proxy$_$$_WeldClientProxy
config implementation:
org.apache.myfaces.extensions.cdi.core.alternative.config.AlternativeCodiCoreConfig
config implementation:
org.apache.myfaces.extensions.cdi.core.api.config.CodiCoreConfig
   method: isAdvancedQualifierRequiredForDependencyInjection
   value: true
   method: isConfigurationLoggingEnabled
   value: true
   method: isInvalidBeanCreationEventEnabled
   value: false

Advertencia: The value of the JSF 2 project stage (Development) is
different from the CODI project stage (Production)
Información: [Started] MyFaces CODI Scripting-Module v1.0.4

Información: [Started] MyFaces CODI Bean-Validation-Module v1.0.4














2012/3/12 Rafael Pestano 

> i see, if you are using CODI it should be printing(at startup time) all
> information about your enviroment like JSF, CDI implementations,  is that
> the case? what it is printing?
>
>
>
> Att,
> Rafael M. Pestano
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> - Mensagem original -----
> De: José Luis Cetina 
> Para: MyFaces Discussion ; Rafael Pestano <
> rmpest...@yahoo.com.br>
> Cc:
> Enviadas: Segunda-feira, 12 de Março de 2012 14:24
> Assunto: Re: Both MyFaces and the RI are on your classpath. Please make
> sure to use only one of the two JSF-implementations.
>
> I cant do that , in the server exist other app that use mojarra   :(
>
&

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread José Luis Cetina
I cant do that , in the server exist other app that use mojarra   :(

and what happend with this:




2012/3/12 Rafael Pestano 

> You can try to remove jsf-api.jar and jsf-impl.jar from glassfish, if your
> app still running you are using myfaces ;).
>
> RI jars are under GLASSFISH_HOME\glassfish\modules, also make sure to
> delete cache folder in GLASSFISH_HOME\glassfish\domains\domain1\osgi-cache
>
> Att,
>
> Rafael M. Pestano
>
> Desenvolvedor Java Cia. de Processamento de Dados do Rio Grande do Sul
> Graduando em Ciência da Computação UFRGS
> @realpestano
> http://code.google.com/p/jsf-conventions-framework/
>
>
>
> 
> De: Mike Kienenberger 
> Para: MyFaces Discussion 
> Enviadas: Segunda-feira, 12 de Março de 2012 14:17
> Assunto: Re: Both MyFaces and the RI are on your classpath. Please make
> sure to use only one of the two JSF-implementations.
>
> You are correct in that it is a serious error.   Having both jars in
> your path will result in identically-named, but differently-operating
> classes to be present in your application.
>
> You need to configure Glassfish to disable the RI, or you need to
> remove the myfaces jars.
>
> 2012/3/12 José Luis Cetina :
> > Well sorry, really this says: ERROR Both MyFaces and the RI are on your
> > classpath. Please make sure to use only one of the two
> JSF-implementations.
> >
> > Grave: Both MyFaces and the RI are on your classpath. Please make sure to
> > use only one of the two JSF-implementations.
> >
> > 2012/3/12 Shasi Mitra 
> >
> >> It's just a warning rite? You can go ahead with your development. It
> >> doesn't  affect anything.
> >>
> >> Sent from my iPhone
> >>
> >> On Mar 12, 2012, at 10:10 PM, José Luis Cetina 
> >> wrote:
> >>
> >> > Im triying to start a new project for first time with myfaces, i
> always
> >> > used Mojarra but know i want to change but im having problems at the
> >> start:
> >> >
> >> > My only requierement is use Glassfish 3.1.2.1.
> >> >
> >> > Hi i have this WARNING:
> >> >
> >> > *Both MyFaces and the RI are on your classpath. Please make sure to
> use
> >> > only one of the two JSF-implementations.*
> >> >
> >> > Why this happend if im using only jars from myfaces?? maybe for
> >> glassfish i
> >> > think, i have these in my *glassfish-web.xml* file, under WEB-INF
> folder:
> >> >
> >> > 
> >> >  >> > Application Server 3.1 Servlet 3.0//EN" "
> >> > http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd";;>
> >> > 
> >> >
> >> >
> >> >**
> >> > **
> >> >
> >> >
> >> >
> >> >Keep a copy of the generated servlet class'
> java
> >> > code.
> >> >
> >> >
> >> > 
> >> >
> >> >     
> >> >
> >> > This is my web.xml
> >> >
> >> > 
> >> > 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";;>
> >> >
> >> >javax.faces.PROJECT_STAGE
> >> >Development
> >> >
> >> >
> >> >com.ocpsoft.pretty.DEVELOPMENT
> >> >true
> >> >
> >> >
> >> >javax.faces.STATE_SAVING_METHOD
> >> >server
> >> >
> >> >
> >> >
> >> >
> >>
> javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
> >> >true
> >> >
> >> > 
> >> >javax.faces.FACELETS_SKIP_COMMENTS
> >> >true
> >> >
> >> >
> >> >
> >> >
> >>
> com.sun.faces.enableMissingResourceLibraryDetection
> >> >true
> >> >
> >> >
> >> >*
> >> >
> >>
> org.apache.myfaces.webapp.StartupServletContextListener
> >> > *
> >> >
> >> >
> >> &g

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread José Luis Cetina
Ok, im a little confusing because it says in spanis:

*Grave*: Both MyFaces and the RI are on your classpath. Please make sure to
use only one of the two JSF-implementations.

Grave it means: seriuos in english.

But i see the application deploy ok.

Is there a way to see if the web app is using MyFaces and not Mojarra?

2012/3/12 Shasi Mitra 

> We too get that error in our logs when we use myfaces with websphere. It
> doesn't create a problem. I am sure about that. And the issue related to
> your bean should be a configuration issue.
>
> Sent from my iPhone
>
> On Mar 12, 2012, at 10:28 PM, José Luis Cetina 
> wrote:
>
> > Well sorry, really this says: ERROR Both MyFaces and the RI are on your
> > classpath. Please make sure to use only one of the two
> JSF-implementations.
> >
> > Grave: Both MyFaces and the RI are on your classpath. Please make sure to
> > use only one of the two JSF-implementations.
> >
> > 2012/3/12 Shasi Mitra 
> >
> >> It's just a warning rite? You can go ahead with your development. It
> >> doesn't  affect anything.
> >>
> >> Sent from my iPhone
> >>
> >> On Mar 12, 2012, at 10:10 PM, José Luis Cetina 
> >> wrote:
> >>
> >>> Im triying to start a new project for first time with myfaces, i always
> >>> used Mojarra but know i want to change but im having problems at the
> >> start:
> >>>
> >>> My only requierement is use Glassfish 3.1.2.1.
> >>>
> >>> Hi i have this WARNING:
> >>>
> >>> *Both MyFaces and the RI are on your classpath. Please make sure to use
> >>> only one of the two JSF-implementations.*
> >>>
> >>> Why this happend if im using only jars from myfaces?? maybe for
> >> glassfish i
> >>> think, i have these in my *glassfish-web.xml* file, under WEB-INF
> folder:
> >>>
> >>> 
> >>>  >>> Application Server 3.1 Servlet 3.0//EN" "
> >>> http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd";>
> >>> 
> >>>   
> >>>   
> >>>   **
> >>> **
> >>>   
> >>>   
> >>>   
> >>>   Keep a copy of the generated servlet class' java
> >>> code.
> >>>   
> >>>   
> >>> 
> >>>
> >>>     
> >>>
> >>> This is my web.xml
> >>>
> >>> 
> >>> 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";>
> >>>   
> >>>   javax.faces.PROJECT_STAGE
> >>>   Development
> >>>   
> >>>   
> >>>   com.ocpsoft.pretty.DEVELOPMENT
> >>>   true
> >>>   
> >>>   
> >>>   javax.faces.STATE_SAVING_METHOD
> >>>   server
> >>>   
> >>>   
> >>>   
> >>>
> >>
> javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
> >>>   true
> >>>   
> >>>
> >>>   javax.faces.FACELETS_SKIP_COMMENTS
> >>>   true
> >>>   
> >>>   
> >>>
> >>>
> >>
> com.sun.faces.enableMissingResourceLibraryDetection
> >>>   true
> >>>   
> >>>   
> >>>   *
> >>>
> >>
> org.apache.myfaces.webapp.StartupServletContextListener
> >>> *
> >>>   
> >>>   
> >>>   Faces Servlet
> >>>   javax.faces.webapp.FacesServlet
> >>>   1
> >>>   
> >>>   
> >>>   Faces Servlet
> >>>   /faces/*
> >>>   
> >>>   
> >>>   
> >>>   30
> >>>   
> >>>   
> >>>   
> >>>   faces/index.xhtml
> >>>   
> >>> 
> >>>
> >>>     
> >>>
> >>> Here are my libraries:
> >>>
> >>> --MYFACES
> >>> myfaces-api-2.1.6.jar
> >>> myfaces-impl-2.1.6.jar
> >>> commons-beanutils-

Re: Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread José Luis Cetina
Well sorry, really this says: ERROR Both MyFaces and the RI are on your
classpath. Please make sure to use only one of the two JSF-implementations.

Grave: Both MyFaces and the RI are on your classpath. Please make sure to
use only one of the two JSF-implementations.

2012/3/12 Shasi Mitra 

> It's just a warning rite? You can go ahead with your development. It
> doesn't  affect anything.
>
> Sent from my iPhone
>
> On Mar 12, 2012, at 10:10 PM, José Luis Cetina 
> wrote:
>
> > Im triying to start a new project for first time with myfaces, i always
> > used Mojarra but know i want to change but im having problems at the
> start:
> >
> > My only requierement is use Glassfish 3.1.2.1.
> >
> > Hi i have this WARNING:
> >
> > *Both MyFaces and the RI are on your classpath. Please make sure to use
> > only one of the two JSF-implementations.*
> >
> > Why this happend if im using only jars from myfaces?? maybe for
> glassfish i
> > think, i have these in my *glassfish-web.xml* file, under WEB-INF folder:
> >
> > 
> >  > Application Server 3.1 Servlet 3.0//EN" "
> > http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd";>
> > 
> >
> >
> >**
> > **
> >
> >
> >
> >Keep a copy of the generated servlet class' java
> > code.
> >
> >
> > 
> >
> >     
> >
> > This is my web.xml
> >
> > 
> > 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";>
> >
> >javax.faces.PROJECT_STAGE
> >Development
> >
> >
> >com.ocpsoft.pretty.DEVELOPMENT
> >true
> >
> >
> >javax.faces.STATE_SAVING_METHOD
> >server
> >
> >
> >
> >
> javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
> >true
> >
> > 
> >javax.faces.FACELETS_SKIP_COMMENTS
> >true
> >
> >
> >
> >
> com.sun.faces.enableMissingResourceLibraryDetection
> >true
> >
> >
> >*
> >
> org.apache.myfaces.webapp.StartupServletContextListener
> > *
> >
> >
> >Faces Servlet
> >javax.faces.webapp.FacesServlet
> >1
> >
> >
> >Faces Servlet
> >/faces/*
> >
> >
> >
> >30
> >
> >
> >
> >faces/index.xhtml
> >
> > 
> >
> >     
> >
> > Here are my libraries:
> >
> > --MYFACES
> > myfaces-api-2.1.6.jar
> > myfaces-impl-2.1.6.jar
> > commons-beanutils-1.8.3.jar
> > commons-digester-1.8.jar
> > commons-logging-1.8.jar
> > commons-codec-1.1.1.jar
> > commons-collections-3.2.jar
> > --MYFACES CODI
> > myfaces-extcdi-alternative-implementation-module-1.0.4
> > myfaces-extcdi-bv1-module-api-1.0.4
> > myfaces-extcdi-bv1-module-impl-1.0.4
> > myfaces-extcdi-core-alternative-configuration-1.0.4
> > myfaces-extcdi-core-api-1.0.4
> > myfaces-extcdi-core-impl-1.0.4
> > myfaces-extcdi-jpa1-module-api-1.0.4
> > myfaces-extcdi-jpa1-module-impl-1.0.4
> > myfaces-extcdi-jsf20-module-api-1.0.4
> > myfaces-extcdi-jsf20-module-impl-1.0.4
> > myfaces-extcdi-jsf-alternative-configuration-1.0.4
> > myfaces-extcdi-message-module-api-1.0.4
> > myfaces-extcdi-message-module-impl-1.0.4
> > myfaces-extcdi-scripting-module-api-1.0.4
> > myfaces-extcdi-scripting-module-impl-1.0.4
> >
> >
> > I dont know if because the "WARNING" i have other problem:
> >
> > javax.el.PropertyNotFoundException: Target Unreachable, identifier
> 'myBean'
> > resolved to null,
> >
> > I have in my beans.xml file under WEB-INF this:
> >
> > 
> > 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/beans_1_0.xsd";>
> > 
> >
> > and in my bean:
> >
> > @Named
> > @Vi

Both MyFaces and the RI are on your classpath. Please make sure to use only one of the two JSF-implementations.

2012-03-12 Thread José Luis Cetina
Im triying to start a new project for first time with myfaces, i always
used Mojarra but know i want to change but im having problems at the start:

My only requierement is use Glassfish 3.1.2.1.

Hi i have this WARNING:

*Both MyFaces and the RI are on your classpath. Please make sure to use
only one of the two JSF-implementations.*

Why this happend if im using only jars from myfaces?? maybe for glassfish i
think, i have these in my *glassfish-web.xml* file, under WEB-INF folder:


http://glassfish.org/dtds/glassfish-web-app_3_0-1.dtd";>



**
**



Keep a copy of the generated servlet class' java
code.




    

This is my web.xml


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";>

javax.faces.PROJECT_STAGE
Development


com.ocpsoft.pretty.DEVELOPMENT
true


javax.faces.STATE_SAVING_METHOD
server



javax.faces.DATETIMECONVERTER_DEFAULT_TIMEZONE_IS_SYSTEM_TIMEZONE
true

 
javax.faces.FACELETS_SKIP_COMMENTS
true



com.sun.faces.enableMissingResourceLibraryDetection
true


*
org.apache.myfaces.webapp.StartupServletContextListener
*


Faces Servlet
javax.faces.webapp.FacesServlet
1


Faces Servlet
/faces/*



30



faces/index.xhtml



    

Here are my libraries:

--MYFACES
myfaces-api-2.1.6.jar
myfaces-impl-2.1.6.jar
commons-beanutils-1.8.3.jar
commons-digester-1.8.jar
commons-logging-1.8.jar
commons-codec-1.1.1.jar
commons-collections-3.2.jar
--MYFACES CODI
myfaces-extcdi-alternative-implementation-module-1.0.4
myfaces-extcdi-bv1-module-api-1.0.4
myfaces-extcdi-bv1-module-impl-1.0.4
myfaces-extcdi-core-alternative-configuration-1.0.4
myfaces-extcdi-core-api-1.0.4
myfaces-extcdi-core-impl-1.0.4
myfaces-extcdi-jpa1-module-api-1.0.4
myfaces-extcdi-jpa1-module-impl-1.0.4
myfaces-extcdi-jsf20-module-api-1.0.4
myfaces-extcdi-jsf20-module-impl-1.0.4
myfaces-extcdi-jsf-alternative-configuration-1.0.4
myfaces-extcdi-message-module-api-1.0.4
myfaces-extcdi-message-module-impl-1.0.4
myfaces-extcdi-scripting-module-api-1.0.4
myfaces-extcdi-scripting-module-impl-1.0.4


I dont know if because the "WARNING" i have other problem:

javax.el.PropertyNotFoundException: Target Unreachable, identifier 'myBean'
resolved to null,

I have in my beans.xml file under WEB-INF this:


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/beans_1_0.xsd";>


and in my bean:

@Named
@ViewAccessScoped
@Model
@View(Index.class)
public class MyBean implements Serializable{
   public void test(){
 //do nothing
   }

.
}

and in my index.xhtml



if i click my button the i get this error:

javax.el.PropertyNotFoundException: Target Unreachable, identifier 'myBean'
resolved to null
viewId=/index.xhtml
location=C:\Users\user\Documents\NetBeansProjects\testweb\build\web\index.xhtml
phaseId=INVOKE_APPLICATION(5)
Caused by:
javax.el.PropertyNotFoundException - Target Unreachable, identifier
'myBean' resolved to null
at com.sun.el.parser.AstValue.getTarget(AstValue.java:153)


I dont know if this is for the first problem  (*Both MyFaces and the RI are
on your classpath. Please make sure to use only one of the two
JSF-implementations.*)
I read i need to have my beans.xml but i have it!!!

Thanks, and sorry for the english, is not my native language


Im using: Netbeans 7.1, *Glassfish 3.1.2.1,* JDK 7u3, MyFaces 2.1.6, CODI
1.0.4, Windows 7.

-- 
---
*SCJA. José Luis Cetina*
---


Message in @InitView

2012-03-09 Thread José Luis Cetina
How can i show an error message when the page load for the first time, this
only work if i go to another page and back to the original (this) then the
message in index.xhml show.

Its possible?

@Named(value="myBean")
@ViewAccessScoped
@Model
@View(Index.class)
public class MyBean implements Serializable{
@InitView
public void init(){
 //do something if something its wrong then:
 FacesContext.getCurrentInstance().addMessage(null, new
FacesMessage(FacesMessage.SEVERITY_INFO, "msg", "msg detail"));
}


Thanks


-------
*SCJA. José Luis Cetina*
---


  1   2   >