Re: commandlink not working in panelgrid

2012-05-09 Thread Shasi Mitra
After u click the link also the expression in the rendered attribute is 
evaluated. That time it should be returning Faldo and hence ur action isn't 
being fired. If u remove all the rendered attributes or keep ur bean in session 
scope, it should work. Try printing the expression u gave in the rendered 
attribute and check. 

Sent from my iPhone

On May 9, 2012, at 11:59 PM, Lim Hock-Chai  
wrote:

> I tried both session and request scopes.  Both failed to work.  The thing is 
> that the commandlink is showing on the page, which would mean that the 
> rendered condition in the panelGroup or panelgrid is ok.  It just that when I 
> click on the link that is inside the panelgroup/panelgrid, it does not work.  
> I even tried not using any rendered condition on the panelGroup/panelGrid, 
> the link still not working.  Oddest thing.
> 
> 
> 
> -Original Message-
> From: Shasi Mitra [mailto:shasimi...@yahoo.com] 
> Sent: Wednesday, May 09, 2012 1:12 PM
> To: MyFaces Discussion
> Subject: Re: commandlink not working in panelgrid
> 
> Are u sure ur bean is in session scope? Befor the action event is fired, it's 
> verified whether the grid is rendered or not. So if the bean is in request 
> scope, it returns False and therefore the link's action isn't fired. 
> 
> Sent from my iPhone
> 
> On May 9, 2012, at 9:57 PM, Lim Hock-Chai  
> wrote:
> 
>> I'm currently using myfaces 1.1.9 for my web app.  I'm having some problems 
>> with commandlink not working correctly for me.  It appears that when 
>> commandlink is inside of the panelgrid, it is not calling the method 
>> specified in the action attr.  But it works fine if I put it outside of the 
>> panelgrid.  Strange part is that I've had other jsp that have commandlink 
>> inside datatable and they work fine also.  This is the first time I use it 
>> inside a panelgrid.
>> 
>> See code below.  The first commandlink is, which is not inside of panelgrid, 
>> works fine.  The 2nd commandlink is inside of panelgrid and it is not 
>> working (not calling back-end bean method)
>> 
>> >   xmlns:jsp="http://java.sun.com/JSP/Page";
>>xmlns:c="http://java.sun.com/jsp/jstl/core";
>>xmlns:f="http://java.sun.com/jsf/core";
>>xmlns:h="http://java.sun.com/jsf/html";
>>xmlns:t="http://myfaces.apache.org/tomahawk";
>>xmlns:a4j="http://richfaces.org/a4j";>
>> 
>> 
>>   
>>   
>> 
>>   
>>   
>>   > action="#{commonTaskBean.fromMSAMBackToMyAccount}" >
>>   
>>   
>>   
>> 
>>   
>>   >   rendered="#{not empty sessionScope.MyAccountLoginType and
>>   
>> sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }">
>>   
>>   
>>   > action="#{commonTaskBean.fromMSAMBackToMyAccount}">
>>   
>>   
>>   
>>   
>>   
>> 
>> 


Re: commandlink not working in panelgrid

2012-05-09 Thread Shasi Mitra
Are u sure ur bean is in session scope? Befor the action event is fired, it's 
verified whether the grid is rendered or not. So if the bean is in request 
scope, it returns False and therefore the link's action isn't fired. 

Sent from my iPhone

On May 9, 2012, at 9:57 PM, Lim Hock-Chai  wrote:

