Messages posted by: ivanhoe  XML
Profile for ivanhoe -> Messages posted by ivanhoe [17] Go to Page: 1, 2 Next 
Author Message
I would be interested in this as well ...
Yeah I know where to use the PortableRenderer, I just use it cause my actual case is a bit different and I can't gurantee a FacesContext if I want to re-render. Just wanted to know if it is possible at all to have two webapps that both use the ICEpush Features. You said it should work, thanks for that info. Hopefuly I can get it to work.
Ok, I thought that would be the case.
Another question (because of this I experimented with the contextPath): Is it possible to have like 2 .war-Files deployed to liferay and in each .war-File are a couple of portlets that use the PushRenderer?
So .war-File A has Portlets AA and AB. If something happens in AA it request a re-rendering of AB.
In .war-File B there are the Portlets BA and BB and if something happens in BA it re-renders BB.

Is this possible? Are there some kind of tricks to it? Cause I have 3 .war-Files and if I try to fire the PushRenderer nothing happens (though I use the PortableRenderer, but that shouldn't make a difference, or should it?)
I'm wondering when/why I should use "org.icepush.contextPath" and how to make it work?
I have 3 Portlets in 3 .war-Files and they all use ICEPush. This leads to some errors and I figured it might be because they all try to use the same BlockConnection and lock each other out or something. Anyway I edited the "org.icepush.contextPath" context-param in each of the .war-Files web.xml and set it all to the same Path ( "MyPath" ). Now after redeploying my portlets I see a 404 Error in FireBug.
Am I on the wrong path if I want to unify the context-path my portlets use?

Any answer is appreciated .....
Ah got it now. Had the file at the wrong location.
I had the file on D:\logging.properties and set Tomcat to start with that file, so Tomcat used the file for itself but ICEFaces and all other stuff didn't. After I coied the file in the root of my source directory it worked. Did that before but must have had another error back then 'cause at that time that didn't work either ... .

So all in all don't be stupid like me and just create a file in the source dir and everything's fine.
Thanks deryk anyway :).
Hey it's me again,
this time with a problem that is somewhat difficult to explain.
I use the liferay community portal and have three portlets set up that should be able to communicate with each other. These portlets are in different .war files so they can't simply be in the same push group and update one another that way, that's why I wrote an "ApllicationManager" where every portlet registers itself and can send update requests to.
The "ApplicationManager" then goes ahead and tells every registered portlet to re-render itself, but this does not work all the time.

I currently have two types of "events" that can occur, either an event fired by one portlet (portlet A) to update another portlet (ortlet B). So in A the keyword "xyz" is set, the event is fired through the application Manager and the manager tells B "Hey look something happened". In this case most of the time everything is fine and portlet B gets updated correctly.
The other type of event is fired in portlet B and should update both other portlets (A and C) with a new timestamp (for testing). This however does not work most of the time.

Sometimes, but very rarely, the cases are swapped so the "keyword-update-event" does NOT work and the "timestamp-update-event" DOES work.

This is a serious problem for us at the moment 'cause we want to have many events between our portlets. If someone could point me into any helpful direction it would be great.

An additional note: I am forced to use the PortableRenderer for the updates, because the normal PushRenderer fails with an error. Thats no biggie, but maybe this has something to do with the problem.

I will attach my example files in a minute, just need to clean up the code.

