Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Open Session in view antipattern and RAP 3.0(Will open session in view be possible after phase liteners removal in version 3.0)
icon5.gif  Open Session in view antipattern and RAP 3.0 [message #1712827] Wed, 28 October 2015 15:10 Go to next message
Konstantinos Apostolou is currently offline Konstantinos ApostolouFriend
Messages: 5
Registered: November 2014
Junior Member
Hi I have an RAP application that implements the open session in view.
public class PhaseListener implements
		org.eclipse.rap.rwt.lifecycle.PhaseListener {
	static Logger logger = Logger.getLogger(PhaseListener.class);
	long start;

	@Override
	public void beforePhase(PhaseEvent arg0) {
		if (arg0.getPhaseId() == PhaseId.PREPARE_UI_ROOT) {
	          HttpSessionFactory.getHttpSession().getDaoFacade().openSession();
		}

	}

	@Override
	public void afterPhase(PhaseEvent arg0) {
		if (arg0.getPhaseId() == PhaseId.RENDER) {
                      HttpSessionFactory.getHttpSession().getDaoFacade().closeSession();
		}
	}

	@Override
	public PhaseId getPhaseId() {
		return PhaseId.ANY;
	}

}

The question is, will session in view be possible after phase liteners removal in version 3.0.

Thanx in advance
K. Apostolou

[Updated on: Wed, 28 October 2015 20:36]

Report message to a moderator

Re: Open Session in view anti pattern and RAP 3.0 [message #1713336 is a reply to message #1712827] Tue, 03 November 2015 13:09 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi,
PhaseListener was deprecated in RAP 2.3 and completely removed in RAP
3.0. In RAP 3.0 you could use the internal MessageFilter class, but it
is processed outside UI thread. In RAP 3.1 we introduced a new
UIThreadListener - see:
472345: Replacement for PhaseListeners
https://bugs.eclipse.org/bugs/show_bug.cgi?id=472345
HTH,
Ivan

--
Ivan Furnadjiev

Twitter: @EclipseRAP
Blog: http://eclipsesource.com/blogs/

Professional services for RAP and RCP?
http://eclipsesource.com/services/rap/
Previous Topic:[ANN] Updated Service Release: 3.0 SR1a
Next Topic:Does Nebula autoheight feature support grids with RowTemplates?
Goto Forum:
  


Current Time: Tue Mar 19 11:02:53 GMT 2024

Powered by FUDForum. Page generated in 0.02730 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top