> I'm currently using myfaces 1.1.9 for my web app.  I'm having some problems 
> with commandlink not working correctly for me.  It appears that when 
> commandlink is inside of the panelgrid, it is not calling the method 
> specified in the action attr.  But it works fine if I put it outside of the 
> panelgrid.  Strange part is that I've had other jsp that have commandlink 
> inside datatable and they work fine also.  This is the first time I use it 
> inside a panelgrid.
> 
> See code below.  The first commandlink is, which is not inside of panelgrid, 
> works fine.  The 2nd commandlink is inside of panelgrid and it is not working 
> (not calling back-end bean method)
> 
> xmlns:jsp="http://java.sun.com/JSP/Page";
> xmlns:c="http://java.sun.com/jsp/jstl/core";
> xmlns:f="http://java.sun.com/jsf/core";
> xmlns:h="http://java.sun.com/jsf/html";
> xmlns:t="http://myfaces.apache.org/tomahawk";
> xmlns:a4j="http://richfaces.org/a4j";>
> 
> 
>
>
> 
>
>
> action="#{commonTaskBean.fromMSAMBackToMyAccount}" >
>
>
>
> 
>
>rendered="#{not empty sessionScope.MyAccountLoginType and
>
> sessionScope.MyAccountLoginType==resources.LOGIN_TYPE_MY_ACCOUNT }">
>
>
> action="#{commonTaskBean.fromMSAMBackToMyAccount}">
>
>
>
>
>
> 
> 


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 Shasi Mitra
From ur exception I can see that ur application is using Mojarra and not 
myfaces.  There should be a way to change the class load policy so that your 
application picks the myfaces classes instead of mojarra's which comes with the 
server. This setting should be done in your server, somewhere in class loading

Sent from my iPhone

On Mar 12, 2012, at 10:34 PM, José Luis Cetina  wrote:

> 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
>>>>> *
>>>>>  
>>>>>  
>&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 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
> @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*
> ---


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

Re: Problem with number of views in session..urgent !!

2009-12-03 Thread Shasi Mitra Yarram
All - Please let me know if this issue is caused because of any 
misconfiguration..

--- On Tue, 1/12/09, Shasi Mitra Yarram  wrote:

From: Shasi Mitra Yarram 
Subject: Problem with number of views in session
To: "MyFaces Discussion" 
Date: Tuesday, 1 December, 2009, 5:01 PM

Hi all, I had gone thru <http://wiki.apache.org/myfaces/Performance> and 
updated org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION to "4" to have less 
session usage. Now the problem is I have a link on a page, on click of which a 
new window opens. After going through more than 4 screens in the child window, 
none of the links in the parent window work. The page simply refreshes. Can 
anyone suggest solution for this? It works if I put more number of views in 
session. But I wanna know if there is any other alternative..
Thanks,Shasi


      The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

Problem with number of views in session

2009-12-01 Thread Shasi Mitra Yarram
Hi all, I had gone thru  and 
updated org.apache.myfaces.NUMBER_OF_VIEWS_IN_SESSION to "4" to have less 
session usage. Now the problem is I have a link on a page, on click of which a 
new window opens. After going through more than 4 screens in the child window, 
none of the links in the parent window work. The page simply refreshes. Can 
anyone suggest solution for this? It works if I put more number of views in 
session. But I wanna know if there is any other alternative..
Thanks,Shasi


  The INTERNET now has a personality. YOURS! See your Yahoo! Homepage. 
http://in.yahoo.com/

JSF Performance and Scalability issues

2009-09-07 Thread Shasi Mitra Yarram
We have developed an application..These are the technologies we've used: 
- JDK 1.4.2 
- JSF 1.1 (Myfaces 1.1.6) 
- Ajax4JSF 1.1.1 
- Tomahawk 1.1.8 
- Tiles 2.1.0 
- Spring 2.5, Spring Security for security layer 
- iBatis 2.0 

Databases: 
- SQL Server 2000, DB2 8, Sybase 

Servers: 
- IBM Websphere 6.0 - JVM memory min - 64MB, max 512MB 
- IBM MQ Series 6.0 
- IBM AIX UNIX, load balacing on 2 servers (Clustered environment), Each unix 
box has 2 CPUs 

Our application uses MQ for lot of business transactions. It is dependent more 
on MQ than the database. Among the databases, SQL Server is the main database. 
DB2 and Sybase is used for few transactions. 
This application is supposed to take a load of 1000 users in production and 
give us a response time of 10 secs. 

