[JBoss Seam] - Re: Problem with extra action method executing
by raja05
This seems to be happening in AbstractPhaseListener and looks like a bug. The code in question is
| public boolean callPageActions(PhaseEvent event)
| {
| Lifecycle.setPhaseId( PhaseId.INVOKE_APPLICATION );
| boolean actionsWereCalled = false;
| try
| {
| actionsWereCalled = Pages.callAction( event.getFacesContext() ) || actionsWereCalled;
| actionsWereCalled = Pages.instance().callAction() || actionsWereCalled;
| return actionsWereCalled;
|
The first "Pages.callAction(event.getFacesContext()) || actionsWereCalled " runs the intended action i.e. the action in the second page. Note that at this point, the view-id is still the first page as the lifecycle has not come into the "render" phase -- still in the "Execute" phase. Now that the method returned true, we are again invoking the Pages.instance().callAction() which calls the first view since the view-id is the first page. Thats the reason for the out of order of messages.
If the code were
| actionsWereCalled = Pages.callAction( event.getFacesContext() ) || actionsWereCalled;
| actionsWereCalled = actionsWereCalled || Pages.instance().callAction();
| return actionsWereCalled;
|
that should fix this.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969794#3969794
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969794
19 years, 7 months
[JBoss Portal] - Re: Sharing a data among different browser instances
by Antoine_h
It is because the singleton class is used inside different class loaders.
so there are actually multiple "singleton" working on the plateform.
you have to put it in a lib, as you have done, but also make sure to call the instance from the same class loader.
I would do it using a JMX service of JBoss.
you build a service with your communication class, and get what you want.
At least, the service may only be a factory, that provide to any one calling it the same instance of the singleton.
or more feature as a service.
look at the JMX documentation and tutorials.
and, as an example, look at the code of the CMSPortlet and how it uses the CMSService.
or may be an EJB...
for inter portlet communication, look also for "IPC" in the forum, wiki, and at the Michelle Osmond web pages and proposed library : it works well and do most of the job.
I built a JMX service above this library to access it above multiple war and 'isolated' portlets. The reste is done by the librairy.
View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3969791#3969791
Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3969791
19 years, 7 months