click-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Bob Schellink <sab...@gmail.com>
Subject Re: EJB 3.1 injection of a SessionBean in a click page
Date Wed, 14 Apr 2010 13:41:02 GMT
Hi Manuel,

Great work. I assume this was done with Glassfish 3?

So I am correct in saying that as long as CDI created the Page it automatically injected EJB

annotated services?


One thing I'm not sure of is this:

   * The jndi name under which the BeanManager can be found according to the CDI spec in a
JEE6 app 
server
  public static final String CDI_BEANMANAGER_JNDILOOKUPNAME = "java:comp/BeanManager";


I've found that certain containers doesn't use the 'java:' prefix for JNDI lookups. Do you
have a 
reference where this name is specified in the spec?

kind regards

bob


On 14/04/2010 22:01, Manuel Chinea wrote:
> Hi,
>
> I a have managed to do a cdi- based click servlet. Alpha quality code
> yet (no error or edge cases handling, no javadoc), but it creates the
> Page objects through the cdi api.
>
> Here is the JIRA issue https://issues.apache.org/jira/browse/CLK-656
> with some instructions on the use of the Servlet.
>
> So far i have tested injecting EJB (with the @EJB annotation) and Plain
> POJOs using Producers.
>
> regards
>
> 2010/4/12 Bob Schellink <sabob1@gmail.com <mailto:sabob1@gmail.com>>
>
>     On 12/04/2010 23:19, Manuel Chinea wrote:
>
>
>         Ok, i meant more of a project-specific Page, like MyPage, not the
>         Framework specific Page.
>
>
>
>     Ah nods, I meant an application specific page as well. You can
>     certainly do this in a BasePage or BorderPage, however the reason
>     I'm suggesting you don't, is your BasePage can grow quite large as
>     the number of services grow. We've found that large super pages can
>     be difficult to digest by new developers working on our application.
>
>     However since everybody's needs is different a super page exposing
>     services might not pose a problem in your case. And if down the road
>     it does, you can easily refactor the services into a separate
>     Service Locator or Service Factory class.
>
>
>
>         Ah, that is very interesting. I totally forgot about the
>         ClickServlet!.
>         I'll take a look on that option. That way i'll learn a little
>         bit more
>         of Apache Click in the process! ;).
>
>
>     Agreed :)
>
>     I'm also hoping a future release of Click could expose a page
>     creation service interface so the ClickServlet doesn't have to be
>     subclassed.
>
>     kind regards
>
>     bob
>
>
> --
> Manuel Chinea.


Mime
View raw message