As we started with load testing we saw poor response time. We did profiling 
using Jprofiler and corrected some inherent application bugs which was causing 
high JVM utilization. 
As we reached 250 user load, myfaces started eating memory (This was revealed 
by heap dump). 
We tuned myfaces based on various websites and did the following: 
1) State saving mechanism as "server" 
2) Number of views as 3 
3) Streaming resource 
org.apache.myfaces.component.html.util.StreamingAddResource with t:documentHead 
4) Set org.apache.myfaces.SERIALIZE_STATE_IN_SESSION as false. 

By adding the above code, it improved the performance only a bit. 
I later wrote some filters to cache the images and css files. This improved the 
screen load performance a bit. 

But the overall response time was not upto the benchmark. We were getting a 
response time of 20 secs for 250 user load. We are far from achieving the 
response time for 1000 user load. 
We got the heap dump once again but we saw myfaces continued to eat memory. The 
object in heap that is causing the trouble is 
JspStateManagerImpl$SerializedViewCollection 
I saw in some website that this object tries to save the old view states in 
some weak hashmap which nevers gets garbage collected. Thought that could be 
the problem. I found a fix in the website and replaced the corrected jars. Now 
JspStateManagerImpl is not storing old views in weak hashmap. 

This actually helped a bit. It reduced the memory utilization. 

But When we run for 500 users, heap dump still shows JspStateManagerImpl object 
is eating (Approx 1.6MB). 
I am not sure if 1.6MB size in heap is normal for 500 users!!! 

I know the screen size also makes a lot of difference to give a conclusion 
upfront. 

But let me provide more information. 
On an average we use 25 components. 

Each screen has list of selectitems for a drop down. The select items is inturn 
refered by a managed bean in session. 

Apart from the above object in session, we store only 3 managed beans in 
session. These managed beans carry menu and user information. 
JSCookmenu inturn reads the menu object in session and renders the output for 
every screen. 

I wrote a session size calculator jsp to find the size of each of these session 
objects. 
They are hardly 20~30KB. But JspStateManagerImpl object in session is easily 
150KB min. Sometimes it goes above 450KB. 

We use tomahawk savestate to store some object information. 

I should accept that we do use EL expression statements in many of our screens. 

We have limited usage of datatables. But wherever we have used, we have done 
managed bean (in request scope) binding with preservedatamodel as true. 

Wherever JSF components were not needed, we used pure HTML tags enclosed 
withing f:verbatim. 

Each page contains atleast 4 command buttons. Each command button is supposed 
to call some other managed bean and render those screens. 
This means apart from the main managed bean, when the screen is rendered the 
beans referred by these buttons are instantiated. 
Of course all these managed beans are in request scope. 

Most of the components in our screen use "rendered" attribute to perform some 
business function. 

Now my question is, did I miss anything else in myfaces? Did i miss anything 
that could help me tune JSF further? 
Our constraint is we cannot move to JDK 1.5 (which means JSF 1.2 or higher) as 
it will be a big infrastructre cost to our clients. 

I know the problem for poor response time could also be due to database, MQ and 
others. We are working on them parallely. 
But I want to eliminate all JSF related issues from the picture. 


  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

Load testing JSF application

2009-08-21 Thread Shasi Mitra Yarram



Hi,
> We are having a peculiar behavior when we performed load testing on our JSF 
> application deployed in websphere server.
> It is throwing an error as it is unable to serialize the view state of 
> Ajax4jsf.
> 
> I looked into the code of Ajax4jsf jars, none of the programs are 
> serializable. Shouldnt these classes be serializable?
> AjaxViewRoot extends the myfaces APIs. Even they are not serializable. If at 
> all not implementing serializable is a issue, it seems to be a basic problem. 
> I am pretty sure that Myfaces developers/designers would have thought about 
> this and handled it somehow. There is something that I am missing and unable 
> to understand.
> 
> I did a bit of research and found the following link.
> <>
> 
> It states by enabling SERIALIZE_STATE_IN_SESSION to "true", it could resolve 
> the problem.
> 
> Now I had set this to false after looking at JSF performance improvement tips 
> in myfaces wiki
> <>
> 
> I am pretty confused as exactly what needs to be done. Can you please help 
> with your ideas?
> 
> 
> Below is my stack trace...

