I need to be able to use Seam components during createView of a ViewHandler (at
least). This was working in beta 1, and we need to be to get back to that
ability to upgrade.
The problem with using Seam components then is that there is no conversation
until you get to afterPhase RESTORE_VIEW leading to "conversation context not
active" if you try to access them in createView.
So I've hacked around this by trying to startup conversations in beforePhase
RESTORE_VIEW:
- Extending SeamExtendedManagedPersistencePhaseListener
- Then:
| public void beforePhase(PhaseEvent arg0) {
| super.beforePhase(arg0);
| if (arg0.getPhaseId().equals(PhaseId.RESTORE_VIEW)){
| ExternalContext ec = arg0.getFacesContext().getExternalContext();
| Manager.instance().restoreConversation( ec.getRequestParameterMap() );
| Lifecycle.resumeConversation(ec);
|
Manager.instance().handleConversationPropagation(ec.getRequestParameterMap() );
| }
| }
|
That gets things a little further along... however now I appear to be running
into http://jira.jboss.com/jira/browse/EJBTHREE-540:
| 11:02:43,668 ERROR [STDERR] org.hibernate.TransactionException: could not
register synchronization with JTA TransactionManager
| at
org.hibernate.jdbc.JDBCContext.registerSynchronizationIfPossible(JDBCContext.java:174)
| at
org.hibernate.impl.SessionImpl.checkTransactionSynchStatus(SessionImpl.java:1824)
|
So I have no idea (yet) if setting up the conversation in beforePhase
RESTORE_VIEW is actually a workaround to using Seam components at that time.
What I'm ultimately looking for is a valid way to start using Seam components,
conversation scoped at least, when createView of a ViewHandler is called.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=3939626#3939626
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=3939626
-------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
JBoss-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/jboss-user