I just saw I can only upload to files ... well I uploaded one portlet and the ApplicationManager. The ApplicationManagers whole package de.incony.global.* is exported out of a eclipse as a .jar file and stored in my liferay-portal/tomcat-VERSION/lib folder.
The portlet (every portlet is it's own project/.war-file!) is deployed through the liferay IDE.
Thanks for the quick reply, it helped a little bit, but my problem isn't completely solved. In the example file you mentiod there's just:
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
 .level = INFO
 java.util.logging.ConsoleHandler.level = INFO
 java.util.logging.FileHandler.level = INFO
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter

I did set .level to "FINEST" which naturally spammed my console as soon as is restarted Tomcat. So I turned that off again.
Now I have the following config in the file:
handlers = java.util.logging.ConsoleHandler, java.util.logging.FileHandler
 .level = INFO
 java.util.logging.ConsoleHandler.level = FINEST
 java.util.logging.FileHandler.level = INFO
 java.util.logging.ConsoleHandler.formatter = java.util.logging.SimpleFormatter
 com.icesoft.level = FINEST
 org.icefaces.level = FINEST
 org.icepush.level = FINEST

Those are the packages I saw earlier and I just wanted to get any output at all .... but still nothing.
I'm trying to enable the logging for ICEFaces & ICEPush to see if my PortableRenderer etc throw any errors, but it looks like I'm doing something wrong.
I added a commons-logging.properties in the docroot/WEB-INF/src Folder (same folder my JAVA Packages / Files are in) and a log4j.properties.


 log4j.appender.stdout.layout.ConversionPattern=[%d{dd MMM yyyy HH:mm:ss}] %-5p [%F:%L -- %M] - %m%n
 log4j.logger.com.icesoft.faces.application.D2DViewHandler=FINEST, stdout
 log4j.logger.com.sun.faces.config.ConfigureListener=FINEST, stdout
 log4j.logger.org.icepush=FINEST, stdout
 log4j.logger.org.icepush.application.PushRenderer=FINEST, stdout
 log4j.logger.org.icepush.application.PortableRenderer=FINEST, stdout
 log4j.logger.org.icefaces=FINEST, stdout

I know finest is overkill, but I just wanted to get any logging output at all. Yet I don't get any, except the output of some liferay logging (those I don't need and their output hasn't change through the config at all, just fyi)

As you see I use the liferay Portal for my Portlets.

Help is appreciated :)

Quick edit: I tried the settings I found here: http://jforum.icesoft.org/JForum/posts/list/2453.page
But it didn't help at all :(
Hey one more quick question.
Could you please specify what you exactly mean when you say "view"?
If I understood it correctly a view is one browser tab. If I open the same page in another tab it is technically a different view.
Am I correct? And if so, those two methods still don't function correclty for me :p
Regardless of what I do always all pages get the push and rendered ...
Thanks for the clarification!
Firstly, thanks for the reply.

No I'm not using different groups.
But if with every trigger of the render method all views for that group are getting a push update, why are there those two functions?

I thought the addCurrentSession() method only adds the views of the one client (because he has a unique session that is not shared with other clients) so that a push only updates his personal view.
addCurrentView() on the other hands adds the current view for all clients thus a push updates the view of all clients.

The problem why I need to have those two cases is, my company wants to be able to do both. We want to be able to update alle pages of all clients.
Little example (product management):
Client A starts to edit a product. Thus it needs to be locked for all other clients so that not two persons can edit the same product (to avoid loss of data).
But if Client B searches for something in the productlist and gets an update with the shortened list we don't want that the same result is displayed for Client C who searched for something a minute ago.

Yeah I hope my point is clearer now.
Is this management only possible with different group names?
Like the groups "GLOBAL_UPDATE" for global updates (go figure) and "SID_HAFJH234243" [session id of the user] for user specific updates?
Noone hast a Hint or something?
I realy can't figure out a difference between the two methods. Regardless of what method I use / what scope my Beans have. Every time I call PushRenderer.render("MYGROUP"); every single Portlet gets updated.
Is this a problem with the liferay Server? Is there only a difference in a non-portal environment?
Hey everyone,
I'm having a new issue. What exactly is the difference between "PushRenderer.addCurrentSession()" and "PushRenderer.addCurrentView()"?
If I understand the documentation right, "addCurrentSession()" should prepare all Portlets of all Pages in the specified group to be rendered on request. "addCurrentView()" on the other hand only prepares the portlets on the ACTIVE page to be rendered. However, this is not the case.
I have a setup of 3 Portlets, all in the same group on one page plus one of the portlets, in the same group, on another page. I opened two browsers (Chrom & Firefox) and both pages and then triggered the push event. Tada all pages always rerender. But I only want the Portlets of the page on which the event is triggered to render.
Can anybody point me to a solution?
Problem is solved. Eclipse slowed somehow the whole communication down. So the solution was to simply start the server directly through the .bat/.sh file.
Hey everybody,
I'm trying to get IPC with Application Scoped Sessions to work and everything is fine, except that the updating or whatever gets reaaaaly slow if I put more than two Portlets in the same Push Group.
I have a total of 3 Portlets (A, B and C), if all 3 are in the group it takes about 15 - 30 seconds for the update to be rendered.
If I seperate the groups (Group AB, AC and BC so all are connected) the update is nearly instant.

Can anybody help me with fixing this? I'm relativly new to Java Development (and an utter noob with Portals / Portlets) so please don't get too technical with you answers.

Thanks in advance ...
Profile for ivanhoe -> Messages posted by ivanhoe [17] Go to Page: 1, 2 Next 
Go to:   
Powered by JForum 2.1.7ice © JForum Team