OK found the following so far. Think I've got to the bottom of the ClassCastException
tho I'm still not sure whether
The @Startup annotation means that the Component.newInstance() gets called at the end of
the seam initialisation which creates a mapping of
"referenceSessionFactory" -> Component( referenceSessionFactory )
in the application context/scope. Unfortunately when the ManagedHibernateSession comes to
evaluate #{referenceSessionFactory} the JSF (RI) ScopedAttributeELResolver gets in first
and returns the value in the application scope which is the component itself, rather than
the unwrapped SessionFactory.
Not sure why this only happens when the @Create method is being called. I found that
outside the @Create method then the SeamVariableResolver gets first go at resolving the
"referenceSessionFactory" and presumably does the proper unwrapping. Is this
VariableResolver perhaps not enabled until after the @Create method is called?
I'll continue looking around.
Cheers.
Mike.
View the original post :
http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4009963#...
Reply to the post :
http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&a...