> After spending some time, albeit very little, tinkering with JSP samples I'm
> still
> confused about the much touted integration between JSP and EJB.
>
> My question is:
>
> How do I reconcile the two stage creation of Session Beans, that is,
> 1-) EJBHome =  JNDIContext->FindHome
> 2-) EJBHome->Create()
>
> with the JSP <usebean> mechanism that expects a no arg constructor returning
> a ready to be used instance. Do I have to write some sort of wrapper
> JavaBeans around EJB stubs by hand?
>
> Unrelated question:
> Is the controversial processRequest still in?
>
> Thanks in advance.
> Ubaldo

        Ubaldo,
                The <jsp:useBean ... > tag in JSP 1.0 is not intended to abstract
        the construction/initialization of an EJB, it is intended to be used in
        conjection with plain JavaBeans. Better EJB support is under investigation
        for JSP 1.1.

        FOr now, I would encourage you to build JavaBean "proxies" to EJB's that
        encapsulate their creation and expose their API, then you can use the
        usebean tag to include them in your pages.

        Rgds

        - Larry Cable.

        P.S
                I'm afraid that processRequest() is out .... having said that one
        could easily simulate/replace it with:

        <jsp:setProperty name="fooBean" property="pageContext" value="<%= pageContext 
%>" />

        or:

        <% fooBean.processRequest(pageContext); %>

        Although you should not take this as an "official" endorsement of this pattern!

===========================================================================
To unsubscribe, send email to [EMAIL PROTECTED] and include in the body
of the message "signoff JSP-INTEREST".  For general help, send email to
[EMAIL PROTECTED] and include in the body of the message "help".

Reply via email to