> app data changes : [jsf_sequence, 
> org.apache.myfaces.application.jsp.JspStateManagerImpl.SERIALIZED_VIEW, 
> javax.faces.request.charset]
> app data removals : null
> user write hit : false
> max inact write hit : false
> listener count hit : false
> update : update sessions set 
> listener count : 1
> 
> cached : true
> cacheId : 0001
> cacheIdUpdated : false
> syncFromServlet : false
> 
> 
> [8/21/09 2:13:20:286 EDT] 00b2 SessionContex E   Exception is: 
> java.io.NotSerializableException: org.ajax4jsf.framework.ajax.AjaxViewRoot
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.defaultWriteFields(ObjectOutputStream.java(Inlined 
> Compiled Code))
>     at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled
>  Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Inlined 
> Compiled Code))
>     at java.util.ArrayList.writeObject(ArrayList.java(Compiled Code))
>     at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
>  Code))
>     at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
>     at 
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled
>  Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Inlined 
> Compiled Code))
>     at java.util.ArrayList.writeObject(ArrayList.java(Compiled Code))
>     at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
>     at 
> sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java(Compiled
>  Code))> 
>     at java.lang.reflect.Method.invoke(Method.java(Compiled Code))
>     at 
> java.io.ObjectStreamClass.invokeWriteObject(ObjectStreamClass.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeSerialData(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeOrdinaryObject(ObjectOutputStream.java(Compiled
>  Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeArray(ObjectOutputStream.java(Compiled 
> Code))
>     at 
> java.io.ObjectOutputStream.writeObject0(ObjectOutputStream.java(Compiled 
> Code))
>     at java.io.ObjectOutputStream.writeObject(ObjectOutputStream.java(Inlined 
> Compiled Code))
>     at java.util.ArrayList.writeObject(ArrayList.java(Compiled Code))
>     at sun.reflect.GeneratedMethodAccessor75.invoke(Unknown Source)
>     at 
> sun.reflect.

Re: Performance issues with JSF

2009-07-20 Thread Shasi Mitra Yarram
Hi - This is my configuration
1.JSF1.1
2.MyFaces 1.1.6
3.Tomahawk 1.1.8
4.IBM Websphere Server 6.0
5.Ajax4JSF1.1
6.JDK1.4
Somebody mentioned that using jsp as page description slows down performance. 
Instead use Facelets. Can you tell what he meant?
Also our application has 447 jsp pages. We are using struts-tiles. If we want 
to convert to facelets how much time it'll take for the entire conversion , as 
its time for us to freeze the code. Is it easy to incorporate those changes?
 
Thanks,
Shasi

--- On Sat, 18/7/09, Kito Mann  wrote:


From: Kito Mann 
Subject: Re: Performance issues with JSF
To: "Shasi Mitra Yarram" , "MyFaces Discussion" 

Date: Saturday, 18 July, 2009, 7:47 PM


Hello Sashi,

Ok, but which version? I'm asking because I had a client that switched from WAS 
7.0 on AS/400 to 7.0 on Linux and saw some major performance improvements.
---
Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3



On Sat, Jul 18, 2009 at 12:14 AM, Shasi Mitra Yarram  
wrote:





Thanks Kito Mann for the reply. I am using IBM's websphere server and unix OS. 

--- On Fri, 17/7/09, Kito Mann  wrote:


From: Kito Mann 
Subject: Re: Performance issues with JSF
To: "MyFaces Discussion" , shasimi...@yahoo.com
Date: Friday, 17 July, 2009, 4:27 PM





Hello Shashi,

A couple more recommendations:

* Follow Dan Allen's suggestions in these articles: 
http://www.jsfcentral.com/articles/speed_up_your_jsf_app_1..html and 
http://www.jsfcentral.com/articles/speed_up_your_jsf_app_2.html. Often, as 
someone else suggested, the problem is placing time-consuming code inside of 
getter methods that are referenced via the EL.

* Time different parts of the life cycle -- this will verify whether or not the 
problem is really in the Restore View phase. You can do this by writing a 
simple PhaseListener or using something like PrimeFaces' FacesTrace 
(http://primefaces.prime.com.tr/en/).

Which application server and OS are you using?
---
Kito D. Mann -- Author, JavaServer Faces in Action
http://twitter.com/kito99  http://twitter.com/jsfcentral
http://www.virtua.com - JSF/Java EE consulting, training, and mentoring
http://www.JSFCentral.com - JavaServer Faces FAQ, news, and info
+1 203-404-4848 x3



On Fri, Jul 17, 2009 at 5:56 AM, Shasi Mitra Yarram  
wrote:






Hi All - We have built a J2EE application with JSF (MyFaces, Ajax4JSF) ,Spring 
and IBatis. What we find is, each of the screen takes lot of time to load. We 
find no performance issue with Spring or Ibatis (after verifying via 
JProfiler). Jprofiler shows the JVM memory is occupied b JSF objects. I found 
that the screen loading is taking time for two reasons. 
1.The JSF screens (which has cook menu) take time to load. 
2.The overall screen painting in the browser takes time to load. 
Our JSF screens are not too complicated and even the simplest screen takes time 
to load. Note that each of the screens always loads JSCookMenu. We visited 
apache site for tuning JSF. As per their suggestion we did the following 
1. We set the State saving mechanism as server side. 
2. Serialization of session objects was set to false. 
3. Compression of objects was set to false. 
4. Streaming Add Resource and t:documentHead were added. 
But none of these improved the performance. 
The overall screen takes time and I'm wondering if we should do effective 
caching of images,CSS and js files. I visited plenty of websites and tried to 
move all these client specific files under the  tag, loaded the images 
via CSS but nothing helps. We have high capacity machines and I dont think 
desktop config is playing a role. 
We thought the problem could be bcos of network traffic or slow performance of 
underlying platform websphere server. We checked other application running in 
the same envrironment and they are extremely fast. The only difference b/n our 
application and the other is JSF. 
I'm short of solutions. Any valuable input will be greatly appreciated. 




Looking for local information? Find it on Yahoo! Local



Love Cricket? Check out live scores, photos, video highlights and more. Click 
here.



  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

Performance issues with JSF

2009-07-17 Thread Shasi Mitra Yarram
Hi All - We have built a J2EE application with JSF (MyFaces, Ajax4JSF) ,Spring 
and IBatis. What we find is, each of the screen takes lot of time to load. We 
find no performance issue with Spring or Ibatis (after verifying via 
JProfiler). Jprofiler shows the JVM memory is occupied b JSF objects. I found 
that the screen loading is taking time for two reasons. 
1.The JSF screens (which has cook menu) take time to load. 
2.The overall screen painting in the browser takes time to load. 
Our JSF screens are not too complicated and even the simplest screen takes time 
to load. Note that each of the screens always loads JSCookMenu. We visited 
apache site for tuning JSF. As per their suggestion we did the following 
1. We set the State saving mechanism as server side. 
2. Serialization of session objects was set to false. 
3. Compression of objects was set to false. 
4. Streaming Add Resource and t:documentHead were added. 
But none of these improved the performance. 
The overall screen takes time and I'm wondering if we should do effective 
caching of images,CSS and js files. I visited plenty of websites and tried to 
move all these client specific files under the  tag, loaded the images 
via CSS but nothing helps. We have high capacity machines and I dont think 
desktop config is playing a role. 
We thought the problem could be bcos of network traffic or slow performance of 
underlying platform websphere server. We checked other application running in 
the same envrironment and they are extremely fast. The only difference b/n our 
application and the other is JSF. 
I'm short of solutions. Any valuable input will be greatly appreciated. 



  See the Web's breaking stories, chosen by people like you. Check out 
Yahoo! Buzz. http://in.buzz.yahoo.com/

Custom Error message

2009-06-29 Thread Shasi Mitra Yarram
Hello All - On failure of any validation, I need to show my own messages for 
the components(text boxes, radio buttons). I see that jsf1.2 gives 
requiredMessage attribute for each input component. I don have the privilege to 
use 1.2. Can i do similar thing in 1.1. Please gimme a clue.It would be great 
if you can share the code..
Thanks,
Shasi


  Love Cricket? Check out live scores, photos, video highlights and more. 
Click here http://cricket.yahoo.com

Re: Problem when using Ajax4JSF

2009-06-07 Thread Shasi Mitra Yarram
I'm using tomahawk1.1.8, myfaces1.1.6 with a4j.. Please suggest a solution.

--- On Fri, 5/6/09, Anton Gavazuk  wrote:


From: Anton Gavazuk 
Subject: Re: Problem when using Ajax4JSF
To: "MyFaces Discussion" 
Date: Friday, 5 June, 2009, 7:20 AM


Ask the question on related richfaces jboss forum


2009/6/5 Shasi Mitra Yarram 






Hi all- 
On load of the body I'm rendering a panelgrid by calling one actionListener 
using . But till that panelgrid loads none of the actions on 
the page are working. As ajax is asynchronous, it should not wait for the panel 
grid to load to perform other actions. Any idea how to resolve this? 



Bring your gang together. Do your thing. Find your favourite Yahoo! Group.



  Own a website.Get an unlimited package.Pay next to nothing.*Go to 
http://in.business.yahoo.com/

JSCookMenu - Action is seen on the status bar--

2009-06-04 Thread Shasi Mitra Yarram
Hi,
 when the cursor is hovered over the js cook menu items, the 
action(#{backingbean.action}) is seen in the status bar. what can be done to 
avoid this? 


  Explore and discover exciting holidays and getaways with Yahoo! India 
Travel http://in.travel.yahoo.com/

Problem when using Ajax4JSF

2009-06-04 Thread Shasi Mitra Yarram
Hi all- 
On load of the body I'm rendering a panelgrid by calling one actionListener 
using . But till that panelgrid loads none of the actions on 
the page are working. As ajax is asynchronous, it should not wait for the panel 
grid to load to perform other actions. Any idea how to resolve this? 


  Cricket on your mind? Visit the ultimate cricket website. Enter 
http://beta.cricket.yahoo.com

Customized Menu using MyFaces

2009-04-29 Thread Shasi Mitra Yarram
Hi all,

 According to my requirement I have to build a menu with a list of
navigationItems. I cannot use cookMenu because i should show all the
parent and child menu items in the same column not onMouseOver. Is
there any component for this? I'm using JSF1.1 and tomahawk-1.1.8 .
Thanks in advance.

 

 Also can you let me know how to hide the border coming for
 which is coming when layout "spread" is used? There is not
styleClass attribute for the same. 


  Now surf faster and smarter ! Check out the new Firefox 3 - Yahoo! 
Edition http://downloads.yahoo.com/in/firefox/?fr=om_email_firefox

First row should have only one column inside a datatable

2009-03-17 Thread Shasi Mitra Yarram
Hi all- i have to display the data from the second row in the datatable and in 
the first row i should have a check box with select all label. How is it 
possible? Can i have something like first= -1 in datatable? If i add one dummy 
VO with spaces as the first object in the list it worke fine but i'm looking 
for better options..Any clue?


  Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

Page not getting submitted

2009-03-01 Thread Shasi Mitra Yarram
There is a problem having the mapping variable for an input
text box as part of the Value object which is part of the backing bean. The page
does not get submitted on clicking the submit button. Instead the same page gets
refreshed.  

   

The jsf code for the  input text box is as  

   

 

   

But when I have the mapping variable ‘inputtext ’
as part of the backing bean it works fine.  

   

The question is  - Can’t we have the mapping
variable for an input field as a part of the value object which is a part of
the backing bean.


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Datatable with only one select all checkbox in the first row

2009-02-21 Thread Shasi Mitra Yarram








Hi all, 
Hi i'm using jsf1.1, tomahawk 1.1.6..my requirement is the datatable should be 
displayed with only one select all checkbox in the first row and data should 
come from second row with one check box per row. how can i get an empty row? 
Also i should get as many selected rows in the next layer to perform some 
operations..pls help


  Get perfect Email ID for your Resume. Grab now 
http://in.promos.yahoo.com/address

Usage of Tomahawk SourceCodeServlet

2009-02-20 Thread Shasi Mitra Yarram
 Can anyone tell me the usage of 
org.apache.myfaces.shared_tomahawk.util.servlet.SourceCodeServlet? Is it 
mandatory if we use tomahawk's components?


  Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

Re: Data table is taking long time to render

2009-01-28 Thread Shasi Mitra Yarram
Hi David- We use ibatis,it takes connections from pool only and we have simple 
select queries. It returns 5000 records out of which we filter(filtering part 
is taken care by business classes) and show atmost 60 records on the page.Each 
record is a commandLink. And i am using t:dataTable with 
preserveDataModel="true". Even if i remove this attribute i don see much 
difference.
I can see that there's a siginificant decrease in the response time if i use 
struts. But as jsf is giving more components and also faster to develop we don 
want to lose the opportunity of using it in our application. But if the 
performance is not upto the mark, clients insist us to use Struts or Spring web 
mvc. Also we have very less time to decide on which framework to use :-( We 
even followed all the performance improvement measures given in myfaces 
wiki..Any suggestions to my problem?
Concurrent users may be atmost 1000.

--- On Thu, 29/1/09, David Griffiths  wrote:

From: David Griffiths 
Subject: Re: Data table is taking long time to render
To: "MyFaces Discussion" 
Date: Thursday, 29 January, 2009, 5:43 AM

Actually, he just said a million users - nothing about concurrent.

Is this wired up to a database? Is a database connection being opened for each
user, or is it a connection pool? What does the query look like? How many rows
on average are you asking the data table to render? I guess I am asking if you
are 100% sure it's JSF, or if maybe it's got to do with some other
aspect of the application.

There are parts of an application when, for performance reasons, you have to
leave the high-level tools (JSF, Hibernate, Spring) and code lower to the
silicon. Every Hibernate application I've worked on has had SQL over a plain
JDBC connection for performance reasons.

David


Richard Yee wrote:
> What kind of server and how many are you running on? How many CPUs and
> how much memory? How are you testing it? You might have to tune your
> database and # of database connections. A million concurrent users is
> pretty unrealistic.
> 
> -R
> 
> On Wed, Jan 28, 2009 at 12:02 PM, Shasi Mitra Yarram
>  wrote:
>   
>> Hi all,
>> we are designing an application which will have atleast 1 million
users. As
>> part of POC we have developed a module with JSF and Spring. Now when
we run
>> it with 30 -40 users the page with datatable is taking <5 secs to
render.
>> But if we increase the number of users say 100 its taking more than 30
>> seconds. As we have not yet started coding we need to decide whether
to go
>> with JSF or use struts..Any help is greatly appreciated..I heard and
can see
>> too that performance of JSF is pretty slow although the development
time is
>> fast..
>> 
>> 
>> Add more friends to your messenger and enjoy! Invite them now.
>> 
> 
>   




  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Data table is taking long time to render

2009-01-28 Thread Shasi Mitra Yarram
Hi all,
we are designing an application which will have atleast 1 million users. As 
part of POC we have developed a module with JSF and Spring. Now when we run it 
with 30 -40 users the page with datatable is taking <5 secs to render. But if 
we increase the number of users say 100 its taking more than 30 seconds. As we 
have not yet started coding we need to decide whether to go with JSF or use 
struts..Any help is greatly appreciated..I heard and can see too that 
performance of JSF is pretty slow although the development time is fast..



  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

calling backing bean method from Javascript

2009-01-18 Thread Shasi Mitra Yarram
Hi i want some methods of backing bean to be called onload of the page.. can u 
lemme know how to call a backing bean method from javascript using AJAX.


  Check out the all-new Messenger 9.0! Go to http://in.messenger.yahoo.com/

RE: Using Ajax with MyFaces

2009-01-15 Thread Shasi Mitra Yarram
Madhav,

i actually have a page which has three tables in it. I get data to table 1 from 
db which is very fast. Table 2 and table 3 should be populated from webservice 
calls. As the webservice calls are very slow it is taking a long time for the 
page to get loaded.So somebody suggested to load the page with table1 first and 
then using ajax populate the other two tables after the page loads without any 
user action..Hope u understood my reqmt..any help please? does myfaces give any 
component or can i use ajax with myfaces without any prob..this is my config 
(myfaces 1.1.6, tomahawk-1.1.8, tiles with jdk 1.4)

--- On Thu, 15/1/09, Madhav Bhargava  wrote:

From: Madhav Bhargava 
Subject: RE: Using Ajax with MyFaces
To: "MyFaces Discussion" , "shasimi...@yahoo.com" 

Date: Thursday, 15 January, 2009, 6:03 AM








Shashi wrote:



>Hi all,>  >I'm using myfaces 1.1.6, tomahawk-1.1.8, tiles with jdk 1.4.>I've a 
>page which has three data tables. I want the data in the two tables to be 
>populated after the page loads.Can i do it using AJAX. I am new to >AJAX. Or 
>is there any component in Sandbox for this requirement.>Already i'm facing lot 
>of problems cos i'm trying to use trinidad for breadcrumb which i could not 
>resolve yet. If i include rich faces now, I'm scared >I'll have 
>incompatibility issues. My aim is to populate one table(which is a web service 
>call) automatically after the page loads. That too without any >client 
>interaction. Please help as we have very less time for development. 
 
Your requirement is not clear. You can always pre-populate a backing bean which 
is associated to the page and then transfer control to that page.
Alternatively you can call a javascript on page load and then issue an AJAX 
submit. Put the data table in a4j:outputPanel. When the page is refreshed the 
data table will then have the data that you desire.
 
Regards,
M



 CAUTION - Disclaimer *
This e-mail contains PRIVILEGED AND CONFIDENTIAL INFORMATION intended solely 
for the use of the addressee(s). If you are not the intended recipient, please 
notify the sender by e-mail and delete the original message. Further, you are 
not 
to copy, disclose, or distribute this e-mail or its contents to any other 
person and 
any such actions are unlawful. This e-mail may contain viruses. Infosys has 
taken 
every reasonable precaution to minimize this risk, but is not liable for any 
damage 
you may sustain as a result of any virus in this e-mail. You should carry out 
your 
own virus checks before opening the e-mail or attachment. Infosys reserves the 
right to monitor and review the content of all messages sent to or from this 
e-mail 
address. Messages sent to or from this e-mail address may be stored on the 
Infosys e-mail system.
***INFOSYS End of Disclaimer INFOSYS***


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/

Using Ajax with MyFaces

2009-01-14 Thread Shasi Mitra Yarram




Hi all,

I'm using myfaces 1.1.6, tomahawk-1.1.8, tiles with jdk 1.4.I've a page which 
has three data tables. I want the data in the two tables to be populated after 
the page loads.Can i do it using AJAX. I am new to AJAX. Or is there any 
component in Sandbox for this requirement.Already i'm facing lot of problems 
cos i'm trying to use trinidad for breadcrumb which i could not resolve yet. If 
i include rich faces now, I'm scared I'll have incompatibility issues. My aim 
is to populate one table(which is a web service call) automatically after the 
page loads. That too without any client interaction. Please help as we have 
very less time for development. 


  Unlimited freedom, unlimited storage. Get it now, on 
http://help.yahoo.com/l/in/yahoo/mail/yahoomail/tools/tools-08.html/

MyFaces 1.1.8 , Trinidad 1.1.0, Tomahawk 1.1.6 and JDK1.4

2008-12-17 Thread Shasi Mitra Yarram
Is it possible to work with the following combination. I want to use breadcrumb 
component from trinidad.
MyFaces 1.1.8 , Trinidad 1.1.0, Tomahawk 1.1.6 and JDK1.4.
If i use this my command button actions are not working. Please help.
 
Thanks,
Shasi


  Add more friends to your messenger and enjoy! Go to 
http://messenger.yahoo.com/invite/