Hi,
I have a the following producer method
@Named("contextRoot")
@Produces
@ConversationScoped
@ContextRoot
public CmApplication getContextRoot() {
return (CmApplication) db.getCompositeRoots().get(0);
}
and I reference it in jsf <h:inputText id="rootLabel"
value="#{contextRoot.name}" />
When I navigate to the page before the producer method gets called the
object is instantiated by owb/codi. Is this avoidable?
Thread [qtp165149691-27] (Suspended (breakpoint at line 50 in
CmApplication))
CmApplication_$$_javassist_31(CmApplication).<init>() line: 50
CmApplication_$$_javassist_31.<init>() line: not available
NativeConstructorAccessorImpl.newInstance0(Constructor, Object[])
line: not available [native method]
NativeConstructorAccessorImpl.newInstance(Object[]) line: 57
DelegatingConstructorAccessorImpl.newInstance(Object[]) line: 45
Constructor<T>.newInstance(Object...) line: 532
Class<T>.newInstance0() line: 372
Class<T>.newInstance() line: 325
JavassistProxyFactory.createNormalScopedBeanProxy(OwbBean<?>,
CreationalContext<?>) line: 204
BeanManagerImpl.getReference(Bean<?>, Type, CreationalContext<?>)
line: 940
WebBeansELResolver.getNormalScopedContextualInstance(BeanManagerImpl,
ELContextStore, ELContext, Bean<Object>, String) line: 152
WebBeansELResolver.getValue(ELContext, Object, Object) line: 141
FacesCompositeELResolver(CompositeELResolver).getValue(ELContext,
Object, Object) line: 58
FacesCompositeELResolver.getValue(ELContext, Object, Object) line: 142
AstIdentifier.getValue(EvaluationContext) line: 99
AstValue.getValue(EvaluationContext) line: 158
ValueExpressionImpl.getValue(ELContext) line: 219
WrappedValueExpression.getValue(ELContext) line: 68
TagValueExpression.getValue(ELContext) line: 85
_DeltaStateHelper.eval(Serializable) line: 243
HtmlInputText(UIOutput).getValue() line: 71
HtmlInputText(UIInput).getValue() line: 143
RendererUtils.getValue(UIComponent) line: 343
RendererUtils.getStringValue(FacesContext, UIComponent) line: 291
HtmlTextRenderer(HtmlTextRendererBase).renderInputBegin(FacesContext,
UIComponent) line: 169
HtmlTextRenderer(HtmlTextRendererBase).renderInput(FacesContext,
UIComponent) line: 158
HtmlTextRenderer(HtmlTextRendererBase).encodeEnd(FacesContext,
UIComponent) line: 75
HtmlInputText(UIComponentBase).encodeEnd(FacesContext) line: 519
RendererUtils.renderChild(FacesContext, UIComponent) line: 543
HtmlGridRenderer(HtmlGridRendererBase).renderChildren(FacesContext,
ResponseWriter, UIComponent, int) line: 315
HtmlGridRenderer(HtmlGridRendererBase).encodeEnd(FacesContext,
UIComponent) line: 150
HtmlPanelGrid(UIComponentBase).encodeEnd(FacesContext) line: 519
HtmlPanelGrid(UIComponent).encodeAll(FacesContext) line: 626
HtmlForm(UIComponent).encodeAll(FacesContext) line: 622
HtmlBody(UIComponent).encodeAll(FacesContext) line: 622
UIViewRoot(UIComponent).encodeAll(FacesContext) line: 622
FaceletViewDeclarationLanguage.renderView(FacesContext, UIViewRoot)
line: 1322
ViewHandlerImpl.renderView(FacesContext, UIViewRoot) line: 263
CodiViewHandler(ViewHandlerWrapper).renderView(FacesContext,
UIViewRoot) line: 59
ConversationAwareViewHandler(ViewHandlerWrapper).renderView(FacesContext, UIViewRoot)
line: 59
RenderResponseExecutor.execute(FacesContext) line: 85
LifecycleImpl.render(FacesContext) line: 239
CodiLifecycleWrapper.render(FacesContext) line: 132
FacesServlet.service(ServletRequest, ServletResponse) line: 191
ServletHolder.handle(Request, ServletRequest, ServletResponse)
line: 538
ServletHandler.doHandle(String, Request, HttpServletRequest,
HttpServletResponse) line: 478
ServletHandler(ScopedHandler).handle(String, Request,
HttpServletRequest, HttpServletResponse) line: 119
ConstraintSecurityHandler(SecurityHandler).handle(String, Request,
HttpServletRequest, HttpServletResponse) line: 517
SessionHandler.doHandle(String, Request, HttpServletRequest,
HttpServletResponse) line: 225
WebAppContext(ContextHandler).doHandle(String, Request,
HttpServletRequest, HttpServletResponse) line: 937
ServletHandler.doScope(String, Request, HttpServletRequest,
HttpServletResponse) line: 406
SessionHandler.doScope(String, Request, HttpServletRequest,
HttpServletResponse) line: 183
WebAppContext(ContextHandler).doScope(String, Request,
HttpServletRequest, HttpServletResponse) line: 871
WebAppContext(ScopedHandler).handle(String, Request,
HttpServletRequest, HttpServletResponse) line: 117
ContextHandlerCollection.handle(String, Request,
HttpServletRequest, HttpServletResponse) line: 247
Server(HandlerWrapper).handle(String, Request, HttpServletRequest,
HttpServletResponse) line: 110
Server.handle(HttpConnection) line: 346
SelectChannelConnector$SelectChannelHttpConnection(HttpConnection).handleRequest()
line: 589
HttpConnection$RequestHandler.headerComplete() line: 1048
HttpParser.parseNext() line: 601
HttpParser.parseAvailable() line: 214
SelectChannelConnector$SelectChannelHttpConnection(HttpConnection).handle()
line: 411
SelectChannelEndPoint.handle() line: 535
SelectChannelEndPoint$1.run() line: 40
QueuedThreadPool$3.run() line: 529
Thread.run() line: 679
The producer method is called afterwards.
Thanks
Pieter